@farm.js/core 0.1.70 → 0.1.72

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 (242) hide show
  1. package/dist/{agent-mcp-handler-6T2Z7TB6.cjs → agent-mcp-handler-KE4J3W7S.cjs} +4 -4
  2. package/dist/{agent-mcp-handler-CPU354QQ.mjs → agent-mcp-handler-VIT4GOSR.mjs} +3 -3
  3. package/dist/{agent-mcp.d-DulgFLBt.d.ts → agent-mcp.d-BO3rZXEM.d.ts} +15 -5
  4. package/dist/{agent-mcp.d-TAs1ES2F.d.mts → agent-mcp.d-Cwff7lcA.d.mts} +15 -5
  5. package/dist/agent-runtime.d.mts +3 -3
  6. package/dist/agent-runtime.d.ts +3 -3
  7. package/dist/{analyzer-QGRBLETM.mjs → analyzer-5Q75LTIL.mjs} +2 -2
  8. package/dist/analyzer-UJG4MIZW.cjs +16 -0
  9. package/dist/api/node.d.mts +5 -5
  10. package/dist/api/node.d.ts +5 -5
  11. package/dist/api/route-manager.cjs +7 -6
  12. package/dist/api/route-manager.d.mts +7 -7
  13. package/dist/api/route-manager.d.ts +7 -7
  14. package/dist/api/route-manager.mjs +6 -5
  15. package/dist/api/runtime.d.mts +4 -4
  16. package/dist/api/runtime.d.ts +4 -4
  17. package/dist/api.cjs +8 -7
  18. package/dist/api.d.mts +8 -8
  19. package/dist/api.d.ts +8 -8
  20. package/dist/api.mjs +7 -6
  21. package/dist/{app-manifest.d-C-nf3Vmm.d.ts → app-manifest.d-DwjGkYlP.d.ts} +1 -1
  22. package/dist/{app-manifest.d-6zXb90o6.d.mts → app-manifest.d-USD_IbFd.d.mts} +1 -1
  23. package/dist/app-markdown.cjs +5 -3
  24. package/dist/app-markdown.d.mts +5 -5
  25. package/dist/app-markdown.d.ts +5 -5
  26. package/dist/app-markdown.mjs +4 -2
  27. package/dist/{app.d-C2xeMIYT.d.ts → app.d-DAmF2MAk.d.ts} +52 -8
  28. package/dist/{app.d-DF0aundc.d.mts → app.d-fW06_h8h.d.mts} +52 -8
  29. package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
  30. package/dist/{chunk-JRF2SKCD.mjs → chunk-3JN5M3T5.mjs} +259 -61
  31. package/dist/{chunk-XYVPTTUT.cjs → chunk-3WG7GJQL.cjs} +11 -6
  32. package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
  33. package/dist/{chunk-I7NUT24Z.cjs → chunk-5R4Q5FN7.cjs} +2 -2
  34. package/dist/{chunk-BPUVDCGG.cjs → chunk-5X6OHJEE.cjs} +15 -3
  35. package/dist/{chunk-RMOU3PR4.mjs → chunk-5XFKWHZD.mjs} +293 -66
  36. package/dist/{chunk-A2TH5MKE.mjs → chunk-645ENY7W.mjs} +3 -3
  37. package/dist/{chunk-NYF7A4UW.mjs → chunk-77VNYVVX.mjs} +1 -1
  38. package/dist/{chunk-32SYRIQ7.cjs → chunk-7QCJDYZQ.cjs} +3 -3
  39. package/dist/{chunk-QZHTDVH4.mjs → chunk-AUAMXI6N.mjs} +1 -1
  40. package/dist/{chunk-5R3JQPWD.mjs → chunk-AYVGD3PK.mjs} +1 -1
  41. package/dist/{chunk-IEN2EFE5.cjs → chunk-BE7AQXJB.cjs} +346 -148
  42. package/dist/{chunk-CCHJWJGP.mjs → chunk-BSXKZPFE.mjs} +204 -98
  43. package/dist/{chunk-2MR4MABG.cjs → chunk-C5AM2XDN.cjs} +54 -4
  44. package/dist/{chunk-M6U6E4F7.cjs → chunk-CBLRSZQL.cjs} +557 -330
  45. package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
  46. package/dist/{chunk-5IJRJWJS.mjs → chunk-DGNMXL2O.mjs} +11 -1
  47. package/dist/{chunk-3EXCZJEN.mjs → chunk-DS7JGFW5.mjs} +13 -1
  48. package/dist/{chunk-EDZU7YRK.mjs → chunk-E2V7RRFL.mjs} +2 -2
  49. package/dist/{chunk-K7JMTAFH.cjs → chunk-E3LE6EZH.cjs} +20 -10
  50. package/dist/{chunk-DIHBWZDZ.cjs → chunk-ET6WW3FY.cjs} +636 -355
  51. package/dist/{chunk-65FPDDT4.cjs → chunk-EXN4DTVF.cjs} +2 -2
  52. package/dist/{chunk-K4UGCUXX.cjs → chunk-FSSONJRV.cjs} +7 -7
  53. package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
  54. package/dist/{chunk-FJ5YCERM.cjs → chunk-HLMUWKAP.cjs} +466 -359
  55. package/dist/{chunk-A7HCBHMC.cjs → chunk-IWCYRDRQ.cjs} +3 -3
  56. package/dist/{chunk-R7254L3R.mjs → chunk-J5ASGNKF.mjs} +23 -0
  57. package/dist/{chunk-75E5FDX2.mjs → chunk-JMFTKNBA.mjs} +10 -10
  58. package/dist/{chunk-TLSSIYAL.mjs → chunk-KQAB5LML.mjs} +10 -3
  59. package/dist/{chunk-NSZY3EWG.cjs → chunk-L6E4SHUB.cjs} +31 -8
  60. package/dist/{chunk-OCNV4CI2.cjs → chunk-MQ4DYVFS.cjs} +26 -0
  61. package/dist/{chunk-4AC4PXZO.cjs → chunk-N3XO5AL5.cjs} +2 -2
  62. package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
  63. package/dist/{chunk-R2ZHU37O.mjs → chunk-NLRAQXAA.mjs} +26 -0
  64. package/dist/{chunk-NA77GEIU.mjs → chunk-NV26EGMC.mjs} +51 -1
  65. package/dist/{chunk-LECZ5DPZ.cjs → chunk-OSEQL34Q.cjs} +2 -2
  66. package/dist/{chunk-3WS5AZ3R.mjs → chunk-OSMUE5ST.mjs} +8 -3
  67. package/dist/{chunk-JFPKARWM.cjs → chunk-PMU4U2W2.cjs} +1 -0
  68. package/dist/{chunk-KPMLDT3B.mjs → chunk-QUYAGU65.mjs} +581 -300
  69. package/dist/{chunk-N62IYXYD.mjs → chunk-RFWWXEIF.mjs} +1 -1
  70. package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
  71. package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
  72. package/dist/{chunk-VG6HYT5K.cjs → chunk-TP4RAV7Y.cjs} +9 -9
  73. package/dist/{chunk-JFVT5ZZV.mjs → chunk-VAWDGGW3.mjs} +1 -1
  74. package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
  75. package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
  76. package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
  77. package/dist/{chunk-HAXFV2CD.mjs → chunk-WIJF3PBM.mjs} +1 -1
  78. package/dist/{chunk-QEWWKYDL.cjs → chunk-YCNHUIPR.cjs} +17 -10
  79. package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
  80. package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
  81. package/dist/{chunk-PJQ5W356.mjs → chunk-Z5ZZAGIH.mjs} +1 -0
  82. package/dist/{chunk-MZLJFNMH.cjs → chunk-ZDZUFD67.cjs} +1 -1
  83. package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
  84. package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
  85. package/dist/{client-component.d-DNbC4oWI.d.ts → client-component.d-9J7CkTWW.d.ts} +2 -2
  86. package/dist/{client-component.d-Bk5qKJM-.d.mts → client-component.d-ciHeCxr-.d.mts} +2 -2
  87. package/dist/{client-plugins.d-DwUqh4gp.d.ts → client-plugins.d-CUOhfapO.d.ts} +12 -8
  88. package/dist/{client-plugins.d-Pi9nG0W0.d.mts → client-plugins.d-JnRz5a1o.d.mts} +12 -8
  89. package/dist/client-plugins.d.mts +3 -3
  90. package/dist/client-plugins.d.ts +3 -3
  91. package/dist/client.cjs +1 -1
  92. package/dist/client.d.mts +8 -8
  93. package/dist/client.d.ts +8 -8
  94. package/dist/client.mjs +1 -1
  95. package/dist/config.d.mts +3 -3
  96. package/dist/config.d.ts +3 -3
  97. package/dist/desktop.d.mts +4 -4
  98. package/dist/desktop.d.ts +4 -4
  99. package/dist/{devtools-CB43AHEP.mjs → devtools-7JPQMSTQ.mjs} +4 -4
  100. package/dist/{devtools-L5DUNDF3.cjs → devtools-IZFUYWPG.cjs} +5 -5
  101. package/dist/docs.cjs +6 -6
  102. package/dist/docs.d.mts +4 -4
  103. package/dist/docs.d.ts +4 -4
  104. package/dist/docs.mjs +5 -5
  105. package/dist/environment/vite.cjs +3 -3
  106. package/dist/environment/vite.mjs +2 -2
  107. package/dist/{headers.d-CE6OWB-n.d.ts → headers.d-CqpTL_fZ.d.ts} +2 -2
  108. package/dist/{headers.d-DED1hHh4.d.mts → headers.d-rbbTKGaN.d.mts} +2 -2
  109. package/dist/i18n/client.cjs +3 -2
  110. package/dist/i18n/client.d.mts +2 -2
  111. package/dist/i18n/client.d.ts +2 -2
  112. package/dist/i18n/client.mjs +2 -1
  113. package/dist/i18n/index.cjs +3 -2
  114. package/dist/i18n/index.d.mts +3 -3
  115. package/dist/i18n/index.d.ts +3 -3
  116. package/dist/i18n/index.mjs +2 -1
  117. package/dist/i18n/server.cjs +6 -5
  118. package/dist/i18n/server.d.mts +5 -5
  119. package/dist/i18n/server.d.ts +5 -5
  120. package/dist/i18n/server.mjs +5 -4
  121. package/dist/index.cjs +29 -27
  122. package/dist/{index.d-c9UwIqDy.d.ts → index.d-CMKvzHLW.d.ts} +1 -1
  123. package/dist/{index.d-CbvOjJcp.d.mts → index.d-D_B2D9Il.d.mts} +1 -1
  124. package/dist/index.d.mts +24 -24
  125. package/dist/index.d.ts +24 -24
  126. package/dist/index.mjs +28 -26
  127. package/dist/integrations/orm.d.mts +3 -3
  128. package/dist/integrations/orm.d.ts +3 -3
  129. package/dist/integrations.d.mts +3 -3
  130. package/dist/integrations.d.ts +3 -3
  131. package/dist/internal/app-markdown-runtime.cjs +4 -2
  132. package/dist/internal/app-markdown-runtime.d.mts +13 -5
  133. package/dist/internal/app-markdown-runtime.d.ts +13 -5
  134. package/dist/internal/app-markdown-runtime.mjs +3 -1
  135. package/dist/internal/build-runtime.cjs +26 -26
  136. package/dist/internal/build-runtime.d.mts +5 -5
  137. package/dist/internal/build-runtime.d.ts +5 -5
  138. package/dist/internal/build-runtime.mjs +25 -25
  139. package/dist/internal/cli-runtime.cjs +9 -7
  140. package/dist/internal/cli-runtime.mjs +8 -6
  141. package/dist/internal/client-error-overlay.cjs +4 -4
  142. package/dist/internal/client-error-overlay.mjs +1 -1
  143. package/dist/internal/client-runtime.cjs +2 -2
  144. package/dist/internal/client-runtime.d.mts +6 -6
  145. package/dist/internal/client-runtime.d.ts +6 -6
  146. package/dist/internal/client-runtime.mjs +3 -3
  147. package/dist/internal/compression-runtime.d.mts +3 -3
  148. package/dist/internal/compression-runtime.d.ts +3 -3
  149. package/dist/internal/config-runtime.cjs +6 -6
  150. package/dist/internal/config-runtime.d.mts +6 -6
  151. package/dist/internal/config-runtime.d.ts +6 -6
  152. package/dist/internal/config-runtime.mjs +5 -5
  153. package/dist/internal/infra-analytics-runtime.cjs +8 -8
  154. package/dist/internal/infra-analytics-runtime.mjs +6 -6
  155. package/dist/internal/native-server-fns.cjs +4 -4
  156. package/dist/internal/native-server-fns.mjs +3 -3
  157. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  158. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  159. package/dist/internal/production-runtime.cjs +15 -15
  160. package/dist/internal/production-runtime.d.mts +41 -24
  161. package/dist/internal/production-runtime.d.ts +41 -24
  162. package/dist/internal/production-runtime.mjs +14 -14
  163. package/dist/internal/vercel-edge-middleware.d.mts +2 -2
  164. package/dist/internal/vercel-edge-middleware.d.ts +2 -2
  165. package/dist/markdown.d.mts +3 -3
  166. package/dist/markdown.d.ts +3 -3
  167. package/dist/middleware.cjs +3 -3
  168. package/dist/middleware.d.mts +4 -4
  169. package/dist/middleware.d.ts +4 -4
  170. package/dist/middleware.mjs +2 -2
  171. package/dist/mobile.d.mts +3 -3
  172. package/dist/mobile.d.ts +3 -3
  173. package/dist/{mount.d-DngLY7NL.d.ts → mount.d-B0XMxDRh.d.ts} +1 -1
  174. package/dist/{mount.d-BvWxf8ZE.d.mts → mount.d-ImEO7q8a.d.mts} +1 -1
  175. package/dist/{navigation-delegate.d-CMyl1h2l.d.mts → navigation-delegate.d-83Q7ksf7.d.mts} +1 -1
  176. package/dist/{navigation-delegate.d-zZogiDfa.d.ts → navigation-delegate.d-RRx1CSlb.d.ts} +1 -1
  177. package/dist/navigation.d.mts +6 -6
  178. package/dist/navigation.d.ts +6 -6
  179. package/dist/{nitro-Y3LGITW3.cjs → nitro-2LMOMIST.cjs} +2 -2
  180. package/dist/{nitro-NSTXT7LB.mjs → nitro-72TFIGGO.mjs} +1 -1
  181. package/dist/{plugin-F2O4BFTK.cjs → plugin-5PIQQVRP.cjs} +2 -2
  182. package/dist/{plugin-VEBRN7A3.mjs → plugin-QZT747YW.mjs} +1 -1
  183. package/dist/plugin.cjs +20 -20
  184. package/dist/plugin.d.mts +6 -6
  185. package/dist/plugin.d.ts +6 -6
  186. package/dist/plugin.mjs +19 -19
  187. package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
  188. package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
  189. package/dist/{render-plan.d-DQj2bzd2.d.ts → render-plan.d-Ds2sXJ5m.d.ts} +1 -1
  190. package/dist/{render-plan.d-Di1znBDW.d.mts → render-plan.d-wP8nTeRV.d.mts} +1 -1
  191. package/dist/renderer-client.cjs +3 -2
  192. package/dist/renderer-client.d.mts +6 -6
  193. package/dist/renderer-client.d.ts +6 -6
  194. package/dist/renderer-client.mjs +2 -1
  195. package/dist/{request.d-CJWzfDYJ.d.mts → request.d-F3h7K37m.d.mts} +1 -1
  196. package/dist/{request.d-C5vyoYeL.d.ts → request.d-zpSn6pu_.d.ts} +1 -1
  197. package/dist/request.d.mts +4 -4
  198. package/dist/request.d.ts +4 -4
  199. package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
  200. package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
  201. package/dist/{route-rendering.d-DhsY5M2I.d.ts → route-rendering.d-BL0_AdKj.d.ts} +1 -1
  202. package/dist/{route-rendering.d-C-et2TZ1.d.mts → route-rendering.d-Mw0ZKG2e.d.mts} +1 -1
  203. package/dist/{router.d-CJB-Ntni.d.ts → router.d-BwXigemZ.d.ts} +1 -1
  204. package/dist/{router.d-BMDS5s5X.d.mts → router.d-NGVsU11T.d.mts} +1 -1
  205. package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
  206. package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
  207. package/dist/routes.d.mts +3 -3
  208. package/dist/routes.d.ts +3 -3
  209. package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-BhPgtN_S.d.ts} +2 -1
  210. package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-D67HQmnv.d.mts} +2 -1
  211. package/dist/{rsc-pipeline-NJKLZ3YE.cjs → rsc-pipeline-BNXYMG4G.cjs} +6 -6
  212. package/dist/{rsc-pipeline-AXQJCCHI.mjs → rsc-pipeline-DHYZLWSF.mjs} +5 -5
  213. package/dist/{runtime-DMW6DDOI.cjs → runtime-IWOT6ZVC.cjs} +7 -7
  214. package/dist/{runtime-JXNEKOSE.mjs → runtime-XPYKUNL3.mjs} +5 -5
  215. package/dist/{runtime.d-BonodRI9.d.mts → runtime.d-BA3MzhXz.d.mts} +1 -1
  216. package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
  217. package/dist/{runtime.d-uw4123iI.d.ts → runtime.d-OBIZWpx1.d.ts} +1 -1
  218. package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
  219. package/dist/server-plugins.d.mts +5 -5
  220. package/dist/server-plugins.d.ts +5 -5
  221. package/dist/server.cjs +40 -40
  222. package/dist/server.d.mts +14 -14
  223. package/dist/server.d.ts +14 -14
  224. package/dist/server.mjs +22 -22
  225. package/dist/{spa-router.d-rha3M95y.d.mts → spa-router.d-BG2XzE5p.d.mts} +3 -3
  226. package/dist/{spa-router.d-l0d9pPZj.d.ts → spa-router.d-DrYT944-.d.ts} +3 -3
  227. package/dist/testing.cjs +6 -5
  228. package/dist/testing.d.mts +3 -3
  229. package/dist/testing.d.ts +3 -3
  230. package/dist/testing.mjs +6 -5
  231. package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.mts} +4 -0
  232. package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.ts} +4 -0
  233. package/dist/{utils.d-BzuTobEc.d.mts → utils.d-C1k9BJeD.d.mts} +1 -1
  234. package/dist/{utils.d-BK-PTOF8.d.ts → utils.d-DcF4wxey.d.ts} +1 -1
  235. package/dist/version.cjs +2 -2
  236. package/dist/version.mjs +1 -1
  237. package/dist/vite.cjs +20 -20
  238. package/dist/vite.d.mts +9 -7
  239. package/dist/vite.d.ts +9 -7
  240. package/dist/vite.mjs +19 -19
  241. package/package.json +2 -2
  242. package/dist/analyzer-GUIRJWZH.cjs +0 -16
@@ -9,7 +9,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkK7JMTAFHcjs = require('./chunk-K7JMTAFH.cjs');
12
+ var _chunkE3LE6EZHcjs = require('./chunk-E3LE6EZH.cjs');
13
13
 
14
14
 
15
15
  var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
@@ -39,18 +39,20 @@ var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
39
39
 
40
40
 
41
41
 
42
- var _chunk2MR4MABGcjs = require('./chunk-2MR4MABG.cjs');
43
42
 
44
43
 
45
- var _chunkK4UGCUXXcjs = require('./chunk-K4UGCUXX.cjs');
44
+ var _chunkC5AM2XDNcjs = require('./chunk-C5AM2XDN.cjs');
46
45
 
47
46
 
47
+ var _chunkFSSONJRVcjs = require('./chunk-FSSONJRV.cjs');
48
48
 
49
49
 
50
50
 
51
51
 
52
52
 
53
- var _chunkVG6HYT5Kcjs = require('./chunk-VG6HYT5K.cjs');
53
+
54
+
55
+ var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
54
56
 
55
57
 
56
58
 
@@ -76,7 +78,12 @@ var _chunkXGJVRPYLcjs = require('./chunk-XGJVRPYL.cjs');
76
78
 
77
79
 
78
80
 
79
- var _chunkIEN2EFE5cjs = require('./chunk-IEN2EFE5.cjs');
81
+
82
+
83
+
84
+
85
+
86
+ var _chunkBE7AQXJBcjs = require('./chunk-BE7AQXJB.cjs');
80
87
 
81
88
 
82
89
  var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
@@ -93,7 +100,7 @@ var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
93
100
  var _chunkUVV3I5QAcjs = require('./chunk-UVV3I5QA.cjs');
94
101
 
95
102
 
96
- var _chunkOCNV4CI2cjs = require('./chunk-OCNV4CI2.cjs');
103
+ var _chunkMQ4DYVFScjs = require('./chunk-MQ4DYVFS.cjs');
97
104
 
98
105
 
99
106
  var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
@@ -154,10 +161,10 @@ var _chunk4P5634G6cjs = require('./chunk-4P5634G6.cjs');
154
161
 
155
162
 
156
163
 
157
- var _chunk4AC4PXZOcjs = require('./chunk-4AC4PXZO.cjs');
164
+ var _chunkN3XO5AL5cjs = require('./chunk-N3XO5AL5.cjs');
158
165
 
159
166
 
160
- var _chunkNSZY3EWGcjs = require('./chunk-NSZY3EWG.cjs');
167
+ var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
161
168
 
162
169
 
163
170
 
@@ -208,7 +215,7 @@ var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
208
215
 
209
216
 
210
217
 
