@farm.js/core 0.1.86 → 0.1.87

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 (232) hide show
  1. package/dist/{agent-mcp.d-7uKdOttc.d.ts → agent-mcp.d-BdM0pIrD.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-LChlR2au.d.mts → agent-mcp.d-CMGqpUbk.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +1 -1
  4. package/dist/agent-runtime.d.ts +1 -1
  5. package/dist/analyzer-LLU2Z6I4.cjs +17 -0
  6. package/dist/{analyzer-I5S5YKHM.mjs → analyzer-W4EB7DHL.mjs} +2 -2
  7. package/dist/api/node.d.mts +3 -3
  8. package/dist/api/node.d.ts +3 -3
  9. package/dist/api/route-manager.cjs +3 -3
  10. package/dist/api/route-manager.d.mts +3 -3
  11. package/dist/api/route-manager.d.ts +3 -3
  12. package/dist/api/route-manager.mjs +2 -2
  13. package/dist/api/runtime.d.mts +2 -2
  14. package/dist/api/runtime.d.ts +2 -2
  15. package/dist/api.cjs +4 -4
  16. package/dist/api.d.mts +4 -4
  17. package/dist/api.d.ts +4 -4
  18. package/dist/api.mjs +3 -3
  19. package/dist/{app-manifest.d-QMdmqqCr.d.mts → app-manifest.d-BeDB2OVm.d.mts} +1 -1
  20. package/dist/{app-manifest.d-CRp21oAz.d.ts → app-manifest.d-COhjPgHn.d.ts} +1 -1
  21. package/dist/app-markdown.d.mts +2 -2
  22. package/dist/app-markdown.d.ts +2 -2
  23. package/dist/{app.d-Bvpc2eJq.d.mts → app.d-AVZXCfcO.d.mts} +5 -4
  24. package/dist/{app.d-DEKpJEp4.d.ts → app.d-b3A4cca5.d.ts} +5 -4
  25. package/dist/{chunk-SB74WCKC.mjs → chunk-26HESRBL.mjs} +4 -4
  26. package/dist/chunk-2HTNASSB.cjs +134 -0
  27. package/dist/{chunk-BAD6T5NU.cjs → chunk-33WR5XV5.cjs} +4 -4
  28. package/dist/{chunk-YMAE32O7.mjs → chunk-3F55K4MC.mjs} +1 -1
  29. package/dist/{chunk-CVKTYG4L.mjs → chunk-4FGTNYHE.mjs} +2 -2
  30. package/dist/{chunk-CFKAYV7B.mjs → chunk-5D73SKF3.mjs} +1 -1
  31. package/dist/{chunk-Q3YWQEUS.cjs → chunk-7BNVUIGL.cjs} +2 -2
  32. package/dist/{chunk-RA5OUXOJ.mjs → chunk-A2PPQ5LB.mjs} +2 -2
  33. package/dist/{chunk-KHIEGVG7.mjs → chunk-ALOFMAFA.mjs} +10 -4
  34. package/dist/{chunk-BLZCAFGJ.cjs → chunk-CXHVRHM2.cjs} +2 -2
  35. package/dist/{chunk-3RVLJTFZ.mjs → chunk-D7LXBLUW.mjs} +1 -1
  36. package/dist/{chunk-45ANSCTO.mjs → chunk-EZYNIADW.mjs} +63 -37
  37. package/dist/{chunk-NAHDG6UX.mjs → chunk-HFRG2IQS.mjs} +1 -1
  38. package/dist/{chunk-7H2TXT2K.mjs → chunk-HX5HLFBZ.mjs} +7 -0
  39. package/dist/{chunk-2NKNP4AH.cjs → chunk-HYL372GW.cjs} +1 -1
  40. package/dist/{chunk-25JGHAGH.cjs → chunk-I2RBHZF7.cjs} +15 -8
  41. package/dist/{chunk-NXOZRI3B.cjs → chunk-IM422XKU.cjs} +2 -2
  42. package/dist/{chunk-6QYPP5KC.mjs → chunk-K5FLQJW5.mjs} +2 -2
  43. package/dist/chunk-K6RMOB25.mjs +134 -0
  44. package/dist/{chunk-UAQQUQWE.mjs → chunk-LBJOHMTB.mjs} +1 -1
  45. package/dist/{chunk-QYWP5KDY.mjs → chunk-LIWVPE72.mjs} +59 -21
  46. package/dist/{chunk-FDU4Q4QP.cjs → chunk-MZR22RAC.cjs} +10 -4
  47. package/dist/chunk-NDMPGFKL.cjs +47 -0
  48. package/dist/{chunk-YHM4PXJY.mjs → chunk-O5YM6GU3.mjs} +1 -1
  49. package/dist/{chunk-GWPANDW3.mjs → chunk-O7K4HMAQ.mjs} +1 -1
  50. package/dist/{chunk-7UTRNV6R.mjs → chunk-Q73LRKLP.mjs} +1 -1
  51. package/dist/{chunk-3TKGMIPX.mjs → chunk-QLRI2BX5.mjs} +90 -11
  52. package/dist/{chunk-PAENAKTC.mjs → chunk-QSDIJ45N.mjs} +1 -1
  53. package/dist/{chunk-UDWBTABT.cjs → chunk-RGYS5OPL.cjs} +3 -3
  54. package/dist/{chunk-FWLXYNWA.cjs → chunk-SDNYULFS.cjs} +347 -321
  55. package/dist/chunk-TCGPBSVY.mjs +47 -0
  56. package/dist/{chunk-P253SZJF.cjs → chunk-TI4BZV6M.cjs} +353 -274
  57. package/dist/{chunk-QYDGIXQ5.cjs → chunk-U3A46QFD.cjs} +9 -9
  58. package/dist/{chunk-VGHDPEPQ.cjs → chunk-UA77C2ZA.cjs} +2 -2
  59. package/dist/{chunk-U54REWMJ.cjs → chunk-VCI776NG.cjs} +13 -13
  60. package/dist/{chunk-IAERD73G.cjs → chunk-VCZ4EM5K.cjs} +367 -329
  61. package/dist/{chunk-5P65LXGU.cjs → chunk-WSQ3S3NV.cjs} +2 -2
  62. package/dist/{chunk-VTEAUQMT.mjs → chunk-X2SMVPLH.mjs} +19 -3
  63. package/dist/{chunk-TQJ35BBW.cjs → chunk-XFUPWRKT.cjs} +4 -4
  64. package/dist/{chunk-DJ3PVHTW.cjs → chunk-XGPRM7OK.cjs} +3 -3
  65. package/dist/{chunk-CPSFDQKJ.cjs → chunk-Z43CIBUR.cjs} +20 -4
  66. package/dist/{chunk-L2IULWKV.cjs → chunk-ZCX2XJPY.cjs} +3 -3
  67. package/dist/{cli-runtime.d-DaElKjaL.d.ts → cli-runtime.d-jqZ7YCsm.d.ts} +5 -5
  68. package/dist/{cli-runtime.d-C7aMfoTq.d.mts → cli-runtime.d-qL44rqYO.d.mts} +5 -5
  69. package/dist/{client-component.d-miqIXyQv.d.mts → client-component.d-B2L2LyAr.d.mts} +1 -1
  70. package/dist/{client-component.d-CZG02pIh.d.ts → client-component.d-BDD5aiUb.d.ts} +1 -1
  71. package/dist/{client-plugins.d-BVXjyIkY.d.ts → client-plugins.d-Crct3m_r.d.ts} +14 -5
  72. package/dist/{client-plugins.d-BwKwuO_0.d.mts → client-plugins.d-Dzc3vOw_.d.mts} +14 -5
  73. package/dist/client-plugins.d.mts +1 -1
  74. package/dist/client-plugins.d.ts +1 -1
  75. package/dist/client.d.mts +8 -7
  76. package/dist/client.d.ts +8 -7
  77. package/dist/config.d.mts +1 -1
  78. package/dist/config.d.ts +1 -1
  79. package/dist/desktop.d.mts +2 -2
  80. package/dist/desktop.d.ts +2 -2
  81. package/dist/{devtools-A3L7WNTB.cjs → devtools-GPIKZ5AV.cjs} +5 -3
  82. package/dist/{devtools-DGC2247E.mjs → devtools-GWJZPWIW.mjs} +4 -2
  83. package/dist/docs.cjs +6 -4
  84. package/dist/docs.d.mts +3 -3
  85. package/dist/docs.d.ts +3 -3
  86. package/dist/docs.mjs +5 -3
  87. package/dist/environment/vite.cjs +4 -4
  88. package/dist/environment/vite.mjs +3 -3
  89. package/dist/font.cjs +4 -2
  90. package/dist/font.d.mts +13 -1
  91. package/dist/font.d.ts +13 -1
  92. package/dist/font.mjs +3 -1
  93. package/dist/{handler.d-BKTWzzNA.d.mts → handler.d-B1S1ZBqS.d.mts} +1 -1
  94. package/dist/{handler.d-Dzpyg3-N.d.ts → handler.d-ZweCBJD4.d.ts} +1 -1
  95. package/dist/{headers.d-PZyXcDAH.d.ts → headers.d-BgBdQN8x.d.ts} +1 -1
  96. package/dist/{headers.d-5opjyhXw.d.mts → headers.d-C-yGl_f6.d.mts} +1 -1
  97. package/dist/image-attributes.d-BMPDQO1q.d.mts +55 -0
  98. package/dist/image-attributes.d-BMPDQO1q.d.ts +55 -0
  99. package/dist/image.cjs +5 -127
  100. package/dist/image.d.mts +3 -13
  101. package/dist/image.d.ts +3 -13
  102. package/dist/image.mjs +5 -127
  103. package/dist/index.cjs +24 -22
  104. package/dist/{index.d-C0Mie66f.d.mts → index.d-13h3oDu7.d.mts} +1 -1
  105. package/dist/{index.d-DV2q-0mE.d.ts → index.d-CtoniAXT.d.ts} +1 -1
  106. package/dist/index.d.mts +24 -23
  107. package/dist/index.d.ts +24 -23
  108. package/dist/index.mjs +23 -21
  109. package/dist/integrations/orm.d.mts +1 -1
  110. package/dist/integrations/orm.d.ts +1 -1
  111. package/dist/integrations.d.mts +1 -1
  112. package/dist/integrations.d.ts +1 -1
  113. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  114. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  115. package/dist/internal/build-runtime.cjs +19 -19
  116. package/dist/internal/build-runtime.d.mts +4 -4
  117. package/dist/internal/build-runtime.d.ts +4 -4
  118. package/dist/internal/build-runtime.mjs +18 -18
  119. package/dist/internal/cli-runtime.cjs +5 -3
  120. package/dist/internal/cli-runtime.d.mts +7 -7
  121. package/dist/internal/cli-runtime.d.ts +7 -7
  122. package/dist/internal/cli-runtime.mjs +4 -2
  123. package/dist/internal/client-error-overlay.cjs +4 -4
  124. package/dist/internal/client-error-overlay.mjs +1 -1
  125. package/dist/internal/client-runtime.cjs +66 -40
  126. package/dist/internal/client-runtime.d.mts +6 -6
  127. package/dist/internal/client-runtime.d.ts +6 -6
  128. package/dist/internal/client-runtime.mjs +53 -27
  129. package/dist/internal/compression-runtime.d.mts +1 -1
  130. package/dist/internal/compression-runtime.d.ts +1 -1
  131. package/dist/internal/config-runtime.cjs +6 -4
  132. package/dist/internal/config-runtime.d.mts +3 -3
  133. package/dist/internal/config-runtime.d.ts +3 -3
  134. package/dist/internal/config-runtime.mjs +5 -3
  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-boot.cjs +44 -16
  138. package/dist/internal/islands-boot.d.mts +3 -1
  139. package/dist/internal/islands-boot.d.ts +3 -1
  140. package/dist/internal/islands-boot.mjs +28 -0
  141. package/dist/internal/native-server-fns.cjs +4 -4
  142. package/dist/internal/native-server-fns.mjs +3 -3
  143. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  144. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  145. package/dist/internal/production-runtime.cjs +6 -6
  146. package/dist/internal/production-runtime.d.mts +10 -10
  147. package/dist/internal/production-runtime.d.ts +10 -10
  148. package/dist/internal/production-runtime.mjs +5 -5
  149. package/dist/internal/renderer-islands.cjs +35 -8
  150. package/dist/internal/renderer-islands.d.mts +9 -1
  151. package/dist/internal/renderer-islands.d.ts +9 -1
  152. package/dist/internal/renderer-islands.mjs +35 -8
  153. package/dist/internal/spa-router.d.mts +3 -3
  154. package/dist/internal/spa-router.d.ts +3 -3
  155. package/dist/internal/start-manifest.d.mts +1 -1
  156. package/dist/internal/start-manifest.d.ts +1 -1
  157. package/dist/{island-runtime.d-BA7EPo1v.d.ts → island-runtime.d-D2Mh5eTU.d.ts} +5 -1
  158. package/dist/{island-runtime.d-BBS_YUSX.d.mts → island-runtime.d-lrpEJlgg.d.mts} +5 -1
  159. package/dist/markdown.d.mts +1 -1
  160. package/dist/markdown.d.ts +1 -1
  161. package/dist/middleware.cjs +4 -4
  162. package/dist/middleware.d.mts +1 -1
  163. package/dist/middleware.d.ts +1 -1
  164. package/dist/middleware.mjs +3 -3
  165. package/dist/{mount.d-gWul1GA1.d.ts → mount.d-DyKlRR6z.d.ts} +1 -1
  166. package/dist/{mount.d-CZ_qL1iS.d.mts → mount.d-_6Un9wdK.d.mts} +1 -1
  167. package/dist/{navigation-delegate.d-BBTzhJLj.d.mts → navigation-delegate.d-ChfinbWB.d.mts} +1 -1
  168. package/dist/{navigation-delegate.d-BZsYEAet.d.ts → navigation-delegate.d-fMgELdAe.d.ts} +1 -1
  169. package/dist/navigation.d.mts +4 -4
  170. package/dist/navigation.d.ts +4 -4
  171. package/dist/{plugin-QOTAPTVV.mjs → plugin-EVKQZBNW.mjs} +1 -1
  172. package/dist/{plugin-3PT7I26P.cjs → plugin-MWO3G2XM.cjs} +2 -2
  173. package/dist/plugin.cjs +16 -16
  174. package/dist/plugin.d.mts +5 -5
  175. package/dist/plugin.d.ts +5 -5
  176. package/dist/plugin.mjs +15 -15
  177. package/dist/{render-plan.d-AaJsYPX-.d.ts → render-plan.d-D0FV9lDT.d.ts} +1 -1
  178. package/dist/{render-plan.d-bnWxS12w.d.mts → render-plan.d-DaM1NPnm.d.mts} +1 -1
  179. package/dist/renderer-client.cjs +6 -1
  180. package/dist/renderer-client.d.mts +6 -5
  181. package/dist/renderer-client.d.ts +6 -5
  182. package/dist/renderer-client.mjs +5 -0
  183. package/dist/renderer.cjs +3 -3
  184. package/dist/renderer.mjs +2 -2
  185. package/dist/{request.d-CAeitOG1.d.ts → request.d-CrXC7voZ.d.ts} +1 -1
  186. package/dist/{request.d-C2HOn3Hi.d.mts → request.d-DVSLilGx.d.mts} +1 -1
  187. package/dist/request.d.mts +2 -2
  188. package/dist/request.d.ts +2 -2
  189. package/dist/{route-rendering.d-CYA-ulnX.d.mts → route-rendering.d-CWi3UYtR.d.mts} +1 -1
  190. package/dist/{route-rendering.d-A1dIkUK5.d.ts → route-rendering.d-OfbM_rj8.d.ts} +1 -1
  191. package/dist/{router.d-A_Yt6jYz.d.ts → router.d-D5Mp7bpO.d.ts} +1 -1
  192. package/dist/{router.d-8lxnzlkr.d.mts → router.d-DrQ1QDFk.d.mts} +1 -1
  193. package/dist/routes.d.mts +1 -1
  194. package/dist/routes.d.ts +1 -1
  195. package/dist/{rsc-pipeline-BROS3NEB.mjs → rsc-pipeline-KLMQU3YP.mjs} +5 -3
  196. package/dist/{rsc-pipeline-SNGPAXGW.cjs → rsc-pipeline-TQOSDWOU.cjs} +6 -4
  197. package/dist/{runtime-SLJLW37A.mjs → runtime-BDPBO65S.mjs} +5 -3
  198. package/dist/{runtime-7T5TRAWL.cjs → runtime-CQSCRVZ7.cjs} +7 -5
  199. package/dist/{runtime.d-C_rZ9_DD.d.mts → runtime.d-BVj6apd0.d.mts} +1 -1
  200. package/dist/{runtime.d-BPyvWrgQ.d.ts → runtime.d-D7QYVJGO.d.ts} +1 -1
  201. package/dist/{server-components-status.d-BpxiEMQE.d.mts → server-components-status.d-BDVcxi0z.d.mts} +1 -1
  202. package/dist/{server-components-status.d-C2UEKJn7.d.ts → server-components-status.d-CfKDpmCH.d.ts} +1 -1
  203. package/dist/server-plugins.d.mts +3 -3
  204. package/dist/server-plugins.d.ts +3 -3
  205. package/dist/server.cjs +37 -37
  206. package/dist/server.d.mts +11 -11
  207. package/dist/server.d.ts +11 -11
  208. package/dist/server.mjs +17 -17
  209. package/dist/{spa-router.d-Cw5i_15e.d.ts → spa-router.d-BXxoU3Cv.d.ts} +2 -2
  210. package/dist/{spa-router.d-BD-6WX1R.d.mts → spa-router.d-CXgvy-7L.d.mts} +2 -2
  211. package/dist/{ssg.d-CCE9aob5.d.mts → ssg.d-DS-gXUbf.d.mts} +2 -2
  212. package/dist/{ssg.d-Bifiq0EL.d.ts → ssg.d-jXlUAKzg.d.ts} +2 -2
  213. package/dist/{store-core.d-BN2MxSG9.d.mts → store-core.d-CDbVAbTn.d.mts} +3 -2
  214. package/dist/{store-core.d-5tVn5vi1.d.ts → store-core.d-D00BsbnO.d.ts} +3 -2
  215. package/dist/testing.cjs +2 -2
  216. package/dist/testing.d.mts +1 -1
  217. package/dist/testing.d.ts +1 -1
  218. package/dist/testing.mjs +2 -2
  219. package/dist/{utils.d-BUjpSNIO.d.ts → utils.d-BODwBtkz.d.ts} +1 -1
  220. package/dist/{utils.d-wGPLeVbq.d.mts → utils.d-Cmj-fzds.d.mts} +1 -1
  221. package/dist/version.cjs +2 -2
  222. package/dist/version.mjs +1 -1
  223. package/dist/vite.cjs +21 -19
  224. package/dist/vite.d.mts +21 -7
  225. package/dist/vite.d.ts +21 -7
  226. package/dist/vite.mjs +20 -18
  227. package/package.json +2 -2
  228. package/dist/analyzer-OEMQSLYT.cjs +0 -17
  229. package/dist/chunk-7EPYN7GW.cjs +0 -30
  230. package/dist/chunk-HZOMT5DY.mjs +0 -30
  231. package/dist/{chunk-4B6YJ5DS.cjs → chunk-4ZVKDHS6.cjs} +3 -3
  232. package/dist/{chunk-4EEAPBNV.mjs → chunk-PEQJ4UUT.mjs} +3 -3
@@ -43,7 +43,8 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkP253SZJFcjs = require('./chunk-P253SZJF.cjs');
46
+
47
+ var _chunkTI4BZV6Mcjs = require('./chunk-TI4BZV6M.cjs');
47
48
 
48
49
 
49
50
 
@@ -61,10 +62,8 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
61
62
  var _chunkXMVZXZ32cjs = require('./chunk-XMVZXZ32.cjs');
62
63
 
63
64
 
64
- var _chunkCPSFDQKJcjs = require('./chunk-CPSFDQKJ.cjs');
65
-
65
+ var _chunk33WR5XV5cjs = require('./chunk-33WR5XV5.cjs');
66
66
 
67
- var _chunkBAD6T5NUcjs = require('./chunk-BAD6T5NU.cjs');
68
67
 
69
68
 
70
69
 
@@ -72,8 +71,7 @@ var _chunkBAD6T5NUcjs = require('./chunk-BAD6T5NU.cjs');
72
71
 
73
72
 
74
73
 
75
-
76
- var _chunk4B6YJ5DScjs = require('./chunk-4B6YJ5DS.cjs');
74
+ var _chunk4ZVKDHS6cjs = require('./chunk-4ZVKDHS6.cjs');
77
75
 
78
76
 
79
77
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -91,13 +89,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
91
89
 
92
90
 
93
91
 
94
- var _chunkTQJ35BBWcjs = require('./chunk-TQJ35BBW.cjs');
92
+ var _chunkXFUPWRKTcjs = require('./chunk-XFUPWRKT.cjs');
95
93
 
96
94
 
97
95
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
98
96
 
99
97
 
100
- var _chunkNXOZRI3Bcjs = require('./chunk-NXOZRI3B.cjs');
98
+ var _chunkIM422XKUcjs = require('./chunk-IM422XKU.cjs');
101
99
 
102
100
 
103
101
 
@@ -105,7 +103,7 @@ var _chunkNXOZRI3Bcjs = require('./chunk-NXOZRI3B.cjs');
105
103
  var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
106
104
 
107
105
 
108
- var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
106
+ var _chunkNDMPGFKLcjs = require('./chunk-NDMPGFKL.cjs');
109
107
 
110
108
 
111
109
 
@@ -148,7 +146,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
148
146
 
149
147
 
150
148
 
151
- var _chunkQYDGIXQ5cjs = require('./chunk-QYDGIXQ5.cjs');
149
+ var _chunkU3A46QFDcjs = require('./chunk-U3A46QFD.cjs');
152
150
 
153
151
 
154
152
 
@@ -172,6 +170,9 @@ var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
172
170
  var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
173
171
 
174
172
 
173
+ var _chunkZ43CIBURcjs = require('./chunk-Z43CIBUR.cjs');
174
+
175
+
175
176
 
176
177
 
177
178
  var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
@@ -196,10 +197,6 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
196
197
  var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
197
198
 
198
199
 
199
-
200
- var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
201
-
202
-
203
200
  var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
204
201
 
205
202
 
@@ -234,7 +231,7 @@ var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
234
231
  var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
235
232
 
236
233
 
237
- var _chunkVGHDPEPQcjs = require('./chunk-VGHDPEPQ.cjs');
234
+ var _chunkUA77C2ZAcjs = require('./chunk-UA77C2ZA.cjs');
238
235
 
239
236
 
240
237
 
@@ -250,7 +247,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
250
247
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
251
248
 
252
249
 
253
- var _chunk5P65LXGUcjs = require('./chunk-5P65LXGU.cjs');
250
+ var _chunkWSQ3S3NVcjs = require('./chunk-WSQ3S3NV.cjs');
254
251
 
255
252
 
256
253
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -283,7 +280,7 @@ var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
283
280
 
284
281
 
285
282
 
286
- var _chunk25JGHAGHcjs = require('./chunk-25JGHAGH.cjs');
283
+ var _chunkI2RBHZF7cjs = require('./chunk-I2RBHZF7.cjs');
287
284
 
288
285
 
289
286
 
@@ -313,13 +310,17 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
313
310
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
314
311
 
315
312
 
316
- var _chunk2NKNP4AHcjs = require('./chunk-2NKNP4AH.cjs');
313
+ var _chunkHYL372GWcjs = require('./chunk-HYL372GW.cjs');
317
314
 
318
315
 
319
316
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
320
317
 
321
318
 
322
319
 
320
+ var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
321
+
322
+
323
+
323
324
  var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
324
325
 
325
326
 
@@ -714,7 +715,7 @@ function findClientServerFnViolation(code, id) {
714
715
  return null;
715
716
  }
716
717
  function createServerFnBoundaryDiagnostic(violation, id, location) {
717
- return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
718
+ return _chunkU3A46QFDcjs.createFarmDiagnostic.call(void 0,
718
719
  "CLIENT_SERVER_FUNCTION",
719
720
  id,
720
721
  `${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.`,
@@ -973,21 +974,21 @@ function readPropertyKey(property) {
973
974
  function createClientBoundaryDiagnostic(file, finding, location) {
974
975
  switch (finding.kind) {
975
976
  case "server-env":
976
- return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
977
+ return _chunkU3A46QFDcjs.createFarmDiagnostic.call(void 0,
977
978
  "CLIENT_SERVER_ENV",
978
979
  file,
979
980
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
980
981
  location
981
982
  );
982
983
  case "public-env":
983
- return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
984
+ return _chunkU3A46QFDcjs.createFarmDiagnostic.call(void 0,
984
985
  "CLIENT_PROCESS_ENV_PUBLIC",
985
986
  file,
986
987
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
987
988
  location
988
989
  );
989
990
  case "builtin":
990
- return _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
991
+ return _chunkU3A46QFDcjs.createFarmDiagnostic.call(void 0,
991
992
  "CLIENT_NODE_BUILTIN",
992
993
  file,
993
994
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1289,7 +1290,7 @@ function loadFarmWorkflowsDevRuntime() {
1289
1290
  return import("./workflows.cjs");
1290
1291
  }
1291
1292
  function loadFarmDevtoolsSnapshotRuntime() {
1292
- return import("./devtools-A3L7WNTB.cjs");
1293
+ return import("./devtools-GPIKZ5AV.cjs");
1293
1294
  }
1294
1295
  function loadFarmDevtoolsUIRuntime() {
1295
1296
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1339,16 +1340,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1339
1340
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1340
1341
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1341
1342
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1342
- _chunkP253SZJFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1343
- new RegExp(`^${_chunkQYDGIXQ5cjs.FARM_RESOLVE_FROM_PREFIX}`),
1343
+ _chunkTI4BZV6Mcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1344
+ new RegExp(`^${_chunkU3A46QFDcjs.FARM_RESOLVE_FROM_PREFIX}`),
1344
1345
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1345
1346
  // included.
1346
1347
  /^node:/,
1347
- _chunkP253SZJFcjs.exactIdPattern.call(void 0, _module.builtinModules)
1348
+ _chunkTI4BZV6Mcjs.exactIdPattern.call(void 0, _module.builtinModules)
1348
1349
  ];
1349
1350
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1350
- _chunkP253SZJFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1351
- new RegExp(`^${_chunkQYDGIXQ5cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1351
+ _chunkTI4BZV6Mcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1352
+ new RegExp(`^${_chunkU3A46QFDcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1352
1353
  ];
1353
1354
  function createFarmPlatformClientModule(platform) {
1354
1355
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1384,18 +1385,18 @@ function farmIslandContainersPlugin(config) {
1384
1385
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1385
1386
  return null;
1386
1387
  }
1387
- if (_chunkQYDGIXQ5cjs.hasUseClientDirective.call(void 0, code)) return null;
1388
+ if (_chunkU3A46QFDcjs.hasUseClientDirective.call(void 0, code)) return null;
1388
1389
  const file = id.split("?", 1)[0];
1389
- const bindings = _chunkQYDGIXQ5cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1390
+ const bindings = _chunkU3A46QFDcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1390
1391
  if (bindings.length === 0) return null;
1391
- const grown = _chunkQYDGIXQ5cjs.wrapFarmIslandContainers.call(void 0, {
1392
+ const grown = _chunkU3A46QFDcjs.wrapFarmIslandContainers.call(void 0, {
1392
1393
  code,
1393
1394
  file,
1394
1395
  bindings,
1395
- reference: _chunkQYDGIXQ5cjs.farmIslandContainerReferencePath.call(void 0, root)
1396
+ reference: _chunkU3A46QFDcjs.farmIslandContainerReferencePath.call(void 0, root)
1396
1397
  });
1397
1398
  if (grown === null) return null;
1398
- _chunkQYDGIXQ5cjs.ensureFarmIslandContainerReference.call(void 0, root);
1399
+ _chunkU3A46QFDcjs.ensureFarmIslandContainerReference.call(void 0, root);
1399
1400
  return { code: grown, map: null };
1400
1401
  }
1401
1402
  };
@@ -1409,18 +1410,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1409
1410
  config(config) {
1410
1411
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1411
1412
  if (options.distDir) {
1412
- _chunkQYDGIXQ5cjs.usePackageScanCacheFile.call(void 0,
1413
+ _chunkU3A46QFDcjs.usePackageScanCacheFile.call(void 0,
1413
1414
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1414
1415
  );
1415
1416
  }
1416
- const bundledPackages = _chunkQYDGIXQ5cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1417
+ const bundledPackages = _chunkU3A46QFDcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1417
1418
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1418
- _chunkQYDGIXQ5cjs.persistPackageScanCache.call(void 0, );
1419
+ _chunkU3A46QFDcjs.persistPackageScanCache.call(void 0, );
1419
1420
  return {
1420
1421
  optimizeDeps: {
1421
1422
  // A package that defines fonts is served unbundled, so Farm's font compiler sees it.
1422
1423
  exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
1423
- rolldownOptions: { plugins: [_chunkQYDGIXQ5cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1424
+ rolldownOptions: { plugins: [_chunkU3A46QFDcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1424
1425
  },
1425
1426
  ssr: {
1426
1427
  noExternal: [
@@ -1446,8 +1447,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1446
1447
  return FARM_SERVER_ONLY_PACKAGE_ID;
1447
1448
  }
1448
1449
  this.error(
1449
- _chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
1450
- _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
1450
+ _chunkU3A46QFDcjs.formatFarmDiagnostic.call(void 0,
1451
+ _chunkU3A46QFDcjs.createFarmDiagnostic.call(void 0,
1451
1452
  "CLIENT_SERVER_ONLY_IMPORT",
1452
1453
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1453
1454
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1457,9 +1458,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1457
1458
  );
1458
1459
  }
1459
1460
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1460
- return _chunkQYDGIXQ5cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1461
+ return _chunkU3A46QFDcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1461
1462
  }
1462
- const resolveFrom = importer ? _chunkQYDGIXQ5cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1463
+ const resolveFrom = importer ? _chunkU3A46QFDcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1463
1464
  if (resolveFrom) {
1464
1465
  const directory = path6.dirname(resolveFrom.importer);
1465
1466
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1476,8 +1477,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1476
1477
  const importedBy = importer ? ` (imported by ${importer})` : "";
1477
1478
  if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1478
1479
  this.error(
1479
- _chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
1480
- _chunkQYDGIXQ5cjs.createFarmDiagnostic.call(void 0,
1480
+ _chunkU3A46QFDcjs.formatFarmDiagnostic.call(void 0,
1481
+ _chunkU3A46QFDcjs.createFarmDiagnostic.call(void 0,
1481
1482
  "CLIENT_SERVER_ONLY_ENTRY",
1482
1483
  _nullishCoalesce(importer, () => ( id)),
1483
1484
  `${id} is server-only and cannot be imported into client code.`
@@ -1502,7 +1503,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1502
1503
  if (id === FARM_PLATFORM_CLIENT_ID) {
1503
1504
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1504
1505
  }
1505
- return _nullishCoalesce(_chunkQYDGIXQ5cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1506
+ return _nullishCoalesce(_chunkU3A46QFDcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1506
1507
  }
1507
1508
  }
1508
1509
  };
@@ -1535,7 +1536,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1535
1536
  if (!snapshot) return "";
1536
1537
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1537
1538
  if (snapshot.routing === "none") return runtime;
1538
- return `${_chunk4B6YJ5DScjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1539
+ return `${_chunk4ZVKDHS6cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1539
1540
  }
1540
1541
  function getPublicEnvDefine(config) {
1541
1542
  const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
@@ -2116,7 +2117,7 @@ function transformIsolatedClientBoundaryModule(options) {
2116
2117
  return null;
2117
2118
  }
2118
2119
  const body = Array.isArray(ast.body) ? ast.body : [];
2119
- const everyExportIsComponent = options.code.includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2120
+ const everyExportIsComponent = options.code.includes(_chunkU3A46QFDcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkU3A46QFDcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2120
2121
  const replacements = [];
2121
2122
  const wrapperStatements = [];
2122
2123
  const originalEntries = [];
@@ -2271,16 +2272,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2271
2272
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2272
2273
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2273
2274
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2274
- if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkQYDGIXQ5cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2275
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkU3A46QFDcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2275
2276
  }
2276
2277
  findings.push(finding);
2277
2278
  }
2278
2279
  if (findings.length === 0) return;
2279
2280
  warnedClientBoundaryIds.add(id);
2280
- const locate = _chunkQYDGIXQ5cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2281
+ const locate = _chunkU3A46QFDcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2281
2282
  _chunk7U4XF76Rcjs.logger.warn(
2282
2283
  findings.map(
2283
- (finding) => _chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
2284
+ (finding) => _chunkU3A46QFDcjs.formatFarmDiagnostic.call(void 0,
2284
2285
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2285
2286
  config.root
2286
2287
  )
@@ -2299,6 +2300,22 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2299
2300
  function shouldEmitFarmClientRootHmr(renderer) {
2300
2301
  return _chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2301
2302
  }
2303
+ function reachesSharedFarmRendererIsland(graph, file, islandModules) {
2304
+ const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _106 => _106.getModulesByFile, 'call', _107 => _107(file)]), () => ( [])));
2305
+ const seen = new Set(queue);
2306
+ for (const node of queue) {
2307
+ if (node.file && islandModules.has(path6.resolve(node.file))) {
2308
+ if (node.importers.size > 0) return true;
2309
+ continue;
2310
+ }
2311
+ for (const importer of node.importers) {
2312
+ if (seen.has(importer)) continue;
2313
+ seen.add(importer);
2314
+ queue.push(importer);
2315
+ }
2316
+ }
2317
+ return false;
2318
+ }
2302
2319
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2303
2320
  function toFarmRuntimeModuleId(specifier) {
2304
2321
  return FARM_RUNTIME_MODULE_PREFIX + specifier;
@@ -2330,21 +2347,23 @@ function hasFarmSourceAliasOverride(alias) {
2330
2347
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2331
2348
  const rendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2332
2349
  const imageImports = farmImageImportsPlugin();
2333
- const fontImports = _chunkP253SZJFcjs.farmFontImportsPlugin.call(void 0, {
2350
+ const fontImports = _chunkTI4BZV6Mcjs.farmFontImportsPlugin.call(void 0, {
2334
2351
  root: options.root,
2335
2352
  basePath: options.basePath,
2336
- publicDir: options.publicDir
2353
+ publicDir: options.publicDir,
2354
+ // A production build never starts the app, so it reads the directories from these options.
2355
+ isLayoutModule: (id) => _chunkTI4BZV6Mcjs.isFarmLayoutModule.call(void 0, id, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _108 => _108.getConfig, 'call', _109 => _109()]), () => ( options))))
2337
2356
  });
2338
2357
  let farmApp;
2339
2358
  const isFarmGeneratedOutput = (file) => {
2340
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _106 => _106.getConfig, 'call', _107 => _107(), 'access', _108 => _108.root]), () => ( options.root));
2359
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111(), 'access', _112 => _112.root]), () => ( options.root));
2341
2360
  if (!root) return file.includes("/.farm/");
2342
2361
  const output = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2343
2362
  return file === output || file.startsWith(`${output}/`);
2344
2363
  };
2345
2364
  let serverFnTransformActive = false;
2346
2365
  const getFarmRenderedServerModules = () => {
2347
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _109 => _109.getRouteManager, 'call', _110 => _110()]);
2366
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _113 => _113.getRouteManager, 'call', _114 => _114()]);
2348
2367
  if (!routeManager) return /* @__PURE__ */ new Set();
2349
2368
  const files = /* @__PURE__ */ new Set();
2350
2369
  for (const entries of [
@@ -2364,8 +2383,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2364
2383
  if (mdxComponents) files.add(mdxComponents);
2365
2384
  return files;
2366
2385
  };
2367
- const islxActionsMode = () => _chunkP253SZJFcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2368
- const islandsServerFns = () => _chunkP253SZJFcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2386
+ const islxActionsMode = () => _chunkTI4BZV6Mcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _115 => _115.getConfig, 'call', _116 => _116()]), () => ( options)));
2387
+ const islandsServerFns = () => _chunkTI4BZV6Mcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
2369
2388
  let reactRefreshActive = false;
2370
2389
  let server;
2371
2390
  let deferredGates;
@@ -2394,9 +2413,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2394
2413
  ].join(" ");
2395
2414
  console.log(log);
2396
2415
  };
2397
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _115 => _115.getRouteManager, 'call', _116 => _116(), 'access', _117 => _117.getProgrammaticClientRoutes, 'call', _118 => _118()])));
2416
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _119 => _119.getRouteManager, 'call', _120 => _120(), 'access', _121 => _121.getProgrammaticClientRoutes, 'call', _122 => _122()])));
2398
2417
  const isOutsideAppRoot = (file) => {
2399
- const root = _optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120(), 'access', _121 => _121.root]) || _optionalChain([server, 'optionalAccess', _122 => _122.config, 'access', _123 => _123.root]) || options.root;
2418
+ const root = _optionalChain([farmApp, 'optionalAccess', _123 => _123.getConfig, 'call', _124 => _124(), 'access', _125 => _125.root]) || _optionalChain([server, 'optionalAccess', _126 => _126.config, 'access', _127 => _127.root]) || options.root;
2400
2419
  if (!root) return false;