211
- var _chunk2AM26UGIcjs = require('./chunk-2AM26UGI.cjs');
218
+ var _chunkNLBK37HIcjs = require('./chunk-NLBK37HI.cjs');
212
219
 
213
220
 
214
221
 
@@ -243,7 +250,7 @@ var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
243
250
  var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
244
251
 
245
252
 
246
- var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
253
+ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
247
254
 
248
255
 
249
256
 
@@ -278,18 +285,14 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
278
285
  var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
279
286
 
280
287
 
281
- var _chunkMZLJFNMHcjs = require('./chunk-MZLJFNMH.cjs');
282
-
283
-
284
-
285
- var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
288
+ var _chunkZDZUFD67cjs = require('./chunk-ZDZUFD67.cjs');
286
289
 
287
290
 
288
291
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
289
292
 
290
293
 
291
294
 
292
- var _chunkY2SZVIVHcjs = require('./chunk-Y2SZVIVH.cjs');
295
+ var _chunkGPICBTDVcjs = require('./chunk-GPICBTDV.cjs');
293
296
 
294
297
 
295
298
  var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
@@ -315,6 +318,10 @@ var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
315
318
  var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
316
319
 
317
320
 
321
+
322
+ var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
323
+
324
+
318
325
  var _chunkDXUXQP2Tcjs = require('./chunk-DXUXQP2T.cjs');
319
326
 
320
327
 
@@ -445,6 +452,8 @@ function getRouteSpecificity(entry) {
445
452
  function compareRouteEntries(left, right) {
446
453
  return _chunkYTVSWXEZcjs.compareRouteSpecificity.call(void 0, getRouteSpecificity(left), getRouteSpecificity(right));
447
454
  }
455
+ var PLAN_SOURCE = /\.(?:[cm]?[jt]sx?|vue|svelte)$/;
456
+ var NODE_MODULES_SEGMENT = `${path3.default.sep}node_modules${path3.default.sep}`;
448
457
  var RouteManager = class _RouteManager {
449
458
  constructor(config, viteServer) {
450
459
  this.routes = /* @__PURE__ */ new Map();
@@ -460,9 +469,17 @@ var RouteManager = class _RouteManager {
460
469
  this.redirects = /* @__PURE__ */ new Map();
461
470
  this.programmaticPages = /* @__PURE__ */ new Map();
462
471
  this.programmaticLayouts = /* @__PURE__ */ new Map();
463
- this.programmaticClientRoutes = _chunkIEN2EFE5cjs.mergeProgrammaticClientRoutes.call(void 0, []);
472
+ this.programmaticClientRoutes = _chunkBE7AQXJBcjs.mergeProgrammaticClientRoutes.call(void 0, []);
464
473
  this.discovery = Promise.resolve();
465
474
  this.reportedIslandsErrors = /* @__PURE__ */ new Set();
475
+ // Each route module's hydration plan from the last plan, with the source files it read, so a dev
476
+ // replan recomputes only the modules that read an edited file. Every replan used to read and
477
+ // walk every route's import graph again, seconds on a large app, before an edit could update.
478
+ this.ownerPlans = /* @__PURE__ */ new Map();
479
+ this.sourceChangeTracking = false;
480
+ this.linkedSources = /* @__PURE__ */ new Map();
481
+ // Source files edited since the last plan; null when the next plan must recompute every module.
482
+ this.editedSources = null;
466
483
  this.config = config;
467
484
  this.viteServer = viteServer;
468
485
  if (viteServer) _chunkE7QOEV5Zcjs.trackProgrammaticRouteSources.call(void 0, );
@@ -509,7 +526,7 @@ var RouteManager = class _RouteManager {
509
526
  await this.discoverFileRoutes(source);
510
527
  await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
511
528
  }
512
- this.programmaticClientRoutes = _chunkIEN2EFE5cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
529
+ this.programmaticClientRoutes = _chunkBE7AQXJBcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
513
530
  for (const slot of this.routeSlots.values()) {
514
531
  if (slot.interception && !this.pageRouteShapes.has(_chunkYTVSWXEZcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
515
532
  throw new (0, _chunkYTVSWXEZcjs.AmbiguousRouteError)(
@@ -528,8 +545,8 @@ var RouteManager = class _RouteManager {
528
545
  )
529
546
  );
530
547
  this.orderedLayouts = Array.from(this.layouts.values()).sort(
531
- (left, right) => _chunk2MR4MABGcjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunk2MR4MABGcjs.getRouteDirectoryDepth.call(void 0, right.pattern)
532
- ).map((entry) => ({ entry, groupScope: _chunk2MR4MABGcjs.getRouteGroupScope.call(void 0, entry.pattern) }));
548
+ (left, right) => _chunkC5AM2XDNcjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkC5AM2XDNcjs.getRouteDirectoryDepth.call(void 0, right.pattern)
549
+ ).map((entry) => ({ entry, groupScope: _chunkC5AM2XDNcjs.getRouteGroupScope.call(void 0, entry.pattern) }));
533
550
  for (const slot of this.routeSlots.values()) {
534
551
  if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
535
552
  this.routeSlotOwnerSegments.set(
@@ -778,10 +795,88 @@ var RouteManager = class _RouteManager {
778
795
  return this.clientManifestCache.manifest;
779
796
  }
780
797
  const cacheFile = this.packageClientBoundaryCacheFile;
781
- return cacheFile ? _chunkIEN2EFE5cjs.runWithPackageClientBoundaryCacheFile.call(void 0,
782
- cacheFile,
783
- () => this.computeClientManifest(normalizedProjectRoot)
784
- ) : this.computeClientManifest(normalizedProjectRoot);
798
+ const compute = () => _chunkBE7AQXJBcjs.withFarmSourceSnapshot.call(void 0,
799
+ () => this.computeClientManifest(normalizedProjectRoot),
800
+ this.sourceSnapshot
801
+ );
802
+ return cacheFile ? _chunkBE7AQXJBcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
803
+ }
804
+ /**
805
+ * @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
806
+ * reuse the plan of each route module that read none of the edited files. Without tracking,
807
+ * every plan recomputes every module.
808
+ */
809
+ trackSourceChanges() {
810
+ this.sourceChangeTracking = true;
811
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkBE7AQXJBcjs.FarmSourceSnapshotStore)())));
812
+ }
813
+ /**
814
+ * @internal A watched file changed. An edit to a script narrows the next replan to the route
815
+ * modules that read it; a script added or removed (where an import may now resolve), or a
816
+ * changed JSON file (a package manifest or tsconfig paths), replans everything. Other files
817
+ * (stylesheets, Markdown, assets) are not read by plans.
818
+ */
819
+ noteSourceChange(file, event) {
820
+ if (file.endsWith(".d.ts")) return;
821
+ if (PLAN_SOURCE.test(file)) {
822
+ if (event === "update") {
823
+ _optionalChain([this, 'access', _6 => _6.editedSources, 'optionalAccess', _7 => _7.add, 'call', _8 => _8(path3.default.resolve(file))]);
824
+ return;
825
+ }
826
+ } else if (!/\.jsonc?$/.test(file)) {
827
+ return;
828
+ }
829
+ this.editedSources = null;
830
+ _optionalChain([this, 'access', _9 => _9.sourceSnapshot, 'optionalAccess', _10 => _10.clear, 'call', _11 => _11()]);
831
+ this.linkedSources.clear();
832
+ }
833
+ /**
834
+ * @internal Whether an edit to `file` leaves the current plan as it is: a client module the
835
+ * last plan read whose directive, island and hydrate exports, export shape and imports the edit
836
+ * kept. The next replan reads it again (the watcher reported it).
837
+ */
838
+ isEditPlanNeutral(file) {
839
+ if (!this.sourceChangeTracking || !this.editedSources || !this.clientManifestCache) {
840
+ return false;
841
+ }
842
+ const previous = _optionalChain([this, 'access', _12 => _12.sourceSnapshot, 'optionalAccess', _13 => _13.peekSource, 'call', _14 => _14(path3.default.resolve(file))]);
843
+ return previous !== void 0 && _chunkBE7AQXJBcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
844
+ }
845
+ /**
846
+ * A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
847
+ * Callers get a copy, since the route budget rewrites a plan's fields in place.
848
+ */
849
+ planRouteModule(key, edited, compute) {
850
+ const previous = this.ownerPlans.get(key);
851
+ if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
852
+ return { ...previous.plan };
853
+ }
854
+ const { result, files } = _chunkBE7AQXJBcjs.traceFarmSourceReads.call(void 0, compute);
855
+ const sources = /* @__PURE__ */ new Set();
856
+ for (const file of files) {
857
+ const source = this.planSourcePath(file);
858
+ if (source) sources.add(source);
859
+ }
860
+ this.ownerPlans.set(key, { plan: result, files: sources });
861
+ return { ...result };
862
+ }
863
+ /**
864
+ * The path the watcher reports for a file a plan read: itself, or the real path of a workspace
865
+ * package's source read through its `node_modules` link. Null for an installed package's file.
866
+ */
867
+ planSourcePath(file) {
868
+ if (!file.includes(NODE_MODULES_SEGMENT)) return file;
869
+ let source = this.linkedSources.get(file);
870
+ if (source === void 0) {
871
+ try {
872
+ const real = _fs.realpathSync.call(void 0, file);
873
+ source = real.includes(NODE_MODULES_SEGMENT) ? null : real;
874
+ } catch (e) {
875
+ source = null;
876
+ }
877
+ this.linkedSources.set(file, source);
878
+ }
879
+ return source;
785
880
  }
786
881
  /**
787
882
  * @internal Keep package client-boundary inspections in `file` between plans, as the dev server
@@ -790,6 +885,15 @@ var RouteManager = class _RouteManager {
790
885
  usePackageClientBoundaryCacheFile(file) {
791
886
  this.packageClientBoundaryCacheFile = file;
792
887
  }
888
+ /**
889
+ * @internal Run `operation` (synchronous) with the package inspections of the latest plan, as
890
+ * the dev server's transforms and renders inspect the packages a module imports. Without a cache
891
+ * file (outside the dev server), it runs as it is.
892
+ */
893
+ inspectPackages(operation) {
894
+ const file = this.packageClientBoundaryCacheFile;
895
+ return file ? _chunkBE7AQXJBcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
896
+ }
793
897
  computeClientManifest(normalizedProjectRoot) {
794
898
  const toUrlPath = (absolutePath) => {
795
899
  const rootRelative = _chunkQMNWKQL4cjs.toRootRelativeUrlPath.call(void 0, absolutePath, normalizedProjectRoot);
@@ -806,79 +910,102 @@ var RouteManager = class _RouteManager {
806
910
  const unsupportedIntegrationProvider = integrationProviders.find(
807
911
  (provider) => provider.supportsIsolatedHydration !== true
808
912
  );
809
- if (_optionalChain([this, 'access', _6 => _6.config, 'access', _7 => _7.experimental, 'optionalAccess', _8 => _8.isolatedClientHydration]) === "enabled" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _9 => _9.config, 'access', _10 => _10.experimental, 'optionalAccess', _11 => _11.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
913
+ if (_optionalChain([this, 'access', _15 => _15.config, 'access', _16 => _16.experimental, 'optionalAccess', _17 => _17.isolatedClientHydration]) === "enabled" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _18 => _18.config, 'access', _19 => _19.experimental, 'optionalAccess', _20 => _20.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
810
914
  _chunkQMNWKQL4cjs.logger.warn(
811
915
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
812
916
  );
813
917
  }
814
- const isolatedMode = _chunkIEN2EFE5cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
815
- _optionalChain([this, 'access', _12 => _12.config, 'access', _13 => _13.experimental, 'optionalAccess', _14 => _14.isolatedClientHydration]),
918
+ const isolatedMode = _chunkBE7AQXJBcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
919
+ _optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]),
816
920
  {
817
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _15 => _15.config, 'access', _16 => _16.experimental, 'optionalAccess', _17 => _17.serverComponents])) === "rsc",
921
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) === "rsc",
818
922
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
819
923
  }
820
924
  );
821
- const planOptions = _chunkIEN2EFE5cjs.getFarmClientHydrationPlanOptions.call(void 0,
925
+ const planOptions = _chunkBE7AQXJBcjs.getFarmClientHydrationPlanOptions.call(void 0,
822
926
  this.config.renderer,
823
927
  Boolean(unsupportedIntegrationProvider)
824
928
  );
825
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _18 => _18.config, 'access', _19 => _19.experimental, 'optionalAccess', _20 => _20.serverComponents])) === "islands";
929
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _27 => _27.config, 'access', _28 => _28.experimental, 'optionalAccess', _29 => _29.serverComponents])) === "islands";
930
+ const changed = _optionalChain([this, 'access', _30 => _30.sourceSnapshot, 'optionalAccess', _31 => _31.refresh, 'call', _32 => _32(_nullishCoalesce(this.editedSources, () => ( [])))]);
931
+ let edited = null;
932
+ if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
933
+ edited = /* @__PURE__ */ new Set();
934
+ for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
935
+ if (_chunkBE7AQXJBcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
936
+ const source = this.planSourcePath(file);
937
+ if (source) edited.add(source);
938
+ }
939
+ }
940
+ if (!edited) this.ownerPlans.clear();
826
941
  const layoutEntries = Array.from(this.layouts.values()).map((entry) => ({
827
942
  entry,
828
- metadata: _chunkIEN2EFE5cjs.getClientModuleHydrationPlan.call(void 0,
829
- entry.modulePath,
830
- normalizedProjectRoot,
831
- isolatedMode,
832
- islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions
943
+ metadata: this.planRouteModule(
944
+ `layout:${entry.modulePath}`,
945
+ edited,
946
+ () => _chunkBE7AQXJBcjs.getClientModuleHydrationPlan.call(void 0,
947
+ entry.modulePath,
948
+ normalizedProjectRoot,
949
+ isolatedMode,
950
+ islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions
951
+ )
833
952
  )
834
953
  }));
835
- const markdownPagePlan = _chunkIEN2EFE5cjs.createMarkdownPageHydrationPlanner.call(void 0,
954
+ const markdownComponentsPlan = _chunkBE7AQXJBcjs.createMarkdownPageHydrationPlanner.call(void 0,
836
955
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
837
956
  normalizedProjectRoot,
838
957
  isolatedMode,
839
958
  { ...planOptions, packageReferences: islandsMode }
840
959
  );
960
+ let markdownPlan;
961
+ const markdownPagePlan = () => ({
962
+ ..._nullishCoalesce(markdownPlan, () => ( (markdownPlan = this.planRouteModule("markdown", edited, markdownComponentsPlan))))
963
+ });
841
964
  const routeEntries = Array.from(this.routes.values()).map((entry) => ({
842
965
  entry,
843
- metadata: _chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : _chunkIEN2EFE5cjs.getClientModuleHydrationPlan.call(void 0, entry.modulePath, normalizedProjectRoot, isolatedMode, {
844
- ...planOptions,
845
- serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.serverComponents])) === "islands"
846
- })
966
+ metadata: _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
967
+ `page:${entry.modulePath}`,
968
+ edited,
969
+ () => _chunkBE7AQXJBcjs.getClientModuleHydrationPlan.call(void 0, entry.modulePath, normalizedProjectRoot, isolatedMode, {
970
+ ...planOptions,
971
+ serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _33 => _33.config, 'access', _34 => _34.experimental, 'optionalAccess', _35 => _35.serverComponents])) === "islands"
972
+ })
973
+ )
847
974
  }));
848
975
  const markdownFallback = routeEntries.find(
849
- ({ entry, metadata }) => _chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
976
+ ({ entry, metadata }) => _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
850
977
  );
851
978
  if (markdownFallback) {
852
979
  _chunkQMNWKQL4cjs.logger.warn(
853
980
  `[Farm.js] client components in Markdown pages stay static: ${markdownFallback.metadata.fallbackReason}.`
854
981
  );
855
982
  }
856
- const markdownStaticPackages = _optionalChain([routeEntries, 'access', _24 => _24.find, 'call', _25 => _25(
857
- ({ entry, metadata }) => _chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
858
- ), 'optionalAccess', _26 => _26.metadata, 'access', _27 => _27.staticPackageBoundaries]);
983
+ const markdownStaticPackages = _optionalChain([routeEntries, 'access', _36 => _36.find, 'call', _37 => _37(
984
+ ({ entry, metadata }) => _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
985
+ ), 'optionalAccess', _38 => _38.metadata, 'access', _39 => _39.staticPackageBoundaries]);
859
986
  if (markdownStaticPackages) {
860
987
  _chunkQMNWKQL4cjs.logger.info(
861
988
  `[Farm.js] Markdown pages render client components from ${markdownStaticPackages.join(", ")} as static HTML: package client components cannot be isolated yet.`
862
989
  );
863
990
  }
864
991
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
865
- if (_chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
992
+ if (_chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
866
993
  _chunkQMNWKQL4cjs.logger.info(
867
994
  `[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
868
995
  );
869
996
  }
870
- _chunkIEN2EFE5cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
997
+ _chunkBE7AQXJBcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
871
998
  layoutEntries.map(({ entry, metadata }) => ({
872
999
  pattern: entry.pattern,
873
- depth: _chunk2MR4MABGcjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1000
+ depth: _chunkC5AM2XDNcjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
874
1001
  metadata
875
1002
  })),
876
1003
  routeEntries.map(({ entry, metadata }) => ({
877
1004
  pattern: getRouteEntryDirectory(entry),
878
- depth: _chunk2MR4MABGcjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1005
+ depth: _chunkC5AM2XDNcjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
879
1006
  metadata
880
1007
  })),
881
- _chunk2MR4MABGcjs.routeBoundaryCoversDirectory,
1008
+ _chunkC5AM2XDNcjs.routeBoundaryCoversDirectory,
882
1009
  { serverOwners: islandsMode }
883
1010
  );
884
1011
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
@@ -898,7 +1025,7 @@ var RouteManager = class _RouteManager {
898
1025
  const routes = routeEntries.map(({ entry, metadata }) => {
899
1026
  const programmaticPage = this.programmaticPages.get(entry.modulePath);
900
1027
  const layoutShouldHydrate = layoutEntries.some(
901
- ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunk2MR4MABGcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1028
+ ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkC5AM2XDNcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
902
1029
  );
903
1030
  return {
904
1031
  pattern: entry.pattern,
@@ -914,15 +1041,15 @@ var RouteManager = class _RouteManager {
914
1041
  modulePath: toUrlPath(boundary.modulePath)
915
1042
  }))
916
1043
  } : {},
917
- ..._chunkIEN2EFE5cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
918
- renderPlan: _chunk2MR4MABGcjs.createFarmRouteRenderPlan.call(void 0, {
1044
+ ..._chunkBE7AQXJBcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1045
+ renderPlan: _chunkC5AM2XDNcjs.createFarmRouteRenderPlan.call(void 0, {
919
1046
  pageShouldHydrate: metadata.shouldHydrate,
920
1047
  layoutShouldHydrate,
921
1048
  islandStrategy: metadata.islandStrategy
922
1049
  }),
923
1050
  suppressedAsyncHydration: metadata.suppressedAsyncHydration,
924
1051
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {},
925
- search: _chunkE7QOEV5Zcjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _28 => _28.search])),
1052
+ search: _chunkE7QOEV5Zcjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _40 => _40.search])),
926
1053
  segments: entry.route.segments.map((seg) => ({
927
1054
  segment: seg.segment,
928
1055
  isDynamic: seg.isDynamic,
@@ -931,7 +1058,7 @@ var RouteManager = class _RouteManager {
931
1058
  }))
932
1059
  };
933
1060
  });
934
- const treeLayoutPatterns = islandsMode ? _chunk2MR4MABGcjs.getFarmServerTreeLayoutPatterns.call(void 0,
1061
+ const treeLayoutPatterns = islandsMode ? _chunkC5AM2XDNcjs.getFarmServerTreeLayoutPatterns.call(void 0,
935
1062
  layoutEntries.map(({ entry, metadata }) => ({
936
1063
  pattern: entry.pattern,
937
1064
  shouldHydrate: metadata.shouldHydrate,
@@ -956,7 +1083,7 @@ var RouteManager = class _RouteManager {
956
1083
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
957
1084
  }));
958
1085
  const slots = Array.from(this.routeSlots.values()).map((entry) => {
959
- const metadata = _chunkIEN2EFE5cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1086
+ const metadata = _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
960
1087
  return {
961
1088
  name: entry.name,
962
1089
  ownerPattern: entry.ownerPattern,
@@ -972,7 +1099,7 @@ var RouteManager = class _RouteManager {
972
1099
  };
973
1100
  });
974
1101
  const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
975
- metadata: _chunkIEN2EFE5cjs.getClientModuleHydrationPlan.call(void 0,
1102
+ metadata: _chunkBE7AQXJBcjs.getClientModuleHydrationPlan.call(void 0,
976
1103
  entry.modulePath,
977
1104
  normalizedProjectRoot,
978
1105
  isolatedMode,
@@ -1000,6 +1127,7 @@ var RouteManager = class _RouteManager {
1000
1127
  _chunkQMNWKQL4cjs.logger.error(`[Farm.js] islands mode cannot hydrate ${error}`);
1001
1128
  }
1002
1129
  const manifest = { routes, layouts, slots };
1130
+ this.editedSources = this.sourceChangeTracking ? /* @__PURE__ */ new Set() : null;
1003
1131
  this.clientManifestCache = {
1004
1132
  projectRoot: normalizedProjectRoot,
1005
1133
  manifest,
@@ -1036,7 +1164,7 @@ var RouteManager = class _RouteManager {
1036
1164
  getIsolatedClientBoundaryModules(projectRoot = this.config.root) {
1037
1165
  const normalizedProjectRoot = path3.default.resolve(projectRoot);
1038
1166
  this.generateClientManifest(normalizedProjectRoot);
1039
- return _nullishCoalesce(_optionalChain([this, 'access', _29 => _29.clientManifestCache, 'optionalAccess', _30 => _30.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
1167
+ return _nullishCoalesce(_optionalChain([this, 'access', _41 => _41.clientManifestCache, 'optionalAccess', _42 => _42.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
1040
1168
  }
1041
1169
  /**
1042
1170
  * @internal Islands-mode pages with a client component that cannot become an island. Hydrating
@@ -1044,7 +1172,7 @@ var RouteManager = class _RouteManager {
1044
1172
  */
1045
1173
  getIslandsErrors(projectRoot = this.config.root) {
1046
1174
  this.generateClientManifest(path3.default.resolve(projectRoot));
1047
- return _nullishCoalesce(_optionalChain([this, 'access', _31 => _31.clientManifestCache, 'optionalAccess', _32 => _32.islandsErrors]), () => ( []));
1175
+ return _nullishCoalesce(_optionalChain([this, 'access', _43 => _43.clientManifestCache, 'optionalAccess', _44 => _44.islandsErrors]), () => ( []));
1048
1176
  }
1049
1177
  /**
1050
1178
  * Invalidate build-time route metadata after a page or layout changes in dev.
@@ -1063,12 +1191,12 @@ var RouteManager = class _RouteManager {
1063
1191
  const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
1064
1192
  return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
1065
1193
  }
1066
- if (_chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
1194
+ if (_chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
1067
1195
  const mdxConfig = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx);
1068
1196
  const viteServer = this.viteServer;
1069
- return await _chunk4AC4PXZOcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
1197
+ return await _chunkN3XO5AL5cjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
1070
1198
  // Loaded on render: the route runtime manifest only reads metadata and rendering config.
1071
- components: () => _chunk4AC4PXZOcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
1199
+ components: () => _chunkN3XO5AL5cjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
1072
1200
  root: this.config.root,
1073
1201
  loadModule: viteServer ? (componentModulePath) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
1074
1202
  }),
@@ -1120,7 +1248,7 @@ var RouteManager = class _RouteManager {
1120
1248
  */
1121
1249
  createRoutePattern(route) {
1122
1250
  if (route.segments.length === 0) return "/";
1123
- return "/" + route.segments.map(_chunk2MR4MABGcjs.formatRouteSegment).join("/");
1251
+ return "/" + route.segments.map(_chunkC5AM2XDNcjs.formatRouteSegment).join("/");
1124
1252
  }
1125
1253
  registerPageRoute(entry) {
1126
1254
  _chunkYTVSWXEZcjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
@@ -1171,8 +1299,8 @@ var RouteManager = class _RouteManager {
1171
1299
  }
1172
1300
  }
1173
1301
  for (const [pattern, group] of canonicalPageGroups) {
1174
- const componentFiles = group.files.filter((file) => !_chunkNSZY3EWGcjs.isFarmMarkdownPageFile.call(void 0, file));
1175
- const markdownFiles = group.files.filter(_chunkNSZY3EWGcjs.isFarmMarkdownPageFile);
1302
+ const componentFiles = group.files.filter((file) => !_chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, file));
1303
+ const markdownFiles = group.files.filter(_chunkL6E4SHUBcjs.isFarmMarkdownPageFile);
1176
1304
  if (componentFiles.length > 1) {
1177
1305
  throw new Error(
1178
1306
  `Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path3.default.join(appDir, file)).join(" and ")}.`
@@ -1189,7 +1317,7 @@ var RouteManager = class _RouteManager {
1189
1317
  if (!primaryFile) continue;
1190
1318
  const modulePath = path3.default.join(appDir, primaryFile);
1191
1319
  const existing = this.routes.get(pattern);
1192
- if (_optionalChain([existing, 'optionalAccess', _33 => _33.sourceRoot]) === source.root) {
1320
+ if (_optionalChain([existing, 'optionalAccess', _45 => _45.sourceRoot]) === source.root) {
1193
1321
  throw new Error(
1194
1322
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1195
1323
  );
@@ -1214,9 +1342,9 @@ var RouteManager = class _RouteManager {
1214
1342
  for (const file of files) {
1215
1343
  const route = _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, file);
1216
1344
  const modulePath = path3.default.join(appDir, file);
1217
- const pattern = _chunk2MR4MABGcjs.createRouteDirectoryPattern.call(void 0, route);
1345
+ const pattern = _chunkC5AM2XDNcjs.createRouteDirectoryPattern.call(void 0, route);
1218
1346
  const existing = target.get(pattern);
1219
- if (_optionalChain([existing, 'optionalAccess', _34 => _34.sourceRoot]) === source.root) {
1347
+ if (_optionalChain([existing, 'optionalAccess', _46 => _46.sourceRoot]) === source.root) {
1220
1348
  throw new Error(
1221
1349
  `Duplicate ${kind} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1222
1350
  );
@@ -1236,10 +1364,10 @@ var RouteManager = class _RouteManager {
1236
1364
  const modulePath = path3.default.join(appDir, file);
1237
1365
  const pattern = this.createRoutePattern(slot.route);
1238
1366
  const ownerPattern = this.createRoutePattern(slot.ownerRoute);
1239
- const ownerDirectory = _chunk2MR4MABGcjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1367
+ const ownerDirectory = _chunkC5AM2XDNcjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1240
1368
  const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
1241
1369
  const existing = this.routeSlots.get(key);
1242
- if (_optionalChain([existing, 'optionalAccess', _35 => _35.sourceRoot]) === source.root) {
1370
+ if (_optionalChain([existing, 'optionalAccess', _47 => _47.sourceRoot]) === source.root) {
1243
1371
  throw new Error(
1244
1372
  `Duplicate route slot "${slot.name}" for "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1245
1373
  );
@@ -1268,7 +1396,7 @@ var RouteManager = class _RouteManager {
1268
1396
  const key = `${kind}:${pattern}`;
1269
1397
  const existing = this.metadataImages.get(key);
1270
1398
  const sourceType = isStaticMetadataImageFile(file) ? "static" : "module";
1271
- if (_optionalChain([existing, 'optionalAccess', _36 => _36.sourceRoot]) === source.root) {
1399
+ if (_optionalChain([existing, 'optionalAccess', _48 => _48.sourceRoot]) === source.root) {
1272
1400
  throw new Error(
1273
1401
  `Duplicate ${fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one static image or module per route segment.`
1274
1402
  );
@@ -1296,7 +1424,7 @@ var RouteManager = class _RouteManager {
1296
1424
  const pattern = this.createRoutePattern(route);
1297
1425
  const key = `${descriptor.kind}:${pattern}`;
1298
1426
  const existing = this.metadataRoutes.get(key);
1299
- if (_optionalChain([existing, 'optionalAccess', _37 => _37.sourceRoot]) === source.root) {
1427
+ if (_optionalChain([existing, 'optionalAccess', _49 => _49.sourceRoot]) === source.root) {
1300
1428
  throw new Error(
1301
1429
  `Duplicate ${descriptor.fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one .ts or .js metadata route per segment.`
1302
1430
  );
@@ -1318,11 +1446,11 @@ var RouteManager = class _RouteManager {
1318
1446
  srcDir: source.srcDir,
1319
1447
  loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
1320
1448
  });
1321
- const graph = this.viteServer ? _chunkIEN2EFE5cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1449
+ const graph = this.viteServer ? _chunkBE7AQXJBcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1322
1450
  for (const { filePath, manifest } of manifests) {
1323
1451
  if (graph) {
1324
1452
  clientRoutes.push(
1325
- _chunkIEN2EFE5cjs.resolveProgrammaticClientRoutes.call(void 0, {
1453
+ _chunkBE7AQXJBcjs.resolveProgrammaticClientRoutes.call(void 0, {
1326
1454
  graph,
1327
1455
  routesFile: toRealPath(filePath),
1328
1456
  routes: manifest.routes,
@@ -1335,7 +1463,7 @@ var RouteManager = class _RouteManager {
1335
1463
  const route = _chunkE7QOEV5Zcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "page");
1336
1464
  const pattern = this.createRoutePattern(route);
1337
1465
  const existing = this.routes.get(pattern);
1338
- if (_optionalChain([existing, 'optionalAccess', _38 => _38.sourceRoot]) === source.root) {
1466
+ if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
1339
1467
  throw new Error(
1340
1468
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1341
1469
  );
@@ -1353,9 +1481,9 @@ var RouteManager = class _RouteManager {
1353
1481
  }
1354
1482
  if (definition.kind === "layout") {
1355
1483
  const route = _chunkE7QOEV5Zcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
1356
- const pattern = _chunk2MR4MABGcjs.createRouteDirectoryPattern.call(void 0, route);
1484
+ const pattern = _chunkC5AM2XDNcjs.createRouteDirectoryPattern.call(void 0, route);
1357
1485
  const existing = this.layouts.get(pattern);
1358
- if (_optionalChain([existing, 'optionalAccess', _39 => _39.sourceRoot]) === source.root) {
1486
+ if (_optionalChain([existing, 'optionalAccess', _51 => _51.sourceRoot]) === source.root) {
1359
1487
  throw new Error(
1360
1488
  `Duplicate layout route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1361
1489
  );
@@ -1384,7 +1512,7 @@ var RouteManager = class _RouteManager {
1384
1512
  }
1385
1513
  async loadProgrammaticRoutesModule(filePath) {
1386
1514
  if (this.viteServer) {
1387
- const viteRoot = _optionalChain([this, 'access', _40 => _40.viteServer, 'access', _41 => _41.config, 'optionalAccess', _42 => _42.root]) || this.config.root || process.cwd();
1515
+ const viteRoot = _optionalChain([this, 'access', _52 => _52.viteServer, 'access', _53 => _53.config, 'optionalAccess', _54 => _54.root]) || this.config.root || process.cwd();
1388
1516
  return await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, filePath, viteRoot));
1389
1517
  }
1390
1518
  return await import(
@@ -1400,7 +1528,7 @@ var RouteManager = class _RouteManager {
1400
1528
  const matchingLayouts = [];
1401
1529
  for (const { entry, groupScope } of this.orderedLayouts) {
1402
1530
  if (!_chunkQMNWKQL4cjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
1403
- if (groupScope !== null && !_chunk2MR4MABGcjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1531
+ if (groupScope !== null && !_chunkC5AM2XDNcjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1404
1532
  continue;
1405
1533
  }
1406
1534
  matchingLayouts.push(entry);
@@ -1481,14 +1609,14 @@ var RouteManager = class _RouteManager {
1481
1609
  let page = route;
1482
1610
  for (const boundaryEntry of boundaries.values()) {
1483
1611
  if (!_chunkQMNWKQL4cjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
1484
- const groupScope = _chunk2MR4MABGcjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1612
+ const groupScope = _chunkC5AM2XDNcjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1485
1613
  if (groupScope !== null) {
1486
1614
  if (page === void 0) page = this.matchPageRoute(_chunkQMNWKQL4cjs.splitRoutePath.call(void 0, normalizedPath));
1487
- if (!_chunk2MR4MABGcjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1615
+ if (!_chunkC5AM2XDNcjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1488
1616
  }
1489
1617
  const depth = boundaryEntry.route.segments.length;
1490
- const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _43 => _43.route, 'access', _44 => _44.segments, 'access', _45 => _45.length]), () => ( -1));
1491
- if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunk2MR4MABGcjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunk2MR4MABGcjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1618
+ const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _55 => _55.route, 'access', _56 => _56.segments, 'access', _57 => _57.length]), () => ( -1));
1619
+ if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkC5AM2XDNcjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkC5AM2XDNcjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1492
1620
  bestMatch = boundaryEntry;
1493
1621
  }
1494
1622
  }
@@ -1538,7 +1666,7 @@ var RouteManager = class _RouteManager {
1538
1666
  }));
1539
1667
  const i18n = this.getI18nConfig();
1540
1668
  const docsAdapterRoutes = this.getDocsAdapterRoutes();
1541
- const result = await _chunkK7JMTAFHcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1669
+ const result = await _chunkE3LE6EZHcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1542
1670
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
1543
1671
  ...docsAdapterRoutes ? { docsAdapterRoutes } : {}
1544
1672
  });
@@ -1585,9 +1713,9 @@ var RouteManager = class _RouteManager {
1585
1713
  async isRouteSSG(modulePath) {
1586
1714
  try {
1587
1715
  const mod = await this.loadRouteModule(modulePath);
1588
- const rendering = await _chunkK7JMTAFHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1716
+ const rendering = await _chunkE3LE6EZHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1589
1717
  return rendering.ssg;
1590
- } catch (e) {
1718
+ } catch (e2) {
1591
1719
  return false;
1592
1720
  }
1593
1721
  }
@@ -1597,9 +1725,9 @@ var RouteManager = class _RouteManager {
1597
1725
  async hasRouteISR(modulePath) {
1598
1726
  try {
1599
1727
  const mod = await this.loadRouteModule(modulePath);
1600
- const rendering = await _chunkK7JMTAFHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1728
+ const rendering = await _chunkE3LE6EZHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1601
1729
  return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
1602
- } catch (e2) {
1730
+ } catch (e3) {
1603
1731
  return false;
1604
1732
  }
1605
1733
  }
@@ -1609,15 +1737,15 @@ var RouteManager = class _RouteManager {
1609
1737
  async getRouteRevalidateInterval(modulePath) {
1610
1738
  try {
1611
1739
  const mod = await this.loadRouteModule(modulePath);
1612
- const rendering = await _chunkK7JMTAFHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1740
+ const rendering = await _chunkE3LE6EZHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1613
1741
  return rendering.revalidate;
1614
- } catch (e3) {
1742
+ } catch (e4) {
1615
1743
  return void 0;
1616
1744
  }
1617
1745
  }
1618
1746
  };
1619
1747
  function getPageDirectoryField(route, pattern) {
1620
- const directory = _chunk2MR4MABGcjs.createRouteDirectoryPattern.call(void 0, route);
1748
+ const directory = _chunkC5AM2XDNcjs.createRouteDirectoryPattern.call(void 0, route);
1621
1749
  return directory === pattern ? {} : { directory };
1622
1750
  }
1623
1751
  function interpolateRedirectDestination(destination, params, catchAllSegments = {}) {
@@ -1697,14 +1825,14 @@ function replaceAll(input, search, replacement) {
1697
1825
  async function safeGlobFiles(pattern, cwd) {
1698
1826
  try {
1699
1827
  return await _chunkQMNWKQL4cjs.globFiles.call(void 0, pattern, cwd);
1700
- } catch (e4) {
1828
+ } catch (e5) {
1701
1829
  return [];
1702
1830
  }
1703
1831
  }
1704
1832
  function toRealPath(filePath) {
1705
1833
  try {
1706
1834
  return _fs.realpathSync.call(void 0, filePath);
1707
- } catch (e5) {
1835
+ } catch (e6) {
1708
1836
  return filePath;
1709
1837
  }
1710
1838
  }
@@ -1796,7 +1924,7 @@ function farmFontImportsPlugin(options = {}) {
1796
1924
  return;
1797
1925
  }
1798
1926
  const resource = registry.getDevResource(pathname);
1799
- if (!_optionalChain([resource, 'optionalAccess', _46 => _46.bytes])) {
1927
+ if (!_optionalChain([resource, 'optionalAccess', _58 => _58.bytes])) {
1800
1928
  next();
1801
1929
  return;
1802
1930
  }
@@ -2078,7 +2206,7 @@ ${FONT_SECTION_END}
2078
2206
  let url;
2079
2207
  try {
2080
2208
  url = new URL(input.source);
2081
- } catch (e6) {
2209
+ } catch (e7) {
2082
2210
  throw fontError(input.moduleId, `remoteFont() source must be an absolute HTTPS URL`);
2083
2211
  }
2084
2212
  if (url.protocol !== "https:") {
@@ -2314,7 +2442,7 @@ function readFontOptions(code, id, call) {
2314
2442
  const declaration = call.ancestors.at(-2);
2315
2443
  const statement = call.ancestors.at(-3);
2316
2444
  const statementParent = call.ancestors.at(-4);
2317
- const isModuleScope = _optionalChain([declaration, 'optionalAccess', _47 => _47.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _48 => _48.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _49 => _49.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _50 => _50.type]) === "Program");
2445
+ const isModuleScope = _optionalChain([declaration, 'optionalAccess', _59 => _59.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _60 => _60.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _61 => _61.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _62 => _62.type]) === "Program");
2318
2446
  if (!isModuleScope || call.ancestors.some((ancestor) => isFunctionNode(ancestor))) {
2319
2447
  throw fontError(id, `${call.kind}() must be declared directly at module scope`);
2320
2448
  }
@@ -2522,7 +2650,7 @@ function resolveLocalFontPath(source, importer, root) {
2522
2650
  }
2523
2651
  try {
2524
2652
  return _module.createRequire.call(void 0, _url.pathToFileURL.call(void 0, importer)).resolve(source);
2525
- } catch (e7) {
2653
+ } catch (e8) {
2526
2654
  const segments = source.replace(/\\/g, "/").split("/");
2527
2655
  if (segments.includes("..")) return path3.default.resolve(root, source);
2528
2656
  let current = path3.default.dirname(importer);
@@ -2855,7 +2983,7 @@ function parseFarmIslandSource(file, code) {
2855
2983
  function modifiedAt(file) {
2856
2984
  try {
2857
2985
  return fs.default.statSync(file).mtimeMs;
2858
- } catch (e8) {
2986
+ } catch (e9) {
2859
2987
  return -1;
2860
2988
  }
2861
2989
  }
@@ -2869,13 +2997,13 @@ function inferFarmIslandStrategy(filePath, root) {
2869
2997
  let code;
2870
2998
  try {
2871
2999
  code = fs.default.readFileSync(file, "utf8");
2872
- } catch (e9) {
3000
+ } catch (e10) {
2873
3001
  return { strategy: null, files: [file], reason: `${path3.default.basename(file)} could not be read` };
2874
3002
  }
2875
3003
  const result = _compiler.inferStrategy.call(void 0, file, code, {
2876
3004
  parse: parseFarmIslandSource,
2877
3005
  resolve: (specifier, importer) => {
2878
- const resolved = _chunkIEN2EFE5cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3006
+ const resolved = _chunkBE7AQXJBcjs.resolveImportedModule.call(void 0, importer, specifier, root);
2879
3007
  return resolved.local ? resolved.path : null;
2880
3008
  }
2881
3009
  });
@@ -2885,11 +3013,32 @@ function inferFarmIslandStrategy(filePath, root) {
2885
3013
  });
2886
3014
  return result;
2887
3015
  }
3016
+ var routeRootInferences = /* @__PURE__ */ new Map();
3017
+ function invalidateFarmRouteRootInferences() {
3018
+ routeRootInferences.clear();
3019
+ }
2888
3020
  function inferFarmRouteRootStrategy(owners, root) {
3021
+ const key = [_nullishCoalesce(root, () => ( "")), ...owners.map((owner) => path3.default.resolve(owner))].join("\n");
3022
+ const cached = routeRootInferences.get(key);
3023
+ if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
3024
+ return cached.result;
3025
+ }
3026
+ const { result, files } = _chunkBE7AQXJBcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3027
+ const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
3028
+ routeRootInferences.set(key, {
3029
+ stamps: [...read].map((file) => [file, modifiedAt(file)]),
3030
+ result
3031
+ });
3032
+ return result;
3033
+ }
3034
+ function isInstalledPackageFile(file) {
3035
+ return file.split(path3.default.sep).includes("node_modules");
3036
+ }
3037
+ function inferRouteRoot(owners, root) {
2889
3038
  const files = [];
2890
3039
  const modules = [];
2891
3040
  for (const owner of owners) {
2892
- const rendered = _chunkIEN2EFE5cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3041
+ const rendered = _chunkBE7AQXJBcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
2893
3042
  if (!rendered) {
2894
3043
  return {
2895
3044
  strategy: null,
@@ -2903,9 +3052,9 @@ function inferFarmRouteRootStrategy(owners, root) {
2903
3052
  let source = null;
2904
3053
  try {
2905
3054
  source = fs.default.readFileSync(module, "utf8");
2906
- } catch (e10) {
3055
+ } catch (e11) {
2907
3056
  }
2908
- if (_chunkIEN2EFE5cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3057
+ if (_chunkBE7AQXJBcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
2909
3058
  }
2910
3059
  for (const module of modules) {
2911
3060
  const result = inferFarmIslandStrategy(module, root);
@@ -2917,7 +3066,7 @@ function inferFarmRouteRootStrategy(owners, root) {
2917
3066
  function resolveFarmRouteRootStrategy(route, page, layouts, root, islandsMode) {
2918
3067
  const directory = _nullishCoalesce(route.directory, () => ( route.pattern));
2919
3068
  const onRoute = layouts.filter(
2920
- (layout) => _chunk2MR4MABGcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3069
+ (layout) => _chunkC5AM2XDNcjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
2921
3070
  );
2922
3071
  const declared = [
2923
3072
  ...page.islandStrategy ? [page.islandStrategy] : [],
@@ -2950,7 +3099,7 @@ var _stream = require('stream');
2950
3099
 
2951
3100
  function resolveFarmNotFoundComponentPath(config, appDirs) {
2952
3101
  const extensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
2953
- const configuredPath = _optionalChain([config, 'access', _51 => _51.notFound, 'optionalAccess', _52 => _52.component, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]);
3102
+ const configuredPath = _optionalChain([config, 'access', _63 => _63.notFound, 'optionalAccess', _64 => _64.component, 'optionalAccess', _65 => _65.trim, 'call', _66 => _66()]);
2954
3103
  if (configuredPath) {
2955
3104
  const componentPath = path3.default.isAbsolute(configuredPath) ? path3.default.normalize(configuredPath) : path3.default.resolve(config.root, configuredPath);
2956
3105
  if (!extensions.some((extension) => componentPath.endsWith(extension))) {
@@ -2988,11 +3137,11 @@ function getFarmLayoutKey(pattern, params) {
2988
3137
  );
2989
3138
  }
2990
3139
  function countFarmKeptLayouts(layoutsHeader, layouts, params) {
2991
- const chain = _chunk2MR4MABGcjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3140
+ const chain = _chunkC5AM2XDNcjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
2992
3141
  if (chain.length === 0) return 0;
2993
3142
  const keys = layouts.map((layout) => getFarmLayoutKey(layout.pattern, params));
2994
- if (chain[0] === keys[0]) return _chunk2MR4MABGcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
2995
- return keys.length > 1 ? 1 + _chunk2MR4MABGcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
3143
+ if (chain[0] === keys[0]) return _chunkC5AM2XDNcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
3144
+ return keys.length > 1 ? 1 + _chunkC5AM2XDNcjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
2996
3145
  }
2997
3146
  function createFarmFlushToken() {
2998
3147
  const bytes = new Uint8Array(16);
@@ -3179,7 +3328,7 @@ function normalizeStackPath(value) {
3179
3328
  const withoutQuery = value.replace(/[?#].*$/, "");
3180
3329
  try {
3181
3330
  return withoutQuery.startsWith("file://") ? _url.fileURLToPath.call(void 0, withoutQuery) : withoutQuery;
3182
- } catch (e11) {
3331
+ } catch (e12) {
3183
3332
  return void 0;
3184
3333
  }
3185
3334
  }
@@ -3223,7 +3372,7 @@ function createSourceFrame(location) {
3223
3372
  column: location.column,
3224
3373
  lines
3225
3374
  };
3226
- } catch (e12) {
3375
+ } catch (e13) {
3227
3376
  return void 0;
3228
3377
  }
3229
3378
  }
@@ -3247,7 +3396,7 @@ function createDefaultErrorDiagnostics(error, root) {
3247
3396
  function canBootFarmIslandsClient(config) {
3248
3397
  const docs = config.docs;
3249
3398
  const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
3250
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _55 => _55.experimental, 'optionalAccess', _56 => _56.serverComponents])) === "islands" && !docsEnabled && _chunkDMXMIE2Ccjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkDMXMIE2Ccjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3399
+ return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _67 => _67.experimental, 'optionalAccess', _68 => _68.serverComponents])) === "islands" && !docsEnabled && _chunkDMXMIE2Ccjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkDMXMIE2Ccjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3251
3400
  }
3252
3401
 
3253
3402
  // src/server/renderer.ts
@@ -3326,7 +3475,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
3326
3475
  function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
3327
3476
  if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
3328
3477
  warnedSuppressedAsyncHydrationModules.add(modulePath);
3329
- _chunkQMNWKQL4cjs.logger.warn(_chunkIEN2EFE5cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3478
+ _chunkQMNWKQL4cjs.logger.warn(_chunkBE7AQXJBcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3330
3479
  }
3331
3480
  var fullDocumentRoutes = /* @__PURE__ */ new Set();
3332
3481
  var documentLayouts = /* @__PURE__ */ new WeakMap();
@@ -3363,7 +3512,7 @@ function appendResponseHeader(res, name, value) {
3363
3512
  }
3364
3513
  }
3365
3514
  function requestHeader(req, name) {
3366
- const value = _optionalChain([req, 'access', _57 => _57.headers, 'optionalAccess', _58 => _58[name]]);
3515
+ const value = _optionalChain([req, 'access', _69 => _69.headers, 'optionalAccess', _70 => _70[name]]);
3367
3516
  return Array.isArray(value) ? value[0] : value;
3368
3517
  }
3369
3518
  function appendResponseVary(res, value) {
@@ -3377,7 +3526,7 @@ function appendResponseVary(res, value) {
3377
3526
  function renderI18nAlternateLinks(requestPath, snapshot, options) {
3378
3527
  if (snapshot.routing === "none") return "";
3379
3528
  const url = new URL(requestPath, "http://farm.local");
3380
- return _chunk2MR4MABGcjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
3529
+ return _chunkC5AM2XDNcjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
3381
3530
  }
3382
3531
  var PPR_REFRESH_MAX_ATTEMPTS = 3;
3383
3532
  function createPPRRefreshScript() {
@@ -3472,12 +3621,12 @@ async function parseRouteModuleProps(routeModule, input) {
3472
3621
  }
3473
3622
  const schemas = routeModule.__farmRouteSchemas;
3474
3623
  const params = parseRouteModuleSchema(
3475
- _optionalChain([schemas, 'optionalAccess', _59 => _59.params]),
3624
+ _optionalChain([schemas, 'optionalAccess', _71 => _71.params]),
3476
3625
  input.props.params,
3477
3626
  "params",
3478
3627
  input.routePath
3479
3628
  );
3480
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _60 => _60.search]), input.search, "search", input.routePath);
3629
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _72 => _72.search]), input.search, "search", input.routePath);
3481
3630
  return {
3482
3631
  ...input.props,
3483
3632
  params,
@@ -3511,7 +3660,7 @@ function readAppPackageIdentity(root) {
3511
3660
  return JSON.parse(
3512
3661
  fs5.readFileSync(path9.join(root || process.cwd(), "package.json"), "utf8")
3513
3662
  );
3514
- } catch (e13) {
3663
+ } catch (e14) {
3515
3664
  return {};
3516
3665
  }
3517
3666
  }
@@ -3535,7 +3684,7 @@ var ServerRenderer = class {
3535
3684
  } else {
3536
3685
  _chunkXGJVRPYLcjs.uninstallFarmIslandValues.call(void 0, );
3537
3686
  }
3538
- if (_optionalChain([this, 'access', _61 => _61.config, 'access', _62 => _62.notFound, 'optionalAccess', _63 => _63.component, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()])) {
3687
+ if (_optionalChain([this, 'access', _73 => _73.config, 'access', _74 => _74.notFound, 'optionalAccess', _75 => _75.component, 'optionalAccess', _76 => _76.trim, 'call', _77 => _77()])) {
3539
3688
  resolveFarmNotFoundComponentPath(this.config, _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config));
3540
3689
  }
3541
3690
  const loaded = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer) ? await import("./renderer/react/server.cjs") : _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
@@ -3560,7 +3709,7 @@ var ServerRenderer = class {
3560
3709
  "node"
3561
3710
  );
3562
3711
  this.rendererRuntime = islands && this.islandValues() ? withFarmIslandsRenders(runtime, islands) : runtime;
3563
- _optionalChain([this, 'access', _66 => _66.routeManager, 'access', _67 => _67.setRendererRuntime, 'optionalCall', _68 => _68(this.rendererRuntime)]);
3712
+ _optionalChain([this, 'access', _78 => _78.routeManager, 'access', _79 => _79.setRendererRuntime, 'optionalCall', _80 => _80(this.rendererRuntime)]);
3564
3713
  await this.applyRendererAppSetup();
3565
3714
  }
3566
3715
  /**
@@ -3617,7 +3766,7 @@ var ServerRenderer = class {
3617
3766
  /// Stylesheets the app imported through JS (fontsource packages, component
3618
3767
  /// CSS) that the document must link alongside globals.css — see #658.
3619
3768
  collectDevStyleHrefs() {
3620
- const graph = _optionalChain([this, 'access', _69 => _69.viteServer, 'optionalAccess', _70 => _70.moduleGraph]);
3769
+ const graph = _optionalChain([this, 'access', _81 => _81.viteServer, 'optionalAccess', _82 => _82.moduleGraph]);
3621
3770
  if (!graph) return [];
3622
3771
  return collectDevStylesheetUrls(
3623
3772
  graph.idToModuleMap.values(),
@@ -3642,7 +3791,7 @@ var ServerRenderer = class {
3642
3791
  "data-farm-layout-boundary": "true",
3643
3792
  "data-farm-layout-pattern": pattern,
3644
3793
  ...segment ? { "data-farm-layout-key": segment.key } : {},
3645
- ..._optionalChain([segment, 'optionalAccess', _71 => _71.kept]) ? { "data-farm-layout-kept": "true" } : {},
3794
+ ..._optionalChain([segment, 'optionalAccess', _83 => _83.kept]) ? { "data-farm-layout-kept": "true" } : {},
3646
3795
  style: { display: "contents" }
3647
3796
  },
3648
3797
  layoutElement
@@ -3658,6 +3807,11 @@ var ServerRenderer = class {
3658
3807
  return this.rendererRuntime.wrapClientGraph(element);
3659
3808
  }
3660
3809
  /** The page a hydrating layout keeps as server HTML: islands again, or a server tree. */
3810
+ /** The route root's strategy, inspecting packages with the dev server's latest plan's cache. */
3811
+ resolveRouteRootStrategy(...args) {
3812
+ const resolve3 = () => resolveFarmRouteRootStrategy(...args);
3813
+ return typeof this.routeManager.inspectPackages === "function" ? this.routeManager.inspectPackages(resolve3) : resolve3();
3814
+ }
3661
3815
  async isolateServerPage(element, serverTree) {
3662
3816
  if (islands && this.islandValues()) {
3663
3817
  const runtime = islands;
@@ -3733,11 +3887,15 @@ var ServerRenderer = class {
3733
3887
  );
3734
3888
  return { html: rendered.html, head: rendered.head || "" };
3735
3889
  }
3736
- return { html: await this.renderElementToCompleteHTML(element, options), head: "" };
3890
+ const { head, body } = _chunkC5AM2XDNcjs.takeFarmHoistedHead.call(void 0,
3891
+ await this.renderElementToCompleteHTML(element, options),
3892
+ true
3893
+ );
3894
+ return { html: body, head };
3737
3895
  }
3738
3896
  /** Islands mode sends large prop values once, keyed by content (RFC 0003). */
3739
3897
  islandValues() {
3740
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _72 => _72.config, 'access', _73 => _73.experimental, 'optionalAccess', _74 => _74.serverComponents])) === "islands";
3898
+ return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _84 => _84.config, 'access', _85 => _85.experimental, 'optionalAccess', _86 => _86.serverComponents])) === "islands";
3741
3899
  }
3742
3900
  /**
3743
3901
  * Render the route tree used by client navigation without producing a second
@@ -3814,7 +3972,7 @@ var ServerRenderer = class {
3814
3972
  async runWithRequestContext(request2, fn) {
3815
3973
  return _chunkHDPT6OYEcjs._runWithCurrentRequest.call(void 0,
3816
3974
  request2,
3817
- () => _optionalChain([this, 'access', _75 => _75.i18nRuntime, 'optionalAccess', _76 => _76.config, 'access', _77 => _77.enabled]) ? _chunk2AM26UGIcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
3975
+ () => _optionalChain([this, 'access', _87 => _87.i18nRuntime, 'optionalAccess', _88 => _88.config, 'access', _89 => _89.enabled]) ? _chunkNLBK37HIcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
3818
3976
  redirect: false
3819
3977
  }) : fn()
3820
3978
  );
@@ -3845,7 +4003,7 @@ var ServerRenderer = class {
3845
4003
  * Check if a path should be served from SSG cache
3846
4004
  */
3847
4005
  async shouldServeSSG(pathname) {
3848
- const ssgPage = _chunkK7JMTAFHcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4006
+ const ssgPage = _chunkE3LE6EZHcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
3849
4007
  if (!ssgPage) return null;
3850
4008
  const cached = await this.getCachedSSGPage(pathname);
3851
4009
  if (cached && await this.dataCache.isStaleAsync(cached)) {
@@ -3893,7 +4051,11 @@ var ServerRenderer = class {
3893
4051
  key,
3894
4052
  { html },
3895
4053
  {
3896
- paths: [options.pathname],
4054
+ // revalidatePath() takes the route path (`/pricing`), as the docs show, while the shell
4055
+ // answers the public one (`/console/fr/pricing`): either clears it, as in production.
4056
+ paths: [
4057
+ .../* @__PURE__ */ new Set([options.pathname, this.routeManager.toRoutePathname(options.pathname)])
4058
+ ],
3897
4059
  tags: ["ppr"],
3898
4060
  revalidate: _nullishCoalesce(options.revalidate, () => ( false))
3899
4061
  }
@@ -3962,7 +4124,7 @@ var ServerRenderer = class {
3962
4124
  setImmediate(async () => {
3963
4125
  try {
3964
4126
  const mod = await this.routeManager.loadRouteModule(page.filePath);
3965
- if (!_optionalChain([mod, 'optionalAccess', _78 => _78.default])) return;
4127
+ if (!_optionalChain([mod, 'optionalAccess', _90 => _90.default])) return;
3966
4128
  const { route, layouts } = this.routeManager.matchRoute(page.urlPath);
3967
4129
  const layoutModules = await Promise.all(
3968
4130
  layouts.map((l) => this.routeManager.loadLayoutModule(l.modulePath))
@@ -3976,7 +4138,7 @@ var ServerRenderer = class {
3976
4138
  };
3977
4139
  let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
3978
4140
  const pageMetadata = _nullishCoalesce(routeManifest.routes.find(
3979
- (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _79 => _79.pattern])
4141
+ (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _91 => _91.pattern])
3980
4142
  ), () => ( {
3981
4143
  shouldHydrate: false,
3982
4144
  islandStrategy: null
@@ -4086,18 +4248,18 @@ var ServerRenderer = class {
4086
4248
  res.setHeader(header.key, header.value);
4087
4249
  }
4088
4250
  const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
4089
- trustProxy: _optionalChain([this, 'access', _80 => _80.config, 'access', _81 => _81.server, 'optionalAccess', _82 => _82.trustProxy])
4251
+ trustProxy: _optionalChain([this, 'access', _92 => _92.config, 'access', _93 => _93.server, 'optionalAccess', _94 => _94.trustProxy])
4090
4252
  });
4091
4253
  const runtime = this.i18nRuntime;
4092
- if (_optionalChain([runtime, 'optionalAccess', _83 => _83.config, 'access', _84 => _84.enabled])) {
4254
+ if (_optionalChain([runtime, 'optionalAccess', _95 => _95.config, 'access', _96 => _96.enabled])) {
4093
4255
  const resolution = runtime.resolveRequest(request2);
4094
- const varyHeaders = _chunkY2SZVIVHcjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
4256
+ const varyHeaders = _chunkGPICBTDVcjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
4095
4257
  for (const header of varyHeaders) appendResponseVary(res, header);
4096
4258
  if (resolution.persist) {
4097
4259
  appendResponseHeader(
4098
4260
  res,
4099
4261
  "Set-Cookie",
4100
- _chunkY2SZVIVHcjs.createFarmLocaleCookie.call(void 0, resolution.locale, runtime.config)
4262
+ _chunkGPICBTDVcjs.createFarmLocaleCookie.call(void 0, resolution.locale, runtime.config)
4101
4263
  );
4102
4264
  }
4103
4265
  if (resolution.redirect && (request2.method === "GET" || request2.method === "HEAD")) {
@@ -4135,7 +4297,7 @@ var ServerRenderer = class {
4135
4297
  });
4136
4298
  };
4137
4299
  try {
4138
- const url = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _85 => _85.config, 'access', _86 => _86.server, 'optionalAccess', _87 => _87.trustProxy]) });
4300
+ const url = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _97 => _97.config, 'access', _98 => _98.server, 'optionalAccess', _99 => _99.trustProxy]) });
4139
4301
  pathname = url.pathname;
4140
4302
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
4141
4303
  searchParamsObject = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, url.searchParams);
@@ -4205,7 +4367,7 @@ var ServerRenderer = class {
4205
4367
  layouts = match.layouts;
4206
4368
  routeSlots = _nullishCoalesce(match.slots, () => ( []));
4207
4369
  if (!route) {
4208
- if (_chunkVG6HYT5Kcjs.isFarmDefaultMCPPathname.call(void 0, pathname) && this.getDefaultMCPServer()) {
4370
+ if (_chunkTP4RAV7Ycjs.isFarmDefaultMCPPathname.call(void 0, pathname) && this.getDefaultMCPServer()) {
4209
4371
  await this.renderDefaultMCP(req, res);
4210
4372
  completeRender(res.statusCode || 200, pathname);
4211
4373
  return;
@@ -4222,13 +4384,13 @@ var ServerRenderer = class {
4222
4384
  params
4223
4385
  });
4224
4386
  let actionRequest;
4225
- if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _88 => _88.config, 'access', _89 => _89.experimental, 'optionalAccess', _90 => _90.serverComponents])) === "islands") {
4387
+ if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _100 => _100.config, 'access', _101 => _101.experimental, 'optionalAccess', _102 => _102.serverComponents])) === "islands") {
4226
4388
  await Promise.all([
4227
4389
  this.routeManager.loadRouteModule(route.modulePath),
4228
4390
  ...layouts.map((layout) => this.routeManager.loadLayoutModule(layout.modulePath))
4229
4391
  ]);
4230
4392
  actionRequest = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
4231
- trustProxy: _optionalChain([this, 'access', _91 => _91.config, 'access', _92 => _92.server, 'optionalAccess', _93 => _93.trustProxy])
4393
+ trustProxy: _optionalChain([this, 'access', _103 => _103.config, 'access', _104 => _104.server, 'optionalAccess', _105 => _105.trustProxy])
4232
4394
  });