2401
2420
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2402
2421
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2408,14 +2427,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2408
2427
  isBuild = configEnv.command === "build";
2409
2428
  const farmAliases = {
2410
2429
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2411
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkP253SZJFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2430
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _128 => _128.resolve, 'optionalAccess', _129 => _129.alias])) ? {} : _chunkTI4BZV6Mcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2412
2431
  };
2413
2432
  if (Object.keys(farmAliases).length > 0) {
2414
2433
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2415
- userConfig.resolve.alias = _chunkP253SZJFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2434
+ userConfig.resolve.alias = _chunkTI4BZV6Mcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2416
2435
  }
2417
2436
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2418
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
2437
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _130 => _130.server, 'optionalAccess', _131 => _131.cors]) === void 0;
2419
2438
  return {
2420
2439
  // Honor Farm's publicDir so the dev server serves the same static
2421
2440
  // directory the production client build emits.
@@ -2428,13 +2447,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2428
2447
  ...farmOwnsDevCors ? { cors: false } : {},
2429
2448
  fs: {
2430
2449
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2431
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _128 => _128.server, 'optionalAccess', _129 => _129.fs, 'optionalAccess', _130 => _130.deny]), options)
2450
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _132 => _132.server, 'optionalAccess', _133 => _133.fs, 'optionalAccess', _134 => _134.deny]), options)
2432
2451
  }