4233
4395
  const formActionRequest = actionRequest;
4234
4396
  const actionResponse = await _chunkYDXLC4DWcjs._runWithMiddlewareData.call(void 0,
@@ -4260,7 +4422,7 @@ var ServerRenderer = class {
4260
4422
  exposedOnly: true
4261
4423
  });
4262
4424
  const currentRequest = _nullishCoalesce(actionRequest, () => ( _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
4263
- trustProxy: _optionalChain([this, 'access', _94 => _94.config, 'access', _95 => _95.server, 'optionalAccess', _96 => _96.trustProxy])
4425
+ trustProxy: _optionalChain([this, 'access', _106 => _106.config, 'access', _107 => _107.server, 'optionalAccess', _108 => _108.trustProxy])
4264
4426
  })));
4265
4427
  const routeContext = await this.resolveRouteContext({
4266
4428
  request: currentRequest,
@@ -4302,11 +4464,11 @@ var ServerRenderer = class {
4302
4464
  searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParamsObject),
4303
4465
  error
4304
4466
  };
4305
- if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _97 => _97.notFound])) {
4467
+ if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _109 => _109.notFound])) {
4306
4468
  res.statusCode = 404;
4307
4469
  PageComponent = programmaticRouteComponents.notFound;
4308
4470
  pageProps = routeStateProps;
4309
- } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _98 => _98.error])) {
4471
+ } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _110 => _110.error])) {
4310
4472
  res.statusCode = 500;
4311
4473
  PageComponent = programmaticRouteComponents.error;
4312
4474
  pageProps = routeStateProps;
@@ -4314,21 +4476,21 @@ var ServerRenderer = class {
4314
4476
  throw error;
4315
4477
  }
4316
4478
  }
4317
- const renderingConfig = await _chunkK7JMTAFHcjs.resolveRouteRenderingConfigFromFile.call(void 0,
4479
+ const renderingConfig = await _chunkE3LE6EZHcjs.resolveRouteRenderingConfigFromFile.call(void 0,
4318
4480
  routeModule,
4319
4481
  route.modulePath,
4320
- { experimentalPPR: _optionalChain([this, 'access', _99 => _99.config, 'access', _100 => _100.experimental, 'optionalAccess', _101 => _101.ppr]) === true }
4482
+ { experimentalPPR: _optionalChain([this, 'access', _111 => _111.config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.ppr]) === true }
4321
4483
  );
4322
4484
  const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
4323
4485
  const islandsNavigationRequest = Boolean(
4324
4486
  islands && this.islandValues() && (requestHeader(req, "f-layouts") || requestHeader(req, "f-stream"))
4325
4487
  );
4326
4488
  const canCachePPRShell = renderingConfig.ppr && !pprBypassReason && !islandsNavigationRequest;
4327
- const pprI18nSnapshot = canCachePPRShell ? _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, ) : void 0;
4489
+ const pprI18nSnapshot = canCachePPRShell ? _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) : void 0;
4328
4490
  const pprShellOptions = canCachePPRShell ? {
4329
4491
  pathname,
4330
4492
  search: url.search,
4331
- locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _102 => _102.locale]), () => ( "")),
4493
+ locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _114 => _114.locale]), () => ( "")),
4332
4494
  origin: pprI18nSnapshot && pprI18nSnapshot.routing !== "none" ? url.origin : "",
4333
4495
  revalidate: renderingConfig.revalidate
4334
4496
  } : void 0;