2433
2452
  }
2434
2453
  };
2435
2454
  },
2436
2455
  configEnvironment(name, environmentConfig, env) {
2437
- if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _131 => _131.dev, 'optionalAccess', _132 => _132.createEnvironment])) {
2456
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _135 => _135.dev, 'optionalAccess', _136 => _136.createEnvironment])) {
2438
2457
  return;
2439
2458
  }
2440
2459
  return {
@@ -2453,7 +2472,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2453
2472
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2454
2473
  );
2455
2474
  reactRefreshActive = _chunkY2FEFQAYcjs.isFarmReactRefreshActive.call(void 0, config);
2456
- if (_optionalChain([options, 'access', _133 => _133.experimental, 'optionalAccess', _134 => _134.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2475
+ if (_optionalChain([options, 'access', _137 => _137.experimental, 'optionalAccess', _138 => _138.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2457
2476
  _chunk7U4XF76Rcjs.logger.warn(
2458
2477
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2459
2478
  );
@@ -2462,20 +2481,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2462
2481
  async configureServer(viteServer) {
2463
2482
  viteServer.middlewares.use(
2464
2483
  createFarmDevPreviewGuard(viteServer, {
2465
- getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _135 => _135.getConfig, 'call', _136 => _136()]), () => ( options)))
2484
+ getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _139 => _139.getConfig, 'call', _140 => _140()]), () => ( options)))
2466
2485
  })
2467
2486
  );
2468
2487
  if (typeof fontImports.configureServer === "function") {
2469
2488
  await fontImports.configureServer.call(this, viteServer);
2470
2489
  }
2471
2490
  server = viteServer;
2472
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _137 => _137.pre, 'access', _138 => _138.target]), () => ( viteServer.middlewares));
2473
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _139 => _139.post, 'access', _140 => _140.target]), () => ( viteServer.middlewares));
2491
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _141 => _141.pre, 'access', _142 => _142.target]), () => ( viteServer.middlewares));
2492
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _143 => _143.post, 'access', _144 => _144.target]), () => ( viteServer.middlewares));
2474
2493
  const pm = initialPluginManager;
2475
2494
  const configRoutePlugins = new Set(
2476
- _optionalChain([pm, 'optionalAccess', _141 => _141.getPlugins, 'call', _142 => _142(), 'access', _143 => _143.filter, 'call', _144 => _144(isFarmConfigRoutePlugin), 'access', _145 => _145.map, 'call', _146 => _146((plugin2) => plugin2.name)])
2495
+ _optionalChain([pm, 'optionalAccess', _145 => _145.getPlugins, 'call', _146 => _146(), 'access', _147 => _147.filter, 'call', _148 => _148(isFarmConfigRoutePlugin), 'access', _149 => _149.map, 'call', _150 => _150((plugin2) => plugin2.name)])
2477
2496
  );
2478
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _147 => _147.getPlugins, 'call', _148 => _148()]), () => ( []))).flatMap((plugin2) => {
2497
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _151 => _151.getPlugins, 'call', _152 => _152()]), () => ( []))).flatMap((plugin2) => {
2479
2498
  const matcher = _chunkH7OFZJCVcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2480
2499
  return matcher ? [matcher] : [];
2481
2500
  });
@@ -2486,7 +2505,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2486
2505
  } catch (e21) {
2487
2506
  }
2488
2507
  };
2489
- farmApp = new (0, _chunkP253SZJFcjs.FarmApp)(
2508
+ farmApp = new (0, _chunkTI4BZV6Mcjs.FarmApp)(
2490
2509
  {
2491
2510
  ...options,
2492
2511
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2494,7 +2513,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2494
2513
  server
2495
2514
  );
2496
2515
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2497
- _chunkQYDGIXQ5cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2516
+ _chunkU3A46QFDcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2498
2517
  farmApp.getConfig().root,
2499
2518
  options.distDir || ".farm"
2500
2519
  )
@@ -2503,9 +2522,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2503
2522
  await farmApp.initialize();
2504
2523
  const farmConfig = farmApp.getConfig();
2505
2524
  let farmAppPackages;
2506
- if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2525
+ if (_optionalChain([farmConfig, 'access', _153 => _153.agent, 'optionalAccess', _154 => _154.noindexPreviews])) {
2507
2526
  farmMiddlewares.use((_req, res, next) => {
2508
- if (_chunkNXOZRI3Bcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2527
+ if (_chunkIM422XKUcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2509
2528
  res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2510
2529
  }
2511
2530
  next();
@@ -2513,7 +2532,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2513
2532
  }
2514
2533
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2515
2534
  const devBuiltInRoutePaths = new Set(
2516
- _chunkTQJ35BBWcjs.listFarmBuiltInRoutePaths.call(void 0, {
2535
+ _chunkXFUPWRKTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2517
2536
  agent: {
2518
2537
  apiCatalog: true,
2519
2538
  mcp: true,
@@ -2535,7 +2554,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2535
2554
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2536
2555
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2537
2556
  // a caller-controlled Host header.
2538
- trustedLocalOrigin: () => _optionalChain([server, 'access', _151 => _151.resolvedUrls, 'optionalAccess', _152 => _152.local, 'access', _153 => _153[0]]),
2557
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _155 => _155.resolvedUrls, 'optionalAccess', _156 => _156.local, 'access', _157 => _157[0]]),
2539
2558
  onError(error) {
2540
2559
  _chunk7U4XF76Rcjs.logger.error(
2541
2560
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2555,8 +2574,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2555
2574
  const workflowConfig = farmConfig.workflows;
2556
2575
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2557
2576
  const getExtraRouteTypes = () => [
2558
- ..._optionalChain([options, 'access', _154 => _154.openapi, 'optionalAccess', _155 => _155.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2559
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _156 => _156.getFarmDocsRouteTypeEntries, 'call', _157 => _157(farmConfig.docs)]), () => ( []))
2577
+ ..._optionalChain([options, 'access', _158 => _158.openapi, 'optionalAccess', _159 => _159.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2578
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _160 => _160.getFarmDocsRouteTypeEntries, 'call', _161 => _161(farmConfig.docs)]), () => ( []))
2560
2579
  ];
2561
2580
  const appDirSlugs = sourceRoots.map(
2562
2581
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
@@ -2605,7 +2624,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2605
2624
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2606
2625
  );
2607
2626
  const layerConfigFiles = new Set(
2608
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2627
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _162 => _162.configFile, 'optionalAccess', _163 => _163.replace, 'call', _164 => _164(/\\/g, "/")])).filter((file) => Boolean(file))
2609
2628
  );
2610
2629
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2611
2630
  ..._chunkT7UC2ORAcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -2632,7 +2651,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2632
2651
  );
2633
2652
  };
2634
2653
  const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2635
- 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;
2654
+ const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _165 => _165.getRouteManager, 'call', _166 => _166(), 'access', _167 => _167.isRendererRouteFile, 'call', _168 => _168(file)]) === true;
2636
2655
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2637
2656
  file.replace(/\\/g, "/")
2638
2657
  );
@@ -2663,7 +2682,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2663
2682
  ["add", "change", "unlink"].forEach((ev) => {
2664
2683
  server.watcher.on(ev, (file) => {
2665
2684
  if (ev === "add") {
2666
- _chunk25JGHAGHcjs.invalidateFailedFarmDevModules.call(void 0, server);
2685
+ _chunkI2RBHZF7cjs.invalidateFailedFarmDevModules.call(void 0, server);
2667
2686
  }
2668
2687
  const normalizedFile = file.replace(/\\/g, "/");
2669
2688
  const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
@@ -2679,7 +2698,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2679
2698
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2680
2699
  }
2681
2700
  if (isI18nCatalogFile(file)) {
2682
- _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}`))]);
2701
+ _optionalChain([farmApp, 'optionalAccess', _169 => _169.getI18nRuntime, 'call', _170 => _170(), 'access', _171 => _171.reload, 'call', _172 => _172(), 'access', _173 => _173.then, 'call', _174 => _174(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _175 => _175.catch, 'call', _176 => _176((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2683
2702
  }
2684
2703
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2685
2704
  if (isRouteRefreshEvent) {
@@ -2691,8 +2710,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2691
2710
  queuedRouteFiles = void 0;
2692
2711
  try {
2693
2712
  await Promise.all([
2694
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _173 => _173(`${ev} ${file}`)]),
2695
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _174 => _174.reload, 'call', _175 => _175()]) : void 0
2713
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _177 => _177(`${ev} ${file}`)]),
2714
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _178 => _178.reload, 'call', _179 => _179()]) : void 0
2696
2715
  ]);
2697
2716
  if (pendingRouteReloads.size === 1)
2698
2717
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2739,16 +2758,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2739
2758
  const dispatchToDevServer = _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server);
2740
2759
  if (options.mobileClient) {
2741
2760
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2742
- const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
2761
+ const load = (file) => _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, file);
2743
2762
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2744
- _optionalChain([server, 'access', _176 => _176.httpServer, 'optionalAccess', _177 => _177.once, 'call', _178 => _178("close", () => {
2763
+ _optionalChain([server, 'access', _180 => _180.httpServer, 'optionalAccess', _181 => _181.once, 'call', _182 => _182("close", () => {
2745
2764
  const globals = globalThis;
2746
2765
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2747
2766
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2748
2767
  }
2749
2768
  })]);
2750
2769
  }
2751
- apiRouteManager = new (0, _chunk5P65LXGUcjs.APIRouteManager)(appDirs, server, {
2770
+ apiRouteManager = new (0, _chunkWSQ3S3NVcjs.APIRouteManager)(appDirs, server, {
2752
2771
  plugins: farmConfig.plugins,
2753
2772
  i18n: farmApp.getI18nRuntime(),
2754
2773
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2772,14 +2791,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2772
2791
  discoveredWorkflows = await discoverFarmWorkflows(
2773
2792
  { ...farmConfig, workflows: workflowConfig },
2774
2793
  {
2775
- loadModule: async (filePath) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, filePath)
2794
+ loadModule: async (filePath) => _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, filePath)
2776
2795
  }
2777
2796
  );
2778
2797
  if (discoveredWorkflows.length > 0) {
2779
2798
  workflowHandler = createFarmWorkflowRequestHandler({
2780
2799
  workflows: discoveredWorkflows,
2781
2800
  config: workflowConfig,
2782
- loadModule: async (workflow) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
2801
+ loadModule: async (workflow) => _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
2783
2802
  server: farmConfig.server
2784
2803
  });
2785
2804
  _chunk7U4XF76Rcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
@@ -2794,7 +2813,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2794
2813
  });
2795
2814
  }
2796
2815
  }
2797
- middlewareManager = new (0, _chunkVGHDPEPQcjs.MiddlewareManager)(
2816
+ middlewareManager = new (0, _chunkUA77C2ZAcjs.MiddlewareManager)(
2798
2817
  appDirs,
2799
2818
  server,
2800
2819
  farmConfig.middleware,
@@ -2815,11 +2834,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2815
2834
  });
2816
2835
  }
2817
2836
  }
2818
- if (_optionalChain([options, 'access', _179 => _179.openapi, 'optionalAccess', _180 => _180.enabled])) {
2837
+ if (_optionalChain([options, 'access', _183 => _183.openapi, 'optionalAccess', _184 => _184.enabled])) {
2819
2838
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2820
2839
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2821
2840
  mode: "development",
2822
- apiBaseURL: typeof _optionalChain([options, 'access', _181 => _181.api, 'optionalAccess', _182 => _182.baseURL]) === "string" ? options.api.baseURL : void 0,
2841
+ apiBaseURL: typeof _optionalChain([options, 'access', _185 => _185.api, 'optionalAccess', _186 => _186.baseURL]) === "string" ? options.api.baseURL : void 0,
2823
2842
  routes: () => apiRouteManager.getRoutes().values(),
2824
2843
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2825
2844
  });
@@ -2847,10 +2866,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2847
2866
  const layoutModules = await Promise.all(
2848
2867
  layouts.map((layout) => routeManager.loadLayoutModule(layout.modulePath))
2849
2868
  );
2850
- return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2869
+ return _chunkNDMPGFKLcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2851
2870
  };
2852
2871
  releaseDocsMCPServers();
2853
- const isFarmDocsPathGuarded = (href) => _chunk4B6YJ5DScjs.farmPathGuardCoversPage.call(void 0,
2872
+ const isFarmDocsPathGuarded = (href) => _chunk4ZVKDHS6cjs.farmPathGuardCoversPage.call(void 0,
2854
2873
  {
2855
2874
  config: farmConfig,
2856
2875
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2864,20 +2883,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2864
2883
  rendererServer: farmConfig.renderer.server,
2865
2884
  resolveLayoutFonts: resolveDocsLayoutFonts,
2866
2885
  fontStylesheetHref: "/@farm/fonts.css",
2867
- globalStylesheetHref: _chunkP253SZJFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2886
+ globalStylesheetHref: _chunkTI4BZV6Mcjs.resolveDevGlobalStylesheetHref.call(void 0,
2868
2887
  farmConfig.root,
2869
2888
  farmConfig.srcDir
2870
2889
  ),
2871
2890
  loadModule: async (specifier) => {
2872
2891
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2873
- if (specifier === _optionalChain([farmConfig, 'access', _183 => _183.docs, 'access', _184 => _184.adapter, 'optionalAccess', _185 => _185.server]) && _optionalChain([resolved, 'optionalAccess', _186 => _186.id])) {
2892
+ if (specifier === _optionalChain([farmConfig, 'access', _187 => _187.docs, 'access', _188 => _188.adapter, 'optionalAccess', _189 => _189.server]) && _optionalChain([resolved, 'optionalAccess', _190 => _190.id])) {
2874
2893
  const file = resolved.id.split("?", 1)[0];
2875
2894
  return import(
2876
2895
  /* @vite-ignore */
2877
2896
  _url.pathToFileURL.call(void 0, file).href
2878
2897
  );
2879
2898
  }
2880
- return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _187 => _187.id]), () => ( specifier)));
2899
+ return _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _191 => _191.id]), () => ( specifier)));
2881
2900
  },
2882
2901
  registerMCPServer: (mcpServer) => {
2883
2902
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2895,7 +2914,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2895
2914
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2896
2915
  resolveLayoutFonts: resolveDocsLayoutFonts,
2897
2916
  fontStylesheetHref: "/@farm/fonts.css",
2898
- globalStylesheetHref: _chunkP253SZJFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2917
+ globalStylesheetHref: _chunkTI4BZV6Mcjs.resolveDevGlobalStylesheetHref.call(void 0,
2899
2918
  farmConfig.root,
2900
2919
  farmConfig.srcDir
2901
2920
  ),
@@ -2903,7 +2922,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2903
2922
  basePath: farmConfig.basePath
2904
2923
  }) : null;
2905
2924
  const farmDocsListsPages = Boolean(
2906
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.some, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")])
2925
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.some, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")])
2907
2926
  );
2908
2927
  let farmDocsPagePaths;
2909
2928
  const getFarmDocsPagePaths = () => {
@@ -2930,22 +2949,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2930
2949
  });
2931
2950
  }
2932
2951
  }
2933
- const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.find, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")]);
2952
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.find, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")]);
2934
2953
  if (farmInfraAnalyticsPlugin) {
2935
- _chunkBAD6T5NUcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2954
+ _chunk33WR5XV5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2936
2955
  if (farmDocsDevRuntime) {
2937
- const label = _chunkTQJ35BBWcjs.resolveFarmDocsRouteLabel.call(void 0,
2956
+ const label = _chunkXFUPWRKTcjs.resolveFarmDocsRouteLabel.call(void 0,
2938
2957
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2939
2958
  {
2940
- path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
2941
- roots: _optionalChain([farmConfig, 'access', _198 => _198.docs, 'optionalAccess', _199 => _199.roots, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((root) => root.entry)]),
2959
+ path: _optionalChain([farmConfig, 'access', _200 => _200.docs, 'optionalAccess', _201 => _201.entry]) || "/docs",
2960
+ roots: _optionalChain([farmConfig, 'access', _202 => _202.docs, 'optionalAccess', _203 => _203.roots, 'optionalAccess', _204 => _204.map, 'call', _205 => _205((root) => root.entry)]),
2942
2961
  pages: await getFarmDocsPagePaths()
2943
2962
  }
2944
2963
  );
2945
- if (label) return _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2964
+ if (label) return _chunkXFUPWRKTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2946
2965
  }
2947
2966
  const match = farmApp.getRouteManager().matchRoute(pathname);
2948
- return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
2967
+ return { pathname, pattern: _optionalChain([match, 'access', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null };
2949
2968
  });
2950
2969
  }
2951
2970
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
@@ -3020,7 +3039,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3020
3039
  }
3021
3040
  },
3022
3041
  (request) => {
3023
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _204 => _204.getConfig, 'call', _205 => _205()]), () => ( options));
3042
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _208 => _208.getConfig, 'call', _209 => _209()]), () => ( options));
3024
3043
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3025
3044
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
3026
3045
  trustProxy: currentServerConfig.trustProxy
@@ -3036,7 +3055,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3036
3055
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
3037
3056
  const requestUrl = req.url || "/";
3038
3057
  const requestMethod = req.method || "GET";
3039
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _206 => _206.getConfig, 'call', _207 => _207()]), () => ( options));
3058
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _210 => _210.getConfig, 'call', _211 => _211()]), () => ( options));
3040
3059
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3041
3060
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
3042
3061
  trustProxy: currentServerConfig.trustProxy
@@ -3106,7 +3125,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3106
3125
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3107
3126
  res.statusCode = 200;
3108
3127
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3109
- res.end(requestMethod === "HEAD" ? void 0 : _chunkP253SZJFcjs.FARM_VIDEO_PLAYER_HTML);
3128
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkTI4BZV6Mcjs.FARM_VIDEO_PLAYER_HTML);
3110
3129
  return;
3111
3130
  }
3112
3131
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3161,7 +3180,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3161
3180
  openapi: options.openapi
3162
3181
  },
3163
3182
  workflows: discoveredWorkflows,
3164
- plugins: _optionalChain([pm, 'optionalAccess', _208 => _208.getSortedPlugins, 'call', _209 => _209()])
3183
+ plugins: _optionalChain([pm, 'optionalAccess', _212 => _212.getSortedPlugins, 'call', _213 => _213()])
3165
3184
  });
3166
3185
  res.statusCode = 200;
3167
3186
  res.setHeader(
@@ -3196,10 +3215,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3196
3215
  render: {
3197
3216
  pathname: pathname2,
3198
3217
  method: requestMethod,
3199
- routePattern: _optionalChain([match, 'optionalAccess', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null,
3200
- params: _optionalChain([match, 'optionalAccess', _212 => _212.params]) || {}
3218
+ routePattern: _optionalChain([match, 'optionalAccess', _214 => _214.route, 'optionalAccess', _215 => _215.pattern]) || null,
3219
+ params: _optionalChain([match, 'optionalAccess', _216 => _216.params]) || {}
3201
3220
  },
3202
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _213 => _213.layouts]) || []).map((layout) => layout.pattern)
3221
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _217 => _217.layouts]) || []).map((layout) => layout.pattern)
3203
3222
  };
3204
3223
  return pageHookRouteMatch;
3205
3224
  };
@@ -3287,7 +3306,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3287
3306
  }
3288
3307
  }
3289
3308
  const runAppMiddlewareForContentRoute = async () => {
3290
- if (!_optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()])) return false;
3309
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _218 => _218.hasMiddleware, 'call', _219 => _219()])) return false;
3291
3310
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3292
3311
  return runFarmMiddlewareWithNavigation(
3293
3312
  farmApp.getServerRenderer(),
@@ -3325,7 +3344,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3325
3344
  return response.status;
3326
3345
  };
3327
3346
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3328
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _216 => _216.hasRuntimeHook, 'call', _217 => _217("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _218 => _218.hasMiddleware, 'call', _219 => _219()]) ? interceptFarmDevPageResponse({
3347
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _220 => _220.hasRuntimeHook, 'call', _221 => _221("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _222 => _222.hasMiddleware, 'call', _223 => _223()]) ? interceptFarmDevPageResponse({
3329
3348
  req,
3330
3349
  res,
3331
3350
  pm,
@@ -3338,7 +3357,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3338
3357
  urlPath: requestUrl,
3339
3358
  pathname: requestPathname,
3340
3359
  startTime: Date.now(),
3341
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _220 => _220(status)]),
3360
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _224 => _224(status)]),
3342
3361
  // The runtime reports a runtime.after failure itself.
3343
3362
  emitError: async () => {
3344
3363
  },
@@ -3349,7 +3368,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3349
3368
  handled = await runAppMiddlewareForContentRoute();
3350
3369
  } catch (error) {
3351
3370
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3352
- _optionalChain([interceptor, 'optionalAccess', _221 => _221.release, 'call', _222 => _222()]);
3371
+ _optionalChain([interceptor, 'optionalAccess', _225 => _225.release, 'call', _226 => _226()]);
3353
3372
  throw error;
3354
3373
  }
3355
3374
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3357,10 +3376,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3357
3376
  return true;
3358
3377
  }
3359
3378
  if (!handled) {
3360
- _optionalChain([interceptor, 'optionalAccess', _223 => _223.release, 'call', _224 => _224()]);
3379
+ _optionalChain([interceptor, 'optionalAccess', _227 => _227.release, 'call', _228 => _228()]);
3361
3380
  return false;
3362
3381
  }
3363
- if (!_optionalChain([interceptor, 'optionalAccess', _225 => _225.isEnded, 'call', _226 => _226()])) _optionalChain([logResponse2, 'optionalCall', _227 => _227(res.statusCode || 200)]);
3382
+ if (!_optionalChain([interceptor, 'optionalAccess', _229 => _229.isEnded, 'call', _230 => _230()])) _optionalChain([logResponse2, 'optionalCall', _231 => _231(res.statusCode || 200)]);
3364
3383
  return true;
3365
3384
  };
3366
3385
  const serveBuiltInRoute = async (respond, {
@@ -3369,7 +3388,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3369
3388
  label
3370
3389
  } = {}) => {
3371
3390
  const discard = async () => {
3372
- await _optionalChain([computed, 'optionalAccess', _228 => _228.body, 'optionalAccess', _229 => _229.cancel, 'call', _230 => _230(), 'access', _231 => _231.catch, 'call', _232 => _232(() => {
3391
+ await _optionalChain([computed, 'optionalAccess', _232 => _232.body, 'optionalAccess', _233 => _233.cancel, 'call', _234 => _234(), 'access', _235 => _235.catch, 'call', _236 => _236(() => {
3373
3392
  })]);
3374
3393
  };
3375
3394
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3386,9 +3405,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3386
3405
  if (pm && opensFarmDevRuntimeSession(pm)) {
3387
3406
  try {
3388
3407
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3389
- const route = _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0,
3408
+ const route = _chunkXFUPWRKTcjs.setFarmRouteLabel.call(void 0,
3390
3409
  { pathname: requestPathname },
3391
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkTQJ35BBWcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3410
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkXFUPWRKTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3392
3411
  );
3393
3412
  runtimeSession2 = await pm.beginRuntimeRequest(
3394
3413
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3426,7 +3445,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3426
3445
  }
3427
3446
  responding = true;
3428
3447
  response = await respond(
3429
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _233 => _233.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3448
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _237 => _237.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3430
3449
  );
3431
3450
  } catch (error) {
3432
3451
  if (!responding && !res.headersSent) {
@@ -3446,7 +3465,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3446
3465
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3447
3466
  };
3448
3467
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3449
- if (openAPIManager && _optionalChain([options, 'access', _234 => _234.openapi, 'optionalAccess', _235 => _235.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3468
+ if (openAPIManager && _optionalChain([options, 'access', _238 => _238.openapi, 'optionalAccess', _239 => _239.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3450
3469
  const specManager = openAPIManager;
3451
3470
  await serveBuiltInRoute(async () => {
3452
3471
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3466,7 +3485,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3466
3485
  });
3467
3486
  return;
3468
3487
  }
3469
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _236 => _236.openapi, 'optionalAccess', _237 => _237.route])) {
3488
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _240 => _240.openapi, 'optionalAccess', _241 => _241.route])) {
3470
3489
  const docsManager = openAPIManager;
3471
3490
  await serveBuiltInRoute(
3472
3491
  async () => {
@@ -3477,8 +3496,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3477
3496
  );
3478
3497
  return;
3479
3498
  }
3480
- if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunkTQJ35BBWcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3481
- const manifestGuardCoversPath = (path7) => _chunk4B6YJ5DScjs.farmPathGuardCoversEndpoint.call(void 0,
3499
+ if (_optionalChain([options, 'access', _242 => _242.agent, 'optionalAccess', _243 => _243.manifest]) !== false && _chunkXFUPWRKTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3500
+ const manifestGuardCoversPath = (path7) => _chunk4ZVKDHS6cjs.farmPathGuardCoversEndpoint.call(void 0,
3482
3501
  {
3483
3502
  config: farmConfig,
3484
3503
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3487,18 +3506,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3487
3506
  apiServerBasePath
3488
3507
  );
3489
3508
  await serveBuiltInRoute(async () => {
3490
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkP253SZJFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3491
- const manifest = await _chunkTQJ35BBWcjs.createFarmAppManifestResponse.call(void 0,
3509
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTI4BZV6Mcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3510
+ const manifest = await _chunkXFUPWRKTcjs.createFarmAppManifestResponse.call(void 0,
3492
3511
  new Request(parsedRequestUrl, {
3493
3512
  method: requestMethod,
3494
3513
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3495
3514
  }),
3496
3515
  {
3497
- ..._chunkTQJ35BBWcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3516
+ ..._chunkXFUPWRKTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3498
3517
  build: "development",
3499
3518
  packages: farmAppPackages,
3500
3519
  // Read again on each request; unchanged files come from a cache.
3501
- webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkP253SZJFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3520
+ webmcpTools: _optionalChain([farmConfig, 'access', _244 => _244.plugins, 'optionalAccess', _245 => _245.some, 'call', _246 => _246(({ name }) => name === "farm:webmcp")]) ? _chunkTI4BZV6Mcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3502
3521
  }),
3503
3522
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3504
3523
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3516,11 +3535,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3516
3535
  });
3517
3536
  return;
3518
3537
  }
3519
- if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkTQJ35BBWcjs.FARM_API_CATALOG_PATH) {
3538
+ if (_optionalChain([options, 'access', _247 => _247.agent, 'optionalAccess', _248 => _248.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkXFUPWRKTcjs.FARM_API_CATALOG_PATH) {
3520
3539
  await serveBuiltInRoute(
3521
- () => _chunkTQJ35BBWcjs.createFarmApiCatalogResponse.call(void 0,
3540
+ () => _chunkXFUPWRKTcjs.createFarmApiCatalogResponse.call(void 0,
3522
3541
  requestMethod,
3523
- _chunkTQJ35BBWcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3542
+ _chunkXFUPWRKTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3524
3543
  new Request(parsedRequestUrl, {
3525
3544
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3526
3545
  })
@@ -3528,8 +3547,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3528
3547
  );
3529
3548
  return;
3530
3549
  }
3531
- if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
3532
- const aiCatalog = _chunkTQJ35BBWcjs.createFarmAiCatalogResponse.call(void 0,
3550
+ if (_optionalChain([options, 'access', _249 => _249.agent, 'optionalAccess', _250 => _250.aiCatalog]) !== false) {
3551
+ const aiCatalog = _chunkXFUPWRKTcjs.createFarmAiCatalogResponse.call(void 0,
3533
3552
  new Request(parsedRequestUrl, {
3534
3553
  method: requestMethod,
3535
3554
  headers: {
@@ -3577,7 +3596,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3577
3596
  );
3578
3597
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3579
3598
  if (docsResponse) {
3580
- 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")]);
3599
+ const docsPage = _optionalChain([docsResponse, 'access', _251 => _251.headers, 'access', _252 => _252.get, 'call', _253 => _253("content-type"), 'optionalAccess', _254 => _254.toLowerCase, 'call', _255 => _255(), 'access', _256 => _256.includes, 'call', _257 => _257("text/html")]);
3581
3600
  await serveBuiltInRoute(
3582
3601
  async (request) => {
3583
3602
  if (!docsPage) {
@@ -3595,7 +3614,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3595
3614
  farmConfig.deploymentId
3596
3615
  );
3597
3616
  if (deploymentMismatch) {
3598
- await _optionalChain([docsResponse, 'access', _254 => _254.body, 'optionalAccess', _255 => _255.cancel, 'call', _256 => _256()]);
3617
+ await _optionalChain([docsResponse, 'access', _258 => _258.body, 'optionalAccess', _259 => _259.cancel, 'call', _260 => _260()]);
3599
3618
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3600
3619
  }
3601
3620
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3611,11 +3630,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3611
3630
  {
3612
3631
  kind: "docs",
3613
3632
  computed: docsResponse,
3614
- label: _chunkTQJ35BBWcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3633
+ label: _chunkXFUPWRKTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3615
3634
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3616
3635
  {
3617
- path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
3618
- roots: _optionalChain([farmConfig, 'access', _259 => _259.docs, 'optionalAccess', _260 => _260.roots, 'optionalAccess', _261 => _261.map, 'call', _262 => _262((root) => root.entry)]),
3636
+ path: _optionalChain([farmConfig, 'access', _261 => _261.docs, 'optionalAccess', _262 => _262.entry]) || "/docs",
3637
+ roots: _optionalChain([farmConfig, 'access', _263 => _263.docs, 'optionalAccess', _264 => _264.roots, 'optionalAccess', _265 => _265.map, 'call', _266 => _266((root) => root.entry)]),
3619
3638
  pages: await getFarmDocsPagePaths()
3620
3639
  }
3621
3640
  )
@@ -3624,7 +3643,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3624
3643
  return;
3625
3644
  }
3626
3645
  }
3627
- 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)])) {
3646
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _267 => _267.headers, 'access', _268 => _268.accept, 'optionalAccess', _269 => _269.includes, 'call', _270 => _270(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3628
3647
  const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3629
3648
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3630
3649
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3642,15 +3661,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3642
3661
  });
3643
3662
  await serveBuiltInRoute(() => treeResponse, {
3644
3663
  computed: treeResponse,
3645
- 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))
3664
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _271 => _271.getRouteManager, 'call', _272 => _272(), 'access', _273 => _273.matchRoute, 'call', _274 => _274(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _275 => _275.route, 'optionalAccess', _276 => _276.pattern]), () => ( null))
3646
3665
  });
3647
3666
  return;
3648
3667
  }
3649
3668
  const markdownRouteLabel = () => (
3650
3669
  // On the route path, as production labels it: /fr/index.md is /index.md.
3651
- _chunkTQJ35BBWcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3670
+ _chunkXFUPWRKTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3652
3671
  toRoutePathname(requestPathname),
3653
- (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])
3672
+ (page) => _optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(page), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern])
3654
3673
  )
3655
3674
  );
3656
3675
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3662,14 +3681,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3662
3681
  routePathname: toRoutePathname,
3663
3682
  resolveSource: async (pathname2) => {
3664
3683
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3665
- 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);
3684
+ const sourcePath = _optionalChain([match, 'access', _283 => _283.route, 'optionalAccess', _284 => _284.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3666
3685
  if (!sourcePath) {
3667
3686
  return null;
3668
3687
  }
3669
3688
  return {
3670
3689
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3671
3690
  // Project-relative, as production sends it: never the machine's path.
3672
- filePath: _chunkP253SZJFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3691
+ filePath: _chunkTI4BZV6Mcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3673
3692
  };
3674
3693
  },
3675
3694
  // The anonymous check goes through this server, so its guards and
@@ -3819,7 +3838,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3819
3838
  "beforeRequest",
3820
3839
  (plugin2) => {
3821
3840
  const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3822
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _281 => _281.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3841
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _285 => _285.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3823
3842
  },
3824
3843
  req,
3825
3844
  res
@@ -3856,7 +3875,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3856
3875
  isProd: false
3857
3876
  },
3858
3877
  request,
3859
- { clientAddress: _optionalChain([req, 'access', _282 => _282.socket, 'optionalAccess', _283 => _283.remoteAddress]) }
3878
+ { clientAddress: _optionalChain([req, 'access', _286 => _286.socket, 'optionalAccess', _287 => _287.remoteAddress]) }
3860
3879
  );
3861
3880
  if (!result) {
3862
3881
  throw new Error(`Matched integration route did not return a response`);
@@ -3864,7 +3883,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3864
3883
  return result;
3865
3884
  } catch (error) {
3866
3885
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3867
- await _optionalChain([runtime, 'optionalAccess', _284 => _284.reportError, 'call', _285 => _285(error)]);
3886
+ await _optionalChain([runtime, 'optionalAccess', _288 => _288.reportError, 'call', _289 => _289(error)]);
3868
3887
  return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
3869
3888
  }
3870
3889
  };
@@ -3918,7 +3937,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3918
3937
  _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3919
3938
  pathname: requestPathname,
3920
3939
  method: requestMethod
3921
- }) || 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)
3940
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _290 => _290.isFarmDocsAPIRequest, 'call', _291 => _291(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3922
3941
  );
3923
3942
  };
3924
3943
  try {
@@ -4008,15 +4027,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4008
4027
  );
4009
4028
  };
4010
4029
  const isDocsAPIRequest = Boolean(
4011
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _288 => _288.isFarmDocsAPIRequest, 'call', _289 => _289(pathname2)])
4030
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _292 => _292.isFarmDocsAPIRequest, 'call', _293 => _293(pathname2)])
4012
4031
  );
4013
4032
  const docsRuntimeOptions = () => ({
4014
4033
  kind: "docs",
4015
- route: _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0,
4034
+ route: _chunkXFUPWRKTcjs.setFarmRouteLabel.call(void 0,
4016
4035
  { pathname: pathname2, pattern: urlPath2 },
4017
- _chunkTQJ35BBWcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4018
- path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
4019
- roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
4036
+ _chunkXFUPWRKTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4037
+ path: _optionalChain([farmConfig, 'access', _294 => _294.docs, 'optionalAccess', _295 => _295.entry]) || "/docs",
4038
+ roots: _optionalChain([farmConfig, 'access', _296 => _296.docs, 'optionalAccess', _297 => _297.roots, 'optionalAccess', _298 => _298.map, 'call', _299 => _299((root) => root.entry)])
4020
4039
  })
4021
4040
  )
4022
4041
  });
@@ -4098,7 +4117,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4098
4117
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4099
4118
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4100
4119
  if (apiHandler && hasExplicitAPIRoute) {
4101
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _296 => _296.route, 'access', _297 => _297.path]) || urlPath2;
4120
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _300 => _300.route, 'access', _301 => _301.path]) || urlPath2;
4102
4121
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4103
4122
  type: "route.matched",
4104
4123
  pathname: pathname2,
@@ -4148,7 +4167,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4148
4167
  error
4149
4168
  });
4150
4169
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4151
- await _optionalChain([runtime, 'optionalAccess', _298 => _298.reportError, 'call', _299 => _299(error)]);
4170
+ await _optionalChain([runtime, 'optionalAccess', _302 => _302.reportError, 'call', _303 => _303(error)]);
4152
4171
  response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
4153
4172
  }
4154
4173
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4253,12 +4272,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4253
4272
  }
4254
4273
  return;
4255
4274
  }
4256
- 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")])) {
4275
+ if (_optionalChain([req, 'access', _304 => _304.url, 'optionalAccess', _305 => _305.startsWith, 'call', _306 => _306("/@")]) || _optionalChain([req, 'access', _307 => _307.url, 'optionalAccess', _308 => _308.startsWith, 'call', _309 => _309("/node_modules")])) {
4257
4276
  return next();
4258
4277
  }
4259
4278
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4260
4279
  requestPathname,
4261
- _optionalChain([farmApp, 'optionalAccess', _306 => _306.getRouteManager, 'call', _307 => _307()]),
4280
+ _optionalChain([farmApp, 'optionalAccess', _310 => _310.getRouteManager, 'call', _311 => _311()]),
4262
4281
  [server.config.publicDir, server.config.root],
4263
4282
  farmAgentGeneratedPaths(farmConfig),
4264
4283
  requestMethod
@@ -4266,7 +4285,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4266
4285
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4267
4286
  return next();
4268
4287
  }
4269
- if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/__farm/page-data")])) {
4288
+ if (_optionalChain([req, 'access', _312 => _312.url, 'optionalAccess', _313 => _313.startsWith, 'call', _314 => _314("/__farm/page-data")])) {
4270
4289
  const urlObj = parsedRequestUrl;
4271
4290
  const targetPath = urlObj.searchParams.get("path") || "/";
4272
4291
  let renderedRequest;
@@ -4296,7 +4315,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4296
4315
  renderedRequest = targetRequest;
4297
4316
  let middlewareMap = /* @__PURE__ */ new Map();
4298
4317
  let middlewareContext = /* @__PURE__ */ new Map();
4299
- if (_optionalChain([middlewareManager, 'optionalAccess', _311 => _311.hasMiddleware, 'call', _312 => _312()])) {
4318
+ if (_optionalChain([middlewareManager, 'optionalAccess', _315 => _315.hasMiddleware, 'call', _316 => _316()])) {
4300
4319
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4301
4320
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4302
4321
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4330,10 +4349,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4330
4349
  if (pm) {
4331
4350
  await pm.runHookParallel("afterRouteMatch", {
4332
4351
  pathname: targetPath,
4333
- matched: !!_optionalChain([match, 'optionalAccess', _313 => _313.route]),
4334
- routePattern: _optionalChain([match, 'optionalAccess', _314 => _314.route, 'optionalAccess', _315 => _315.pattern]) || null,
4335
- params: _optionalChain([match, 'optionalAccess', _316 => _316.params]) || {},
4336
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _317 => _317.layouts]) || []).map((l) => l.pattern)
4352
+ matched: !!_optionalChain([match, 'optionalAccess', _317 => _317.route]),
4353
+ routePattern: _optionalChain([match, 'optionalAccess', _318 => _318.route, 'optionalAccess', _319 => _319.pattern]) || null,
4354
+ params: _optionalChain([match, 'optionalAccess', _320 => _320.params]) || {},
4355
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _321 => _321.layouts]) || []).map((l) => l.pattern)
4337
4356
  });
4338
4357
  }
4339
4358
  if (!match) {
@@ -4368,7 +4387,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4368
4387
  );
4369
4388
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4370
4389
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4371
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkQYDGIXQ5cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4390
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkU3A46QFDcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4372
4391
  const isClientComponent = moduleMetadata.isClientComponent;
4373
4392
  const shouldHydrate = moduleMetadata.shouldHydrate;
4374
4393
  let mergedMetadata = {};
@@ -4379,7 +4398,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4379
4398
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4380
4399
  (entry) => entry.pattern === layout.pattern
4381
4400
  ), () => ( {
4382
- ..._chunkQYDGIXQ5cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4401
+ ..._chunkU3A46QFDcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4383
4402
  serverTree: false
4384
4403
  }))
4385
4404
  );
@@ -4393,17 +4412,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4393
4412
  )
4394
4413
  ];
4395
4414
  const hydrationIslandStrategy = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0,
4396
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options))), 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])
4397
- ) === "islands" ? _chunkP253SZJFcjs.resolveFarmRouteRootStrategy.call(void 0,
4415
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _322 => _322.getConfig, 'call', _323 => _323()]), () => ( options))), 'access', _324 => _324.experimental, 'optionalAccess', _325 => _325.serverComponents])
4416
+ ) === "islands" ? _chunkTI4BZV6Mcjs.resolveFarmRouteRootStrategy.call(void 0,
4398
4417
  route,
4399
4418
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4400
4419
  layouts.map((layout, index) => ({
4401
4420
  pattern: layout.pattern,
4402
4421
  modulePath: layout.modulePath,
4403
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.shouldHydrate]) === true,
4422
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _326 => _326[index], 'optionalAccess', _327 => _327.shouldHydrate]) === true,
4404
4423
  // Manifest entries carry it; metadata read from source does not.
4405
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _324 => _324[index], 'optionalAccess', _325 => _325.hasIsolatedClientBoundaries]) === true,
4406
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _326 => _326[index], 'optionalAccess', _327 => _327.islandStrategy]), () => ( null))
4424
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _328 => _328[index], 'optionalAccess', _329 => _329.hasIsolatedClientBoundaries]) === true,
4425
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.islandStrategy]), () => ( null))
4407
4426
  })),
4408
4427
  server.config.root,
4409
4428
  true
@@ -4460,7 +4479,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4460
4479
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4461
4480
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4462
4481
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4463
- ), () => ( _chunkQYDGIXQ5cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4482
+ ), () => ( _chunkU3A46QFDcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4464
4483
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4465
4484
  request: targetRequest,
4466
4485
  params: slot.params,
@@ -4506,15 +4525,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4506
4525
  );
4507
4526
  const projectRoot = server.config.root;
4508
4527
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4509
- const renderPlan = _chunk4B6YJ5DScjs.createFarmRouteRenderPlan.call(void 0, {
4528
+ const renderPlan = _chunk4ZVKDHS6cjs.createFarmRouteRenderPlan.call(void 0, {
4510
4529
  pageShouldHydrate: shouldHydrate,
4511
4530
  layoutShouldHydrate: shouldHydrateLayout,
4512
4531
  islandStrategy: hydrationIslandStrategy,
4513
4532
  rendering: _chunkXMVZXZ32cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4514
4533
  });
4515
4534
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4516
- const layoutStartIndex = _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0,
4517
- _chunk4B6YJ5DScjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4535
+ const layoutStartIndex = _chunk4ZVKDHS6cjs.getSharedLayoutPrefixLength.call(void 0,
4536
+ _chunk4ZVKDHS6cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4518
4537
  destinationLayoutPatterns
4519
4538
  );
4520
4539
  const renderer = farmApp.getServerRenderer();
@@ -4524,13 +4543,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4524
4543
  middlewareContext,
4525
4544
  () => renderer.renderNavigationFragment({
4526
4545
  PageComponent: routeModule.default,
4527
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _328 => _328.default]),
4546
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _332 => _332.default]),
4528
4547
  pageProps: routeProps,
4529
4548
  params,
4530
4549
  layouts: layouts.map((layout, index) => ({
4531
4550
  pattern: layout.pattern,
4532
4551
  module: layoutModules[index],
4533
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _329 => _329[index], 'optionalAccess', _330 => _330.serverTree])
4552
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _333 => _333[index], 'optionalAccess', _334 => _334.serverTree])
4534
4553
  })),
4535
4554
  layoutStartIndex,
4536
4555
  slots: routeSlots.map((slot) => ({
@@ -4596,7 +4615,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4596
4615
  {
4597
4616
  status: 200,
4598
4617
  headers: {
4599
- "Cache-Control": _chunk4B6YJ5DScjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4618
+ "Cache-Control": _chunk4ZVKDHS6cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4600
4619
  "X-Farm-Navigation": "html-fragment",
4601
4620
  Vary: "X-Farm-Layout-Chain",
4602
4621
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4638,14 +4657,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4638
4657
  trustProxy: currentServerConfig.trustProxy
4639
4658
  }).pathname;
4640
4659
  const routeManager2 = farmApp.getRouteManager();
4641
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("beforeRequest")]), () => ( false));
4642
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterResponse")]), () => ( false));
4643
- 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)));
4660
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasHook, 'call', _336 => _336("beforeRequest")]), () => ( false));
4661
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("afterResponse")]), () => ( false));
4662
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("afterRender")]), () => ( false)));
4644
4663
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4645
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
4664
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasRuntimeHook, 'call', _344 => _344("after")]), () => ( false));
4646
4665
  const pageBuiltInRouteLabel = (pathname2) => {
4647
4666
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4648
- const mcpLabel = _chunkTQJ35BBWcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4667
+ const mcpLabel = _chunkXFUPWRKTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4649
4668
  if (mcpLabel) return mcpLabel;
4650
4669
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4651
4670
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4654,13 +4673,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4654
4673
  const match = routeManager2.matchRoute(pathname2);
4655
4674
  return {
4656
4675
  kind: "page",
4657
- route: _chunkTQJ35BBWcjs.setFarmRouteLabel.call(void 0,
4676
+ route: _chunkXFUPWRKTcjs.setFarmRouteLabel.call(void 0,
4658
4677
  {
4659
4678
  pathname: pathname2,
4660
- pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
4661
- params: _optionalChain([match, 'optionalAccess', _343 => _343.params]) || {}
4679
+ pattern: _optionalChain([match, 'optionalAccess', _345 => _345.route, 'optionalAccess', _346 => _346.pattern]) || null,
4680
+ params: _optionalChain([match, 'optionalAccess', _347 => _347.params]) || {}
4662
4681
  },
4663
- _optionalChain([match, 'optionalAccess', _344 => _344.route]) ? null : pageBuiltInRouteLabel(pathname2)
4682
+ _optionalChain([match, 'optionalAccess', _348 => _348.route]) ? null : pageBuiltInRouteLabel(pathname2)
4664
4683
  )
4665
4684
  };
4666
4685
  };
@@ -4740,7 +4759,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4740
4759
  }) : void 0;
4741
4760
  let middlewareFailed = false;
4742
4761
  try {
4743
- if (_optionalChain([middlewareManager, 'optionalAccess', _345 => _345.hasMiddleware, 'call', _346 => _346()])) {
4762
+ if (_optionalChain([middlewareManager, 'optionalAccess', _349 => _349.hasMiddleware, 'call', _350 => _350()])) {
4744
4763
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4745
4764
  const handled = await runFarmMiddlewareWithNavigation(
4746
4765
  farmApp.getServerRenderer(),
@@ -4753,7 +4772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4753
4772
  throw error;
4754
4773
  });
4755
4774
  if (handled) {
4756
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
4775
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.isEnded, 'call', _352 => _352()])) {
4757
4776
  const duration = Date.now() - startTime;
4758
4777
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4759
4778
  }
@@ -4768,8 +4787,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4768
4787
  res
4769
4788
  );
4770
4789
  }
4771
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
4772
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.isEnded, 'call', _352 => _352()])) {
4790
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4791
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4773
4792
  const duration = Date.now() - startTime;
4774
4793
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4775
4794
  }
@@ -4788,8 +4807,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4788
4807
  await pm.reportRuntimeRequestError(runtimeSession, error);
4789
4808
  } else {
4790
4809
  await pm.failRuntimeRequest(runtimeSession, error);
4791
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4792
- _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.release, 'call', _356 => _356()]);
4810
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4811
+ _optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.release, 'call', _360 => _360()]);
4793
4812
  console.error("[FARM] Page error:", error);
4794
4813
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4795
4814
  return;
@@ -4806,7 +4825,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4806
4825
  }
4807
4826
  })
4808
4827
  );
4809
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _357 => _357.stack, 'access', _358 => _358.at, 'call', _359 => _359(-1), 'optionalAccess', _360 => _360.handle]);
4828
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _361 => _361.stack, 'access', _362 => _362.at, 'call', _363 => _363(-1), 'optionalAccess', _364 => _364.handle]);
4810
4829
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4811
4830
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4812
4831
  }
@@ -4835,7 +4854,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4835
4854
  });
4836
4855
  }
4837
4856
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4838
- 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;
4857
+ const root = _optionalChain([farmApp, 'optionalAccess', _365 => _365.getConfig, 'call', _366 => _366(), 'access', _367 => _367.root]) || _optionalChain([server, 'optionalAccess', _368 => _368.config, 'access', _369 => _369.root]) || options.root;
4839
4858
  return this.resolve(id, path6.join(root, "package.json"), {
4840
4859
  ...resolveOptions,
4841
4860
  skipSelf: true
@@ -4863,7 +4882,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4863
4882
  }
4864
4883
  },
4865
4884
  async load(id, loadOptions) {
4866
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _366 => _366.ssr]) && !farmSetupContext.getStore()) {
4885
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _370 => _370.ssr]) && !farmSetupContext.getStore()) {
4867
4886
  await pendingClientSetup;
4868
4887
  }
4869
4888
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4881,8 +4900,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4881
4900
  if (imageModule) return imageModule;
4882
4901
  }
4883
4902
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4884
- const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4885
- const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4903
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _371 => _371.getConfig, 'call', _372 => _372(), 'access', _373 => _373.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4904
+ const root = _optionalChain([server, 'optionalAccess', _374 => _374.config, 'access', _375 => _375.root]) || options.root;
4886
4905
  if (isClientEnvironment(this, loadOptions)) {
4887
4906
  return generateProgrammaticClientRouteModuleForId(
4888
4907
  id,
@@ -4898,19 +4917,19 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4898
4917
  return FARM_DEV_CLIENT_BOOT_MODULE;
4899
4918
  }
4900
4919
  if (isFarmClientVirtualId(id)) {
4901
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _372 => _372.getConfig, 'call', _373 => _373()]);
4902
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4903
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
4904
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
4905
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
4920
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _376 => _376.getConfig, 'call', _377 => _377()]);
4921
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4922
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.integrations]) || options.integrations;
4923
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.root]) || _optionalChain([server, 'optionalAccess', _381 => _381.config, 'access', _382 => _382.root]) || process.cwd();
4924
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.docs]);
4906
4925
  const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4907
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4926
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4908
4927
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4909
- _optionalChain([docs, 'optionalAccess', _381 => _381.enabled]) ? loadFarmDocsDevRuntime() : null,
4910
- _optionalChain([docs, 'optionalAccess', _382 => _382.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4928
+ _optionalChain([docs, 'optionalAccess', _385 => _385.enabled]) ? loadFarmDocsDevRuntime() : null,
4929
+ _optionalChain([docs, 'optionalAccess', _386 => _386.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4911
4930
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4912
4931
  ]);
4913
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _383 => _383.isFarmDocsSearchEnabled, 'call', _384 => _384(docs)]), () => ( false));
4932
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _387 => _387.isFarmDocsSearchEnabled, 'call', _388 => _388(docs)]), () => ( false));
4914
4933
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4915
4934
  docsSearchEnabled,
4916
4935
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -4918,10 +4937,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4918
4937
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4919
4938
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4920
4939
  const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4921
- const isolatedHydrationMode = _chunkQYDGIXQ5cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4922
- _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
4940
+ const isolatedHydrationMode = _chunkU3A46QFDcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4941
+ _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.experimental, 'optionalAccess', _390 => _390.isolatedClientHydration]),
4923
4942
  {
4924
- serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4943
+ serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "rsc",
4925
4944
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4926
4945
  }
4927
4946
  );
@@ -4929,32 +4948,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4929
4948
  integrationProviders,
4930
4949
  [
4931
4950
  ..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4932
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _389 => _389.getFarmDocsDocumentNavigationMatchers, 'call', _390 => _390(docs)]), () => ( []))
4951
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _393 => _393.getFarmDocsDocumentNavigationMatchers, 'call', _394 => _394(docs)]), () => ( []))
4933
4952
  ],
4934
4953
  generatedDocsSearchRuntime,
4935
4954
  `${generatedDevtoolsClientRuntime}
4936
4955
  ${generatedDevIndicatorsClientRuntime}`,
4937
- _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.plugins]) || [],
4956
+ _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.plugins]) || [],
4938
4957
  root,
4939
- _optionalChain([resolvedConfig, 'optionalAccess', _392 => _392.srcDir]) || options.srcDir || "src",
4940
- _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
4941
- adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
4958
+ _optionalChain([resolvedConfig, 'optionalAccess', _396 => _396.srcDir]) || options.srcDir || "src",
4959
+ _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.publicRuntimeConfig]) || options.publicRuntimeConfig,
4960
+ adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _398 => _398.adapter])) : void 0,
4942
4961
  renderer,
4943
- isolatedHydrationMode === "enabled" || _chunkT7UC2ORAcjs.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,
4944
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
4945
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.basePath]), () => ( "/")),
4946
- _chunkP253SZJFcjs.generateClientCachePersistenceCode.call(void 0,
4947
- _chunkP253SZJFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
4962
+ isolatedHydrationMode === "enabled" || _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _399 => _399.getRouteManager, 'call', _400 => _400(), 'access', _401 => _401.getIsolatedClientBoundaryModules, 'call', _402 => _402(root)])))), 'optionalAccess', _403 => _403.size]) > 0,
4963
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
4964
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
4965
+ _chunkTI4BZV6Mcjs.generateClientCachePersistenceCode.call(void 0,
4966
+ _chunkTI4BZV6Mcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
4948
4967
  ),
4949
4968
  adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4950
- _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
4969
+ _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.experimental, 'optionalAccess', _408 => _408.serverComponents])) === "islands"
4951
4970
  );
4952
4971
  }
4953
4972
  if (id === "/@farm/server") {
4954
4973
  return generateServerCode();
4955
4974
  }
4956
4975
  if (id === "/@farm/manifest") {
4957
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406()]);
4976
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _409 => _409.getRouteManager, 'call', _410 => _410()]);
4958
4977
  if (!routeManager) {
4959
4978
  return `
4960
4979
  export const getManifest = () => ({
@@ -4966,11 +4985,11 @@ export const getManifest = () => ({
4966
4985
  });
4967
4986
  `;
4968
4987
  }
4969
- const globalStylesheetHref = _chunkP253SZJFcjs.resolveDevGlobalStylesheetHref.call(void 0,
4988
+ const globalStylesheetHref = _chunkTI4BZV6Mcjs.resolveDevGlobalStylesheetHref.call(void 0,
4970
4989
  server.config.root,
4971
- _optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
4990
+ _optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
4972
4991
  );
4973
- const fullManifest = _chunkP253SZJFcjs.createFarmDevClientManifest.call(void 0,
4992
+ const fullManifest = _chunkTI4BZV6Mcjs.createFarmDevClientManifest.call(void 0,
4974
4993
  routeManager.generateClientManifest(server.config.root),
4975
4994
  {
4976
4995
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4986,64 +5005,64 @@ export { manifest };
4986
5005
  }
4987
5006
  },
4988
5007
  async transform(code, id, transformOptions) {
4989
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) && !farmSetupContext.getStore()) {
5008
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) && !farmSetupContext.getStore()) {
4990
5009
  await pendingClientSetup;
4991
5010
  }
4992
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4993
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
5011
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5012
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
4994
5013
  let rewrotePackageImports = false;
4995
- if (_chunkT7UC2ORAcjs.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) && !_chunkQYDGIXQ5cjs.hasUseClientDirective.call(void 0, code)) {
5014
+ if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _418 => _418.experimental, 'optionalAccess', _419 => _419.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkU3A46QFDcjs.hasUseClientDirective.call(void 0, code)) {
4996
5015
  const file = id.split("?", 1)[0];
4997
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
5016
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _421 => _421.config, 'access', _422 => _422.root]) || process.cwd();
4998
5017
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4999
5018
  const rewrite = () => {
5000
- if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
5019
+ if (_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true) {
5001
5020
  if (farmReactServerFiles.has(file)) {
5002
- for (const child of _chunkQYDGIXQ5cjs.farmRelativeImportFiles.call(void 0, code, file))
5021
+ for (const child of _chunkU3A46QFDcjs.farmRelativeImportFiles.call(void 0, code, file))
5003
5022
  farmReactServerFiles.add(child);
5004
5023
  }
5005
- const serverModule = farmReactServerFiles.has(file) || !_chunkQYDGIXQ5cjs.getFarmClientReachableModules.call(void 0,
5024
+ const serverModule = farmReactServerFiles.has(file) || !_chunkU3A46QFDcjs.getFarmClientReachableModules.call(void 0,
5006
5025
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
5007
5026
  projectRoot
5008
5027
  ).has(path6.resolve(file));
5009
- const reactServer = !serverModule ? null : _chunkQYDGIXQ5cjs.rewriteFarmReactServerImports.call(void 0, {
5028
+ const reactServer = !serverModule ? null : _chunkU3A46QFDcjs.rewriteFarmReactServerImports.call(void 0, {
5010
5029
  code,
5011
5030
  file,
5012
- reference: (specifier, exportName) => _chunkQYDGIXQ5cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5031
+ reference: (specifier, exportName) => _chunkU3A46QFDcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5013
5032
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5014
5033
  });
5015
5034
  if (reactServer !== null) {
5016
5035
  code = reactServer;
5017
5036
  rewrotePackageImports = true;
5018
5037
  }
5019
- const internal = farmReactServerFiles.has(file) ? _chunkQYDGIXQ5cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5038
+ const internal = farmReactServerFiles.has(file) ? _chunkU3A46QFDcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5020
5039
  code,
5021
5040
  file,
5022
- reference: (clientFile) => _chunkQYDGIXQ5cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5041
+ reference: (clientFile) => _chunkU3A46QFDcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5023
5042
  }) : null;
5024
5043
  if (internal !== null) {
5025
5044
  code = internal;
5026
5045
  rewrotePackageImports = true;
5027
5046
  }
5028
5047
  }
5029
- const rewritePackageImports = (source2) => _chunkQYDGIXQ5cjs.rewriteFarmPackageClientImports.call(void 0, {
5048
+ const rewritePackageImports = (source2) => _chunkU3A46QFDcjs.rewriteFarmPackageClientImports.call(void 0, {
5030
5049
  code: source2,
5031
5050
  file,
5032
5051
  root: projectRoot,
5033
- isClientPackage: (specifier) => _chunkQYDGIXQ5cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5052
+ isClientPackage: (specifier) => _chunkU3A46QFDcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5034
5053
  });
5035
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
5054
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _424 => _424.getRouteManager, 'call', _425 => _425()]);
5036
5055
  const source = code;
5037
5056
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
5038
5057
  if (referenced !== null) {
5039
5058
  code = referenced;
5040
5059
  rewrotePackageImports = true;
5041
5060
  }
5042
- if (_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true) {
5061
+ if (_optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true) {
5043
5062
  const cached = rewriteFarmReactCacheImport(
5044
5063
  code,
5045
5064
  file,
5046
- _optionalChain([runtimeModule, 'optionalCall', _423 => _423(FARM_REACT_CACHE_MODULE)])
5065
+ _optionalChain([runtimeModule, 'optionalCall', _427 => _427(FARM_REACT_CACHE_MODULE)])
5047
5066
  );
5048
5067
  if (cached !== null) {
5049
5068
  code = cached;
@@ -5051,12 +5070,12 @@ export { manifest };
5051
5070
  }
5052
5071
  }
5053
5072
  };
5054
- if (buildSnapshot) _chunkQYDGIXQ5cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5073
+ if (buildSnapshot) _chunkU3A46QFDcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5055
5074
  else rewrite();
5056
5075
  }
5057
5076
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5058
5077
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
5059
- environment: _optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) === true ? "rsc" : "client"
5078
+ environment: _optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr]) === true ? "rsc" : "client"
5060
5079
  });
5061
5080
  if (serverFns) {
5062
5081
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5069,8 +5088,8 @@ export { manifest };
5069
5088
  const actionModule = transformFarmFormActionModule({
5070
5089
  code,
5071
5090
  id,
5072
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _425 => _425.config, 'access', _426 => _426.root]) || process.cwd(),
5073
- ssr: _optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) === true,
5091
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _429 => _429.config, 'access', _430 => _430.root]) || process.cwd(),
5092
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _431 => _431.ssr]) === true,
5074
5093
  // Parsed by file type: page components are TSX.
5075
5094
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5076
5095
  runtimeModule,
@@ -5078,21 +5097,21 @@ export { manifest };
5078
5097
  });
5079
5098
  if (actionModule) return { code: actionModule, map: null };
5080
5099
  }
5081
- if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5082
- const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
5083
- if (_chunkP253SZJFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5084
- const redacted = _chunkP253SZJFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5100
+ if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5101
+ const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434(), 'optionalAccess', _435 => _435.docs]));
5102
+ if (_chunkTI4BZV6Mcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5103
+ const redacted = _chunkTI4BZV6Mcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5085
5104
  if (redacted !== null) return { code: redacted, map: null };
5086
5105
  }
5087
5106
  }
5088
- if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5089
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434()]), () => ( options));
5090
- if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5107
+ if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr])) {
5108
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438()]), () => ( options));
5109
+ if ((_optionalChain([currentConfig, 'access', _439 => _439.experimental, 'optionalAccess', _440 => _440.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5091
5110
  const violation = findClientServerFnViolation(code, id);
5092
5111
  if (violation) {
5093
- const locate = _chunkQYDGIXQ5cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5112
+ const locate = _chunkU3A46QFDcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5094
5113
  this.error(
5095
- _chunkQYDGIXQ5cjs.formatFarmDiagnostic.call(void 0,
5114
+ _chunkU3A46QFDcjs.formatFarmDiagnostic.call(void 0,
5096
5115
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5097
5116
  currentConfig.root
5098
5117
  )
@@ -5100,8 +5119,8 @@ export { manifest };
5100
5119
  }
5101
5120
  }
5102
5121
  }
5103
- if (!_optionalChain([transformOptions, 'optionalAccess', _437 => _437.ssr]) && shouldInspectClientBoundary(id, code)) {
5104
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _438 => _438.getConfig, 'call', _439 => _439()]), () => ( options)));
5122
+ if (!_optionalChain([transformOptions, 'optionalAccess', _441 => _441.ssr]) && shouldInspectClientBoundary(id, code)) {
5123
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options)));
5105
5124
  }
5106
5125
  if (typeof imageImports.transform === "function") {
5107
5126
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5116,13 +5135,13 @@ export { manifest };
5116
5135
  id,
5117
5136
  transformOptions
5118
5137
  );
5119
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _440 => _440.code, 'optionalAccess', _441 => _441.toString, 'call', _442 => _442()]);
5138
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _444 => _444.code, 'optionalAccess', _445 => _445.toString, 'call', _446 => _446()]);
5120
5139
  if (fontCode) {
5121
5140
  transformedCode = fontCode;
5122
5141
  transformed = true;
5123
5142
  }
5124
5143
  }
5125
- if (_optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) && server) {
5144
+ if (_optionalChain([transformOptions, 'optionalAccess', _447 => _447.ssr]) && server) {
5126
5145
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5127
5146
  code: transformedCode,
5128
5147
  id,
@@ -5134,27 +5153,27 @@ export { manifest };
5134
5153
  transformed = true;
5135
5154
  }
5136
5155
  }
5137
- if (_chunkQYDGIXQ5cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5156
+ if (_chunkU3A46QFDcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5138
5157
  const clientBoundarySource = transformedCode;
5139
5158
  const moduleInfo = this.getModuleInfo(id);
5140
5159
  if (moduleInfo) {
5141
5160
  moduleInfo.isClientComponent = true;
5142
5161
  }
5143
- transformedCode = _chunkQYDGIXQ5cjs.stripUseClientDirective.call(void 0, transformedCode);
5162
+ transformedCode = _chunkU3A46QFDcjs.stripUseClientDirective.call(void 0, transformedCode);
5144
5163
  transformed = true;
5145
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5164
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _448 => _448.getConfig, 'call', _449 => _449()]), () => ( options));
5146
5165
  let isolatedModuleReference = null;
5147
5166
  let rendererIslandModule = false;
5148
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5167
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _450 => _450.config, 'access', _451 => _451.root]) || process.cwd();
5149
5168
  const cleanId = id.split("?", 1)[0];
5150
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5151
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
5152
- if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkQYDGIXQ5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5153
- cleanId.replace(/\\/g, "/").includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5169
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _452 => _452.getRouteManager, 'call', _453 => _453(), 'access', _454 => _454.getIsolatedClientBoundaryModules, 'call', _455 => _455(root)])));
5170
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _456 => _456.has, 'call', _457 => _457(path6.resolve(cleanId))]) === true;
5171
+ if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkU3A46QFDcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5172
+ cleanId.replace(/\\/g, "/").includes(_chunkU3A46QFDcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5154
5173
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5155
- const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
5156
- const explicitStrategy = _chunkQYDGIXQ5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5157
- const inference = islandsMode && explicitStrategy === null ? _chunkP253SZJFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5174
+ const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _458 => _458.experimental, 'optionalAccess', _459 => _459.serverComponents])) === "islands";
5175
+ const explicitStrategy = _chunkU3A46QFDcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5176
+ const inference = islandsMode && explicitStrategy === null ? _chunkTI4BZV6Mcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5158
5177
  if (inference) {
5159
5178
  for (const file of inference.files) {
5160
5179
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5167,8 +5186,8 @@ export { manifest };
5167
5186
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5168
5187
  parse: (source) => this.parse(source),
5169
5188
  slots: islandsMode,
5170
- browser: _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) !== true,
5171
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _457 => _457.strategy]) === "interaction",
5189
+ browser: _optionalChain([transformOptions, 'optionalAccess', _460 => _460.ssr]) !== true,
5190
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _461 => _461.strategy]) === "interaction",
5172
5191
  runtimeModule
5173
5192
  });
5174
5193
  if (!transformedBoundary) {
@@ -5177,14 +5196,14 @@ export { manifest };
5177
5196
  );
5178
5197
  }
5179
5198
  transformedCode = transformedBoundary;
5180
- } else if (selectedForIsolatedHydration && _chunkCPSFDQKJcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkQYDGIXQ5cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5199
+ } else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkU3A46QFDcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkU3A46QFDcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5181
5200
  rendererIslandModule = true;
5182
- if (_optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) === true) {
5201
+ if (_optionalChain([transformOptions, 'optionalAccess', _462 => _462.ssr]) === true) {
5183
5202
  const renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5184
5203
  const transformedBoundary = transformIsolatedClientBoundaryModule({
5185
5204
  code: transformedCode,
5186
5205
  moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
5187
- islandStrategy: _nullishCoalesce(_chunkQYDGIXQ5cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5206
+ islandStrategy: _nullishCoalesce(_chunkU3A46QFDcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5188
5207
  parse: (source) => this.parse(source),
5189
5208
  withIsland: renderer.server
5190
5209
  });
@@ -5217,7 +5236,17 @@ export { manifest };
5217
5236
  );
5218
5237
  return;
5219
5238
  }` : "";
5220
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _459 => _459.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5239
+ const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _463 => _463.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5240
+ const hmrCode = rendererIslandHmr ? `
5241
+ if (import.meta.hot) {
5242
+ import.meta.hot.accept((newModule) => {
5243
+ const runtime = window.__FARM_ISOLATED_HYDRATION_RUNTIME__;
5244
+ if (!newModule || !runtime?.updateModule?.(${JSON.stringify(_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root))}, newModule)) {
5245
+ import.meta.hot.invalidate();
5246
+ }
5247
+ });
5248
+ }
5249
+ ` : _optionalChain([transformOptions, 'optionalAccess', _464 => _464.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5221
5250
  if (import.meta.hot) {
5222
5251
  import.meta.hot.accept((newModule) => {
5223
5252
  ${isolatedHmrUpdate}
@@ -5273,14 +5302,14 @@ if (import.meta.hot) {
5273
5302
  }
5274
5303
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5275
5304
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5276
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _460 => _460.config, 'access', _461 => _461.root]) || process.cwd(), options.outDir || "dist");
5305
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _465 => _465.config, 'access', _466 => _466.root]) || process.cwd(), options.outDir || "dist");
5277
5306
  const clientDir = path6.join(outDir, "client");
5278
5307
  for (const page of ssgPages) {
5279
5308
  try {
5280
5309
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5281
5310
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5282
5311
  const mod = await routeManager.loadRouteModule(page.filePath);
5283
- if (!_optionalChain([mod, 'optionalAccess', _462 => _462.default])) return;
5312
+ if (!_optionalChain([mod, 'optionalAccess', _467 => _467.default])) return;
5284
5313
  const { layouts } = routeManager.matchRoute(page.urlPath);
5285
5314
  const layoutModules = await Promise.all(
5286
5315
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5312,7 +5341,7 @@ if (import.meta.hot) {
5312
5341
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5313
5342
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5314
5343
  const fullHtml = `<!DOCTYPE html>
5315
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _463 => _463.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5344
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _468 => _468.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5316
5345
  <head>
5317
5346
  <meta charset="utf-8">
5318
5347
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5357,12 +5386,12 @@ if (import.meta.hot) {
5357
5386
  watchChange(id, change) {
5358
5387
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5359
5388
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5360
- _optionalChain([farmApp, 'optionalAccess', _464 => _464.getRouteManager, 'call', _465 => _465(), 'access', _466 => _466.noteSourceChange, 'call', _467 => _467(id, change.event)]);
5389
+ _optionalChain([farmApp, 'optionalAccess', _469 => _469.getRouteManager, 'call', _470 => _470(), 'access', _471 => _471.noteSourceChange, 'call', _472 => _472(id, change.event)]);
5361
5390
  }
5362
- _chunkQYDGIXQ5cjs.invalidateFarmClientReachableModules.call(void 0, );
5363
- _chunkQYDGIXQ5cjs.invalidateFarmClientOnlyScan.call(void 0, );
5364
- _chunkP253SZJFcjs.invalidateFarmRouteRootInferences.call(void 0, );
5365
- _chunkQYDGIXQ5cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5391
+ _chunkU3A46QFDcjs.invalidateFarmClientReachableModules.call(void 0, );
5392
+ _chunkU3A46QFDcjs.invalidateFarmClientOnlyScan.call(void 0, );
5393
+ _chunkTI4BZV6Mcjs.invalidateFarmRouteRootInferences.call(void 0, );
5394
+ _chunkU3A46QFDcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5366
5395
  },
5367
5396
  async handleHotUpdate(ctx) {
5368
5397
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5387,7 +5416,7 @@ if (import.meta.hot) {
5387
5416
  server2.moduleGraph.invalidateModule(mod);
5388
5417
  }
5389
5418
  }
5390
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _468 => _468.getConfig, 'call', _469 => _469()]);
5419
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _473 => _473.getConfig, 'call', _474 => _474()]);
5391
5420
  const normalizedFile = file.replace(/\\/g, "/");
5392
5421
  const reloadAfterEdit = () => {
5393
5422
  for (const files of pendingRouteReloads) {
@@ -5395,10 +5424,10 @@ if (import.meta.hot) {
5395
5424
  }
5396
5425
  server2.ws.send({ type: "full-reload", path: "*" });
5397
5426
  };
5398
- if (normalizedFile.includes(_chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5427
+ if (normalizedFile.includes(_chunkU3A46QFDcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5399
5428
  path6.posix.join(
5400
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _470 => _470.root]) || options.root || server2.config.root),
5401
- _chunkQYDGIXQ5cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5429
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.root]) || options.root || server2.config.root),
5430
+ _chunkU3A46QFDcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5402
5431
  )
5403
5432
  ))
5404
5433
  return modules;
@@ -5406,7 +5435,7 @@ if (import.meta.hot) {
5406
5435
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5407
5436
  )) {
5408
5437
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5409
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5438
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _476 => _476(`updated ${file}`)]);
5410
5439
  reloadAfterEdit();
5411
5440
  return [];
5412
5441
  }
@@ -5416,7 +5445,7 @@ if (import.meta.hot) {
5416
5445
  for (const mod of modules) {
5417
5446
  server2.moduleGraph.invalidateModule(mod);
5418
5447
  }
5419
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5448
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _477 => _477(`updated ${file}`)]);
5420
5449
  reloadAfterEdit();
5421
5450
  return [];
5422
5451
  }
@@ -5426,22 +5455,22 @@ if (import.meta.hot) {
5426
5455
  for (const mod of modules) {
5427
5456
  server2.moduleGraph.invalidateModule(mod);
5428
5457
  }
5429
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5458
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _478 => _478(`updated ${file}`)]);
5430
5459
  reloadAfterEdit();
5431
5460
  return [];
5432
5461
  }
5433
- if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5434
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _474 => _474(`updated ${file}`)]);
5462
+ if (apiRouteManager && _chunkI2RBHZF7cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5463
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _479 => _479(`updated ${file}`)]);
5435
5464
  }
5436
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
5437
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
5465
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _480 => _480.experimental, 'optionalAccess', _481 => _481.isolatedClientHydration]);
5466
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _482 => _482.getRouteManager, 'call', _483 => _483()]);
5438
5467
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5439
- const tracksAsyncOwnerIslands = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
5468
+ const tracksAsyncOwnerIslands = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _484 => _484.renderer])) && planRouteManager !== void 0;
5440
5469
  let clientPlanCurrent = false;
5441
5470
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5442
5471
  const routeManager = planRouteManager;
5443
- await _optionalChain([ctx, 'access', _480 => _480.read, 'optionalCall', _481 => _481()]);
5444
- if (_optionalChain([routeManager, 'optionalAccess', _482 => _482.isEditPlanNeutral, 'call', _483 => _483(file)])) {
5472
+ await _optionalChain([ctx, 'access', _485 => _485.read, 'optionalCall', _486 => _486()]);
5473
+ if (_optionalChain([routeManager, 'optionalAccess', _487 => _487.isEditPlanNeutral, 'call', _488 => _488(file)])) {
5445
5474
  clientPlanCurrent = true;
5446
5475
  } else if (routeManager) {
5447
5476
  routeManager.noteSourceChange(file, "update");
@@ -5485,7 +5514,7 @@ if (import.meta.hot) {
5485
5514
  }
5486
5515
  }
5487
5516
  }
5488
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _484 => _484.getRouteManager, 'call', _485 => _485(), 'access', _486 => _486.isRendererRouteModule, 'call', _487 => _487(normalizedFile)]) === true;
5517
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _489 => _489.getRouteManager, 'call', _490 => _490(), 'access', _491 => _491.isRendererRouteModule, 'call', _492 => _492(normalizedFile)]) === true;
5489
5518
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5490
5519
  if (normalizedFile.includes("middleware.")) {
5491
5520
  if (middlewareManager) {
@@ -5503,7 +5532,7 @@ if (import.meta.hot) {
5503
5532
  }
5504
5533
  return [];
5505
5534
  }
5506
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _488 => _488.getRouteManager, 'call', _489 => _489(), 'access', _490 => _490.invalidateClientManifest, 'call', _491 => _491()]);
5535
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _493 => _493.getRouteManager, 'call', _494 => _494(), 'access', _495 => _495.invalidateClientManifest, 'call', _496 => _496()]);
5507
5536
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5508
5537
  if (manifestModule) {
5509
5538
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5518,7 +5547,15 @@ if (import.meta.hot) {
5518
5547
  return [];
5519
5548
  }
5520
5549
  }
5521
- 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) {
5550
+ if (currentFarmConfig && planRouteManager && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
5551
+ _optionalChain([server2, 'access', _497 => _497.environments, 'access', _498 => _498.client, 'optionalAccess', _499 => _499.moduleGraph]),
5552
+ normalizedFile,
5553
+ planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
5554
+ )) {
5555
+ reloadAfterEdit();
5556
+ return [];
5557
+ }
5558
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _500 => _500.environments, 'access', _501 => _501.client, 'optionalAccess', _502 => _502.moduleGraph, 'access', _503 => _503.getModulesByFile, 'call', _504 => _504(normalizedFile), 'optionalAccess', _505 => _505.size]) && _chunkI2RBHZF7cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5522
5559
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5523
5560
  reloadAfterEdit();
5524
5561
  return [];
@@ -5616,7 +5653,7 @@ function createPageDataMiddlewareResponse(res) {
5616
5653
  return (...args) => {
5617
5654
  if (captures(target.statusCode, target.getHeader("location"))) {
5618
5655
  const callback = args.find((arg) => typeof arg === "function");
5619
- _optionalChain([callback, 'optionalCall', _498 => _498()]);
5656
+ _optionalChain([callback, 'optionalCall', _506 => _506()]);
5620
5657
  return property === "write" ? true : response;
5621
5658
  }
5622
5659
  return target[property](...args);
@@ -5680,12 +5717,12 @@ function isFarmClientVirtualId(id) {
5680
5717
  }
5681
5718
  function isClientEnvironment(context, loadOptions) {
5682
5719
  const environment = context.environment;
5683
- if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
5684
- if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
5685
- return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
5720
+ if (_optionalChain([environment, 'optionalAccess', _507 => _507.config, 'optionalAccess', _508 => _508.consumer])) return environment.config.consumer === "client";
5721
+ if (_optionalChain([environment, 'optionalAccess', _509 => _509.name])) return environment.name === "client";
5722
+ return _optionalChain([loadOptions, 'optionalAccess', _510 => _510.ssr]) !== true;
5686
5723
  }
5687
5724
  function invalidateProgrammaticClientRouteModules(server) {
5688
- const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5725
+ const graph = _optionalChain([server, 'access', _511 => _511.environments, 'optionalAccess', _512 => _512.client, 'optionalAccess', _513 => _513.moduleGraph]);
5689
5726
  if (!graph) return;
5690
5727
  for (const [id, module] of graph.idToModuleMap) {
5691
5728
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5695,12 +5732,12 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5695
5732
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5696
5733
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5697
5734
  watchFile(routesFile);
5698
- return _chunkQYDGIXQ5cjs.generateProgrammaticClientRouteModule.call(void 0, {
5735
+ return _chunkU3A46QFDcjs.generateProgrammaticClientRouteModule.call(void 0, {
5699
5736
  kind: parsed.kind,
5700
5737
  routePath: parsed.routePath,
5701
5738
  routesFile,
5702
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
5703
- _chunkQYDGIXQ5cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5739
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _514 => _514.routes, 'access', _515 => _515.get, 'call', _516 => _516(
5740
+ _chunkU3A46QFDcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5704
5741
  )]),
5705
5742
  // React's client module exports no createElement; the main client entry imports React too.
5706
5743
  rendererClient: _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
@@ -5708,7 +5745,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5708
5745
  });
5709
5746
  }
5710
5747
  function resolveRealModuleFile(filePath, root) {
5711
- const resolved = _nullishCoalesce(_chunkQYDGIXQ5cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5748
+ const resolved = _nullishCoalesce(_chunkU3A46QFDcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5712
5749
  try {
5713
5750
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5714
5751
  } catch (e29) {
@@ -6022,12 +6059,12 @@ async function parseRouteModuleProps(routeModule, input) {
6022
6059
  }
6023
6060
  const schemas = routeModule.__farmRouteSchemas;
6024
6061
  const params = parseRouteModuleSchema(
6025
- _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
6062
+ _optionalChain([schemas, 'optionalAccess', _517 => _517.params]),
6026
6063
  input.props.params,
6027
6064
  "params",
6028
6065
  input.routePath
6029
6066
  );
6030
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
6067
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _518 => _518.search]), input.search, "search", input.routePath);
6031
6068
  return {
6032
6069
  ...input.props,
6033
6070
  params,
@@ -6047,7 +6084,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6047
6084
  }
6048
6085
  }
6049
6086
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkT7UC2ORAcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6050
- const providerClientCode = _chunkP253SZJFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6087
+ const providerClientCode = _chunkTI4BZV6Mcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6051
6088
  integrationProviders,
6052
6089
  root,
6053
6090
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -6145,7 +6182,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6145
6182
  return null;
6146
6183
  }
6147
6184
  }
6148
- ${islandValues ? `${_chunkP253SZJFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6185
+ ${islandValues ? `${_chunkTI4BZV6Mcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6149
6186
  let farmLastRouteState = null;
6150
6187
 
6151
6188
  // A hot update to a layout tree's client module renders the route again.
@@ -6986,7 +7023,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6986
7023
  return loadedLayouts;
6987
7024
  }
6988
7025
 
6989
- ${_chunkP253SZJFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7026
+ ${_chunkTI4BZV6Mcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6990
7027
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6991
7028
  let wrapped = element;
6992
7029
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7286,7 +7323,7 @@ function readActiveLayoutPatterns() {
7286
7323
  );
7287
7324
  }
7288
7325
 
7289
- ${_chunkP253SZJFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7326
+ ${_chunkTI4BZV6Mcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7290
7327
 
7291
7328
  function activateFragmentScripts(root) {
7292
7329
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7345,7 +7382,7 @@ function getLayoutShell(root, patterns, index, find) {
7345
7382
  return shell.innerHTML;
7346
7383
  }
7347
7384
 
7348
- ${islandValues ? _chunkP253SZJFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7385
+ ${islandValues ? _chunkTI4BZV6Mcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7349
7386
  container,
7350
7387
  fragment,
7351
7388
  currentPatterns,
@@ -7420,9 +7457,9 @@ ${islandValues ? `
7420
7457
  return nextTarget;
7421
7458
  }
7422
7459
 
7423
- ${islandValues ? `${_chunkP253SZJFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7460
+ ${islandValues ? `${_chunkTI4BZV6Mcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7424
7461
 
7425
- ${_chunkP253SZJFcjs.FARM_EARLY_NAVIGATION_SOURCE}
7462
+ ${_chunkTI4BZV6Mcjs.FARM_EARLY_NAVIGATION_SOURCE}
7426
7463
 
7427
7464
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7428
7465
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -8129,7 +8166,7 @@ function generateClientManifest(bundle) {
8129
8166
  async function defineConfig(config = {}) {
8130
8167
  const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8131
8168
  const appRoot = path6.resolve(config.root || process.cwd());
8132
- if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8169
+ if (_optionalChain([config, 'access', _519 => _519.extends, 'optionalAccess', _520 => _520.length])) {
8133
8170
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8134
8171
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8135
8172
  root: appRoot,
@@ -8139,7 +8176,7 @@ async function defineConfig(config = {}) {
8139
8176
  config = layeredConfig;
8140
8177
  }
8141
8178
  config.renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, config.renderer);
8142
- config.images = _chunkP253SZJFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8179
+ config.images = _chunkTI4BZV6Mcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8143
8180
  const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8144
8181
  ssr: true
8145
8182
  });
@@ -8231,13 +8268,13 @@ async function defineConfig(config = {}) {
8231
8268
  if (!serverStarted) {
8232
8269
  serverStarted = true;
8233
8270
  const elapsed = Date.now() - startTime;
8234
- const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8271
+ const address = _optionalChain([server, 'access', _521 => _521.httpServer, 'optionalAccess', _522 => _522.address, 'call', _523 => _523()]);
8235
8272
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8236
8273
  const hostConfig = server.config.server.host;
8237
8274
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8238
8275
  console.log("");
8239
8276
  console.log(
8240
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk2NKNP4AHcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8277
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkHYL372GWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8241
8278
  );
8242
8279
  console.log("");
8243
8280
  console.log(
@@ -8271,7 +8308,7 @@ async function defineConfig(config = {}) {
8271
8308
  plugins: [
8272
8309
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8273
8310
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8274
- _chunkP253SZJFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8311
+ _chunkTI4BZV6Mcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8275
8312
  tailwindVitePlugin,
8276
8313
  ...rendererVitePlugins,
8277
8314
  ...reactRefreshPlugins,
@@ -8281,14 +8318,14 @@ async function defineConfig(config = {}) {
8281
8318
  farmNavigationPlugin(config.renderer),
8282
8319
  farmIslandContainersPlugin(config),
8283
8320
  farmPlugin(config),
8284
- _chunkQYDGIXQ5cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8321
+ _chunkU3A46QFDcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8285
8322
  farmBrandingPlugin
8286
8323
  ],
8287
8324
  customLogger: farmLogger,
8288
8325
  clearScreen: false,
8289
8326
  optimizeDeps: {
8290
- ..._chunkP253SZJFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8291
- _chunkP253SZJFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8327
+ ..._chunkTI4BZV6Mcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8328
+ _chunkTI4BZV6Mcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8292
8329
  appRoot,
8293
8330
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8294
8331
  ),
@@ -8332,7 +8369,7 @@ async function defineConfig(config = {}) {
8332
8369
  // Stub out problematic server-only modules during dev mode
8333
8370
  alias: {
8334
8371
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8335
- ..._chunkP253SZJFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8372
+ ..._chunkTI4BZV6Mcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8336
8373
  // Nitro internals that should not be resolved in browser
8337
8374
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8338
8375
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -8366,4 +8403,5 @@ async function defineConfig(config = {}) {
8366
8403
 
8367
8404
 
8368
8405
 
8369
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmNavigationPlugin = farmNavigationPlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
8406
+
8407
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmNavigationPlugin = farmNavigationPlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.reachesSharedFarmRendererIsland = reachesSharedFarmRendererIsland; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;