@@ -4400,7 +4562,7 @@ var ServerRenderer = class {
4400
4562
  const routeManifestEntry = routeManifest.routes.find(
4401
4563
  (entry) => entry.pattern === route.pattern
4402
4564
  );
4403
- const moduleMetadata = routeManifestEntry || _chunkIEN2EFE5cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
4565
+ const moduleMetadata = routeManifestEntry || _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
4404
4566
  const isClientComponent = moduleMetadata.isClientComponent;
4405
4567
  const renderedRouteSlots = await Promise.all(
4406
4568
  routeSlots.map(async (slot) => {
@@ -4451,20 +4613,20 @@ var ServerRenderer = class {
4451
4613
  if (moduleMetadata.suppressedAsyncHydration) {
4452
4614
  warnSuppressedAsyncHydrationOnce(
4453
4615
  route.modulePath,
4454
- _optionalChain([routeManifestEntry, 'optionalAccess', _103 => _103.suppressedAsyncHydrationReason])
4616
+ _optionalChain([routeManifestEntry, 'optionalAccess', _115 => _115.suppressedAsyncHydrationReason])
4455
4617
  );
4456
4618
  }
4457
4619
  const layoutHydrationMetadata = layouts.map((layout) => {
4458
4620
  const manifestEntry = routeManifest.layouts.find(
4459
4621
  (entry) => entry.pattern === layout.pattern
4460
4622
  );
4461
- if (_optionalChain([manifestEntry, 'optionalAccess', _104 => _104.suppressedAsyncHydration])) {
4623
+ if (_optionalChain([manifestEntry, 'optionalAccess', _116 => _116.suppressedAsyncHydration])) {
4462
4624
  warnSuppressedAsyncHydrationOnce(
4463
4625
  layout.modulePath,
4464
4626
  manifestEntry.suppressedAsyncHydrationReason
4465
4627
  );
4466
4628
  }
4467
- if (typeof _optionalChain([manifestEntry, 'optionalAccess', _105 => _105.shouldHydrate]) === "boolean") {
4629
+ if (typeof _optionalChain([manifestEntry, 'optionalAccess', _117 => _117.shouldHydrate]) === "boolean") {
4468
4630
  return {
4469
4631
  isClientComponent: manifestEntry.isClientComponent === true,
4470
4632
  shouldHydrate: manifestEntry.shouldHydrate,
@@ -4485,11 +4647,11 @@ var ServerRenderer = class {
4485
4647
  const clientLayouts = layouts.map((layout, index) => ({
4486
4648
  pattern: layout.pattern,
4487
4649
  modulePath: _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
4488
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _106 => _106[index], 'optionalAccess', _107 => _107.shouldHydrate]) === true,
4489
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _108 => _108[index], 'optionalAccess', _109 => _109.islandStrategy]), () => ( null)),
4490
- ..._optionalChain([layoutHydrationMetadata, 'access', _110 => _110[index], 'optionalAccess', _111 => _111.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
4650
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _118 => _118[index], 'optionalAccess', _119 => _119.shouldHydrate]) === true,
4651
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _120 => _120[index], 'optionalAccess', _121 => _121.islandStrategy]), () => ( null)),
4652
+ ..._optionalChain([layoutHydrationMetadata, 'access', _122 => _122[index], 'optionalAccess', _123 => _123.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
4491
4653
  // Islands mode: the browser rebuilds this layout from its tree, not its module.
4492
- ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _112 => _112[index], 'optionalAccess', _113 => _113.serverTree]) === true ? { serverTree: true } : {}
4654
+ ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _124 => _124[index], 'optionalAccess', _125 => _125.serverTree]) === true ? { serverTree: true } : {}
4493
4655
  }));
4494
4656
  const hydrationStrategies = [
4495
4657
  ...shouldHydrate && moduleMetadata.islandStrategy ? [moduleMetadata.islandStrategy] : [],
@@ -4497,15 +4659,15 @@ var ServerRenderer = class {
4497
4659
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
4498
4660
  )
4499
4661
  ];
4500
- const hydrationIslandStrategy = this.islandValues() ? resolveFarmRouteRootStrategy(
4662
+ const hydrationIslandStrategy = this.islandValues() ? this.resolveRouteRootStrategy(
4501
4663
  route,
4502
4664
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4503
4665
  layouts.map((layout, index) => ({
4504
4666
  pattern: layout.pattern,
4505
4667
  modulePath: layout.modulePath,
4506
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _114 => _114[index], 'optionalAccess', _115 => _115.shouldHydrate]) === true,
4507
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _116 => _116[index], 'optionalAccess', _117 => _117.hasIsolatedClientBoundaries]) === true,
4508
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _118 => _118[index], 'optionalAccess', _119 => _119.islandStrategy]), () => ( null))
4668
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _126 => _126[index], 'optionalAccess', _127 => _127.shouldHydrate]) === true,
4669
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _128 => _128[index], 'optionalAccess', _129 => _129.hasIsolatedClientBoundaries]) === true,
4670
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _130 => _130[index], 'optionalAccess', _131 => _131.islandStrategy]), () => ( null))
4509
4671
  })),
4510
4672
  this.config.root || process.cwd(),
4511
4673
  true
@@ -4513,7 +4675,7 @@ var ServerRenderer = class {
4513
4675
  const hasHydratableRouteSlots = renderedRouteSlots.some(
4514
4676
  (slot) => slot.isClientComponent || slot.shouldHydrate
4515
4677
  );
4516
- const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _120 => _120.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
4678
+ const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _132 => _132.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
4517
4679
  req.__FARM_PAGE_PATH__ = route.modulePath;
4518
4680
  req.__FARM_ROUTE__ = pathname;
4519
4681
  req.__FARM_IS_CLIENT_COMPONENT__ = isClientComponent;
@@ -4526,7 +4688,7 @@ var ServerRenderer = class {
4526
4688
  req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
4527
4689
  req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
4528
4690
  req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
4529
- req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _121 => _121.modulePath]) ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
4691
+ req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _133 => _133.modulePath]) ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
4530
4692
  req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
4531
4693
  name: slot.name,
4532
4694
  ownerPattern: slot.ownerPattern,
@@ -4598,7 +4760,7 @@ var ServerRenderer = class {
4598
4760
  } else if (shouldHydrateLayout && !(isClientComponent || shouldHydrate) && this.rendererRuntime.isolateServerPageGraph) {
4599
4761
  pageElement = await this.isolateServerPage(
4600
4762
  pageElement,
4601
- _optionalChain([routeManifestEntry, 'optionalAccess', _122 => _122.serverTree]) === true
4763
+ _optionalChain([routeManifestEntry, 'optionalAccess', _134 => _134.serverTree]) === true
4602
4764
  );
4603
4765
  }
4604
4766
  pageElement = this.createPageBoundary(pageElement, {
@@ -4612,7 +4774,7 @@ var ServerRenderer = class {
4612
4774
  if (keptLayouts > 0) {
4613
4775
  let keptElement = null;
4614
4776
  for (let i = keptLayouts - 1; i >= 0; i--) {
4615
- const KeptLayout = _optionalChain([layoutModules, 'access', _123 => _123[i], 'optionalAccess', _124 => _124.default]);
4777
+ const KeptLayout = _optionalChain([layoutModules, 'access', _135 => _135[i], 'optionalAccess', _136 => _136.default]);
4616
4778
  if (KeptLayout) {
4617
4779
  keptElement = this.rendererRuntime.createElement(KeptLayout, {
4618
4780
  children: keptElement,
@@ -4625,7 +4787,7 @@ var ServerRenderer = class {
4625
4787
  await this.wrapWithIntegrationProviders(keptElement),
4626
4788
  { rejectLateErrors: true }
4627
4789
  );
4628
- } catch (e14) {
4790
+ } catch (e15) {
4629
4791
  keptLayouts = 0;
4630
4792
  }
4631
4793
  }
@@ -4661,7 +4823,7 @@ var ServerRenderer = class {
4661
4823
  );
4662
4824
  slotProps[slot.name] = slotElement;
4663
4825
  }
4664
- wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _125 => _125[i], 'optionalAccess', _126 => _126.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
4826
+ wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _137 => _137[i], 'optionalAccess', _138 => _138.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
4665
4827
  LayoutComponent,
4666
4828
  { params },
4667
4829
  { children: wrappedElement, ...slotProps },
@@ -4759,7 +4921,7 @@ var ServerRenderer = class {
4759
4921
  }
4760
4922
  if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
4761
4923
  const redirect = _chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error);
4762
- const snapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
4924
+ const snapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
4763
4925
  const redirectUrl = snapshot && redirect.url.startsWith("/") && !redirect.url.startsWith("//") ? _chunkOWQV6MLMcjs.localizeFarmHref.call(void 0, redirect.url, snapshot.locale, snapshot) : redirect.url;
4764
4926
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4765
4927
  type: "route.redirect",
@@ -4796,7 +4958,7 @@ var ServerRenderer = class {
4796
4958
  }
4797
4959
  }
4798
4960
  emitFarmRenderError(req, pathname, error);
4799
- const errorStatus = _chunk2MR4MABGcjs.resolveDefaultErrorStatus.call(void 0, error);
4961
+ const errorStatus = _chunkC5AM2XDNcjs.resolveDefaultErrorStatus.call(void 0, error);
4800
4962
  if (pprRefreshRoute) {
4801
4963
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4802
4964
  type: "ppr.refresh.error",
@@ -4840,7 +5002,7 @@ var ServerRenderer = class {
4840
5002
  const rendererCapabilities = _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
4841
5003
  if (!rendererCapabilities.functionComponents) {
4842
5004
  throw new Error(
4843
- `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _127 => _127.config, 'access', _128 => _128.renderer, 'optionalAccess', _129 => _129.name]), () => ( "the configured renderer"))}\` cannot.`
5005
+ `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _139 => _139.config, 'access', _140 => _140.renderer, 'optionalAccess', _141 => _141.name]), () => ( "the configured renderer"))}\` cannot.`
4844
5006
  );
4845
5007
  }
4846
5008
  if (provider.type === "clerk" && !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer)) {
@@ -4879,7 +5041,7 @@ var ServerRenderer = class {
4879
5041
  }
4880
5042
  if (provider.type !== "clerk" && typeof this.rendererRuntime.markFunctionComponent === "function" && !isRendererCompiledComponent(
4881
5043
  _nullishCoalesce(providerSourceModule, () => ( "")),
4882
- _chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _130 => _130.config, 'access', _131 => _131.renderer, 'optionalAccess', _132 => _132.componentExtensions]))
5044
+ _chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _142 => _142.config, 'access', _143 => _143.renderer, 'optionalAccess', _144 => _144.componentExtensions]))
4883
5045
  )) {
4884
5046
  ProviderComponent = this.rendererRuntime.markFunctionComponent(ProviderComponent);
4885
5047
  }
@@ -4930,7 +5092,7 @@ var ServerRenderer = class {
4930
5092
  manifestMatch.metadata,
4931
5093
  manifestMatch.params
4932
5094
  );
4933
- const snapshot2 = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
5095
+ const snapshot2 = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
4934
5096
  const localizedHref = snapshot2 ? _chunkOWQV6MLMcjs.localizeFarmHref.call(void 0, rawHref, snapshot2.locale, snapshot2) : rawHref;
4935
5097
  metadata.manifest = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, localizedHref, this.config.basePath);
4936
5098
  }
@@ -4941,7 +5103,7 @@ var ServerRenderer = class {
4941
5103
  metadata = _chunk6IOZPJ3Icjs.addMetadataImageReference.call(void 0, metadata, reference);
4942
5104
  }
4943
5105
  }
4944
- const snapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
5106
+ const snapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
4945
5107
  const publicPathname = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0,
4946
5108
  snapshot ? _chunkOWQV6MLMcjs.localizeFarmHref.call(void 0, options.pathname, snapshot.locale, snapshot) : options.pathname,
4947
5109
  this.config.basePath
@@ -4958,7 +5120,7 @@ var ServerRenderer = class {
4958
5120
  const match = this.routeManager.getMatchingMetadataImage(pathname, kind);
4959
5121
  if (!match) return null;
4960
5122
  const rawHref = this.routeManager.resolveMetadataImagePath(match.image, match.params);
4961
- const snapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
5123
+ const snapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
4962
5124
  const localizedHref = snapshot ? _chunkOWQV6MLMcjs.localizeFarmHref.call(void 0, rawHref, snapshot.locale, snapshot) : rawHref;
4963
5125
  const href = _chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, localizedHref, this.config.basePath);
4964
5126
  const reference = {
@@ -5008,7 +5170,7 @@ var ServerRenderer = class {
5008
5170
  );
5009
5171
  }
5010
5172
  const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5011
- trustProxy: _optionalChain([this, 'access', _133 => _133.config, 'access', _134 => _134.server, 'optionalAccess', _135 => _135.trustProxy])
5173
+ trustProxy: _optionalChain([this, 'access', _145 => _145.config, 'access', _146 => _146.server, 'optionalAccess', _147 => _147.trustProxy])
5012
5174
  });
5013
5175
  const url = new URL(request2.url);
5014
5176
  const llmsContext = match.metadata.kind === "llms" || match.metadata.kind === "llms-full" ? await this.createLlmsTxtContext(request2, {
@@ -5026,7 +5188,7 @@ var ServerRenderer = class {
5026
5188
  origin: await this.getAgentOrigin(request2),
5027
5189
  readMarkdown: llmsContext.markdown
5028
5190
  }) : value;
5029
- const response = _chunk2MR4MABGcjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5191
+ const response = _chunkC5AM2XDNcjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5030
5192
  method,
5031
5193
  request: request2
5032
5194
  });
@@ -5044,7 +5206,7 @@ var ServerRenderer = class {
5044
5206
  }
5045
5207
  /** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
5046
5208
  getGeneratedLlmsKind(pathname) {
5047
- const config = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _136 => _136.config, 'access', _137 => _137.agent, 'optionalAccess', _138 => _138.llmsTxt]));
5209
+ const config = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _148 => _148.config, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.llmsTxt]));
5048
5210
  if (!config.enabled) return null;
5049
5211
  if (pathname === "/llms.txt") return "llms";
5050
5212
  return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
@@ -5052,9 +5214,9 @@ var ServerRenderer = class {
5052
5214
  async renderGeneratedLlmsTxt(req, res, kind) {
5053
5215
  try {
5054
5216
  const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5055
- trustProxy: _optionalChain([this, 'access', _139 => _139.config, 'access', _140 => _140.server, 'optionalAccess', _141 => _141.trustProxy])
5217
+ trustProxy: _optionalChain([this, 'access', _151 => _151.config, 'access', _152 => _152.server, 'optionalAccess', _153 => _153.trustProxy])
5056
5218
  });
5057
- const config = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _142 => _142.config, 'access', _143 => _143.agent, 'optionalAccess', _144 => _144.llmsTxt]));
5219
+ const config = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _154 => _154.config, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.llmsTxt]));
5058
5220
  const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
5059
5221
  const body = kind === "llms-full" ? await _chunkO32QPFVVcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
5060
5222
  origin: await this.getAgentOrigin(request2),
@@ -5062,7 +5224,7 @@ var ServerRenderer = class {
5062
5224
  }) : context.defaults;
5063
5225
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5064
5226
  res,
5065
- _chunk2MR4MABGcjs.createFarmMetadataRouteResponse.call(void 0,
5227
+ _chunkC5AM2XDNcjs.createFarmMetadataRouteResponse.call(void 0,
5066
5228
  kind,
5067
5229
  body,
5068
5230
  { revalidate: config.revalidate },
@@ -5081,23 +5243,23 @@ var ServerRenderer = class {
5081
5243
  }
5082
5244
  }
5083
5245
  getAgentCrawlers() {
5084
- return _chunkZUVAGMQ5cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _145 => _145.config, 'access', _146 => _146.agent, 'optionalAccess', _147 => _147.crawlers]));
5246
+ return _chunkZUVAGMQ5cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _157 => _157.config, 'access', _158 => _158.agent, 'optionalAccess', _159 => _159.crawlers]));
5085
5247
  }
5086
5248
  /** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
5087
5249
  async renderGeneratedRobotsTxt(req, res) {
5088
5250
  try {
5089
- const sitemapPath = _optionalChain([this, 'access', _148 => _148.routeManager, 'access', _149 => _149.matchMetadataRoute, 'call', _150 => _150("/sitemap.xml"), 'optionalAccess', _151 => _151.metadata, 'access', _152 => _152.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
5251
+ const sitemapPath = _optionalChain([this, 'access', _160 => _160.routeManager, 'access', _161 => _161.matchMetadataRoute, 'call', _162 => _162("/sitemap.xml"), 'optionalAccess', _163 => _163.metadata, 'access', _164 => _164.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
5090
5252
  const rootLayout = this.routeManager.getLayouts().get("/");
5091
5253
  const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5092
5254
  const robots = _chunkZUVAGMQ5cjs.createFarmAgentRobots.call(void 0, {
5093
5255
  crawlers: this.getAgentCrawlers(),
5094
5256
  sitemapPath,
5095
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _153 => _153.metadataBase]),
5257
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _165 => _165.metadataBase]),
5096
5258
  basePath: this.config.basePath
5097
5259
  });
5098
5260
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5099
5261
  res,
5100
- _chunk2MR4MABGcjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
5262
+ _chunkC5AM2XDNcjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
5101
5263
  );
5102
5264
  } catch (error) {
5103
5265
  _chunkQMNWKQL4cjs.logger.error(`Generated robots.txt failed: ${error}`);
@@ -5111,13 +5273,13 @@ var ServerRenderer = class {
5111
5273
  }
5112
5274
  }
5113
5275
  getAgentSitemap() {
5114
- return _chunkZUVAGMQ5cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _154 => _154.config, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.sitemap]));
5276
+ return _chunkZUVAGMQ5cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _166 => _166.config, 'access', _167 => _167.agent, 'optionalAccess', _168 => _168.sitemap]));
5115
5277
  }
5116
5278
  /** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
5117
5279
  async renderGeneratedSitemap(req, res) {
5118
5280
  try {
5119
5281
  const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5120
- trustProxy: _optionalChain([this, 'access', _157 => _157.config, 'access', _158 => _158.server, 'optionalAccess', _159 => _159.trustProxy])
5282
+ trustProxy: _optionalChain([this, 'access', _169 => _169.config, 'access', _170 => _170.server, 'optionalAccess', _171 => _171.trustProxy])
5121
5283
  });
5122
5284
  const sources = await Promise.all(
5123
5285
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -5128,8 +5290,8 @@ var ServerRenderer = class {
5128
5290
  }),
5129
5291
  fs5.promises.stat(route.modulePath).catch(() => void 0)
5130
5292
  ]);
5131
- if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _160 => _160.metadata]))) return null;
5132
- return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _161 => _161.mtime, 'access', _162 => _162.toISOString, 'call', _163 => _163()]) };
5293
+ if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _172 => _172.metadata]))) return null;
5294
+ return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _173 => _173.mtime, 'access', _174 => _174.toISOString, 'call', _175 => _175()]) };
5133
5295
  })
5134
5296
  );
5135
5297
  const rootLayout = this.routeManager.getLayouts().get("/");
@@ -5139,15 +5301,15 @@ var ServerRenderer = class {
5139
5301
  {
5140
5302
  origin: new URL(request2.url).origin,
5141
5303
  config: this.getAgentSitemap(),
5142
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _164 => _164.metadataBase]),
5304
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _176 => _176.metadataBase]),
5143
5305
  basePath: this.config.basePath,
5144
5306
  trailingSlash: this.config.trailingSlash,
5145
- i18n: _optionalChain([this, 'access', _165 => _165.i18nRuntime, 'optionalAccess', _166 => _166.config])
5307
+ i18n: _optionalChain([this, 'access', _177 => _177.i18nRuntime, 'optionalAccess', _178 => _178.config])
5146
5308
  }
5147
5309
  );
5148
5310
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5149
5311
  res,
5150
- _chunk2MR4MABGcjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
5312
+ _chunkC5AM2XDNcjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
5151
5313
  );
5152
5314
  } catch (error) {
5153
5315
  _chunkQMNWKQL4cjs.logger.error(`Generated sitemap.xml failed: ${error}`);
@@ -5174,9 +5336,9 @@ var ServerRenderer = class {
5174
5336
  * matcher) covers, as the production build decides.
5175
5337
  */
5176
5338
  getAgentListedRoutes() {
5177
- const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _167 => _167.middlewareRoutes, 'optionalCall', _168 => _168()]), () => ( [])) };
5339
+ const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _179 => _179.middlewareRoutes, 'optionalCall', _180 => _180()]), () => ( [])) };
5178
5340
  return [...this.routeManager.getRoutes()].filter(
5179
- ([pattern]) => !pattern.includes("[") && !_chunk2MR4MABGcjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
5341
+ ([pattern]) => !pattern.includes("[") && !_chunkC5AM2XDNcjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
5180
5342
  );
5181
5343
  }
5182
5344
  /**
@@ -5200,26 +5362,28 @@ var ServerRenderer = class {
5200
5362
  * or a registered server such as the docs engine's. Production applies the same rules.
5201
5363
  */
5202
5364
  getDefaultMCPServer() {
5203
- if (_optionalChain([this, 'access', _169 => _169.config, 'access', _170 => _170.agent, 'optionalAccess', _171 => _171.mcp]) !== true || _chunkVG6HYT5Kcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
5204
- if (_optionalChain([this, 'access', _172 => _172.apiRouteExists, 'optionalCall', _173 => _173("/api/mcp")])) return void 0;
5205
- if (this.routeManager.matchRoute(_chunkVG6HYT5Kcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
5206
- _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkVG6HYT5Kcjs.createFarmDefaultMCPServer.call(void 0,
5365
+ if (_optionalChain([this, 'access', _181 => _181.config, 'access', _182 => _182.agent, 'optionalAccess', _183 => _183.mcp]) !== true || _chunkTP4RAV7Ycjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
5366
+ if (_optionalChain([this, 'access', _184 => _184.apiRouteExists, 'optionalCall', _185 => _185("/api/mcp")])) return void 0;
5367
+ if (this.routeManager.matchRoute(_chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
5368
+ _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkTP4RAV7Ycjs.createFarmDefaultMCPServer.call(void 0,
5207
5369
  readAppPackageIdentity(this.config.root),
5208
- _chunkMZLJFNMHcjs.FARM_VERSION
5370
+ _chunkZDZUFD67cjs.FARM_VERSION
5209
5371
  ))));
5210
- return _chunkVG6HYT5Kcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
5372
+ return _chunkTP4RAV7Ycjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
5211
5373
  }
5212
5374
  async renderDefaultMCP(req, res) {
5213
5375
  const server = this.getDefaultMCPServer();
5214
- const request2 = _nullishCoalesce(_chunkHDPT6OYEcjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _174 => _174.config, 'access', _175 => _175.server, 'optionalAccess', _176 => _176.trustProxy]) })));
5376
+ const request2 = _nullishCoalesce(_chunkHDPT6OYEcjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _186 => _186.config, 'access', _187 => _187.server, 'optionalAccess', _188 => _188.trustProxy]) })));
5215
5377
  try {
5216
- const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-6T2Z7TB6.cjs");
5378
+ const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-KE4J3W7S.cjs");
5217
5379
  const origin = new URL(request2.url).origin;
5218
- const i18n = _optionalChain([this, 'access', _177 => _177.i18nRuntime, 'optionalAccess', _178 => _178.config]);
5380
+ const i18n = _optionalChain([this, 'access', _189 => _189.i18nRuntime, 'optionalAccess', _190 => _190.config]);
5381
+ const metadataBase = await this.getRootMetadataBase();
5219
5382
  const response = await handleFarmDefaultMCPRequest(request2, {
5220
5383
  server,
5221
5384
  basePath: this.config.basePath,
5222
5385
  i18n,
5386
+ metadataBase,
5223
5387
  listPages: async () => {
5224
5388
  const sources = await Promise.all(
5225
5389
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -5228,10 +5392,11 @@ var ServerRenderer = class {
5228
5392
  return await this.isAgentPageNoIndex(pattern, metadata) ? null : { pattern, module };
5229
5393
  })
5230
5394
  );
5231
- return _chunkVG6HYT5Kcjs.collectFarmDefaultMCPPages.call(void 0,
5395
+ return _chunkTP4RAV7Ycjs.collectFarmDefaultMCPPages.call(void 0,
5232
5396
  sources.filter((source) => source !== null),
5233
5397
  {
5234
5398
  origin,
5399
+ metadataBase,
5235
5400
  basePath: this.config.basePath,
5236
5401
  markdown: _chunkC2JOS77Zcjs.resolveMarkdownConfig.call(void 0, this.config.md),
5237
5402
  trailingSlash: this.config.trailingSlash,
@@ -5260,7 +5425,7 @@ var ServerRenderer = class {
5260
5425
  }
5261
5426
  /** Same inputs the production server gives llms.txt: static pages and root metadata. */
5262
5427
  async createLlmsTxtContext(request2, options = {}) {
5263
- const config = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _179 => _179.config, 'access', _180 => _180.agent, 'optionalAccess', _181 => _181.llmsTxt]));
5428
+ const config = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _191 => _191.config, 'access', _192 => _192.agent, 'optionalAccess', _193 => _193.llmsTxt]));
5264
5429
  const origin = await this.getAgentOrigin(request2);
5265
5430
  const sources = await Promise.all(
5266
5431
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -5286,7 +5451,7 @@ var ServerRenderer = class {
5286
5451
  include: config.include,
5287
5452
  exclude: config.exclude,
5288
5453
  trailingSlash: this.config.trailingSlash,
5289
- i18n: _optionalChain([this, 'access', _182 => _182.i18nRuntime, 'optionalAccess', _183 => _183.config])
5454
+ i18n: _optionalChain([this, 'access', _194 => _194.i18nRuntime, 'optionalAccess', _195 => _195.config])
5290
5455
  }
5291
5456
  );
5292
5457
  return {
@@ -5296,7 +5461,7 @@ var ServerRenderer = class {
5296
5461
  pages,
5297
5462
  config,
5298
5463
  rootMetadata,
5299
- mcp: _optionalChain([this, 'access', _184 => _184.config, 'access', _185 => _185.agent, 'optionalAccess', _186 => _186.aiCatalog]) === false ? [] : _chunkK4UGCUXXcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
5464
+ mcp: _optionalChain([this, 'access', _196 => _196.config, 'access', _197 => _197.agent, 'optionalAccess', _198 => _198.aiCatalog]) === false ? [] : _chunkFSSONJRVcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
5300
5465
  basePath: this.config.basePath,
5301
5466
  apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
5302
5467
  _chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
@@ -5316,16 +5481,17 @@ var ServerRenderer = class {
5316
5481
  };
5317
5482
  }
5318
5483
  /**
5319
- * The origin llms.txt and llms-full.txt link to: the root layout's `metadataBase`, else the
5320
- * request's origin, as for the sitemap and the production server.
5484
+ * The origin llms.txt, llms-full.txt and list_pages link to: the root layout's
5485
+ * `metadataBase`, else the request's origin, as for the sitemap and the production server.
5321
5486
  */
5322
5487
  async getAgentOrigin(request2) {
5488
+ return _chunkO32QPFVVcjs.resolveFarmAgentOrigin.call(void 0, await this.getRootMetadataBase(), new URL(request2.url).origin);
5489
+ }
5490
+ /** The root layout's `metadataBase`, which generated agent files and list_pages link to. */
5491
+ async getRootMetadataBase() {
5323
5492
  const rootLayout = this.routeManager.getLayouts().get("/");
5324
5493
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5325
- return _chunkO32QPFVVcjs.resolveFarmAgentOrigin.call(void 0,
5326
- _optionalChain([rootMetadata, 'optionalAccess', _187 => _187.metadataBase]),
5327
- new URL(request2.url).origin
5328
- );
5494
+ return _optionalChain([rootMetadata, 'optionalAccess', _199 => _199.metadataBase]);
5329
5495
  }
5330
5496
  /**
5331
5497
  * Reads page mirrors back through this dev server, the way its .md handler
@@ -5337,8 +5503,8 @@ var ServerRenderer = class {
5337
5503
  * body is discarded.
5338
5504
  */
5339
5505
  createDevMarkdownReader(req) {
5340
- const socket = _optionalChain([req, 'optionalAccess', _188 => _188.socket]);
5341
- if (_optionalChain([req, 'optionalAccess', _189 => _189.method, 'optionalAccess', _190 => _190.toUpperCase, 'call', _191 => _191()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _192 => _192.localAddress]) || !socket.localPort) {
5506
+ const socket = _optionalChain([req, 'optionalAccess', _200 => _200.socket]);
5507
+ if (_optionalChain([req, 'optionalAccess', _201 => _201.method, 'optionalAccess', _202 => _202.toUpperCase, 'call', _203 => _203()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _204 => _204.localAddress]) || !socket.localPort) {
5342
5508
  return async () => null;
5343
5509
  }
5344
5510
  if (socket.encrypted) {
@@ -5404,7 +5570,7 @@ var ServerRenderer = class {
5404
5570
  }
5405
5571
  const etag = `"${image.staticInfo.hash}"`;
5406
5572
  const requestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
5407
- trustProxy: _optionalChain([this, 'access', _193 => _193.config, 'access', _194 => _194.server, 'optionalAccess', _195 => _195.trustProxy])
5573
+ trustProxy: _optionalChain([this, 'access', _205 => _205.config, 'access', _206 => _206.server, 'optionalAccess', _207 => _207.trustProxy])
5408
5574
  });
5409
5575
  const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
5410
5576
  res.setHeader("Content-Type", image.staticInfo.contentType);
@@ -5469,7 +5635,7 @@ var ServerRenderer = class {
5469
5635
  options.middlewareMap,
5470
5636
  () => _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0,
5471
5637
  options.middlewareContext,
5472
- () => this.rendererRuntime.renderToString(wrapped, rendererRenderOptions())
5638
+ () => this.renderElementToCompleteHTML(wrapped)
5473
5639
  )
5474
5640
  );
5475
5641
  res.statusCode = options.statusCode;
@@ -5580,11 +5746,11 @@ window.__FARM_PAGE_MODULE__ = ${JSON.stringify(relativePath)};
5580
5746
  window.__FARM_LOADING_MODULE__ = ${JSON.stringify(req.__FARM_LOADING_MODULE_PATH__ || null)};
5581
5747
  window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
5582
5748
  window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkJX5VOLAVcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
5583
- window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
5749
+ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
5584
5750
  </script>`);
5585
5751
  const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
5586
5752
  const rendererHydrationScript = farmScripts(
5587
- _optionalChain([this, 'access', _196 => _196.rendererRuntime, 'access', _197 => _197.generateHydrationScript, 'optionalCall', _198 => _198()]) || ""
5753
+ _optionalChain([this, 'access', _208 => _208.rendererRuntime, 'access', _209 => _209.generateHydrationScript, 'optionalCall', _210 => _210()]) || ""
5588
5754
  );
5589
5755
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
5590
5756
  const farmClientScript = farmScripts(
@@ -5594,7 +5760,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5594
5760
  element,
5595
5761
  {
5596
5762
  rejectLateNavigation: _chunkC2JOS77Zcjs._isFarmMarkdownPageCheck.call(void 0,
5597
- _optionalChain([req, 'access', _199 => _199.headers, 'optionalAccess', _200 => _200[_chunkC2JOS77Zcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
5763
+ _optionalChain([req, 'access', _211 => _211.headers, 'optionalAccess', _212 => _212[_chunkC2JOS77Zcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
5598
5764
  )
5599
5765
  }
5600
5766
  );
@@ -5606,29 +5772,29 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5606
5772
  viewport: viewportTags
5607
5773
  } = _chunk6IOZPJ3Icjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
5608
5774
  pathname: getFarmMetadataPathname(req),
5609
- jsonLd: _optionalChain([this, 'access', _201 => _201.config, 'access', _202 => _202.agent, 'optionalAccess', _203 => _203.jsonLd])
5775
+ jsonLd: _optionalChain([this, 'access', _213 => _213.config, 'access', _214 => _214.agent, 'optionalAccess', _215 => _215.jsonLd])
5610
5776
  });
5611
5777
  const documentTitleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
5612
5778
  const rendererHasTitle = /<title[\s>]/i.test(rendererHead);
5613
- const i18nSnapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
5779
+ const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
5614
5780
  const alternateTags = i18nSnapshot ? renderI18nAlternateLinks(
5615
5781
  req.__FARM_ROUTE__ || req.url || "/",
5616
5782
  i18nSnapshot,
5617
5783
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
5618
5784
  ) : "";
5619
- const themeDocument = _chunk2MR4MABGcjs.createFarmThemeDocumentParts.call(void 0,
5785
+ const themeDocument = _chunkC5AM2XDNcjs.createFarmThemeDocumentParts.call(void 0,
5620
5786
  this.config.theme,
5621
5787
  this.config.basePath,
5622
5788
  _chunkQIXEU2WVcjs.getTheme.call(void 0, )
5623
5789
  );
5624
5790
  themeDocument.head = farmScripts(themeDocument.head);
5625
- const fullDocument = _chunk2MR4MABGcjs.extractFarmFullDocument.call(void 0, content);
5791
+ const fullDocument = _chunkC5AM2XDNcjs.extractFarmFullDocument.call(void 0, content);
5626
5792
  let html;
5627
5793
  if (fullDocument) {
5628
5794
  const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
5629
- const documentHtml = shouldReplaceLayoutTitle ? _chunk2MR4MABGcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
5630
- const effectiveRendererHead = hasExplicitTitle ? _chunk2MR4MABGcjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
5631
- html = _chunk2MR4MABGcjs.composeFarmFullDocument.call(void 0, documentHtml, {
5795
+ const documentHtml = shouldReplaceLayoutTitle ? _chunkC5AM2XDNcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
5796
+ const effectiveRendererHead = hasExplicitTitle ? _chunkC5AM2XDNcjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
5797
+ html = _chunkC5AM2XDNcjs.composeFarmFullDocument.call(void 0, documentHtml, {
5632
5798
  fallbackIcon: !hasFavicon,
5633
5799
  viewport: viewportTags,
5634
5800
  htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
@@ -5654,7 +5820,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5654
5820
  });
5655
5821
  } else {
5656
5822
  html = `<!DOCTYPE html>
5657
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _204 => _204.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
5823
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _216 => _216.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
5658
5824
  <head>
5659
5825
  ${themeDocument.head}
5660
5826
  <meta charset="utf-8">
@@ -5685,7 +5851,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5685
5851
  const securedHtml = this.secureDocumentHTML(req, html);
5686
5852
  if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
5687
5853
  res.end();
5688
- if (!options.captureStaticShell) await _optionalChain([options, 'access', _205 => _205.onComplete, 'optionalCall', _206 => _206(securedHtml)]);
5854
+ if (!options.captureStaticShell) await _optionalChain([options, 'access', _217 => _217.onComplete, 'optionalCall', _218 => _218(securedHtml)]);
5689
5855
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
5690
5856
  type: "render.stream.complete",
5691
5857
  route,
@@ -5695,7 +5861,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5695
5861
  emitFarmRenderError(req, route, error);
5696
5862
  throw error;
5697
5863
  } finally {
5698
- _optionalChain([clearMiddlewareData, 'optionalCall', _207 => _207()]);
5864
+ _optionalChain([clearMiddlewareData, 'optionalCall', _219 => _219()]);
5699
5865
  }
5700
5866
  }
5701
5867
  /**
@@ -5710,7 +5876,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5710
5876
  if (!rootLayout) return false;
5711
5877
  try {
5712
5878
  const Layout = (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).default;
5713
- if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _208 => _208.prototype, 'optionalAccess', _209 => _209.isReactComponent]) || _optionalChain([Layout, 'access', _210 => _210.constructor, 'optionalAccess', _211 => _211.name]) === "AsyncFunction") {
5879
+ if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _220 => _220.prototype, 'optionalAccess', _221 => _221.isReactComponent]) || _optionalChain([Layout, 'access', _222 => _222.constructor, 'optionalAccess', _223 => _223.name]) === "AsyncFunction") {
5714
5880
  return false;
5715
5881
  }
5716
5882
  const cached = documentLayouts.get(Layout);
@@ -5722,12 +5888,12 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5722
5888
  params: {}
5723
5889
  });
5724
5890
  rendersDocument = this.rendererRuntime.isValidElement(rendered) && rendered.type === "html";
5725
- } catch (e15) {
5891
+ } catch (e16) {
5726
5892
  rendersDocument = false;
5727
5893
  }
5728
5894
  documentLayouts.set(Layout, rendersDocument);
5729
5895
  return rendersDocument;
5730
- } catch (e16) {
5896
+ } catch (e17) {
5731
5897
  return false;
5732
5898
  }
5733
5899
  }
@@ -5735,7 +5901,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5735
5901
  const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
5736
5902
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
5737
5903
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument();
5738
- if (!renderToPipeableStream || _chunkC2JOS77Zcjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _212 => _212.headers, 'optionalAccess', _213 => _213[_chunkC2JOS77Zcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
5904
+ if (!renderToPipeableStream || _chunkC2JOS77Zcjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _224 => _224.headers, 'optionalAccess', _225 => _225[_chunkC2JOS77Zcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
5739
5905
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
5740
5906
  }
5741
5907
  return new Promise((resolve3, reject) => {
@@ -5852,7 +6018,7 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
5852
6018
  )};
5853
6019
  window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
5854
6020
  window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkJX5VOLAVcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
5855
- window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
6021
+ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
5856
6022
  </script>${_chunkW44X6IC2cjs.renderFarmFormStateScript.call(void 0, )}`;
5857
6023
  const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
5858
6024
  const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
@@ -5867,16 +6033,16 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5867
6033
  viewport: viewportTags
5868
6034
  } = _chunk6IOZPJ3Icjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
5869
6035
  pathname: getFarmMetadataPathname(req),
5870
- jsonLd: _optionalChain([this, 'access', _214 => _214.config, 'access', _215 => _215.agent, 'optionalAccess', _216 => _216.jsonLd])
6036
+ jsonLd: _optionalChain([this, 'access', _226 => _226.config, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.jsonLd])
5871
6037
  });
5872
- const i18nSnapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
6038
+ const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
5873
6039
  const i18nAlternateTags = i18nSnapshot ? renderI18nAlternateLinks(
5874
6040
  req.__FARM_ROUTE__ || req.url || "/",
5875
6041
  i18nSnapshot,
5876
6042
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
5877
6043
  ) : "";
5878
6044
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
5879
- const themeDocument = _chunk2MR4MABGcjs.createFarmThemeDocumentParts.call(void 0,
6045
+ const themeDocument = _chunkC5AM2XDNcjs.createFarmThemeDocumentParts.call(void 0,
5880
6046
  this.config.theme,
5881
6047
  this.config.basePath,
5882
6048
  _chunkQIXEU2WVcjs.getTheme.call(void 0, )
@@ -5895,7 +6061,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5895
6061
  formState: _chunkW44X6IC2cjs.getFarmFormState.call(void 0, ),
5896
6062
  onShellReady() {
5897
6063
  if (pendingNavigationError) {
5898
- _optionalChain([abort, 'optionalCall', _217 => _217(pendingNavigationError)]);
6064
+ _optionalChain([abort, 'optionalCall', _229 => _229(pendingNavigationError)]);
5899
6065
  if (clearMiddlewareData) {
5900
6066
  clearMiddlewareData();
5901
6067
  }
@@ -5913,7 +6079,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5913
6079
  console.log(`[FARM STREAM] onShellReady at ${shellReadyMs}ms`);
5914
6080
  }
5915
6081
  const shell = `<!DOCTYPE html>
5916
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _218 => _218.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6082
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _230 => _230.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
5917
6083
  <head>
5918
6084
  ${themeDocument.head}
5919
6085
  <meta charset="utf-8">
@@ -5931,11 +6097,20 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5931
6097
  <body class="">${earlyClient ? `
5932
6098
  ${earlyClientScript}` : ""}
5933
6099
  <div id="root">`;
5934
- const securedShell = streamDocument ? "" : stampDocumentHTML(shell);
5935
- if (securedShell) {
5936
- htmlParts.push(securedShell);
5937
- _optionalChain([staticShellParts, 'optionalAccess', _219 => _219.push, 'call', _220 => _220(securedShell)]);
5938
- }
6100
+ let pendingShell = streamDocument ? "" : stampDocumentHTML(shell);
6101
+ let heldHead = "";
6102
+ const releaseShell = (complete) => {
6103
+ const split = _chunkC5AM2XDNcjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6104
+ if (!split) return null;
6105
+ const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkC5AM2XDNcjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
6106
+ const opened = _chunkC5AM2XDNcjs.appendFarmHead.call(void 0, shellHead, split.head);
6107
+ pendingShell = "";
6108
+ heldHead = "";
6109
+ htmlParts.push(opened);
6110
+ _optionalChain([staticShellParts, 'optionalAccess', _231 => _231.push, 'call', _232 => _232(opened)]);
6111
+ res.write(opened);
6112
+ return split.body;
6113
+ };
5939
6114
  const withEarlyClient = (document) => earlyClient ? {
5940
6115
  ...document,
5941
6116
  html: document.html.replace(
@@ -5944,10 +6119,10 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5944
6119
  ${stampDocumentHTML(earlyClientScript)}`
5945
6120
  )
5946
6121
  } : document;
5947
- const documentTransform = streamDocument ? _chunk2MR4MABGcjs.createFarmStreamedDocumentTransform.call(void 0,
6122
+ const documentTransform = streamDocument ? _chunkC5AM2XDNcjs.createFarmStreamedDocumentTransform.call(void 0,
5948
6123
  (opening) => withEarlyClient(
5949
- _chunk2MR4MABGcjs.openFarmStreamedDocument.call(void 0,
5950
- hasExplicitTitle ? _chunk2MR4MABGcjs.removeFarmDocumentTitles.call(void 0, opening) : opening,
6124
+ _chunkC5AM2XDNcjs.openFarmStreamedDocument.call(void 0,
6125
+ hasExplicitTitle ? _chunkC5AM2XDNcjs.removeFarmDocumentTitles.call(void 0, opening) : opening,
5951
6126
  {
5952
6127
  fallbackIcon: !hasFavicon,
5953
6128
  viewport: viewportTags,
@@ -5986,7 +6161,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
5986
6161
  const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
5987
6162
  if (!checkedFullDocument && renderedText) {
5988
6163
  documentPrefix += renderedText;
5989
- const prefix = _chunk2MR4MABGcjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6164
+ const prefix = _chunkC5AM2XDNcjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
5990
6165
  if (prefix !== "pending") {
5991
6166
  checkedFullDocument = true;
5992
6167
  documentPrefix = "";
@@ -6005,7 +6180,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6005
6180
  staticShellClosed = true;
6006
6181
  if (!suspenseHoleEmitted) {
6007
6182
  suspenseHoleEmitted = true;
6008
- _optionalChain([options, 'access', _221 => _221.onSuspenseHoleDetected, 'optionalCall', _222 => _222()]);
6183
+ _optionalChain([options, 'access', _233 => _233.onSuspenseHoleDetected, 'optionalCall', _234 => _234()]);
6009
6184
  }
6010
6185
  } else {
6011
6186
  staticShellParts.push(chunkText);
@@ -6015,6 +6190,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6015
6190
  const writableStream = new (0, _stream.Writable)({
6016
6191
  write(chunk, encoding, callback) {
6017
6192
  if (flushMarker && chunk === flushMarker) {
6193
+ if (pendingShell) releaseShell(true);
6018
6194
  const marker = documentTransform ? documentTransform.write(flushMarker.toString()) : flushMarker;
6019
6195
  res.write(marker, () => {
6020
6196
  if (typeof res.flush === "function") res.flush();
@@ -6027,7 +6203,18 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6027
6203
  firstChunk = false;
6028
6204
  }
6029
6205
  const chunkText = Buffer.isBuffer(chunk) ? cspStreamDecoder ? cspStreamDecoder.decode(chunk, { stream: true }) : chunk.toString() : String(chunk);
6030
- const securedChunkText = cspNonceRewriter ? cspNonceRewriter.write(chunkText) : chunkText;
6206
+ let securedChunkText = cspNonceRewriter ? cspNonceRewriter.write(chunkText) : chunkText;
6207
+ let held = false;
6208
+ if (pendingShell) {
6209
+ heldHead += securedChunkText;
6210
+ const body = releaseShell(false);
6211
+ if (body === null) {
6212
+ callback();
6213
+ return;
6214
+ }
6215
+ securedChunkText = body;
6216
+ held = true;
6217
+ }
6031
6218
  const outputText = documentTransform ? documentTransform.write(securedChunkText) : securedChunkText;
6032
6219
  recordRenderedChunk(outputText, securedChunkText);
6033
6220
  const onWrite = () => {
@@ -6037,10 +6224,18 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6037
6224
  if (documentTransform) {
6038
6225
  if (outputText) res.write(outputText, onWrite);
6039
6226
  else callback();
6040
- } else if (cspNonceRewriter) res.write(securedChunkText, onWrite);
6227
+ } else if (cspNonceRewriter || held) res.write(securedChunkText, onWrite);
6041
6228
  else res.write(chunk, encoding, onWrite);
6042
6229
  },
6043
6230
  final: (callback) => {
6231
+ if (pendingShell) {
6232
+ const body = releaseShell(true);
6233
+ if (body) {
6234
+ htmlParts.push(body);
6235
+ _optionalChain([staticShellParts, 'optionalAccess', _235 => _235.push, 'call', _236 => _236(body)]);
6236
+ res.write(body);
6237
+ }
6238
+ }
6044
6239
  if (lateNavigationError) {
6045
6240
  const navigationError = lateNavigationError;
6046
6241
  lateNavigationError = null;
@@ -6069,8 +6264,8 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6069
6264
  recordRenderedChunk(tail, rewritten);
6070
6265
  if (tail) res.write(tail);
6071
6266
  }
6072
- const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _223 => _223.end, 'call', _224 => _224()]);
6073
- if (_optionalChain([documentEnd, 'optionalAccess', _225 => _225.text])) {
6267
+ const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _237 => _237.end, 'call', _238 => _238()]);
6268
+ if (_optionalChain([documentEnd, 'optionalAccess', _239 => _239.text])) {
6074
6269
  recordRenderedChunk(documentEnd.text, "");
6075
6270
  res.write(documentEnd.text);
6076
6271
  }
@@ -6081,7 +6276,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6081
6276
  deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
6082
6277
  earlyClient,
6083
6278
  // A full document: Farm's #root closes only where Farm opened it.
6084
- ..._optionalChain([documentEnd, 'optionalAccess', _226 => _226.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6279
+ ..._optionalChain([documentEnd, 'optionalAccess', _240 => _240.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6085
6280
  })
6086
6281
  );
6087
6282
  htmlParts.push(footer);
@@ -6113,7 +6308,6 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6113
6308
  });
6114
6309
  resolve3();
6115
6310
  };
6116
- res.write(securedShell);
6117
6311
  if (typeof res.flush === "function") {
6118
6312
  res.flush();
6119
6313
  }
@@ -6181,7 +6375,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6181
6375
  };
6182
6376
  }
6183
6377
  localizeRedirectUrl(url) {
6184
- const snapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
6378
+ const snapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
6185
6379
  return snapshot && url.startsWith("/") && !url.startsWith("//") ? _chunkOWQV6MLMcjs.localizeFarmHref.call(void 0, url, snapshot.locale, snapshot) : url;
6186
6380
  }
6187
6381
  /** The app's not-found component, or null when it relies on the built-in page. */
@@ -6194,7 +6388,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6194
6388
  return await this.routeManager.loadRouteModule(notFoundPath);
6195
6389
  }
6196
6390
  async loadNotFoundComponent() {
6197
- return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _227 => _227.default]), async () => ( null));
6391
+ return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _241 => _241.default]), async () => ( null));
6198
6392
  }
6199
6393
  /** The not-found document's head: layout and not-found metadata, as production renders it. */
6200
6394
  async notFoundMetadataHead(layoutModule, notFoundModule) {
@@ -6217,34 +6411,33 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6217
6411
  */
6218
6412
  async createLateNavigationRecoveryHTML(req, error) {
6219
6413
  if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
6220
- return _chunk2MR4MABGcjs.createLateRedirectRecovery.call(void 0,
6414
+ return _chunkC5AM2XDNcjs.createLateRedirectRecovery.call(void 0,
6221
6415
  this.localizeRedirectUrl(_chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error).url),
6222
6416
  this.getCspNonce(req) || ""
6223
6417
  );
6224
6418
  }
6225
6419
  const pathname = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
6226
- trustProxy: _optionalChain([this, 'access', _228 => _228.config, 'access', _229 => _229.server, 'optionalAccess', _230 => _230.trustProxy])
6420
+ trustProxy: _optionalChain([this, 'access', _242 => _242.config, 'access', _243 => _243.server, 'optionalAccess', _244 => _244.trustProxy])
6227
6421
  }).pathname;
6228
6422
  let content = this.defaultNotFoundContent();
6229
6423
  const NotFoundComponent = await this.loadNotFoundComponent();
6230
6424
  if (NotFoundComponent) {
6231
6425
  try {
6232
- content = await this.rendererRuntime.renderToString(
6426
+ content = await this.renderElementToCompleteHTML(
6233
6427
  await this.wrapWithIntegrationProviders(
6234
6428
  this.rendererRuntime.createElement(NotFoundComponent, { pathname })
6235
- ),
6236
- rendererRenderOptions()
6429
+ )
6237
6430
  );
6238
6431
  } catch (error2) {
6239
6432
  _chunkQMNWKQL4cjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
6240
6433
  }
6241
6434
  }
6242
- return _chunk2MR4MABGcjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
6435
+ return _chunkC5AM2XDNcjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
6243
6436
  }
6244
6437
  async render404(req, res) {
6245
6438
  res.statusCode = 404;
6246
6439
  const pathname = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
6247
- trustProxy: _optionalChain([this, 'access', _231 => _231.config, 'access', _232 => _232.server, 'optionalAccess', _233 => _233.trustProxy])
6440
+ trustProxy: _optionalChain([this, 'access', _245 => _245.config, 'access', _246 => _246.server, 'optionalAccess', _247 => _247.trustProxy])
6248
6441
  }).pathname;
6249
6442
  if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
6250
6443
  res.setHeader("Content-Type", "application/json");
@@ -6285,9 +6478,9 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6285
6478
  );
6286
6479
  if (notFoundPath) {
6287
6480
  const notFoundModule = await this.loadNotFoundModule();
6288
- const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _234 => _234.default]), () => ( null));
6481
+ const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _248 => _248.default]), () => ( null));
6289
6482
  if (NotFoundComponent) {
6290
- const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _235 => _235.default]), () => ( null));
6483
+ const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _249 => _249.default]), () => ( null));
6291
6484
  let element = this.rendererRuntime.createElement(NotFoundComponent, { pathname });
6292
6485
  if (LayoutComponent) {
6293
6486
  element = this.rendererRuntime.createElement(LayoutComponent, {
@@ -6295,10 +6488,7 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6295
6488
  });
6296
6489
  }
6297
6490
  element = await this.wrapWithIntegrationProviders(element);
6298
- const content = await this.rendererRuntime.renderToString(
6299
- element,
6300
- rendererRenderOptions()
6301
- );
6491
+ const content = await this.renderElementToCompleteHTML(element);
6302
6492
  const { head: head2, metadata: metadata2 } = await this.notFoundMetadataHead(layoutModule, notFoundModule);
6303
6493
  const html2 = this.createFullHTML(content, false, pathname, head2, { req, metadata: metadata2 });
6304
6494
  res.setHeader("Content-Type", "text/html; charset=utf-8");
@@ -6327,23 +6517,23 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6327
6517
  res.statusCode = statusCode;
6328
6518
  const isDev = process.env.NODE_ENV === "development";
6329
6519
  const requestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
6330
- trustProxy: _optionalChain([this, 'access', _236 => _236.config, 'access', _237 => _237.server, 'optionalAccess', _238 => _238.trustProxy])
6520
+ trustProxy: _optionalChain([this, 'access', _250 => _250.config, 'access', _251 => _251.server, 'optionalAccess', _252 => _252.trustProxy])
6331
6521
  });
6332
6522
  const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
6333
- const statusText = _chunk2MR4MABGcjs.getDefaultErrorStatusText.call(void 0, statusCode);
6523
+ const statusText = _chunkC5AM2XDNcjs.getDefaultErrorStatusText.call(void 0, statusCode);
6334
6524
  const content = this.stampFarmScripts(
6335
6525
  req,
6336
- _chunk2MR4MABGcjs.createDefaultErrorMarkup.call(void 0, {
6526
+ _chunkC5AM2XDNcjs.createDefaultErrorMarkup.call(void 0, {
6337
6527
  statusCode,
6338
6528
  statusText,
6339
6529
  requestPath: requestUrl.pathname,
6340
6530
  method: req.method || "GET",
6341
- message: _optionalChain([diagnostics, 'optionalAccess', _239 => _239.message]),
6342
- errorName: _optionalChain([diagnostics, 'optionalAccess', _240 => _240.name]),
6343
- stack: _optionalChain([diagnostics, 'optionalAccess', _241 => _241.stack]),
6344
- sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _242 => _242.sourceFrame]),
6531
+ message: _optionalChain([diagnostics, 'optionalAccess', _253 => _253.message]),
6532
+ errorName: _optionalChain([diagnostics, 'optionalAccess', _254 => _254.name]),
6533
+ stack: _optionalChain([diagnostics, 'optionalAccess', _255 => _255.stack]),
6534
+ sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _256 => _256.sourceFrame]),
6345
6535
  development: isDev,
6346
- farmVersion: _chunkMZLJFNMHcjs.FARM_VERSION,
6536
+ farmVersion: _chunkZDZUFD67cjs.FARM_VERSION,
6347
6537
  nodeVersion: process.version,
6348
6538
  mode: isDev ? "development" : "production"
6349
6539
  })
@@ -6369,12 +6559,12 @@ window.__FARM_I18N__ = ${_chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0
6369
6559
  */
6370
6560
  getI18nAlternateOptions(req, metadata) {
6371
6561
  return {
6372
- metadataBase: _optionalChain([metadata, 'optionalAccess', _243 => _243.metadataBase]),
6373
- origin: req ? _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _244 => _244.config, 'access', _245 => _245.server, 'optionalAccess', _246 => _246.trustProxy]) }).origin : void 0
6562
+ metadataBase: _optionalChain([metadata, 'optionalAccess', _257 => _257.metadataBase]),
6563
+ origin: req ? _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _258 => _258.config, 'access', _259 => _259.server, 'optionalAccess', _260 => _260.trustProxy]) }).origin : void 0
6374
6564
  };
6375
6565
  }
6376
6566
  createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
6377
- const i18nSnapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
6567
+ const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
6378
6568
  const farmScripts = (html) => this.stampFarmScripts(alternates.req, html);
6379
6569
  const clientScript = isClientComponent ? ` ${farmScripts(`<script type="module" src="/@farm/client.js"></script>`)}` : "";
6380
6570
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
@@ -6389,20 +6579,20 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
6389
6579
  this.getI18nAlternateOptions(alternates.req, alternates.metadata)
6390
6580
  ) : "";
6391
6581
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
6392
- const themeDocument = _chunk2MR4MABGcjs.createFarmThemeDocumentParts.call(void 0,
6582
+ const themeDocument = _chunkC5AM2XDNcjs.createFarmThemeDocumentParts.call(void 0,
6393
6583
  this.config.theme,
6394
6584
  this.config.basePath,
6395
6585
  _chunkQIXEU2WVcjs.getTheme.call(void 0, )
6396
6586
  );
6397
6587
  themeDocument.head = farmScripts(themeDocument.head);
6398
6588
  const rendererHydrationScript = farmScripts(
6399
- _optionalChain([this, 'access', _247 => _247.rendererRuntime, 'access', _248 => _248.generateHydrationScript, 'optionalCall', _249 => _249()]) || ""
6589
+ _optionalChain([this, 'access', _261 => _261.rendererRuntime, 'access', _262 => _262.generateHydrationScript, 'optionalCall', _263 => _263()]) || ""
6400
6590
  );
6401
- const viewportTags = _chunk6IOZPJ3Icjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _250 => _250.metadata, 'optionalAccess', _251 => _251.viewport]));
6402
- const fullDocument = _chunk2MR4MABGcjs.extractFarmFullDocument.call(void 0, content);
6591
+ const viewportTags = _chunk6IOZPJ3Icjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _264 => _264.metadata, 'optionalAccess', _265 => _265.viewport]));
6592
+ const fullDocument = _chunkC5AM2XDNcjs.extractFarmFullDocument.call(void 0, content);
6403
6593
  if (fullDocument) {
6404
- return _chunk2MR4MABGcjs.composeFarmFullDocument.call(void 0,
6405
- metadataHead ? _chunk2MR4MABGcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
6594
+ return _chunkC5AM2XDNcjs.composeFarmFullDocument.call(void 0,
6595
+ metadataHead ? _chunkC5AM2XDNcjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
6406
6596
  {
6407
6597
  fallbackIcon: !metadataHead,
6408
6598
  viewport: viewportTags,
@@ -6428,7 +6618,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
6428
6618
  );
6429
6619
  }
6430
6620
  return `<!DOCTYPE html>
6431
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _252 => _252.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6621
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _266 => _266.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6432
6622
  <head>
6433
6623
  ${themeDocument.head}
6434
6624
  <meta charset="utf-8">
@@ -6470,7 +6660,7 @@ ${clientScript}
6470
6660
  res.setHeader(_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
6471
6661
  if ((req.method || "GET").toUpperCase() !== "GET") return;
6472
6662
  const forwardedProto = req.headers["x-forwarded-proto"];
6473
- const isSecure = _optionalChain([(Array.isArray(forwardedProto) ? forwardedProto[0] : forwardedProto), 'optionalAccess', _253 => _253.split, 'call', _254 => _254(","), 'access', _255 => _255[0], 'optionalAccess', _256 => _256.trim, 'call', _257 => _257()]) === "https" || Boolean(_optionalChain([req, 'access', _258 => _258.socket, 'optionalAccess', _259 => _259.encrypted]));
6663
+ const isSecure = _optionalChain([(Array.isArray(forwardedProto) ? forwardedProto[0] : forwardedProto), 'optionalAccess', _267 => _267.split, 'call', _268 => _268(","), 'access', _269 => _269[0], 'optionalAccess', _270 => _270.trim, 'call', _271 => _271()]) === "https" || Boolean(_optionalChain([req, 'access', _272 => _272.socket, 'optionalAccess', _273 => _273.encrypted]));
6474
6664
  const cookie = _chunkNLBHLPEOcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
6475
6665
  const existing = res.getHeader("Set-Cookie");
6476
6666
  if (Array.isArray(existing)) {
@@ -6512,8 +6702,8 @@ var FarmApp = class {
6512
6702
  this.config = this.normalizeConfig(config);
6513
6703
  _chunkEVIWKPJVcjs.configureFarmObservability.call(void 0, this.config.observability);
6514
6704
  _chunkQIXEU2WVcjs._setDefaultFarmThemeConfig.call(void 0, this.config.theme);
6515
- this.i18nRuntime = _chunk2AM26UGIcjs.createFarmI18nRuntime.call(void 0, this.config.i18n);
6516
- _chunk2AM26UGIcjs._setDefaultFarmI18nRuntime.call(void 0, this.i18nRuntime);
6705
+ this.i18nRuntime = _chunkNLBK37HIcjs.createFarmI18nRuntime.call(void 0, this.config.i18n);
6706
+ _chunkNLBK37HIcjs._setDefaultFarmI18nRuntime.call(void 0, this.i18nRuntime);
6517
6707
  this.viteServer = viteServer;
6518
6708
  this.routeManager = new RouteManager(this.config, viteServer);
6519
6709
  this.serverRenderer = new ServerRenderer(
@@ -6576,7 +6766,7 @@ var FarmApp = class {
6576
6766
  workflows: _chunkFSODPZRTcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
6577
6767
  api: normalizeFarmAppAPIConfig(config.api),
6578
6768
  middleware: config.middleware || {},
6579
- routeRules: _chunkOCNV4CI2cjs.normalizeRouteRules.call(void 0, config.routeRules),
6769
+ routeRules: _chunkMQ4DYVFScjs.normalizeRouteRules.call(void 0, config.routeRules),
6580
6770
  context: config.context || (() => void 0),
6581
6771
  server: _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, config.server),
6582
6772
  serverActions: _chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, config.serverActions),
@@ -6587,7 +6777,7 @@ var FarmApp = class {
6587
6777
  ),
6588
6778
  performance: _chunkZUVAGMQ5cjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
6589
6779
  theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
6590
- i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkLNVGXUL3cjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
6780
+ i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
6591
6781
  root,
6592
6782
  mode: process.env.NODE_ENV === "production" ? "production" : "development",
6593
6783
  basePath
@@ -6613,10 +6803,10 @@ var FarmApp = class {
6613
6803
  env: config.env || { server: {}, public: {} },
6614
6804
  suppressLintOnLink: _nullishCoalesce(config.suppressLintOnLink, () => ( false)),
6615
6805
  experimental: {
6616
- serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _260 => _260.experimental, 'optionalAccess', _261 => _261.serverComponents]), () => ( false)),
6617
- serverActions: _nullishCoalesce(_optionalChain([config, 'access', _262 => _262.experimental, 'optionalAccess', _263 => _263.serverActions]), () => ( false)),
6618
- isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _264 => _264.experimental, 'optionalAccess', _265 => _265.isolatedClientHydration]), () => ( "off")),
6619
- ppr: _nullishCoalesce(_optionalChain([config, 'access', _266 => _266.experimental, 'optionalAccess', _267 => _267.ppr]), () => ( false)),
6806
+ serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _274 => _274.experimental, 'optionalAccess', _275 => _275.serverComponents]), () => ( false)),
6807
+ serverActions: _nullishCoalesce(_optionalChain([config, 'access', _276 => _276.experimental, 'optionalAccess', _277 => _277.serverActions]), () => ( false)),
6808
+ isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _278 => _278.experimental, 'optionalAccess', _279 => _279.isolatedClientHydration]), () => ( "off")),
6809
+ ppr: _nullishCoalesce(_optionalChain([config, 'access', _280 => _280.experimental, 'optionalAccess', _281 => _281.ppr]), () => ( false)),
6620
6810
  ...config.experimental
6621
6811
  },
6622
6812
  agent: _nullishCoalesce(config.agent, () => ( {})),
@@ -6675,7 +6865,7 @@ function isResolvedAuthConfig(value) {
6675
6865
  );
6676
6866
  }
6677
6867
  function normalizeFarmAppAPIConfig(config) {
6678
- if (typeof _optionalChain([config, 'optionalAccess', _268 => _268.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _269 => _269.basePath]) === "function") {
6868
+ if (typeof _optionalChain([config, 'optionalAccess', _282 => _282.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _283 => _283.basePath]) === "function") {
6679
6869
  throw new Error(
6680
6870
  "Farm API config resolver functions must be processed with resolveConfig() before creating a FarmApp."
6681
6871
  );
@@ -6690,7 +6880,7 @@ function createFarmApp(config, viteServer) {
6690
6880
  var SHARP_INSTALL_HINT = _chunkKORZ6PREcjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
6691
6881
  var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
6692
6882
  function resolveFarmImageProviderForRuntime(images, options) {
6693
- const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _270 => _270.provider]), () => ( "auto"));
6883
+ const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _284 => _284.provider]), () => ( "auto"));
6694
6884
  if (provider === "none") return images;
6695
6885
  const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
6696
6886
  if (!usesSharp || _chunkKORZ6PREcjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
@@ -6725,7 +6915,7 @@ function resolveFarmAppPackages(root) {
6725
6915
  let manifest;
6726
6916
  try {
6727
6917
  manifest = JSON.parse(fs.default.readFileSync(path3.default.join(root, "package.json"), "utf8"));
6728
- } catch (e17) {
6918
+ } catch (e18) {
6729
6919
  return {};
6730
6920
  }
6731
6921
  const names = new Set(
@@ -6744,7 +6934,7 @@ function resolveFarmAppPackages(root) {
6744
6934
  if (typeof version === "string" && /^[0-9A-Za-z.+-]{1,64}$/.test(version))
6745
6935
  versions[name] = version;
6746
6936
  break;
6747
- } catch (e18) {
6937
+ } catch (e19) {
6748
6938
  const parent = path3.default.dirname(dir);
6749
6939
  if (parent === dir) break;
6750
6940
  dir = parent;
@@ -6819,9 +7009,9 @@ function staticValue(node) {
6819
7009
  }
6820
7010
  }
6821
7011
  function property(object, name) {
6822
- return _optionalChain([object, 'access', _271 => _271.properties, 'access', _272 => _272.find, 'call', _273 => _273(
7012
+ return _optionalChain([object, 'access', _285 => _285.properties, 'access', _286 => _286.find, 'call', _287 => _287(
6823
7013
  (entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name)
6824
- ), 'optionalAccess', _274 => _274.value]);
7014
+ ), 'optionalAccess', _288 => _288.value]);
6825
7015
  }
6826
7016
  function toolFromObject(object) {
6827
7017
  const name = staticValue(property(object, "name"));
@@ -6859,7 +7049,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
6859
7049
  let program;
6860
7050
  try {
6861
7051
  program = parseAst2(code, { lang });
6862
- } catch (e19) {
7052
+ } catch (e20) {
6863
7053
  return [];
6864
7054
  }
6865
7055
  const locals = /* @__PURE__ */ new Map();
@@ -6867,7 +7057,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
6867
7057
  if (statement.type !== "ImportDeclaration" || statement.source.value !== WEBMCP_CLIENT)
6868
7058
  continue;
6869
7059
  for (const specifier of statement.specifiers) {
6870
- const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _275 => _275.imported, 'optionalAccess', _276 => _276.name]), () => ( _optionalChain([specifier, 'access', _277 => _277.imported, 'optionalAccess', _278 => _278.value])));
7060
+ const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _289 => _289.imported, 'optionalAccess', _290 => _290.name]), () => ( _optionalChain([specifier, 'access', _291 => _291.imported, 'optionalAccess', _292 => _292.value])));
6871
7061
  if (specifier.type === "ImportSpecifier" && DEFINERS.has(imported))
6872
7062
  locals.set(specifier.local.name, imported);
6873
7063
  }
@@ -6883,7 +7073,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
6883
7073
  const [argument] = current.arguments;
6884
7074
  if (definer && argument) {
6885
7075
  const objects = definer === "registerWebMCPTools" ? argument.type === "ArrayExpression" ? argument.elements.filter(
6886
- (element) => _optionalChain([element, 'optionalAccess', _279 => _279.type]) === "ObjectExpression"
7076
+ (element) => _optionalChain([element, 'optionalAccess', _293 => _293.type]) === "ObjectExpression"
6887
7077
  ) : [] : argument.type === "ObjectExpression" ? [argument] : [];
6888
7078
  for (const object of objects) {
6889
7079
  const tool = toolFromObject(object);
@@ -6908,7 +7098,7 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
6908
7098
  expandDirectories: false,
6909
7099
  ignore: ["**/node_modules/**", "**/*.d.ts", "**/*.{test,spec}.*", "**/__tests__/**"]
6910
7100
  });
6911
- } catch (e20) {
7101
+ } catch (e21) {
6912
7102
  return [];
6913
7103
  }
6914
7104
  const seen = /* @__PURE__ */ new Set();
@@ -6917,7 +7107,7 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
6917
7107
  let mtimeMs;
6918
7108
  try {
6919
7109
  mtimeMs = fs.default.statSync(file).mtimeMs;
6920
- } catch (e21) {
7110
+ } catch (e22) {
6921
7111
  continue;
6922
7112
  }
6923
7113
  let entry = cache.get(file);
@@ -6925,7 +7115,7 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
6925
7115
  let code = "";
6926
7116
  try {
6927
7117
  code = fs.default.readFileSync(file, "utf8");
6928
- } catch (e22) {
7118
+ } catch (e23) {
6929
7119
  }
6930
7120
  entry = { mtimeMs, tools: findFarmWebMCPTools(code, file) };
6931
7121
  cache.set(file, entry);
@@ -6944,8 +7134,8 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
6944
7134
 
6945
7135
  var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
6946
7136
  function resolveFarmClientCacheAdapterEntry(root, cache2) {
6947
- const client = _optionalChain([cache2, 'optionalAccess', _280 => _280.client]);
6948
- const adapter = _optionalChain([client, 'optionalAccess', _281 => _281.adapter]);
7137
+ const client = _optionalChain([cache2, 'optionalAccess', _294 => _294.client]);
7138
+ const adapter = _optionalChain([client, 'optionalAccess', _295 => _295.adapter]);
6949
7139
  if (adapter === void 0) return void 0;
6950
7140
  if (typeof adapter !== "string" || adapter.trim().length === 0) {
6951
7141
  throw new Error(
@@ -6960,8 +7150,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache2) {
6960
7150
  );
6961
7151
  }
6962
7152
  const options = {};
6963
- if (_optionalChain([client, 'optionalAccess', _282 => _282.version]) !== void 0) options.version = client.version;
6964
- if (_optionalChain([client, 'optionalAccess', _283 => _283.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
7153
+ if (_optionalChain([client, 'optionalAccess', _296 => _296.version]) !== void 0) options.version = client.version;
7154
+ if (_optionalChain([client, 'optionalAccess', _297 => _297.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
6965
7155
  return { importPath: found.replace(/\\/g, "/"), options };
6966
7156
  }
6967
7157
  function resolveAdapterFile(resolved) {
@@ -7331,7 +7521,7 @@ function fileNamePattern(files) {
7331
7521
  names.add(path3.default.basename(file));
7332
7522
  try {
7333
7523
  names.add(path3.default.basename(_fs.realpathSync.call(void 0, file)));
7334
- } catch (e23) {
7524
+ } catch (e24) {
7335
7525
  }
7336
7526
  }
7337
7527
  return new RegExp(`(?:^|/)(?:${[...names].map(escapeRegExp).join("|")})(?:\\?.*)?$`);
@@ -7367,7 +7557,7 @@ function redactFarmDocsClientConfig(code, filename) {
7367
7557
  const current = node;
7368
7558
  if (current.type === "Property") {
7369
7559
  const name = propertyKeyName(current);
7370
- const valueType = _optionalChain([current, 'access', _284 => _284.value, 'optionalAccess', _285 => _285.type]);
7560
+ const valueType = _optionalChain([current, 'access', _298 => _298.value, 'optionalAccess', _299 => _299.type]);
7371
7561
  const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkSM2SYWARcjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
7372
7562
  if (name && credential) {
7373
7563
  edits.push(
@@ -7398,7 +7588,7 @@ function isFarmDocsClientConfigModule(id, configModule) {
7398
7588
  if (file === configModule) return true;
7399
7589
  try {
7400
7590
  return file === _fs.realpathSync.call(void 0, configModule).replace(/\\/g, "/");
7401
- } catch (e24) {
7591
+ } catch (e25) {
7402
7592
  return false;
7403
7593
  }
7404
7594
  }
@@ -7410,7 +7600,7 @@ function farmDocsClientConfigPlugin(configModule) {
7410
7600
  // Never matches without a docs config module, so the bundler never calls the handler.
7411
7601
  filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
7412
7602
  handler(code, id, options) {
7413
- if (_optionalChain([options, 'optionalAccess', _286 => _286.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
7603
+ if (_optionalChain([options, 'optionalAccess', _300 => _300.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
7414
7604
  const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
7415
7605
  return redacted === null ? null : { code: redacted, map: null };
7416
7606
  }
@@ -7442,7 +7632,7 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
7442
7632
  ];
7443
7633
  function getFarmClientOptimizeDepsInclude(renderer) {
7444
7634
  return Array.from(
7445
- /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _287 => _287.optimizeDeps]) || []])
7635
+ /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _301 => _301.optimizeDeps]) || []])
7446
7636
  );
7447
7637
  }
7448
7638
  function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
@@ -7466,7 +7656,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
7466
7656
  // Farm's HTML boots through a virtual module and imports route UI lazily.
7467
7657
  // Explicit entries let Vite finish that crawl before a navigation can
7468
7658
  // rotate the optimizer hash underneath a hydrated React runtime.
7469
- ..._optionalChain([entries, 'optionalAccess', _288 => _288.length]) ? { entries: [...entries] } : {}
7659
+ ..._optionalChain([entries, 'optionalAccess', _302 => _302.length]) ? { entries: [...entries] } : {}
7470
7660
  };
7471
7661
  }
7472
7662
  function createFarmSourceAlias(projectRoot, srcDir = "src") {
@@ -7479,21 +7669,27 @@ function mergeNoExternal(farmValue, userValue) {
7479
7669
  const normalize = (value) => value == null || value === true ? [] : Array.isArray(value) ? value : [value];
7480
7670
  return Array.from(/* @__PURE__ */ new Set([...normalize(farmValue), ...normalize(userValue)]));
7481
7671
  }
7482
- function mergeAlias(farmValue, userValue) {
7672
+ function mergeFarmViteAlias(farmValue, userValue) {
7483
7673
  if (!farmValue) return userValue || {};
7484
7674
  if (!userValue) return farmValue;
7485
7675
  if (!Array.isArray(farmValue) && !Array.isArray(userValue)) {
7486
7676
  return {
7487
- ...farmValue,
7488
- ...userValue
7677
+ ...userValue,
7678
+ ...Object.fromEntries(
7679
+ Object.entries(farmValue).filter(
7680
+ ([find]) => !Object.prototype.hasOwnProperty.call(userValue, find)
7681
+ )
7682
+ )
7489
7683
  };
7490
7684
  }
7491
7685
  const normalize = (value) => Array.isArray(value) ? [...value] : Object.entries(value).map(([find, replacement]) => ({ find, replacement }));
7492
- return [...normalize(userValue), ...normalize(farmValue)];
7686
+ const userEntries = normalize(userValue);
7687
+ const userNames = new Set(userEntries.map((entry) => entry.find));
7688
+ return [...userEntries, ...normalize(farmValue).filter((entry) => !userNames.has(entry.find))];
7493
7689
  }
7494
7690
  function mergeFarmViteConfig(farmConfig, userConfig = {}) {
7495
- const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _289 => _289.optimizeDeps, 'optionalAccess', _290 => _290.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _291 => _291.optimizeDeps, 'optionalAccess', _292 => _292.noDiscovery])));
7496
- const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _293 => _293.optimizeDeps, 'optionalAccess', _294 => _294.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _295 => _295.optimizeDeps, 'optionalAccess', _296 => _296.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _297 => _297.optimizeDeps, 'optionalAccess', _298 => _298.holdUntilCrawlEnd]))));
7691
+ const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _303 => _303.optimizeDeps, 'optionalAccess', _304 => _304.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _305 => _305.optimizeDeps, 'optionalAccess', _306 => _306.noDiscovery])));
7692
+ const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _307 => _307.optimizeDeps, 'optionalAccess', _308 => _308.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _309 => _309.optimizeDeps, 'optionalAccess', _310 => _310.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _311 => _311.optimizeDeps, 'optionalAccess', _312 => _312.holdUntilCrawlEnd]))));
7497
7693
  return {
7498
7694
  ...farmConfig,
7499
7695
  ...userConfig,
@@ -7505,9 +7701,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
7505
7701
  resolve: {
7506
7702
  ...farmConfig.resolve,
7507
7703
  ...userConfig.resolve,
7508
- alias: mergeAlias(_optionalChain([farmConfig, 'access', _299 => _299.resolve, 'optionalAccess', _300 => _300.alias]), _optionalChain([userConfig, 'access', _301 => _301.resolve, 'optionalAccess', _302 => _302.alias])),
7704
+ alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _313 => _313.resolve, 'optionalAccess', _314 => _314.alias]), _optionalChain([userConfig, 'access', _315 => _315.resolve, 'optionalAccess', _316 => _316.alias])),
7509
7705
  dedupe: Array.from(
7510
- /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _303 => _303.resolve, 'optionalAccess', _304 => _304.dedupe]) || [], ..._optionalChain([userConfig, 'access', _305 => _305.resolve, 'optionalAccess', _306 => _306.dedupe]) || []])
7706
+ /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _317 => _317.resolve, 'optionalAccess', _318 => _318.dedupe]) || [], ..._optionalChain([userConfig, 'access', _319 => _319.resolve, 'optionalAccess', _320 => _320.dedupe]) || []])
7511
7707
  )
7512
7708
  },
7513
7709
  optimizeDeps: {
@@ -7517,21 +7713,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
7517
7713
  holdUntilCrawlEnd,
7518
7714
  include: Array.from(
7519
7715
  /* @__PURE__ */ new Set([
7520
- ..._optionalChain([farmConfig, 'access', _307 => _307.optimizeDeps, 'optionalAccess', _308 => _308.include]) || [],
7521
- ..._optionalChain([userConfig, 'access', _309 => _309.optimizeDeps, 'optionalAccess', _310 => _310.include]) || []
7716
+ ..._optionalChain([farmConfig, 'access', _321 => _321.optimizeDeps, 'optionalAccess', _322 => _322.include]) || [],
7717
+ ..._optionalChain([userConfig, 'access', _323 => _323.optimizeDeps, 'optionalAccess', _324 => _324.include]) || []
7522
7718
  ])
7523
7719
  ),
7524
7720
  exclude: Array.from(
7525
7721
  /* @__PURE__ */ new Set([
7526
- ..._optionalChain([farmConfig, 'access', _311 => _311.optimizeDeps, 'optionalAccess', _312 => _312.exclude]) || [],
7527
- ..._optionalChain([userConfig, 'access', _313 => _313.optimizeDeps, 'optionalAccess', _314 => _314.exclude]) || []
7722
+ ..._optionalChain([farmConfig, 'access', _325 => _325.optimizeDeps, 'optionalAccess', _326 => _326.exclude]) || [],
7723
+ ..._optionalChain([userConfig, 'access', _327 => _327.optimizeDeps, 'optionalAccess', _328 => _328.exclude]) || []
7528
7724
  ])
7529
7725
  )
7530
7726
  },
7531
7727
  ssr: {
7532
7728
  ...farmConfig.ssr,
7533
7729
  ...userConfig.ssr,
7534
- noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _315 => _315.ssr, 'optionalAccess', _316 => _316.noExternal]), _optionalChain([userConfig, 'access', _317 => _317.ssr, 'optionalAccess', _318 => _318.noExternal]))
7730
+ noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _329 => _329.ssr, 'optionalAccess', _330 => _330.noExternal]), _optionalChain([userConfig, 'access', _331 => _331.ssr, 'optionalAccess', _332 => _332.noExternal]))
7535
7731
  }
7536
7732
  };
7537
7733
  }
@@ -7541,7 +7737,33 @@ function mergeExternal(farmValue, userValue) {
7541
7737
  if (farmValue === true || userValue === true) return true;
7542
7738
  return Array.from(/* @__PURE__ */ new Set([...farmValue, ...userValue]));
7543
7739
  }
7544
- function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
7740
+ var FARM_CLIENT_OWNED_OUTPUT_OPTIONS = [
7741
+ "dir",
7742
+ "file",
7743
+ "format",
7744
+ "entryFileNames",
7745
+ "chunkFileNames",
7746
+ "assetFileNames",
7747
+ "hashCharacters"
7748
+ ];
7749
+ function isFarmOwnedClientOutputOption(key) {
7750
+ return FARM_CLIENT_OWNED_OUTPUT_OPTIONS.includes(key) || key.startsWith("sourcemap");
7751
+ }
7752
+ function mergeFarmClientOutputOptions(farmOutput, userOutput) {
7753
+ if (userOutput === void 0) return farmOutput;
7754
+ if (Array.isArray(userOutput) || Array.isArray(farmOutput)) {
7755
+ throw new Error(
7756
+ "Farm builds one client output: set vite.build.rolldownOptions.output (or rollupOptions.output) to an object, not an array."
7757
+ );
7758
+ }
7759
+ const app = Object.fromEntries(
7760
+ Object.entries(userOutput).filter(
7761
+ ([key, value]) => value !== void 0 && !isFarmOwnedClientOutputOption(key)
7762
+ )
7763
+ );
7764
+ return { ...app, ...farmOutput };
7765
+ }
7766
+ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}) {
7545
7767
  const {
7546
7768
  plugins: _plugins,
7547
7769
  root: _root,
@@ -7569,13 +7791,15 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
7569
7791
  } = userBuild;
7570
7792
  const {
7571
7793
  input: _input,
7572
- output: _output,
7794
+ output: userOutput,
7573
7795
  ...userBundlerOptions
7574
7796
  } = {
7575
7797
  ...userRollupOptions,
7576
7798
  ...userRolldownOptions
7577
7799
  };
7578
7800
  const merged = mergeFarmViteConfig(farmConfig, shared);
7801
+ const farmBundlerOptions = _optionalChain([farmConfig, 'access', _333 => _333.build, 'optionalAccess', _334 => _334.rollupOptions]);
7802
+ const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _335 => _335.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _336 => _336.output]);
7579
7803
  return {
7580
7804
  ...merged,
7581
7805
  build: {
@@ -7583,7 +7807,8 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
7583
7807
  ...farmConfig.build,
7584
7808
  rollupOptions: {
7585
7809
  ...userBundlerOptions,
7586
- ..._optionalChain([farmConfig, 'access', _319 => _319.build, 'optionalAccess', _320 => _320.rollupOptions])
7810
+ ...farmBundlerOptions,
7811
+ ...output === void 0 ? {} : { output }
7587
7812
  }
7588
7813
  },
7589
7814
  css: farmConfig.css || userCss ? { ...farmConfig.css, ...userCss } : void 0,
@@ -7591,7 +7816,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}) {
7591
7816
  esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
7592
7817
  ssr: {
7593
7818
  ...merged.ssr,
7594
- external: mergeExternal(_optionalChain([farmConfig, 'access', _321 => _321.ssr, 'optionalAccess', _322 => _322.external]), _optionalChain([userConfig, 'access', _323 => _323.ssr, 'optionalAccess', _324 => _324.external]))
7819
+ external: mergeExternal(_optionalChain([farmConfig, 'access', _337 => _337.ssr, 'optionalAccess', _338 => _338.external]), _optionalChain([userConfig, 'access', _339 => _339.ssr, 'optionalAccess', _340 => _340.external]))
7595
7820
  }
7596
7821
  };
7597
7822
  }
@@ -7661,4 +7886,6 @@ ${FARM_DARK_VARIANT}
7661
7886
 
7662
7887
 
7663
7888
 
7664
- exports.inspectStaticMetadataImage = inspectStaticMetadataImage; exports.RouteManager = RouteManager; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.inferFarmIslandStrategy = inferFarmIslandStrategy; exports.resolveFarmRouteRootStrategy = resolveFarmRouteRootStrategy; exports.canBootFarmIslandsClient = canBootFarmIslandsClient; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; exports.resolveFarmAppPackages = resolveFarmAppPackages; exports.collectFarmWebMCPTools = collectFarmWebMCPTools; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE = FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE; exports.FARM_NAVIGATION_SCRIPT_SOURCE = FARM_NAVIGATION_SCRIPT_SOURCE; exports.FARM_NAVIGATION_STREAM_READER_SOURCE = FARM_NAVIGATION_STREAM_READER_SOURCE; exports.FARM_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;
7889
+
7890
+
7891
+ exports.inspectStaticMetadataImage = inspectStaticMetadataImage; exports.RouteManager = RouteManager; exports.resolveDevGlobalStylesheetHref = resolveDevGlobalStylesheetHref; exports.collectDevStylesheetUrls = collectDevStylesheetUrls; exports.resolveFarmNotFoundComponentPath = resolveFarmNotFoundComponentPath; exports.farmFontImportsPlugin = farmFontImportsPlugin; exports.mergeFarmFontCss = mergeFarmFontCss; exports.DEFAULT_NOT_FOUND_STYLES = DEFAULT_NOT_FOUND_STYLES; exports.generateFarmIntegrationProviderClientCode = generateFarmIntegrationProviderClientCode; exports.generateFarmIntegrationProviderServerModules = generateFarmIntegrationProviderServerModules; exports.inferFarmIslandStrategy = inferFarmIslandStrategy; exports.invalidateFarmRouteRootInferences = invalidateFarmRouteRootInferences; exports.resolveFarmRouteRootStrategy = resolveFarmRouteRootStrategy; exports.canBootFarmIslandsClient = canBootFarmIslandsClient; exports.ServerRenderer = ServerRenderer; exports.FarmApp = FarmApp; exports.createFarmApp = createFarmApp; exports.SHARP_INSTALL_HINT = SHARP_INSTALL_HINT; exports.resolveFarmImageProviderForRuntime = resolveFarmImageProviderForRuntime; exports.resolveFarmImageServerRuntime = resolveFarmImageServerRuntime; exports.resolveFarmAppPackages = resolveFarmAppPackages; exports.collectFarmWebMCPTools = collectFarmWebMCPTools; exports.resolveFarmClientCacheAdapterEntry = resolveFarmClientCacheAdapterEntry; exports.generateClientCachePersistenceCode = generateClientCachePersistenceCode; exports.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE = FARM_LAYOUT_ELEMENT_CLIENT_SOURCE; exports.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE = FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE; exports.FARM_NAVIGATION_SCRIPT_SOURCE = FARM_NAVIGATION_SCRIPT_SOURCE; exports.FARM_NAVIGATION_STREAM_READER_SOURCE = FARM_NAVIGATION_STREAM_READER_SOURCE; exports.FARM_REFRESH_FIELDS_SOURCE = FARM_REFRESH_FIELDS_SOURCE; exports.exactIdPattern = exactIdPattern; exports.fileNamePattern = fileNamePattern; exports.redactFarmDocsClientConfig = redactFarmDocsClientConfig; exports.isFarmDocsClientConfigModule = isFarmDocsClientConfigModule; exports.farmDocsClientConfigPlugin = farmDocsClientConfigPlugin; exports.createFarmClientOptimizeDepsEntries = createFarmClientOptimizeDepsEntries; exports.createFarmClientOptimizeDepsConfig = createFarmClientOptimizeDepsConfig; exports.createFarmSourceAlias = createFarmSourceAlias; exports.mergeFarmViteAlias = mergeFarmViteAlias; exports.mergeFarmViteConfig = mergeFarmViteConfig; exports.mergeFarmProductionViteConfig = mergeFarmProductionViteConfig; exports.createFarmThemeCssPlugin = createFarmThemeCssPlugin;