@farm.js/core 0.1.72 → 0.1.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/{agent-mcp-handler-VIT4GOSR.mjs → agent-mcp-handler-RK7LDYEL.mjs} +4 -4
  2. package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-VBCA3WZ6.cjs} +5 -5
  3. package/dist/{agent-mcp.d-BO3rZXEM.d.ts → agent-mcp.d-D_gHjCAE.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-Cwff7lcA.d.mts → agent-mcp.d-PvEf-1mi.d.mts} +1 -1
  5. package/dist/agent-runtime.d.mts +2 -2
  6. package/dist/agent-runtime.d.ts +2 -2
  7. package/dist/{analyzer-5Q75LTIL.mjs → analyzer-MFYCJT75.mjs} +2 -2
  8. package/dist/analyzer-V5ZMRIIY.cjs +16 -0
  9. package/dist/api/node.d.mts +4 -4
  10. package/dist/api/node.d.ts +4 -4
  11. package/dist/api/route-manager.d.mts +4 -4
  12. package/dist/api/route-manager.d.ts +4 -4
  13. package/dist/api/runtime.d.mts +3 -3
  14. package/dist/api/runtime.d.ts +3 -3
  15. package/dist/api.d.mts +5 -5
  16. package/dist/api.d.ts +5 -5
  17. package/dist/{app-manifest.d-DwjGkYlP.d.ts → app-manifest.d-BpVTg43i.d.ts} +1 -1
  18. package/dist/{app-manifest.d-USD_IbFd.d.mts → app-manifest.d-CN7cEWHX.d.mts} +1 -1
  19. package/dist/app-markdown.cjs +4 -4
  20. package/dist/app-markdown.d.mts +3 -3
  21. package/dist/app-markdown.d.ts +3 -3
  22. package/dist/app-markdown.mjs +3 -3
  23. package/dist/{app.d-fW06_h8h.d.mts → app.d-BFWzAdTe.d.mts} +10 -4
  24. package/dist/{app.d-DAmF2MAk.d.ts → app.d-DO4PTCWm.d.ts} +10 -4
  25. package/dist/{chunk-OSMUE5ST.mjs → chunk-462MUII7.mjs} +3 -3
  26. package/dist/{chunk-MWUDEYBI.mjs → chunk-4CTCSKAF.mjs} +1 -1
  27. package/dist/{chunk-FSSONJRV.cjs → chunk-4YHGQDTT.cjs} +12 -12
  28. package/dist/{chunk-YCNHUIPR.cjs → chunk-4Z3YLMSW.cjs} +10 -10
  29. package/dist/{chunk-O32QPFVV.cjs → chunk-5PDMBWAF.cjs} +5 -5
  30. package/dist/{chunk-E2V7RRFL.mjs → chunk-6O6PAZZR.mjs} +1 -1
  31. package/dist/{chunk-LXEJNWF5.mjs → chunk-73K53YPP.mjs} +2 -2
  32. package/dist/{chunk-WIJF3PBM.mjs → chunk-7GMBETHM.mjs} +1 -1
  33. package/dist/{chunk-DGNMXL2O.mjs → chunk-B67CW2LM.mjs} +1 -1
  34. package/dist/{chunk-E3LE6EZH.cjs → chunk-CLEWORVY.cjs} +2 -2
  35. package/dist/{chunk-KPJYBSHL.mjs → chunk-CPMME66W.mjs} +149 -22
  36. package/dist/{chunk-VAWDGGW3.mjs → chunk-CYRIIVD4.mjs} +26 -15
  37. package/dist/{chunk-RFWWXEIF.mjs → chunk-FRO4BB2T.mjs} +1 -1
  38. package/dist/{chunk-N3XO5AL5.cjs → chunk-GPO3LJDJ.cjs} +2 -2
  39. package/dist/{chunk-645ENY7W.mjs → chunk-GZOKWJIW.mjs} +4 -4
  40. package/dist/{chunk-NAXKOTPP.cjs → chunk-HFUOLILA.cjs} +21 -21
  41. package/dist/{chunk-C2JOS77Z.cjs → chunk-HGB4PM2C.cjs} +178 -51
  42. package/dist/{chunk-BE7AQXJB.cjs → chunk-HTXKSREF.cjs} +255 -89
  43. package/dist/{chunk-Z3GPAFIA.mjs → chunk-HY6IVQ54.mjs} +1 -1
  44. package/dist/{chunk-3JN5M3T5.mjs → chunk-IBVN7SW5.mjs} +247 -81
  45. package/dist/{chunk-OSEQL34Q.cjs → chunk-ILQ5DKYF.cjs} +2 -2
  46. package/dist/{chunk-AUAMXI6N.mjs → chunk-IXZSBO76.mjs} +1 -1
  47. package/dist/{chunk-77VNYVVX.mjs → chunk-JMOCMXTQ.mjs} +1 -1
  48. package/dist/{chunk-5R4Q5FN7.cjs → chunk-KDOZORJD.cjs} +52 -41
  49. package/dist/{chunk-7QCJDYZQ.cjs → chunk-KTDG4THT.cjs} +2 -2
  50. package/dist/{chunk-L6E4SHUB.cjs → chunk-LGR7565L.cjs} +6 -6
  51. package/dist/chunk-LRPPXKCX.mjs +58 -0
  52. package/dist/{chunk-5XFKWHZD.mjs → chunk-MJEKMT6B.mjs} +95 -106
  53. package/dist/chunk-NDOE76QC.cjs +58 -0
  54. package/dist/{chunk-REP6HWJN.mjs → chunk-OBYM5S5G.mjs} +2 -2
  55. package/dist/{chunk-ZUVAGMQ5.cjs → chunk-ODBM54RT.cjs} +7 -7
  56. package/dist/{chunk-J5ASGNKF.mjs → chunk-OIP62QEL.mjs} +1 -1
  57. package/dist/{chunk-3WG7GJQL.cjs → chunk-OXNZUCHN.cjs} +9 -9
  58. package/dist/{chunk-C5AM2XDN.cjs → chunk-PXAHSCR6.cjs} +4 -4
  59. package/dist/{chunk-BSXKZPFE.mjs → chunk-QGCSUC5O.mjs} +112 -70
  60. package/dist/{chunk-EXN4DTVF.cjs → chunk-QKEZLYON.cjs} +2 -2
  61. package/dist/{chunk-QUYAGU65.mjs → chunk-REK6HZSU.mjs} +267 -231
  62. package/dist/{chunk-5X6OHJEE.cjs → chunk-ROCF6UQD.cjs} +5 -8
  63. package/dist/{chunk-KQAB5LML.mjs → chunk-SUQACHER.mjs} +2 -2
  64. package/dist/{chunk-NV26EGMC.mjs → chunk-SVQX5HYW.mjs} +2 -2
  65. package/dist/{chunk-CBLRSZQL.cjs → chunk-TAU3OF5B.cjs} +223 -234
  66. package/dist/{chunk-IWCYRDRQ.cjs → chunk-TDCP3Z4T.cjs} +3 -3
  67. package/dist/{chunk-TP4RAV7Y.cjs → chunk-TU6VAH4V.cjs} +8 -8
  68. package/dist/{chunk-ZDZUFD67.cjs → chunk-UVQRMUAR.cjs} +1 -1
  69. package/dist/{chunk-JMFTKNBA.mjs → chunk-UVZMSRHF.mjs} +2 -2
  70. package/dist/{chunk-GF22VGMS.cjs → chunk-VPETSSWN.cjs} +2 -2
  71. package/dist/{chunk-AYVGD3PK.mjs → chunk-XI3OXOMK.mjs} +1 -1
  72. package/dist/{chunk-HLMUWKAP.cjs → chunk-XUSJVHHD.cjs} +408 -366
  73. package/dist/{chunk-ET6WW3FY.cjs → chunk-YZK64PZT.cjs} +433 -397
  74. package/dist/{chunk-DS7JGFW5.mjs → chunk-Z3IN6GEX.mjs} +4 -7
  75. package/dist/{client-component.d-ciHeCxr-.d.mts → client-component.d-C71rMuHF.d.mts} +2 -2
  76. package/dist/{client-component.d-9J7CkTWW.d.ts → client-component.d-sF-Znk0j.d.ts} +2 -2
  77. package/dist/{client-plugins.d-JnRz5a1o.d.mts → client-plugins.d-B-Gd9mWR.d.mts} +1 -1
  78. package/dist/{client-plugins.d-CUOhfapO.d.ts → client-plugins.d-MFibjgBg.d.ts} +1 -1
  79. package/dist/client-plugins.d.mts +2 -2
  80. package/dist/client-plugins.d.ts +2 -2
  81. package/dist/client.d.mts +7 -7
  82. package/dist/client.d.ts +7 -7
  83. package/dist/config.d.mts +2 -2
  84. package/dist/config.d.ts +2 -2
  85. package/dist/desktop.d.mts +3 -3
  86. package/dist/desktop.d.ts +3 -3
  87. package/dist/{devtools-IZFUYWPG.cjs → devtools-6K4QXFRL.cjs} +5 -5
  88. package/dist/{devtools-7JPQMSTQ.mjs → devtools-TDIJ6HVC.mjs} +4 -4
  89. package/dist/docs.cjs +8 -8
  90. package/dist/docs.d.mts +3 -3
  91. package/dist/docs.d.ts +3 -3
  92. package/dist/docs.mjs +7 -7
  93. package/dist/environment/vite.cjs +3 -3
  94. package/dist/environment/vite.mjs +2 -2
  95. package/dist/{headers.d-rbbTKGaN.d.mts → headers.d-BUxGJTsj.d.mts} +1 -1
  96. package/dist/{headers.d-CqpTL_fZ.d.ts → headers.d-uQ6BR59u.d.ts} +1 -1
  97. package/dist/index.cjs +24 -22
  98. package/dist/{index.d-CMKvzHLW.d.ts → index.d-BCGfxCXY.d.ts} +1 -1
  99. package/dist/{index.d-D_B2D9Il.d.mts → index.d-CuWOJ-un.d.mts} +1 -1
  100. package/dist/index.d.mts +18 -18
  101. package/dist/index.d.ts +18 -18
  102. package/dist/index.mjs +23 -21
  103. package/dist/integrations/orm.d.mts +2 -2
  104. package/dist/integrations/orm.d.ts +2 -2
  105. package/dist/integrations.d.mts +2 -2
  106. package/dist/integrations.d.ts +2 -2
  107. package/dist/internal/app-markdown-runtime.cjs +3 -3
  108. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  109. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  110. package/dist/internal/app-markdown-runtime.mjs +2 -2
  111. package/dist/internal/build-runtime.cjs +23 -23
  112. package/dist/internal/build-runtime.d.mts +4 -4
  113. package/dist/internal/build-runtime.d.ts +4 -4
  114. package/dist/internal/build-runtime.mjs +22 -22
  115. package/dist/internal/cli-runtime.cjs +9 -9
  116. package/dist/internal/cli-runtime.mjs +8 -8
  117. package/dist/internal/client-error-overlay.cjs +4 -4
  118. package/dist/internal/client-error-overlay.mjs +1 -1
  119. package/dist/internal/client-runtime.d.mts +5 -5
  120. package/dist/internal/client-runtime.d.ts +5 -5
  121. package/dist/internal/compression-runtime.d.mts +2 -2
  122. package/dist/internal/compression-runtime.d.ts +2 -2
  123. package/dist/internal/config-runtime.cjs +6 -6
  124. package/dist/internal/config-runtime.d.mts +4 -4
  125. package/dist/internal/config-runtime.d.ts +4 -4
  126. package/dist/internal/config-runtime.mjs +5 -5
  127. package/dist/internal/infra-analytics-runtime.cjs +9 -9
  128. package/dist/internal/infra-analytics-runtime.mjs +7 -7
  129. package/dist/internal/native-server-fns.cjs +4 -4
  130. package/dist/internal/native-server-fns.mjs +3 -3
  131. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  132. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  133. package/dist/internal/production-runtime.cjs +11 -11
  134. package/dist/internal/production-runtime.d.mts +10 -10
  135. package/dist/internal/production-runtime.d.ts +10 -10
  136. package/dist/internal/production-runtime.mjs +10 -10
  137. package/dist/markdown.cjs +2 -2
  138. package/dist/markdown.d.mts +2 -2
  139. package/dist/markdown.d.ts +2 -2
  140. package/dist/markdown.mjs +1 -1
  141. package/dist/middleware.d.mts +2 -2
  142. package/dist/middleware.d.ts +2 -2
  143. package/dist/{mount.d-ImEO7q8a.d.mts → mount.d-BIYmcGGg.d.mts} +1 -1
  144. package/dist/{mount.d-B0XMxDRh.d.ts → mount.d-q8k0cJV0.d.ts} +1 -1
  145. package/dist/{native-tree-L2IIEBXH.mjs → native-tree-OYGKP2NZ.mjs} +2 -2
  146. package/dist/{native-tree-GF4BH33L.cjs → native-tree-R6CQMDTI.cjs} +3 -3
  147. package/dist/{navigation-delegate.d-RRx1CSlb.d.ts → navigation-delegate.d-Btfs6Uoa.d.ts} +1 -1
  148. package/dist/{navigation-delegate.d-83Q7ksf7.d.mts → navigation-delegate.d-CYBUupsv.d.mts} +1 -1
  149. package/dist/navigation.d.mts +5 -5
  150. package/dist/navigation.d.ts +5 -5
  151. package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.mts} +27 -3
  152. package/dist/{observability.d-B2363jB6.d.ts → observability.d-DdJRiaIX.d.ts} +27 -3
  153. package/dist/observability.d.mts +1 -1
  154. package/dist/observability.d.ts +1 -1
  155. package/dist/plugin.cjs +15 -15
  156. package/dist/plugin.d.mts +5 -5
  157. package/dist/plugin.d.ts +5 -5
  158. package/dist/plugin.mjs +14 -14
  159. package/dist/{render-plan.d-Ds2sXJ5m.d.ts → render-plan.d-0FHusf1D.d.ts} +1 -1
  160. package/dist/{render-plan.d-wP8nTeRV.d.mts → render-plan.d-BlyxqKMu.d.mts} +1 -1
  161. package/dist/renderer-client.d.mts +5 -5
  162. package/dist/renderer-client.d.ts +5 -5
  163. package/dist/{request.d-zpSn6pu_.d.ts → request.d-CPdVjssg.d.ts} +1 -1
  164. package/dist/{request.d-F3h7K37m.d.mts → request.d-CX-gks1l.d.mts} +1 -1
  165. package/dist/request.d.mts +3 -3
  166. package/dist/request.d.ts +3 -3
  167. package/dist/{route-rendering.d-Mw0ZKG2e.d.mts → route-rendering.d-CcvZ_4N2.d.mts} +1 -1
  168. package/dist/{route-rendering.d-BL0_AdKj.d.ts → route-rendering.d-DcOoSNoG.d.ts} +1 -1
  169. package/dist/{router.d-NGVsU11T.d.mts → router.d-C8RHma4A.d.mts} +1 -1
  170. package/dist/{router.d-BwXigemZ.d.ts → router.d-D2QnK8cM.d.ts} +1 -1
  171. package/dist/routes.d.mts +2 -2
  172. package/dist/routes.d.ts +2 -2
  173. package/dist/{rsc-pipeline-DHYZLWSF.mjs → rsc-pipeline-LC2FBZAR.mjs} +5 -5
  174. package/dist/{rsc-pipeline-BNXYMG4G.cjs → rsc-pipeline-NTAM65NT.cjs} +6 -6
  175. package/dist/{runtime-XPYKUNL3.mjs → runtime-MWAC7NWR.mjs} +5 -5
  176. package/dist/{runtime-IWOT6ZVC.cjs → runtime-U4PAMTVH.cjs} +7 -7
  177. package/dist/{runtime.d-OBIZWpx1.d.ts → runtime.d-1l_1bLrL.d.ts} +1 -1
  178. package/dist/{runtime.d-BA3MzhXz.d.mts → runtime.d-BQUHHq8M.d.mts} +1 -1
  179. package/dist/server-plugins.d.mts +4 -4
  180. package/dist/server-plugins.d.ts +4 -4
  181. package/dist/server.cjs +37 -35
  182. package/dist/server.d.mts +11 -11
  183. package/dist/server.d.ts +11 -11
  184. package/dist/server.mjs +20 -18
  185. package/dist/{spa-router.d-DrYT944-.d.ts → spa-router.d-BJtXNeqo.d.ts} +2 -2
  186. package/dist/{spa-router.d-BG2XzE5p.d.mts → spa-router.d-BzPdi48R.d.mts} +2 -2
  187. package/dist/testing.d.mts +2 -2
  188. package/dist/testing.d.ts +2 -2
  189. package/dist/{utils.d-C1k9BJeD.d.mts → utils.d-B4ZW-6z6.d.mts} +1 -1
  190. package/dist/{utils.d-DcF4wxey.d.ts → utils.d-DquC6qxy.d.ts} +1 -1
  191. package/dist/version.cjs +2 -2
  192. package/dist/version.mjs +1 -1
  193. package/dist/vite.cjs +17 -15
  194. package/dist/vite.d.mts +16 -7
  195. package/dist/vite.d.ts +16 -7
  196. package/dist/vite.mjs +16 -14
  197. package/package.json +1 -1
  198. package/dist/analyzer-UJG4MIZW.cjs +0 -16
  199. package/dist/chunk-V3UOEWCB.cjs +0 -46
  200. package/dist/chunk-VE3FWJBO.mjs +0 -46
@@ -32,7 +32,8 @@ var _chunkO47W53D3cjs = require('./chunk-O47W53D3.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunkCBLRSZQLcjs = require('./chunk-CBLRSZQL.cjs');
35
+
36
+ var _chunkTAU3OF5Bcjs = require('./chunk-TAU3OF5B.cjs');
36
37
 
37
38
 
38
39
 
@@ -47,7 +48,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
47
48
 
48
49
 
49
50
 
50
- var _chunkE3LE6EZHcjs = require('./chunk-E3LE6EZH.cjs');
51
+ var _chunkCLEWORVYcjs = require('./chunk-CLEWORVY.cjs');
51
52
 
52
53
 
53
54
 
@@ -61,9 +62,7 @@ var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
61
62
 
62
63
 
63
64
 
64
-
65
-
66
- var _chunkC5AM2XDNcjs = require('./chunk-C5AM2XDN.cjs');
65
+ var _chunkPXAHSCR6cjs = require('./chunk-PXAHSCR6.cjs');
67
66
 
68
67
 
69
68
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -81,13 +80,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
81
80
 
82
81
 
83
82
 
84
- var _chunkFSSONJRVcjs = require('./chunk-FSSONJRV.cjs');
83
+ var _chunk4YHGQDTTcjs = require('./chunk-4YHGQDTT.cjs');
85
84
 
86
85
 
87
- var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
86
+ var _chunkTU6VAH4Vcjs = require('./chunk-TU6VAH4V.cjs');
88
87
 
89
88
 
90
- var _chunkOSEQL34Qcjs = require('./chunk-OSEQL34Q.cjs');
89
+ var _chunkILQ5DKYFcjs = require('./chunk-ILQ5DKYF.cjs');
91
90
 
92
91
 
93
92
  var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
@@ -123,7 +122,11 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
123
122
 
124
123
 
125
124
 
126
- var _chunkBE7AQXJBcjs = require('./chunk-BE7AQXJB.cjs');
125
+
126
+
127
+
128
+
129
+ var _chunkHTXKSREFcjs = require('./chunk-HTXKSREF.cjs');
127
130
 
128
131
 
129
132
 
@@ -147,10 +150,10 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
147
150
 
148
151
 
149
152
 
150
- var _chunkZUVAGMQ5cjs = require('./chunk-ZUVAGMQ5.cjs');
153
+ var _chunkODBM54RTcjs = require('./chunk-ODBM54RT.cjs');
151
154
 
152
155
 
153
- var _chunkO32QPFVVcjs = require('./chunk-O32QPFVV.cjs');
156
+ var _chunk5PDMBWAFcjs = require('./chunk-5PDMBWAF.cjs');
154
157
 
155
158
 
156
159
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
@@ -180,7 +183,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
180
183
 
181
184
 
182
185
 
183
- var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
186
+ var _chunkLGR7565Lcjs = require('./chunk-LGR7565L.cjs');
184
187
 
185
188
 
186
189
 
@@ -192,7 +195,7 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
192
195
 
193
196
 
194
197
 
195
- var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
198
+ var _chunkHGB4PM2Ccjs = require('./chunk-HGB4PM2C.cjs');
196
199
 
197
200
 
198
201
 
@@ -285,7 +288,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
285
288
  var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
286
289
 
287
290
 
288
- var _chunkZDZUFD67cjs = require('./chunk-ZDZUFD67.cjs');
291
+ var _chunkUVQRMUARcjs = require('./chunk-UVQRMUAR.cjs');
289
292
 
290
293
 
291
294
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -1029,13 +1032,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logge
1029
1032
  // src/vite.ts
1030
1033
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
1031
1034
  function farmLlmsTxtGeneratedPaths(config) {
1032
- const llms = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _57 => _57.agent, 'optionalAccess', _58 => _58.llmsTxt]));
1035
+ const llms = _chunk5PDMBWAFcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _57 => _57.agent, 'optionalAccess', _58 => _58.llmsTxt]));
1033
1036
  if (!llms.enabled) return [];
1034
1037
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1035
1038
  }
1036
1039
  function farmAgentGeneratedPaths(config) {
1037
- const crawlers = _chunkZUVAGMQ5cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _59 => _59.agent, 'optionalAccess', _60 => _60.crawlers]));
1038
- const sitemap = _chunkZUVAGMQ5cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _61 => _61.agent, 'optionalAccess', _62 => _62.sitemap]));
1040
+ const crawlers = _chunkODBM54RTcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _59 => _59.agent, 'optionalAccess', _60 => _60.crawlers]));
1041
+ const sitemap = _chunkODBM54RTcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _61 => _61.agent, 'optionalAccess', _62 => _62.sitemap]));
1039
1042
  return [
1040
1043
  ...farmLlmsTxtGeneratedPaths(config),
1041
1044
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1080,7 +1083,7 @@ function loadFarmWorkflowsDevRuntime() {
1080
1083
  return import("./workflows.cjs");
1081
1084
  }
1082
1085
  function loadFarmDevtoolsSnapshotRuntime() {
1083
- return import("./devtools-IZFUYWPG.cjs");
1086
+ return import("./devtools-6K4QXFRL.cjs");
1084
1087
  }
1085
1088
  function loadFarmDevtoolsUIRuntime() {
1086
1089
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -1111,16 +1114,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1111
1114
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1112
1115
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1113
1116
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1114
- _chunkCBLRSZQLcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1115
- new RegExp(`^${_chunkBE7AQXJBcjs.FARM_RESOLVE_FROM_PREFIX}`),
1117
+ _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1118
+ new RegExp(`^${_chunkHTXKSREFcjs.FARM_RESOLVE_FROM_PREFIX}`),
1116
1119
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1117
1120
  // included.
1118
1121
  /^node:/,
1119
- _chunkCBLRSZQLcjs.exactIdPattern.call(void 0, _module.builtinModules)
1122
+ _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, _module.builtinModules)
1120
1123
  ];
1121
1124
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1122
- _chunkCBLRSZQLcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1123
- new RegExp(`^${_chunkBE7AQXJBcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1125
+ _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1126
+ new RegExp(`^${_chunkHTXKSREFcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1124
1127
  ];
1125
1128
  function createFarmPlatformClientModule(platform) {
1126
1129
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1141,6 +1144,37 @@ function createFarmServerPrebundleConfig(bundledPackages) {
1141
1144
  }
1142
1145
  };
1143
1146
  }
1147
+ function farmIslandContainersPlugin(config) {
1148
+ let root = _nullishCoalesce(config.root, () => ( process.cwd()));
1149
+ return {
1150
+ name: "farm:island-containers",
1151
+ enforce: "pre",
1152
+ configResolved(resolved) {
1153
+ root = config.root || resolved.root;
1154
+ },
1155
+ transform(code, id) {
1156
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _64 => _64.experimental, 'optionalAccess', _65 => _65.serverComponents])) !== "islands") {
1157
+ return null;
1158
+ }
1159
+ if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1160
+ return null;
1161
+ }
1162
+ if (_chunkHTXKSREFcjs.hasUseClientDirective.call(void 0, code)) return null;
1163
+ const file = id.split("?", 1)[0];
1164
+ const bindings = _chunkHTXKSREFcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1165
+ if (bindings.length === 0) return null;
1166
+ const grown = _chunkHTXKSREFcjs.wrapFarmIslandContainers.call(void 0, {
1167
+ code,
1168
+ file,
1169
+ bindings,
1170
+ reference: _chunkHTXKSREFcjs.farmIslandContainerReferencePath.call(void 0, root)
1171
+ });
1172
+ if (grown === null) return null;
1173
+ _chunkHTXKSREFcjs.ensureFarmIslandContainerReference.call(void 0, root);
1174
+ return { code: grown, map: null };
1175
+ }
1176
+ };
1177
+ }
1144
1178
  function farmServerOnlyEntriesPlugin(options = {}) {
1145
1179
  let root = process.cwd();
1146
1180
  let vercelOgInstalled = false;
@@ -1148,11 +1182,11 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1148
1182
  name: "farm:server-only-entries",
1149
1183
  enforce: "pre",
1150
1184
  config(config) {
1151
- const bundledPackages = _chunkBE7AQXJBcjs.collectFarmServerBundledPackageInfo.call(void 0,
1185
+ const bundledPackages = _chunkHTXKSREFcjs.collectFarmServerBundledPackageInfo.call(void 0,
1152
1186
  path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())))
1153
1187
  );
1154
1188
  return {
1155
- optimizeDeps: { rolldownOptions: { plugins: [_chunkBE7AQXJBcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1189
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkHTXKSREFcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1156
1190
  ssr: {
1157
1191
  noExternal: [
1158
1192
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1170,19 +1204,19 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1170
1204
  resolveId: {
1171
1205
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1172
1206
  handler(id, importer, options2) {
1173
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _64 => _64.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1207
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _66 => _66.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1174
1208
  if (id === SERVER_ONLY_PACKAGE) {
1175
- if (_optionalChain([options2, 'optionalAccess', _65 => _65.ssr]) || _optionalChain([options2, 'optionalAccess', _66 => _66.scan])) {
1209
+ if (_optionalChain([options2, 'optionalAccess', _67 => _67.ssr]) || _optionalChain([options2, 'optionalAccess', _68 => _68.scan])) {
1176
1210
  return FARM_SERVER_ONLY_PACKAGE_ID;
1177
1211
  }
1178
1212
  this.error(
1179
1213
  `${_nullishCoalesce(importer, () => ( "A module"))} imports "server-only", so it must not reach the browser, but client code imports it. Move what the client needs out of that module, or call it from a server component, server function or API route.`
1180
1214
  );
1181
1215
  }
1182
- if (!_optionalChain([options2, 'optionalAccess', _67 => _67.ssr]) && _module.isBuiltin.call(void 0, id)) {
1183
- return _chunkBE7AQXJBcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1216
+ if (!_optionalChain([options2, 'optionalAccess', _69 => _69.ssr]) && _module.isBuiltin.call(void 0, id)) {
1217
+ return _chunkHTXKSREFcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1184
1218
  }
1185
- const resolveFrom = importer ? _chunkBE7AQXJBcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1219
+ const resolveFrom = importer ? _chunkHTXKSREFcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1186
1220
  if (resolveFrom) {
1187
1221
  const directory = path6.dirname(resolveFrom.importer);
1188
1222
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1197,7 +1231,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1197
1231
  }
1198
1232
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1199
1233
  const importedBy = importer ? ` (imported by ${importer})` : "";
1200
- if (!_optionalChain([options2, 'optionalAccess', _68 => _68.ssr])) {
1234
+ if (!_optionalChain([options2, 'optionalAccess', _70 => _70.ssr])) {
1201
1235
  this.error(
1202
1236
  `${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
1203
1237
  );
@@ -1218,7 +1252,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1218
1252
  if (id === FARM_PLATFORM_CLIENT_ID) {
1219
1253
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1220
1254
  }
1221
- return _nullishCoalesce(_chunkBE7AQXJBcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1255
+ return _nullishCoalesce(_chunkHTXKSREFcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1222
1256
  }
1223
1257
  }
1224
1258
  };
@@ -1251,10 +1285,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1251
1285
  if (!snapshot) return "";
1252
1286
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1253
1287
  if (snapshot.routing === "none") return runtime;
1254
- return `${_chunkC5AM2XDNcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1288
+ return `${_chunkPXAHSCR6cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1255
1289
  }
1256
1290
  function getPublicEnvDefine(config) {
1257
- const publicEnv = _optionalChain([config, 'access', _69 => _69.env, 'optionalAccess', _70 => _70.public]);
1291
+ const publicEnv = _optionalChain([config, 'access', _71 => _71.env, 'optionalAccess', _72 => _72.public]);
1258
1292
  if (!isResolvedEnvScope(publicEnv)) {
1259
1293
  return {};
1260
1294
  }
@@ -1293,7 +1327,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1293
1327
  return;
1294
1328
  }
1295
1329
  if (res.headersSent) {
1296
- _optionalChain([res, 'access', _71 => _71.destroy, 'optionalCall', _72 => _72(error instanceof Error ? error : new Error(String(error)))]);
1330
+ _optionalChain([res, 'access', _73 => _73.destroy, 'optionalCall', _74 => _74(error instanceof Error ? error : new Error(String(error)))]);
1297
1331
  return;
1298
1332
  }
1299
1333
  res.statusCode = 500;
@@ -1429,7 +1463,7 @@ function interceptFarmDevPageResponse(options) {
1429
1463
  const originalWrite = res.write.bind(res);
1430
1464
  const originalEnd = res.end.bind(res);
1431
1465
  const originalWriteHead = res.writeHead.bind(res);
1432
- const originalFlushHeaders = _optionalChain([res, 'access', _73 => _73.flushHeaders, 'optionalAccess', _74 => _74.bind, 'call', _75 => _75(res)]);
1466
+ const originalFlushHeaders = _optionalChain([res, 'access', _75 => _75.flushHeaders, 'optionalAccess', _76 => _76.bind, 'call', _77 => _77(res)]);
1433
1467
  let afterResponseCalled = false;
1434
1468
  let interceptedEnd = false;
1435
1469
  const restore = () => {
@@ -1491,7 +1525,7 @@ function interceptFarmDevPageResponse(options) {
1491
1525
  ).then(async (runtimeResponse) => {
1492
1526
  applyWebResponseToNodeResponse(runtimeResponse, res);
1493
1527
  if (!res.headersSent) originalWriteHead(res.statusCode);
1494
- _optionalChain([originalFlushHeaders, 'optionalCall', _76 => _76()]);
1528
+ _optionalChain([originalFlushHeaders, 'optionalCall', _78 => _78()]);
1495
1529
  if (!runtimeResponse.body) return;
1496
1530
  const reader = runtimeResponse.body.getReader();
1497
1531
  for (; ; ) {
@@ -1540,7 +1574,7 @@ function interceptFarmDevPageResponse(options) {
1540
1574
  if (streamsThroughRuntime()) {
1541
1575
  streamRuntimeChunk(bufferChunk);
1542
1576
  const callback = args.find((arg) => typeof arg === "function");
1543
- _optionalChain([callback, 'optionalCall', _77 => _77()]);
1577
+ _optionalChain([callback, 'optionalCall', _79 => _79()]);
1544
1578
  return true;
1545
1579
  }
1546
1580
  if (isHtmlResponse && bufferChunk) {
@@ -1552,7 +1586,7 @@ function interceptFarmDevPageResponse(options) {
1552
1586
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1553
1587
  if (shouldBufferResponse) {
1554
1588
  const callback = args.find((arg) => typeof arg === "function");
1555
- _optionalChain([callback, 'optionalCall', _78 => _78()]);
1589
+ _optionalChain([callback, 'optionalCall', _80 => _80()]);
1556
1590
  return true;
1557
1591
  }
1558
1592
  const writeResult = originalWrite(chunk, ...args);
@@ -1704,13 +1738,13 @@ function getEnvDefines(config, configEnv) {
1704
1738
  )
1705
1739
  )
1706
1740
  };
1707
- if (_optionalChain([configEnv, 'optionalAccess', _79 => _79.isSsrBuild])) {
1741
+ if (_optionalChain([configEnv, 'optionalAccess', _81 => _81.isSsrBuild])) {
1708
1742
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1709
1743
  }
1710
1744
  return defines;
1711
1745
  }
1712
1746
  function getFarmAPIBaseURLDefine(config) {
1713
- const baseURL = _optionalChain([config, 'access', _80 => _80.api, 'optionalAccess', _81 => _81.baseURL]);
1747
+ const baseURL = _optionalChain([config, 'access', _82 => _82.api, 'optionalAccess', _83 => _83.baseURL]);
1714
1748
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1715
1749
  }
1716
1750
  function isResolvedEnvScope(value) {
@@ -1832,7 +1866,7 @@ function transformIsolatedClientBoundaryModule(options) {
1832
1866
  return null;
1833
1867
  }
1834
1868
  const body = Array.isArray(ast.body) ? ast.body : [];
1835
- const everyExportIsComponent = options.code.includes(_chunkBE7AQXJBcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkBE7AQXJBcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
1869
+ const everyExportIsComponent = options.code.includes(_chunkHTXKSREFcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkHTXKSREFcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
1836
1870
  const replacements = [];
1837
1871
  const wrapperStatements = [];
1838
1872
  const originalEntries = [];
@@ -1851,9 +1885,9 @@ function transformIsolatedClientBoundaryModule(options) {
1851
1885
  transformedExports++;
1852
1886
  };
1853
1887
  for (const node of body) {
1854
- if (_optionalChain([node, 'optionalAccess', _82 => _82.type]) === "ExportDefaultDeclaration" && node.declaration) {
1888
+ if (_optionalChain([node, 'optionalAccess', _84 => _84.type]) === "ExportDefaultDeclaration" && node.declaration) {
1855
1889
  const declaration2 = node.declaration;
1856
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _83 => _83.id, 'optionalAccess', _84 => _84.name])) {
1890
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _85 => _85.id, 'optionalAccess', _86 => _86.name])) {
1857
1891
  replacements.push({
1858
1892
  start: node.start,
1859
1893
  end: node.end,
@@ -1871,11 +1905,11 @@ function transformIsolatedClientBoundaryModule(options) {
1871
1905
  }
1872
1906
  continue;
1873
1907
  }
1874
- if (_optionalChain([node, 'optionalAccess', _85 => _85.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
1908
+ if (_optionalChain([node, 'optionalAccess', _87 => _87.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
1875
1909
  const specifiers = (node.specifiers || []).filter(
1876
1910
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
1877
1911
  );
1878
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _86 => _86.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _87 => _87.value]), () => ( "")))));
1912
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _88 => _88.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _89 => _89.value]), () => ( "")))));
1879
1913
  const isComponentExport = (specifier) => {
1880
1914
  const exported = specifierName(specifier.exported);
1881
1915
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -1902,14 +1936,14 @@ function transformIsolatedClientBoundaryModule(options) {
1902
1936
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
1903
1937
  continue;
1904
1938
  }
1905
- if (_optionalChain([node, 'optionalAccess', _88 => _88.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
1939
+ if (_optionalChain([node, 'optionalAccess', _90 => _90.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
1906
1940
  const declaration = node.declaration;
1907
1941
  const declaredNames = [];
1908
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _89 => _89.id, 'optionalAccess', _90 => _90.name])) {
1942
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.name])) {
1909
1943
  declaredNames.push(declaration.id.name);
1910
1944
  } else if (declaration.type === "VariableDeclaration") {
1911
1945
  for (const declarator of declaration.declarations || []) {
1912
- if (_optionalChain([declarator, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.type]) === "Identifier") declaredNames.push(declarator.id.name);
1946
+ if (_optionalChain([declarator, 'access', _93 => _93.id, 'optionalAccess', _94 => _94.type]) === "Identifier") declaredNames.push(declarator.id.name);
1913
1947
  }
1914
1948
  }
1915
1949
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -1978,7 +2012,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
1978
2012
  } catch (e20) {
1979
2013
  return;
1980
2014
  }
1981
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _93 => _93.env, 'optionalAccess', _94 => _94.public]), () => ( {}))));
2015
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _95 => _95.env, 'optionalAccess', _96 => _96.public]), () => ( {}))));
1982
2016
  const findings = analyzeClientBoundary(program, publicKeys);
1983
2017
  if (findings.envKeys.length === 0 && findings.publicEnvKeys.length === 0 && findings.builtinImports.length === 0) {
1984
2018
  return;
@@ -2020,21 +2054,21 @@ function hasFarmSourceAliasOverride(alias) {
2020
2054
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2021
2055
  const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2022
2056
  const imageImports = farmImageImportsPlugin();
2023
- const fontImports = _chunkCBLRSZQLcjs.farmFontImportsPlugin.call(void 0, {
2057
+ const fontImports = _chunkTAU3OF5Bcjs.farmFontImportsPlugin.call(void 0, {
2024
2058
  root: options.root,
2025
2059
  basePath: options.basePath,
2026
2060
  publicDir: options.publicDir
2027
2061
  });
2028
2062
  let farmApp;
2029
2063
  const isFarmGeneratedOutput = (file) => {
2030
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _95 => _95.getConfig, 'call', _96 => _96(), 'access', _97 => _97.root]), () => ( options.root));
2064
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _97 => _97.getConfig, 'call', _98 => _98(), 'access', _99 => _99.root]), () => ( options.root));
2031
2065
  if (!root) return file.includes("/.farm/");
2032
2066
  const output = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2033
2067
  return file === output || file.startsWith(`${output}/`);
2034
2068
  };
2035
2069
  let serverFnTransformActive = false;
2036
2070
  const getFarmRenderedServerModules = () => {
2037
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _98 => _98.getRouteManager, 'call', _99 => _99()]);
2071
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _100 => _100.getRouteManager, 'call', _101 => _101()]);
2038
2072
  if (!routeManager) return /* @__PURE__ */ new Set();
2039
2073
  const files = /* @__PURE__ */ new Set();
2040
2074
  for (const entries of [
@@ -2055,8 +2089,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2055
2089
  return files;
2056
2090
  };
2057
2091
  const islandsServerFns = () => {
2058
- const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _100 => _100.getConfig, 'call', _101 => _101()]), () => ( options));
2059
- return _optionalChain([config, 'access', _102 => _102.experimental, 'optionalAccess', _103 => _103.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _104 => _104.experimental, 'optionalAccess', _105 => _105.serverComponents])) === "islands";
2092
+ const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _102 => _102.getConfig, 'call', _103 => _103()]), () => ( options));
2093
+ return _optionalChain([config, 'access', _104 => _104.experimental, 'optionalAccess', _105 => _105.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _106 => _106.experimental, 'optionalAccess', _107 => _107.serverComponents])) === "islands";
2060
2094
  };
2061
2095
  let reactRefreshActive = false;
2062
2096
  let server;
@@ -2085,9 +2119,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2085
2119
  ].join(" ");
2086
2120
  console.log(log);
2087
2121
  };
2088
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _106 => _106.getRouteManager, 'call', _107 => _107(), 'access', _108 => _108.getProgrammaticClientRoutes, 'call', _109 => _109()])));
2122
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _108 => _108.getRouteManager, 'call', _109 => _109(), 'access', _110 => _110.getProgrammaticClientRoutes, 'call', _111 => _111()])));
2089
2123
  const isOutsideAppRoot = (file) => {
2090
- const root = _optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111(), 'access', _112 => _112.root]) || _optionalChain([server, 'optionalAccess', _113 => _113.config, 'access', _114 => _114.root]) || options.root;
2124
+ const root = _optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113(), 'access', _114 => _114.root]) || _optionalChain([server, 'optionalAccess', _115 => _115.config, 'access', _116 => _116.root]) || options.root;
2091
2125
  if (!root) return false;
2092
2126
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2093
2127
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2099,14 +2133,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2099
2133
  isBuild = configEnv.command === "build";
2100
2134
  const farmAliases = {
2101
2135
  ..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, options.layers),
2102
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _115 => _115.resolve, 'optionalAccess', _116 => _116.alias])) ? {} : _chunkCBLRSZQLcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2136
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _117 => _117.resolve, 'optionalAccess', _118 => _118.alias])) ? {} : _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2103
2137
  };
2104
2138
  if (Object.keys(farmAliases).length > 0) {
2105
2139
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2106
- userConfig.resolve.alias = _chunkCBLRSZQLcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2140
+ userConfig.resolve.alias = _chunkTAU3OF5Bcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2107
2141
  }
2108
2142
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2109
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _117 => _117.server, 'optionalAccess', _118 => _118.cors]) === void 0;
2143
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _119 => _119.server, 'optionalAccess', _120 => _120.cors]) === void 0;
2110
2144
  return {
2111
2145
  // Honor Farm's publicDir so the dev server serves the same static
2112
2146
  // directory the production client build emits.
@@ -2119,11 +2153,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2119
2153
  ...farmOwnsDevCors ? { cors: false } : {},
2120
2154
  fs: {
2121
2155
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2122
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _119 => _119.server, 'optionalAccess', _120 => _120.fs, 'optionalAccess', _121 => _121.deny]), options)
2156
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _121 => _121.server, 'optionalAccess', _122 => _122.fs, 'optionalAccess', _123 => _123.deny]), options)
2123
2157
  }
2124
2158
  }
2125
2159
  };
2126
2160
  },
2161
+ configEnvironment(name, environmentConfig, env) {
2162
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _124 => _124.dev, 'optionalAccess', _125 => _125.createEnvironment])) {
2163
+ return;
2164
+ }
2165
+ return {
2166
+ dev: {
2167
+ createEnvironment: (environmentName, config) => _vite.createRunnableDevEnvironment.call(void 0, environmentName, config, {
2168
+ runnerOptions: { sourcemapInterceptor: "prepareStackTrace" }
2169
+ })
2170
+ }
2171
+ };
2172
+ },
2127
2173
  async configResolved(config) {
2128
2174
  if (typeof fontImports.configResolved === "function") {
2129
2175
  await fontImports.configResolved.call(this, config);
@@ -2132,7 +2178,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2132
2178
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2133
2179
  );
2134
2180
  reactRefreshActive = _chunk3QM74STYcjs.isFarmReactRefreshActive.call(void 0, config);
2135
- if (_optionalChain([options, 'access', _122 => _122.experimental, 'optionalAccess', _123 => _123.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2181
+ if (_optionalChain([options, 'access', _126 => _126.experimental, 'optionalAccess', _127 => _127.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2136
2182
  _chunkQMNWKQL4cjs.logger.warn(
2137
2183
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2138
2184
  );
@@ -2141,20 +2187,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2141
2187
  async configureServer(viteServer) {
2142
2188
  viteServer.middlewares.use(
2143
2189
  createFarmDevPreviewGuard(viteServer, {
2144
- getSourceRoots: () => _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _124 => _124.getConfig, 'call', _125 => _125()]), () => ( options)))
2190
+ getSourceRoots: () => _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _128 => _128.getConfig, 'call', _129 => _129()]), () => ( options)))
2145
2191
  })
2146
2192
  );
2147
2193
  if (typeof fontImports.configureServer === "function") {
2148
2194
  await fontImports.configureServer.call(this, viteServer);
2149
2195
  }
2150
2196
  server = viteServer;
2151
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _126 => _126.pre, 'access', _127 => _127.target]), () => ( viteServer.middlewares));
2152
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _128 => _128.post, 'access', _129 => _129.target]), () => ( viteServer.middlewares));
2197
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _130 => _130.pre, 'access', _131 => _131.target]), () => ( viteServer.middlewares));
2198
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _132 => _132.post, 'access', _133 => _133.target]), () => ( viteServer.middlewares));
2153
2199
  const pm = initialPluginManager;
2154
2200
  const configRoutePlugins = new Set(
2155
- _optionalChain([pm, 'optionalAccess', _130 => _130.getPlugins, 'call', _131 => _131(), 'access', _132 => _132.filter, 'call', _133 => _133(isFarmConfigRoutePlugin), 'access', _134 => _134.map, 'call', _135 => _135((plugin2) => plugin2.name)])
2201
+ _optionalChain([pm, 'optionalAccess', _134 => _134.getPlugins, 'call', _135 => _135(), 'access', _136 => _136.filter, 'call', _137 => _137(isFarmConfigRoutePlugin), 'access', _138 => _138.map, 'call', _139 => _139((plugin2) => plugin2.name)])
2156
2202
  );
2157
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _136 => _136.getPlugins, 'call', _137 => _137()]), () => ( []))).flatMap((plugin2) => {
2203
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _140 => _140.getPlugins, 'call', _141 => _141()]), () => ( []))).flatMap((plugin2) => {
2158
2204
  const matcher = _chunkMBCRWU3Pcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2159
2205
  return matcher ? [matcher] : [];
2160
2206
  });
@@ -2165,7 +2211,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2165
2211
  } catch (e21) {
2166
2212
  }
2167
2213
  };
2168
- farmApp = new (0, _chunkCBLRSZQLcjs.FarmApp)(
2214
+ farmApp = new (0, _chunkTAU3OF5Bcjs.FarmApp)(
2169
2215
  {
2170
2216
  ...options,
2171
2217
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2173,7 +2219,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2173
2219
  server
2174
2220
  );
2175
2221
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2176
- _chunkBE7AQXJBcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2222
+ _chunkHTXKSREFcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2177
2223
  farmApp.getConfig().root,
2178
2224
  options.distDir || ".farm"
2179
2225
  )
@@ -2182,17 +2228,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2182
2228
  await farmApp.initialize();
2183
2229
  const farmConfig = farmApp.getConfig();
2184
2230
  let farmAppPackages;
2185
- if (_optionalChain([farmConfig, 'access', _138 => _138.agent, 'optionalAccess', _139 => _139.noindexPreviews])) {
2231
+ if (_optionalChain([farmConfig, 'access', _142 => _142.agent, 'optionalAccess', _143 => _143.noindexPreviews])) {
2186
2232
  farmMiddlewares.use((_req, res, next) => {
2187
- if (_chunkOSEQL34Qcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2188
- res.setHeader("X-Robots-Tag", _chunkZUVAGMQ5cjs.FARM_PREVIEW_ROBOTS_TAG);
2233
+ if (_chunkILQ5DKYFcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2234
+ res.setHeader("X-Robots-Tag", _chunkODBM54RTcjs.FARM_PREVIEW_ROBOTS_TAG);
2189
2235
  }
2190
2236
  next();
2191
2237
  });
2192
2238
  }
2193
2239
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2194
2240
  const devBuiltInRoutePaths = new Set(
2195
- _chunkFSSONJRVcjs.listFarmBuiltInRoutePaths.call(void 0, {
2241
+ _chunk4YHGQDTTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2196
2242
  agent: {
2197
2243
  apiCatalog: true,
2198
2244
  mcp: true,
@@ -2214,7 +2260,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2214
2260
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2215
2261
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2216
2262
  // a caller-controlled Host header.
2217
- trustedLocalOrigin: () => _optionalChain([server, 'access', _140 => _140.resolvedUrls, 'optionalAccess', _141 => _141.local, 'access', _142 => _142[0]]),
2263
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _144 => _144.resolvedUrls, 'optionalAccess', _145 => _145.local, 'access', _146 => _146[0]]),
2218
2264
  onError(error) {
2219
2265
  _chunkQMNWKQL4cjs.logger.error(
2220
2266
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2234,15 +2280,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2234
2280
  const workflowConfig = farmConfig.workflows;
2235
2281
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2236
2282
  const getExtraRouteTypes = () => [
2237
- ..._optionalChain([options, 'access', _143 => _143.openapi, 'optionalAccess', _144 => _144.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2238
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _145 => _145.getFarmDocsRouteTypeEntries, 'call', _146 => _146(farmConfig.docs)]), () => ( []))
2283
+ ..._optionalChain([options, 'access', _147 => _147.openapi, 'optionalAccess', _148 => _148.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2284
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _149 => _149.getFarmDocsRouteTypeEntries, 'call', _150 => _150(farmConfig.docs)]), () => ( []))
2239
2285
  ];
2240
2286
  const appDirSlugs = sourceRoots.map(
2241
2287
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2242
2288
  );
2243
2289
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2244
2290
  try {
2245
- const result = await _chunkE3LE6EZHcjs.generateFarmTypeArtifacts.call(void 0, {
2291
+ const result = await _chunkCLEWORVYcjs.generateFarmTypeArtifacts.call(void 0, {
2246
2292
  root: farmConfig.root,
2247
2293
  srcDir: farmConfig.srcDir,
2248
2294
  layers: farmConfig.layers,
@@ -2282,7 +2328,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2282
2328
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2283
2329
  );
2284
2330
  const layerConfigFiles = new Set(
2285
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _147 => _147.configFile, 'optionalAccess', _148 => _148.replace, 'call', _149 => _149(/\\/g, "/")])).filter((file) => Boolean(file))
2331
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _151 => _151.configFile, 'optionalAccess', _152 => _152.replace, 'call', _153 => _153(/\\/g, "/")])).filter((file) => Boolean(file))
2286
2332
  );
2287
2333
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2288
2334
  ..._chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -2361,7 +2407,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2361
2407
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2362
2408
  }
2363
2409
  if (isI18nCatalogFile(file)) {
2364
- _optionalChain([farmApp, 'optionalAccess', _150 => _150.getI18nRuntime, 'call', _151 => _151(), 'access', _152 => _152.reload, 'call', _153 => _153(), 'access', _154 => _154.then, 'call', _155 => _155(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _156 => _156.catch, 'call', _157 => _157((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2410
+ _optionalChain([farmApp, 'optionalAccess', _154 => _154.getI18nRuntime, 'call', _155 => _155(), 'access', _156 => _156.reload, 'call', _157 => _157(), 'access', _158 => _158.then, 'call', _159 => _159(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _160 => _160.catch, 'call', _161 => _161((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2365
2411
  }
2366
2412
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2367
2413
  if (isRouteRefreshEvent) {
@@ -2374,8 +2420,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2374
2420
  const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
2375
2421
  pendingRouteRefreshIncludesMiddleware = false;
2376
2422
  Promise.all([
2377
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _158 => _158(`${ev} ${file}`)]),
2378
- reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _159 => _159.reload, 'call', _160 => _160()]) : void 0
2423
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _162 => _162(`${ev} ${file}`)]),
2424
+ reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _163 => _163.reload, 'call', _164 => _164()]) : void 0
2379
2425
  ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkQMNWKQL4cjs.logger.warn(`Route refresh failed: ${error.message}`));
2380
2426
  }, 50);
2381
2427
  }
@@ -2414,7 +2460,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2414
2460
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2415
2461
  const load = (file) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, file);
2416
2462
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2417
- _optionalChain([server, 'access', _161 => _161.httpServer, 'optionalAccess', _162 => _162.once, 'call', _163 => _163("close", () => {
2463
+ _optionalChain([server, 'access', _165 => _165.httpServer, 'optionalAccess', _166 => _166.once, 'call', _167 => _167("close", () => {
2418
2464
  const globals = globalThis;
2419
2465
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2420
2466
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
@@ -2488,11 +2534,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2488
2534
  });
2489
2535
  }
2490
2536
  }
2491
- if (_optionalChain([options, 'access', _164 => _164.openapi, 'optionalAccess', _165 => _165.enabled])) {
2537
+ if (_optionalChain([options, 'access', _168 => _168.openapi, 'optionalAccess', _169 => _169.enabled])) {
2492
2538
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2493
2539
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2494
2540
  mode: "development",
2495
- apiBaseURL: typeof _optionalChain([options, 'access', _166 => _166.api, 'optionalAccess', _167 => _167.baseURL]) === "string" ? options.api.baseURL : void 0,
2541
+ apiBaseURL: typeof _optionalChain([options, 'access', _170 => _170.api, 'optionalAccess', _171 => _171.baseURL]) === "string" ? options.api.baseURL : void 0,
2496
2542
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2497
2543
  });
2498
2544
  const spec = await openAPIManager.generateSpec();
@@ -2522,7 +2568,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2522
2568
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2523
2569
  };
2524
2570
  releaseDocsMCPServers();
2525
- const isFarmDocsPathGuarded = (href) => _chunkC5AM2XDNcjs.farmPathGuardCoversPage.call(void 0,
2571
+ const isFarmDocsPathGuarded = (href) => _chunkPXAHSCR6cjs.farmPathGuardCoversPage.call(void 0,
2526
2572
  {
2527
2573
  config: farmConfig,
2528
2574
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2535,20 +2581,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2535
2581
  clientEntry: "/@farm/client.js",
2536
2582
  resolveLayoutFonts: resolveDocsLayoutFonts,
2537
2583
  fontStylesheetHref: "/@farm/fonts.css",
2538
- globalStylesheetHref: _chunkCBLRSZQLcjs.resolveDevGlobalStylesheetHref.call(void 0,
2584
+ globalStylesheetHref: _chunkTAU3OF5Bcjs.resolveDevGlobalStylesheetHref.call(void 0,
2539
2585
  farmConfig.root,
2540
2586
  farmConfig.srcDir
2541
2587
  ),
2542
2588
  loadModule: async (specifier) => {
2543
2589
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2544
- if (specifier === _optionalChain([farmConfig, 'access', _168 => _168.docs, 'access', _169 => _169.adapter, 'optionalAccess', _170 => _170.server]) && _optionalChain([resolved, 'optionalAccess', _171 => _171.id])) {
2590
+ if (specifier === _optionalChain([farmConfig, 'access', _172 => _172.docs, 'access', _173 => _173.adapter, 'optionalAccess', _174 => _174.server]) && _optionalChain([resolved, 'optionalAccess', _175 => _175.id])) {
2545
2591
  const file = resolved.id.split("?", 1)[0];
2546
2592
  return import(
2547
2593
  /* @vite-ignore */
2548
2594
  _url.pathToFileURL.call(void 0, file).href
2549
2595
  );
2550
2596
  }
2551
- return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _172 => _172.id]), () => ( specifier)));
2597
+ return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _176 => _176.id]), () => ( specifier)));
2552
2598
  },
2553
2599
  registerMCPServer: (mcpServer) => {
2554
2600
  const dispose = _chunkLRB5OVRTcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2566,7 +2612,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2566
2612
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2567
2613
  resolveLayoutFonts: resolveDocsLayoutFonts,
2568
2614
  fontStylesheetHref: "/@farm/fonts.css",
2569
- globalStylesheetHref: _chunkCBLRSZQLcjs.resolveDevGlobalStylesheetHref.call(void 0,
2615
+ globalStylesheetHref: _chunkTAU3OF5Bcjs.resolveDevGlobalStylesheetHref.call(void 0,
2570
2616
  farmConfig.root,
2571
2617
  farmConfig.srcDir
2572
2618
  ),
@@ -2574,7 +2620,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2574
2620
  basePath: farmConfig.basePath
2575
2621
  }) : null;
2576
2622
  const farmDocsListsPages = Boolean(
2577
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _173 => _173.getPlugins, 'call', _174 => _174(), 'access', _175 => _175.some, 'call', _176 => _176((plugin2) => plugin2.name === "farm:infra-analytics")])
2623
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _177 => _177.getPlugins, 'call', _178 => _178(), 'access', _179 => _179.some, 'call', _180 => _180((plugin2) => plugin2.name === "farm:infra-analytics")])
2578
2624
  );
2579
2625
  let farmDocsPagePaths;
2580
2626
  const getFarmDocsPagePaths = () => {
@@ -2602,14 +2648,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2602
2648
  }
2603
2649
  }
2604
2650
  const wrapFarmDocsResponseWithLayouts = async (request, response) => {
2605
- if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _177 => _177.headers, 'access', _178 => _178.get, 'call', _179 => _179("content-type"), 'optionalAccess', _180 => _180.toLowerCase, 'call', _181 => _181(), 'access', _182 => _182.includes, 'call', _183 => _183("text/html")])) {
2651
+ if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _181 => _181.headers, 'access', _182 => _182.get, 'call', _183 => _183("content-type"), 'optionalAccess', _184 => _184.toLowerCase, 'call', _185 => _185(), 'access', _186 => _186.includes, 'call', _187 => _187("text/html")])) {
2606
2652
  return response;
2607
2653
  }
2608
2654
  const pathname = new URL(request.url).pathname;
2609
2655
  const matchedRoute = routeManager.matchRoute(pathname);
2610
2656
  const layoutEntries = matchedRoute.layouts.map((layout) => ({
2611
2657
  ...layout,
2612
- metadata: _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
2658
+ metadata: _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
2613
2659
  }));
2614
2660
  if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
2615
2661
  return response;
@@ -2623,7 +2669,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2623
2669
  headers: response.headers
2624
2670
  });
2625
2671
  }
2626
- const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _184 => _184.getConfig, 'call', _185 => _185()]), () => ( options))).renderer);
2672
+ const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options))).renderer);
2627
2673
  const [rendererRuntime, layoutModules] = await Promise.all([
2628
2674
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
2629
2675
  Promise.all(
@@ -2652,7 +2698,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2652
2698
  ])
2653
2699
  );
2654
2700
  const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
2655
- const pageModulePath = _optionalChain([matchedRoute, 'access', _186 => _186.route, 'optionalAccess', _187 => _187.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
2701
+ const pageModulePath = _optionalChain([matchedRoute, 'access', _190 => _190.route, 'optionalAccess', _191 => _191.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
2656
2702
  const bootstrapScript = `<script>
2657
2703
  window.__FARM_PROPS__ = ${inlineValue({ params })};
2658
2704
  window.__FARM_ROUTE_SLOTS__ = [];
@@ -2749,7 +2795,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2749
2795
  }
2750
2796
  },
2751
2797
  (request) => {
2752
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options));
2798
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _192 => _192.getConfig, 'call', _193 => _193()]), () => ( options));
2753
2799
  const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2754
2800
  return _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, request, {
2755
2801
  trustProxy: currentServerConfig.trustProxy
@@ -2765,7 +2811,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2765
2811
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2766
2812
  const requestUrl = req.url || "/";
2767
2813
  const requestMethod = req.method || "GET";
2768
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _190 => _190.getConfig, 'call', _191 => _191()]), () => ( options));
2814
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _194 => _194.getConfig, 'call', _195 => _195()]), () => ( options));
2769
2815
  const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2770
2816
  const parsedRequestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
2771
2817
  trustProxy: currentServerConfig.trustProxy
@@ -2859,7 +2905,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2859
2905
  openapi: options.openapi
2860
2906
  },
2861
2907
  workflows: discoveredWorkflows,
2862
- plugins: _optionalChain([pm, 'optionalAccess', _192 => _192.getSortedPlugins, 'call', _193 => _193()])
2908
+ plugins: _optionalChain([pm, 'optionalAccess', _196 => _196.getSortedPlugins, 'call', _197 => _197()])
2863
2909
  });
2864
2910
  res.statusCode = 200;
2865
2911
  res.setHeader(
@@ -2894,10 +2940,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2894
2940
  render: {
2895
2941
  pathname: pathname2,
2896
2942
  method: requestMethod,
2897
- routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
2898
- params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {}
2943
+ routePattern: _optionalChain([match, 'optionalAccess', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null,
2944
+ params: _optionalChain([match, 'optionalAccess', _200 => _200.params]) || {}
2899
2945
  },
2900
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((layout) => layout.pattern)
2946
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _201 => _201.layouts]) || []).map((layout) => layout.pattern)
2901
2947
  };
2902
2948
  return pageHookRouteMatch;
2903
2949
  };
@@ -2985,7 +3031,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2985
3031
  }
2986
3032
  }
2987
3033
  const runAppMiddlewareForContentRoute = async () => {
2988
- if (!_optionalChain([middlewareManager, 'optionalAccess', _198 => _198.hasMiddleware, 'call', _199 => _199()])) return false;
3034
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()])) return false;
2989
3035
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
2990
3036
  return runFarmMiddlewareWithNavigation(
2991
3037
  farmApp.getServerRenderer(),
@@ -3023,7 +3069,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3023
3069
  return response.status;
3024
3070
  };
3025
3071
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3026
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _200 => _200.hasRuntimeHook, 'call', _201 => _201("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()]) ? interceptFarmDevPageResponse({
3072
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _204 => _204.hasRuntimeHook, 'call', _205 => _205("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _206 => _206.hasMiddleware, 'call', _207 => _207()]) ? interceptFarmDevPageResponse({
3027
3073
  req,
3028
3074
  res,
3029
3075
  pm,
@@ -3036,7 +3082,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3036
3082
  urlPath: requestUrl,
3037
3083
  pathname: requestPathname,
3038
3084
  startTime: Date.now(),
3039
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _204 => _204(status)]),
3085
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _208 => _208(status)]),
3040
3086
  // The runtime reports a runtime.after failure itself.
3041
3087
  emitError: async () => {
3042
3088
  },
@@ -3047,7 +3093,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3047
3093
  handled = await runAppMiddlewareForContentRoute();
3048
3094
  } catch (error) {
3049
3095
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3050
- _optionalChain([interceptor, 'optionalAccess', _205 => _205.release, 'call', _206 => _206()]);
3096
+ _optionalChain([interceptor, 'optionalAccess', _209 => _209.release, 'call', _210 => _210()]);
3051
3097
  throw error;
3052
3098
  }
3053
3099
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3055,10 +3101,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3055
3101
  return true;
3056
3102
  }
3057
3103
  if (!handled) {
3058
- _optionalChain([interceptor, 'optionalAccess', _207 => _207.release, 'call', _208 => _208()]);
3104
+ _optionalChain([interceptor, 'optionalAccess', _211 => _211.release, 'call', _212 => _212()]);
3059
3105
  return false;
3060
3106
  }
3061
- if (!_optionalChain([interceptor, 'optionalAccess', _209 => _209.isEnded, 'call', _210 => _210()])) _optionalChain([logResponse2, 'optionalCall', _211 => _211(res.statusCode || 200)]);
3107
+ if (!_optionalChain([interceptor, 'optionalAccess', _213 => _213.isEnded, 'call', _214 => _214()])) _optionalChain([logResponse2, 'optionalCall', _215 => _215(res.statusCode || 200)]);
3062
3108
  return true;
3063
3109
  };
3064
3110
  const serveBuiltInRoute = async (respond, {
@@ -3067,7 +3113,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3067
3113
  label
3068
3114
  } = {}) => {
3069
3115
  const discard = async () => {
3070
- await _optionalChain([computed, 'optionalAccess', _212 => _212.body, 'optionalAccess', _213 => _213.cancel, 'call', _214 => _214(), 'access', _215 => _215.catch, 'call', _216 => _216(() => {
3116
+ await _optionalChain([computed, 'optionalAccess', _216 => _216.body, 'optionalAccess', _217 => _217.cancel, 'call', _218 => _218(), 'access', _219 => _219.catch, 'call', _220 => _220(() => {
3071
3117
  })]);
3072
3118
  };
3073
3119
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3084,9 +3130,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3084
3130
  if (pm && opensFarmDevRuntimeSession(pm)) {
3085
3131
  try {
3086
3132
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3087
- const route = _chunkFSSONJRVcjs.setFarmRouteLabel.call(void 0,
3133
+ const route = _chunk4YHGQDTTcjs.setFarmRouteLabel.call(void 0,
3088
3134
  { pathname: requestPathname },
3089
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkFSSONJRVcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3135
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk4YHGQDTTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3090
3136
  );
3091
3137
  runtimeSession2 = await pm.beginRuntimeRequest(
3092
3138
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3124,7 +3170,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3124
3170
  }
3125
3171
  responding = true;
3126
3172
  response = await respond(
3127
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _217 => _217.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3173
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _221 => _221.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3128
3174
  );
3129
3175
  } catch (error) {
3130
3176
  if (!responding && !res.headersSent) {
@@ -3144,7 +3190,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3144
3190
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3145
3191
  };
3146
3192
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3147
- if (openAPIManager && _optionalChain([options, 'access', _218 => _218.openapi, 'optionalAccess', _219 => _219.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3193
+ if (openAPIManager && _optionalChain([options, 'access', _222 => _222.openapi, 'optionalAccess', _223 => _223.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3148
3194
  const specManager = openAPIManager;
3149
3195
  await serveBuiltInRoute(async () => {
3150
3196
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3164,7 +3210,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3164
3210
  });
3165
3211
  return;
3166
3212
  }
3167
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _220 => _220.openapi, 'optionalAccess', _221 => _221.route])) {
3213
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _224 => _224.openapi, 'optionalAccess', _225 => _225.route])) {
3168
3214
  const docsManager = openAPIManager;
3169
3215
  await serveBuiltInRoute(
3170
3216
  async () => {
@@ -3175,24 +3221,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3175
3221
  );
3176
3222
  return;
3177
3223
  }
3178
- if (_optionalChain([options, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.manifest]) !== false && _chunkFSSONJRVcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3224
+ if (_optionalChain([options, 'access', _226 => _226.agent, 'optionalAccess', _227 => _227.manifest]) !== false && _chunk4YHGQDTTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3179
3225
  await serveBuiltInRoute(async () => {
3180
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkCBLRSZQLcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3181
- const manifest = await _chunkFSSONJRVcjs.createFarmAppManifestResponse.call(void 0,
3226
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTAU3OF5Bcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3227
+ const manifest = await _chunk4YHGQDTTcjs.createFarmAppManifestResponse.call(void 0,
3182
3228
  new Request(parsedRequestUrl, {
3183
3229
  method: requestMethod,
3184
3230
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3185
3231
  }),
3186
3232
  {
3187
- ..._chunkFSSONJRVcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3233
+ ..._chunk4YHGQDTTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3188
3234
  build: "development",
3189
3235
  packages: farmAppPackages,
3190
3236
  // Read again on each request; unchanged files come from a cache.
3191
- webmcpTools: _optionalChain([farmConfig, 'access', _224 => _224.plugins, 'optionalAccess', _225 => _225.some, 'call', _226 => _226(({ name }) => name === "farm:webmcp")]) ? _chunkCBLRSZQLcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3237
+ webmcpTools: _optionalChain([farmConfig, 'access', _228 => _228.plugins, 'optionalAccess', _229 => _229.some, 'call', _230 => _230(({ name }) => name === "farm:webmcp")]) ? _chunkTAU3OF5Bcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3192
3238
  }),
3193
3239
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3194
3240
  // A guard written for an MCP server's path keeps its tools out of the public view.
3195
- guardCoversPath: (path7) => _chunkC5AM2XDNcjs.farmPathGuardCoversEndpoint.call(void 0,
3241
+ guardCoversPath: (path7) => _chunkPXAHSCR6cjs.farmPathGuardCoversEndpoint.call(void 0,
3196
3242
  {
3197
3243
  config: farmConfig,
3198
3244
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3206,11 +3252,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3206
3252
  });
3207
3253
  return;
3208
3254
  }
3209
- if (_optionalChain([options, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkFSSONJRVcjs.FARM_API_CATALOG_PATH) {
3255
+ if (_optionalChain([options, 'access', _231 => _231.agent, 'optionalAccess', _232 => _232.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk4YHGQDTTcjs.FARM_API_CATALOG_PATH) {
3210
3256
  await serveBuiltInRoute(
3211
- () => _chunkFSSONJRVcjs.createFarmApiCatalogResponse.call(void 0,
3257
+ () => _chunk4YHGQDTTcjs.createFarmApiCatalogResponse.call(void 0,
3212
3258
  requestMethod,
3213
- _chunkFSSONJRVcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3259
+ _chunk4YHGQDTTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3214
3260
  new Request(parsedRequestUrl, {
3215
3261
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3216
3262
  })
@@ -3218,8 +3264,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3218
3264
  );
3219
3265
  return;
3220
3266
  }
3221
- if (_optionalChain([options, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.aiCatalog]) !== false) {
3222
- const aiCatalog = _chunkFSSONJRVcjs.createFarmAiCatalogResponse.call(void 0,
3267
+ if (_optionalChain([options, 'access', _233 => _233.agent, 'optionalAccess', _234 => _234.aiCatalog]) !== false) {
3268
+ const aiCatalog = _chunk4YHGQDTTcjs.createFarmAiCatalogResponse.call(void 0,
3223
3269
  new Request(parsedRequestUrl, {
3224
3270
  method: requestMethod,
3225
3271
  headers: {
@@ -3262,7 +3308,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3262
3308
  const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
3263
3309
  const docsResponse = await farmDocsHandler(new Request(docsRequest, docsBodyInit));
3264
3310
  if (docsResponse) {
3265
- const docsPage = _optionalChain([docsResponse, 'access', _231 => _231.headers, 'access', _232 => _232.get, 'call', _233 => _233("content-type"), 'optionalAccess', _234 => _234.toLowerCase, 'call', _235 => _235(), 'access', _236 => _236.includes, 'call', _237 => _237("text/html")]);
3311
+ const docsPage = _optionalChain([docsResponse, 'access', _235 => _235.headers, 'access', _236 => _236.get, 'call', _237 => _237("content-type"), 'optionalAccess', _238 => _238.toLowerCase, 'call', _239 => _239(), 'access', _240 => _240.includes, 'call', _241 => _241("text/html")]);
3266
3312
  await serveBuiltInRoute(
3267
3313
  async (request) => {
3268
3314
  if (!docsPage) return wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse);
@@ -3271,7 +3317,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3271
3317
  farmConfig.deploymentId
3272
3318
  );
3273
3319
  if (deploymentMismatch) {
3274
- await _optionalChain([docsResponse, 'access', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240()]);
3320
+ await _optionalChain([docsResponse, 'access', _242 => _242.body, 'optionalAccess', _243 => _243.cancel, 'call', _244 => _244()]);
3275
3321
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3276
3322
  }
3277
3323
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3287,11 +3333,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3287
3333
  {
3288
3334
  kind: "docs",
3289
3335
  computed: docsResponse,
3290
- label: _chunkFSSONJRVcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3336
+ label: _chunk4YHGQDTTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3291
3337
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3292
3338
  {
3293
- path: _optionalChain([farmConfig, 'access', _241 => _241.docs, 'optionalAccess', _242 => _242.entry]) || "/docs",
3294
- roots: _optionalChain([farmConfig, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.roots, 'optionalAccess', _245 => _245.map, 'call', _246 => _246((root) => root.entry)]),
3339
+ path: _optionalChain([farmConfig, 'access', _245 => _245.docs, 'optionalAccess', _246 => _246.entry]) || "/docs",
3340
+ roots: _optionalChain([farmConfig, 'access', _247 => _247.docs, 'optionalAccess', _248 => _248.roots, 'optionalAccess', _249 => _249.map, 'call', _250 => _250((root) => root.entry)]),
3295
3341
  pages: await getFarmDocsPagePaths()
3296
3342
  }
3297
3343
  )
@@ -3300,8 +3346,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3300
3346
  return;
3301
3347
  }
3302
3348
  }
3303
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _247 => _247.headers, 'access', _248 => _248.accept, 'optionalAccess', _249 => _249.includes, 'call', _250 => _250(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3304
- const { createFarmNativeTreeResponse } = await import("./native-tree-GF4BH33L.cjs");
3349
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _251 => _251.headers, 'access', _252 => _252.accept, 'optionalAccess', _253 => _253.includes, 'call', _254 => _254(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3350
+ const { createFarmNativeTreeResponse } = await import("./native-tree-R6CQMDTI.cjs");
3305
3351
  const treeBodyInit = requestMethod === "POST" ? { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3306
3352
  const treeResponse = await createFarmNativeTreeResponse({
3307
3353
  request: new Request(fullUrl, {
@@ -3318,18 +3364,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3318
3364
  });
3319
3365
  await serveBuiltInRoute(() => treeResponse, {
3320
3366
  computed: treeResponse,
3321
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _251 => _251.getRouteManager, 'call', _252 => _252(), 'access', _253 => _253.matchRoute, 'call', _254 => _254(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]), () => ( null))
3367
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _255 => _255.getRouteManager, 'call', _256 => _256(), 'access', _257 => _257.matchRoute, 'call', _258 => _258(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _259 => _259.route, 'optionalAccess', _260 => _260.pattern]), () => ( null))
3322
3368
  });
3323
3369
  return;
3324
3370
  }
3325
3371
  const markdownRouteLabel = () => (
3326
3372
  // On the route path, as production labels it: /fr/index.md is /index.md.
3327
- _chunkFSSONJRVcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3373
+ _chunk4YHGQDTTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3328
3374
  toRoutePathname(requestPathname),
3329
- (page) => _optionalChain([farmApp, 'access', _257 => _257.getRouteManager, 'call', _258 => _258(), 'access', _259 => _259.matchRoute, 'call', _260 => _260(page), 'access', _261 => _261.route, 'optionalAccess', _262 => _262.pattern])
3375
+ (page) => _optionalChain([farmApp, 'access', _261 => _261.getRouteManager, 'call', _262 => _262(), 'access', _263 => _263.matchRoute, 'call', _264 => _264(page), 'access', _265 => _265.route, 'optionalAccess', _266 => _266.pattern])
3330
3376
  )
3331
3377
  );
3332
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkL6E4SHUBcjs.createFarmMarkdownSourceResponse.call(void 0, {
3378
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunkLGR7565Lcjs.createFarmMarkdownSourceResponse.call(void 0, {
3333
3379
  request: new Request(fullUrl, {
3334
3380
  method: requestMethod,
3335
3381
  headers: docsHeaders
@@ -3338,7 +3384,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3338
3384
  routePathname: toRoutePathname,
3339
3385
  resolveSource: async (pathname2) => {
3340
3386
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3341
- const sourcePath = _optionalChain([match, 'access', _263 => _263.route, 'optionalAccess', _264 => _264.markdownSourcePath]) || (match.route && _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3387
+ const sourcePath = _optionalChain([match, 'access', _267 => _267.route, 'optionalAccess', _268 => _268.markdownSourcePath]) || (match.route && _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3342
3388
  if (!sourcePath) {
3343
3389
  return null;
3344
3390
  }
@@ -3370,7 +3416,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3370
3416
  });
3371
3417
  return;
3372
3418
  }
3373
- const markdownResponse = viteModuleRequest ? null : await _chunkC2JOS77Zcjs.createMarkdownMirrorResponse.call(void 0, {
3419
+ const markdownResponse = viteModuleRequest ? null : await _chunkHGB4PM2Ccjs.createMarkdownMirrorResponse.call(void 0, {
3374
3420
  request: new Request(fullUrl, {
3375
3421
  method: requestMethod,
3376
3422
  headers: docsHeaders
@@ -3409,16 +3455,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3409
3455
  });
3410
3456
  return;
3411
3457
  }
3412
- if (!viteModuleRequest && _chunkC2JOS77Zcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3413
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkL6E4SHUBcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3458
+ if (!viteModuleRequest && _chunkHGB4PM2Ccjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3459
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkLGR7565Lcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3414
3460
  if (!markdownRoute.route) {
3415
3461
  await serveBuiltInRoute(
3416
3462
  () => new Response(
3417
- _chunkC2JOS77Zcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3463
+ _chunkHGB4PM2Ccjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3418
3464
  {
3419
3465
  status: 404,
3420
3466
  headers: {
3421
- "Content-Type": _chunkC2JOS77Zcjs.FARM_MARKDOWN_CONTENT_TYPE,
3467
+ "Content-Type": _chunkHGB4PM2Ccjs.FARM_MARKDOWN_CONTENT_TYPE,
3422
3468
  "X-Farm-Markdown-Error": "404",
3423
3469
  "Cache-Control": "no-store"
3424
3470
  }
@@ -3428,7 +3474,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3428
3474
  return;
3429
3475
  }
3430
3476
  }
3431
- const markdownPageTarget = _chunkC2JOS77Zcjs.resolveMarkdownMirrorTarget.call(void 0,
3477
+ const markdownPageTarget = _chunkHGB4PM2Ccjs.resolveMarkdownMirrorTarget.call(void 0,
3432
3478
  farmApp.getConfig().md,
3433
3479
  requestPathname,
3434
3480
  {
@@ -3494,7 +3540,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3494
3540
  "beforeRequest",
3495
3541
  (plugin2) => {
3496
3542
  const owner = _chunkJX5VOLAVcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3497
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _265 => _265.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3543
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _269 => _269.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3498
3544
  },
3499
3545
  req,
3500
3546
  res
@@ -3531,7 +3577,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3531
3577
  isProd: false
3532
3578
  },
3533
3579
  request,
3534
- { clientAddress: _optionalChain([req, 'access', _266 => _266.socket, 'optionalAccess', _267 => _267.remoteAddress]) }
3580
+ { clientAddress: _optionalChain([req, 'access', _270 => _270.socket, 'optionalAccess', _271 => _271.remoteAddress]) }
3535
3581
  );
3536
3582
  if (!result) {
3537
3583
  throw new Error(`Matched integration route did not return a response`);
@@ -3539,7 +3585,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3539
3585
  return result;
3540
3586
  } catch (error) {
3541
3587
  _chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
3542
- await _optionalChain([runtime, 'optionalAccess', _268 => _268.reportError, 'call', _269 => _269(error)]);
3588
+ await _optionalChain([runtime, 'optionalAccess', _272 => _272.reportError, 'call', _273 => _273(error)]);
3543
3589
  return _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
3544
3590
  }
3545
3591
  };
@@ -3593,7 +3639,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3593
3639
  _chunkJX5VOLAVcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3594
3640
  pathname: requestPathname,
3595
3641
  method: requestMethod
3596
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _270 => _270.isFarmDocsAPIRequest, 'call', _271 => _271(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3642
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _274 => _274.isFarmDocsAPIRequest, 'call', _275 => _275(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3597
3643
  );
3598
3644
  };
3599
3645
  try {
@@ -3678,15 +3724,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3678
3724
  });
3679
3725
  };
3680
3726
  const isDocsAPIRequest = Boolean(
3681
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _272 => _272.isFarmDocsAPIRequest, 'call', _273 => _273(pathname2)])
3727
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _276 => _276.isFarmDocsAPIRequest, 'call', _277 => _277(pathname2)])
3682
3728
  );
3683
3729
  const docsRuntimeOptions = () => ({
3684
3730
  kind: "docs",
3685
- route: _chunkFSSONJRVcjs.setFarmRouteLabel.call(void 0,
3731
+ route: _chunk4YHGQDTTcjs.setFarmRouteLabel.call(void 0,
3686
3732
  { pathname: pathname2, pattern: urlPath2 },
3687
- _chunkFSSONJRVcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3688
- path: _optionalChain([farmConfig, 'access', _274 => _274.docs, 'optionalAccess', _275 => _275.entry]) || "/docs",
3689
- roots: _optionalChain([farmConfig, 'access', _276 => _276.docs, 'optionalAccess', _277 => _277.roots, 'optionalAccess', _278 => _278.map, 'call', _279 => _279((root) => root.entry)])
3733
+ _chunk4YHGQDTTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3734
+ path: _optionalChain([farmConfig, 'access', _278 => _278.docs, 'optionalAccess', _279 => _279.entry]) || "/docs",
3735
+ roots: _optionalChain([farmConfig, 'access', _280 => _280.docs, 'optionalAccess', _281 => _281.roots, 'optionalAccess', _282 => _282.map, 'call', _283 => _283((root) => root.entry)])
3690
3736
  })
3691
3737
  )
3692
3738
  });
@@ -3768,7 +3814,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3768
3814
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
3769
3815
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
3770
3816
  if (apiHandler && hasExplicitAPIRoute) {
3771
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _280 => _280.route, 'access', _281 => _281.path]) || urlPath2;
3817
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _284 => _284.route, 'access', _285 => _285.path]) || urlPath2;
3772
3818
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
3773
3819
  type: "route.matched",
3774
3820
  pathname: pathname2,
@@ -3818,7 +3864,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3818
3864
  error
3819
3865
  });
3820
3866
  _chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
3821
- await _optionalChain([runtime, 'optionalAccess', _282 => _282.reportError, 'call', _283 => _283(error)]);
3867
+ await _optionalChain([runtime, 'optionalAccess', _286 => _286.reportError, 'call', _287 => _287(error)]);
3822
3868
  response = _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
3823
3869
  }
3824
3870
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -3923,12 +3969,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3923
3969
  }
3924
3970
  return;
3925
3971
  }
3926
- if (_optionalChain([req, 'access', _284 => _284.url, 'optionalAccess', _285 => _285.startsWith, 'call', _286 => _286("/@")]) || _optionalChain([req, 'access', _287 => _287.url, 'optionalAccess', _288 => _288.startsWith, 'call', _289 => _289("/node_modules")])) {
3972
+ if (_optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/@")]) || _optionalChain([req, 'access', _291 => _291.url, 'optionalAccess', _292 => _292.startsWith, 'call', _293 => _293("/node_modules")])) {
3927
3973
  return next();
3928
3974
  }
3929
3975
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
3930
3976
  requestPathname,
3931
- _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291()]),
3977
+ _optionalChain([farmApp, 'optionalAccess', _294 => _294.getRouteManager, 'call', _295 => _295()]),
3932
3978
  [server.config.publicDir, server.config.root],
3933
3979
  farmAgentGeneratedPaths(farmConfig),
3934
3980
  requestMethod
@@ -3936,7 +3982,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3936
3982
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
3937
3983
  return next();
3938
3984
  }
3939
- if (_optionalChain([req, 'access', _292 => _292.url, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("/__farm/page-data")])) {
3985
+ if (_optionalChain([req, 'access', _296 => _296.url, 'optionalAccess', _297 => _297.startsWith, 'call', _298 => _298("/__farm/page-data")])) {
3940
3986
  const urlObj = parsedRequestUrl;
3941
3987
  const targetPath = urlObj.searchParams.get("path") || "/";
3942
3988
  let renderedRequest;
@@ -3966,7 +4012,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3966
4012
  renderedRequest = targetRequest;
3967
4013
  let middlewareMap = /* @__PURE__ */ new Map();
3968
4014
  let middlewareContext = /* @__PURE__ */ new Map();
3969
- if (_optionalChain([middlewareManager, 'optionalAccess', _295 => _295.hasMiddleware, 'call', _296 => _296()])) {
4015
+ if (_optionalChain([middlewareManager, 'optionalAccess', _299 => _299.hasMiddleware, 'call', _300 => _300()])) {
3970
4016
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
3971
4017
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
3972
4018
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4000,10 +4046,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4000
4046
  if (pm) {
4001
4047
  await pm.runHookParallel("afterRouteMatch", {
4002
4048
  pathname: targetPath,
4003
- matched: !!_optionalChain([match, 'optionalAccess', _297 => _297.route]),
4004
- routePattern: _optionalChain([match, 'optionalAccess', _298 => _298.route, 'optionalAccess', _299 => _299.pattern]) || null,
4005
- params: _optionalChain([match, 'optionalAccess', _300 => _300.params]) || {},
4006
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _301 => _301.layouts]) || []).map((l) => l.pattern)
4049
+ matched: !!_optionalChain([match, 'optionalAccess', _301 => _301.route]),
4050
+ routePattern: _optionalChain([match, 'optionalAccess', _302 => _302.route, 'optionalAccess', _303 => _303.pattern]) || null,
4051
+ params: _optionalChain([match, 'optionalAccess', _304 => _304.params]) || {},
4052
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _305 => _305.layouts]) || []).map((l) => l.pattern)
4007
4053
  });
4008
4054
  }
4009
4055
  if (!match) {
@@ -4026,7 +4072,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4026
4072
  );
4027
4073
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4028
4074
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4029
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4075
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4030
4076
  const isClientComponent = moduleMetadata.isClientComponent;
4031
4077
  const shouldHydrate = moduleMetadata.shouldHydrate;
4032
4078
  let mergedMetadata = {};
@@ -4034,7 +4080,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4034
4080
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
4035
4081
  );
4036
4082
  const layoutHydrationMetadata = layouts.map(
4037
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
4083
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
4038
4084
  );
4039
4085
  const shouldHydrateLayout = layoutHydrationMetadata.some(
4040
4086
  (metadata) => metadata.shouldHydrate
@@ -4046,17 +4092,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4046
4092
  )
4047
4093
  ];
4048
4094
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4049
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303()]), () => ( options))), 'access', _304 => _304.experimental, 'optionalAccess', _305 => _305.serverComponents])
4050
- ) === "islands" ? _chunkCBLRSZQLcjs.resolveFarmRouteRootStrategy.call(void 0,
4095
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _306 => _306.getConfig, 'call', _307 => _307()]), () => ( options))), 'access', _308 => _308.experimental, 'optionalAccess', _309 => _309.serverComponents])
4096
+ ) === "islands" ? _chunkTAU3OF5Bcjs.resolveFarmRouteRootStrategy.call(void 0,
4051
4097
  route,
4052
4098
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4053
4099
  layouts.map((layout, index) => ({
4054
4100
  pattern: layout.pattern,
4055
4101
  modulePath: layout.modulePath,
4056
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _306 => _306[index], 'optionalAccess', _307 => _307.shouldHydrate]) === true,
4102
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.shouldHydrate]) === true,
4057
4103
  // Manifest entries carry it; metadata read from source does not.
4058
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _308 => _308[index], 'optionalAccess', _309 => _309.hasIsolatedClientBoundaries]) === true,
4059
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.islandStrategy]), () => ( null))
4104
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _312 => _312[index], 'optionalAccess', _313 => _313.hasIsolatedClientBoundaries]) === true,
4105
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.islandStrategy]), () => ( null))
4060
4106
  })),
4061
4107
  server.config.root,
4062
4108
  true
@@ -4104,7 +4150,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4104
4150
  mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
4105
4151
  mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
4106
4152
  mergedMetadata,
4107
- _chunkC2JOS77Zcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4153
+ _chunkHGB4PM2Ccjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4108
4154
  routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
4109
4155
  })
4110
4156
  );
@@ -4113,7 +4159,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4113
4159
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4114
4160
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4115
4161
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4116
- ), () => ( _chunkBE7AQXJBcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4162
+ ), () => ( _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4117
4163
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4118
4164
  request: targetRequest,
4119
4165
  params: slot.params,
@@ -4159,15 +4205,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4159
4205
  );
4160
4206
  const projectRoot = server.config.root;
4161
4207
  const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4162
- const renderPlan = _chunkC5AM2XDNcjs.createFarmRouteRenderPlan.call(void 0, {
4208
+ const renderPlan = _chunkPXAHSCR6cjs.createFarmRouteRenderPlan.call(void 0, {
4163
4209
  pageShouldHydrate: shouldHydrate,
4164
4210
  layoutShouldHydrate: shouldHydrateLayout,
4165
4211
  islandStrategy: hydrationIslandStrategy,
4166
- rendering: _chunkE3LE6EZHcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4212
+ rendering: _chunkCLEWORVYcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4167
4213
  });
4168
4214
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4169
- const layoutStartIndex = _chunkC5AM2XDNcjs.getSharedLayoutPrefixLength.call(void 0,
4170
- _chunkC5AM2XDNcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4215
+ const layoutStartIndex = _chunkPXAHSCR6cjs.getSharedLayoutPrefixLength.call(void 0,
4216
+ _chunkPXAHSCR6cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4171
4217
  destinationLayoutPatterns
4172
4218
  );
4173
4219
  const renderer = farmApp.getServerRenderer();
@@ -4177,7 +4223,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4177
4223
  middlewareContext,
4178
4224
  () => renderer.renderNavigationFragment({
4179
4225
  PageComponent: routeModule.default,
4180
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _312 => _312.default]),
4226
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _316 => _316.default]),
4181
4227
  pageProps: routeProps,
4182
4228
  params,
4183
4229
  layouts: layouts.map((layout, index) => ({
@@ -4248,7 +4294,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4248
4294
  {
4249
4295
  status: 200,
4250
4296
  headers: {
4251
- "Cache-Control": _chunkC5AM2XDNcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4297
+ "Cache-Control": _chunkPXAHSCR6cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4252
4298
  "X-Farm-Navigation": "html-fragment",
4253
4299
  Vary: "X-Farm-Layout-Chain",
4254
4300
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4290,29 +4336,29 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4290
4336
  trustProxy: currentServerConfig.trustProxy
4291
4337
  }).pathname;
4292
4338
  const routeManager2 = farmApp.getRouteManager();
4293
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _313 => _313.hasHook, 'call', _314 => _314("beforeRequest")]), () => ( false));
4294
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _315 => _315.hasHook, 'call', _316 => _316("afterResponse")]), () => ( false));
4295
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("afterRender")]), () => ( false)));
4339
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("beforeRequest")]), () => ( false));
4340
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("afterResponse")]), () => ( false));
4341
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasHook, 'call', _322 => _322("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _323 => _323.hasHook, 'call', _324 => _324("afterRender")]), () => ( false)));
4296
4342
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4297
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasRuntimeHook, 'call', _322 => _322("after")]), () => ( false));
4343
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _325 => _325.hasRuntimeHook, 'call', _326 => _326("after")]), () => ( false));
4298
4344
  const pageBuiltInRouteLabel = (pathname2) => {
4299
4345
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4300
- const mcpLabel = _chunkFSSONJRVcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4346
+ const mcpLabel = _chunk4YHGQDTTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4301
4347
  if (mcpLabel) return mcpLabel;
4302
4348
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4303
- return routePathname === _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH : null;
4349
+ return routePathname === _chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH : null;
4304
4350
  };
4305
4351
  const pageRuntimeOptions = (pathname2) => {
4306
4352
  const match = routeManager2.matchRoute(pathname2);
4307
4353
  return {
4308
4354
  kind: "page",
4309
- route: _chunkFSSONJRVcjs.setFarmRouteLabel.call(void 0,
4355
+ route: _chunk4YHGQDTTcjs.setFarmRouteLabel.call(void 0,
4310
4356
  {
4311
4357
  pathname: pathname2,
4312
- pattern: _optionalChain([match, 'optionalAccess', _323 => _323.route, 'optionalAccess', _324 => _324.pattern]) || null,
4313
- params: _optionalChain([match, 'optionalAccess', _325 => _325.params]) || {}
4358
+ pattern: _optionalChain([match, 'optionalAccess', _327 => _327.route, 'optionalAccess', _328 => _328.pattern]) || null,
4359
+ params: _optionalChain([match, 'optionalAccess', _329 => _329.params]) || {}
4314
4360
  },
4315
- _optionalChain([match, 'optionalAccess', _326 => _326.route]) ? null : pageBuiltInRouteLabel(pathname2)
4361
+ _optionalChain([match, 'optionalAccess', _330 => _330.route]) ? null : pageBuiltInRouteLabel(pathname2)
4316
4362
  )
4317
4363
  };
4318
4364
  };
@@ -4392,7 +4438,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4392
4438
  }) : void 0;
4393
4439
  let middlewareFailed = false;
4394
4440
  try {
4395
- if (_optionalChain([middlewareManager, 'optionalAccess', _327 => _327.hasMiddleware, 'call', _328 => _328()])) {
4441
+ if (_optionalChain([middlewareManager, 'optionalAccess', _331 => _331.hasMiddleware, 'call', _332 => _332()])) {
4396
4442
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4397
4443
  const handled = await runFarmMiddlewareWithNavigation(
4398
4444
  farmApp.getServerRenderer(),
@@ -4405,7 +4451,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4405
4451
  throw error;
4406
4452
  });
4407
4453
  if (handled) {
4408
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _329 => _329.isEnded, 'call', _330 => _330()])) {
4454
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4409
4455
  const duration = Date.now() - startTime;
4410
4456
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4411
4457
  }
@@ -4420,8 +4466,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4420
4466
  res
4421
4467
  );
4422
4468
  }
4423
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _331 => _331.isEnded, 'call', _332 => _332()])) {
4424
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4469
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4470
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.isEnded, 'call', _338 => _338()])) {
4425
4471
  const duration = Date.now() - startTime;
4426
4472
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4427
4473
  }
@@ -4440,8 +4486,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4440
4486
  await pm.reportRuntimeRequestError(runtimeSession, error);
4441
4487
  } else {
4442
4488
  await pm.failRuntimeRequest(runtimeSession, error);
4443
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4444
- _optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.release, 'call', _338 => _338()]);
4489
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _339 => _339.isEnded, 'call', _340 => _340()])) {
4490
+ _optionalChain([responseInterceptor, 'optionalAccess', _341 => _341.release, 'call', _342 => _342()]);
4445
4491
  console.error("[FARM] Page error:", error);
4446
4492
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4447
4493
  return;
@@ -4458,7 +4504,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4458
4504
  }
4459
4505
  })
4460
4506
  );
4461
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _339 => _339.stack, 'access', _340 => _340.at, 'call', _341 => _341(-1), 'optionalAccess', _342 => _342.handle]);
4507
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _343 => _343.stack, 'access', _344 => _344.at, 'call', _345 => _345(-1), 'optionalAccess', _346 => _346.handle]);
4462
4508
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4463
4509
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4464
4510
  }
@@ -4487,7 +4533,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4487
4533
  });
4488
4534
  }
4489
4535
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4490
- const root = _optionalChain([farmApp, 'optionalAccess', _343 => _343.getConfig, 'call', _344 => _344(), 'access', _345 => _345.root]) || _optionalChain([server, 'optionalAccess', _346 => _346.config, 'access', _347 => _347.root]) || options.root;
4536
+ const root = _optionalChain([farmApp, 'optionalAccess', _347 => _347.getConfig, 'call', _348 => _348(), 'access', _349 => _349.root]) || _optionalChain([server, 'optionalAccess', _350 => _350.config, 'access', _351 => _351.root]) || options.root;
4491
4537
  return this.resolve(id, path6.join(root, "package.json"), {
4492
4538
  ...resolveOptions,
4493
4539
  skipSelf: true
@@ -4515,7 +4561,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4515
4561
  }
4516
4562
  },
4517
4563
  async load(id, loadOptions) {
4518
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _348 => _348.ssr]) && !farmSetupContext.getStore()) {
4564
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _352 => _352.ssr]) && !farmSetupContext.getStore()) {
4519
4565
  await pendingClientSetup;
4520
4566
  }
4521
4567
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4533,8 +4579,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4533
4579
  if (imageModule) return imageModule;
4534
4580
  }
4535
4581
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4536
- const renderer = _optionalChain([farmApp, 'optionalAccess', _349 => _349.getConfig, 'call', _350 => _350(), 'access', _351 => _351.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4537
- const root = _optionalChain([server, 'optionalAccess', _352 => _352.config, 'access', _353 => _353.root]) || options.root;
4582
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _353 => _353.getConfig, 'call', _354 => _354(), 'access', _355 => _355.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4583
+ const root = _optionalChain([server, 'optionalAccess', _356 => _356.config, 'access', _357 => _357.root]) || options.root;
4538
4584
  if (isClientEnvironment(this, loadOptions)) {
4539
4585
  return generateProgrammaticClientRouteModuleForId(
4540
4586
  id,
@@ -4550,21 +4596,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4550
4596
  return FARM_DEV_CLIENT_BOOT_MODULE;
4551
4597
  }
4552
4598
  if (isFarmClientVirtualId(id)) {
4553
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _354 => _354.getConfig, 'call', _355 => _355()]);
4554
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _356 => _356.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4555
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _357 => _357.integrations]) || options.integrations;
4556
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _358 => _358.root]) || _optionalChain([server, 'optionalAccess', _359 => _359.config, 'access', _360 => _360.root]) || process.cwd();
4557
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.docs]);
4599
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _358 => _358.getConfig, 'call', _359 => _359()]);
4600
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4601
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.integrations]) || options.integrations;
4602
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _362 => _362.root]) || _optionalChain([server, 'optionalAccess', _363 => _363.config, 'access', _364 => _364.root]) || process.cwd();
4603
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _365 => _365.docs]);
4558
4604
  const adapterOwnsDocsRuntime = Boolean(
4559
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _362 => _362.adapter, 'optionalAccess', _363 => _363.server]) && docs.adapter.react
4605
+ _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _366 => _366.adapter, 'optionalAccess', _367 => _367.server]) && docs.adapter.react
4560
4606
  );
4561
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4607
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _368 => _368.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4562
4608
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4563
- _optionalChain([docs, 'optionalAccess', _365 => _365.enabled]) ? loadFarmDocsDevRuntime() : null,
4564
- _optionalChain([docs, 'optionalAccess', _366 => _366.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4609
+ _optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) ? loadFarmDocsDevRuntime() : null,
4610
+ _optionalChain([docs, 'optionalAccess', _370 => _370.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4565
4611
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4566
4612
  ]);
4567
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _367 => _367.isFarmDocsSearchEnabled, 'call', _368 => _368(docs)]), () => ( false));
4613
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _371 => _371.isFarmDocsSearchEnabled, 'call', _372 => _372(docs)]), () => ( false));
4568
4614
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4569
4615
  docsSearchEnabled,
4570
4616
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -4572,10 +4618,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4572
4618
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4573
4619
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4574
4620
  const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, integrations) : [];
4575
- const isolatedHydrationMode = _chunkBE7AQXJBcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4576
- _optionalChain([resolvedConfig, 'optionalAccess', _369 => _369.experimental, 'optionalAccess', _370 => _370.isolatedClientHydration]),
4621
+ const isolatedHydrationMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4622
+ _optionalChain([resolvedConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.isolatedClientHydration]),
4577
4623
  {
4578
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.experimental, 'optionalAccess', _372 => _372.serverComponents])) === "rsc",
4624
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.experimental, 'optionalAccess', _376 => _376.serverComponents])) === "rsc",
4579
4625
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4580
4626
  }
4581
4627
  );
@@ -4583,32 +4629,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4583
4629
  integrationProviders,
4584
4630
  [
4585
4631
  ..._chunkJX5VOLAVcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4586
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _373 => _373.getFarmDocsDocumentNavigationMatchers, 'call', _374 => _374(docs)]), () => ( []))
4632
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _377 => _377.getFarmDocsDocumentNavigationMatchers, 'call', _378 => _378(docs)]), () => ( []))
4587
4633
  ],
4588
4634
  generatedDocsSearchRuntime,
4589
4635
  `${generatedDevtoolsClientRuntime}
4590
4636
  ${generatedDevIndicatorsClientRuntime}`,
4591
- _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.plugins]) || [],
4637
+ _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.plugins]) || [],
4592
4638
  root,
4593
- _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.srcDir]) || options.srcDir || "src",
4594
- _optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.publicRuntimeConfig]) || options.publicRuntimeConfig,
4595
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _378 => _378.adapter, 'optionalAccess', _379 => _379.react]) : void 0,
4639
+ _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.srcDir]) || options.srcDir || "src",
4640
+ _optionalChain([resolvedConfig, 'optionalAccess', _381 => _381.publicRuntimeConfig]) || options.publicRuntimeConfig,
4641
+ _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _382 => _382.adapter, 'optionalAccess', _383 => _383.react]) : void 0,
4596
4642
  renderer,
4597
- isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _380 => _380.getRouteManager, 'call', _381 => _381(), 'access', _382 => _382.getIsolatedClientBoundaryModules, 'call', _383 => _383(root)])))), 'optionalAccess', _384 => _384.size]) > 0,
4598
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.trailingSlash]), () => ( false)),
4599
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.basePath]), () => ( "/")),
4600
- _chunkCBLRSZQLcjs.generateClientCachePersistenceCode.call(void 0,
4601
- _chunkCBLRSZQLcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.cache]))
4643
+ isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _384 => _384.getRouteManager, 'call', _385 => _385(), 'access', _386 => _386.getIsolatedClientBoundaryModules, 'call', _387 => _387(root)])))), 'optionalAccess', _388 => _388.size]) > 0,
4644
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.trailingSlash]), () => ( false)),
4645
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.basePath]), () => ( "/")),
4646
+ _chunkTAU3OF5Bcjs.generateClientCachePersistenceCode.call(void 0,
4647
+ _chunkTAU3OF5Bcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.cache]))
4602
4648
  ),
4603
4649
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4604
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.experimental, 'optionalAccess', _389 => _389.serverComponents])) === "islands"
4650
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _392 => _392.experimental, 'optionalAccess', _393 => _393.serverComponents])) === "islands"
4605
4651
  );
4606
4652
  }
4607
4653
  if (id === "/@farm/server") {
4608
4654
  return generateServerCode();
4609
4655
  }
4610
4656
  if (id === "/@farm/manifest") {
4611
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _390 => _390.getRouteManager, 'call', _391 => _391()]);
4657
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _394 => _394.getRouteManager, 'call', _395 => _395()]);
4612
4658
  if (!routeManager) {
4613
4659
  return `
4614
4660
  export const getManifest = () => ({
@@ -4620,121 +4666,82 @@ export const getManifest = () => ({
4620
4666
  });
4621
4667
  `;
4622
4668
  }
4623
- const manifest = routeManager.generateClientManifest(server.config.root);
4624
- const globalStylesheetHref = _chunkCBLRSZQLcjs.resolveDevGlobalStylesheetHref.call(void 0,
4669
+ const globalStylesheetHref = _chunkTAU3OF5Bcjs.resolveDevGlobalStylesheetHref.call(void 0,
4625
4670
  server.config.root,
4626
- _optionalChain([farmApp, 'optionalAccess', _392 => _392.getConfig, 'call', _393 => _393(), 'access', _394 => _394.srcDir])
4671
+ _optionalChain([farmApp, 'optionalAccess', _396 => _396.getConfig, 'call', _397 => _397(), 'access', _398 => _398.srcDir])
4627
4672
  );
4628
- const fullManifest = {
4629
- clientEntry: "/@farm/client.js",
4630
- routes: {},
4631
- layouts: {},
4632
- slots: [],
4633
- sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
4673
+ const fullManifest = _chunkTAU3OF5Bcjs.createFarmDevClientManifest.call(void 0,
4674
+ routeManager.generateClientManifest(server.config.root),
4675
+ {
4676
+ sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
4677
+ }
4678
+ );
4679
+ return {
4680
+ code: `const manifest = JSON.parse(${JSON.stringify(JSON.stringify(fullManifest))});
4681
+ export const getManifest = () => manifest;
4682
+ export { manifest };
4683
+ `,
4684
+ map: { mappings: "" }
4634
4685
  };
4635
- for (const route of manifest.routes) {
4636
- fullManifest.routes[route.pattern] = {
4637
- modulePath: route.modulePath,
4638
- pattern: route.pattern,
4639
- ...route.directory ? { directory: route.directory } : {},
4640
- segments: route.segments,
4641
- search: route.search,
4642
- isClientComponent: route.isClientComponent,
4643
- shouldHydrate: route.shouldHydrate,
4644
- islandStrategy: route.islandStrategy,
4645
- renderPlan: route.renderPlan,
4646
- preloads: [route.modulePath],
4647
- // In dev, preload is just the module
4648
- assets: []
4649
- };
4650
- }
4651
- for (const layout of manifest.layouts) {
4652
- const groupScope = _chunkC5AM2XDNcjs.getRouteGroupScope.call(void 0, layout.pattern);
4653
- fullManifest.layouts[layout.pattern] = {
4654
- modulePath: layout.modulePath,
4655
- pattern: layout.pattern,
4656
- ...groupScope ? { urlPattern: _chunkC5AM2XDNcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
4657
- shouldHydrate: layout.shouldHydrate,
4658
- islandStrategy: layout.islandStrategy,
4659
- // Islands mode: rebuilt from its server tree, so its module is never preloaded.
4660
- ...layout.serverTree ? { serverTree: true } : {},
4661
- preloads: layout.serverTree ? [] : [layout.modulePath],
4662
- assets: []
4663
- };
4664
- }
4665
- for (const slot of manifest.slots) {
4666
- fullManifest.slots.push({
4667
- ...slot,
4668
- preloads: [slot.modulePath],
4669
- assets: []
4670
- });
4671
- }
4672
- return `
4673
- // Auto-generated manifest for SPA navigation (TanStack Start pattern)
4674
- // This manifest is inlined in the server bundle - no file on disk
4675
- // Client receives this via window.__FARM_MANIFEST__ in HTML
4676
- export const getManifest = () => (${JSON.stringify(fullManifest, null, 2)});
4677
- export const manifest = getManifest();
4678
- `;
4679
4686
  }
4680
4687
  },
4681
4688
  async transform(code, id, transformOptions) {
4682
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _395 => _395.ssr]) && !farmSetupContext.getStore()) {
4689
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) && !farmSetupContext.getStore()) {
4683
4690
  await pendingClientSetup;
4684
4691
  }
4685
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _396 => _396.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4686
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _397 => _397.getConfig, 'call', _398 => _398()]), () => ( options));
4692
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _400 => _400.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4693
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _401 => _401.getConfig, 'call', _402 => _402()]), () => ( options));
4687
4694
  let rewrotePackageImports = false;
4688
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _399 => _399.experimental, 'optionalAccess', _400 => _400.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _401 => _401.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkBE7AQXJBcjs.hasUseClientDirective.call(void 0, code)) {
4695
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _405 => _405.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkHTXKSREFcjs.hasUseClientDirective.call(void 0, code)) {
4689
4696
  const file = id.split("?", 1)[0];
4690
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _402 => _402.config, 'access', _403 => _403.root]) || process.cwd();
4691
- if (_optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true) {
4697
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _406 => _406.config, 'access', _407 => _407.root]) || process.cwd();
4698
+ if (_optionalChain([transformOptions, 'optionalAccess', _408 => _408.ssr]) === true) {
4692
4699
  if (farmReactServerFiles.has(file)) {
4693
- for (const child of _chunkBE7AQXJBcjs.farmRelativeImportFiles.call(void 0, code, file))
4700
+ for (const child of _chunkHTXKSREFcjs.farmRelativeImportFiles.call(void 0, code, file))
4694
4701
  farmReactServerFiles.add(child);
4695
4702
  }
4696
- const serverModule = farmReactServerFiles.has(file) || !_chunkBE7AQXJBcjs.getFarmClientReachableModules.call(void 0,
4703
+ const serverModule = farmReactServerFiles.has(file) || !_chunkHTXKSREFcjs.getFarmClientReachableModules.call(void 0,
4697
4704
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4698
4705
  projectRoot
4699
4706
  ).has(path6.resolve(file));
4700
- const reactServer = !serverModule ? null : _chunkBE7AQXJBcjs.rewriteFarmReactServerImports.call(void 0, {
4707
+ const reactServer = !serverModule ? null : _chunkHTXKSREFcjs.rewriteFarmReactServerImports.call(void 0, {
4701
4708
  code,
4702
4709
  file,
4703
- reference: (specifier, exportName) => _chunkBE7AQXJBcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4710
+ reference: (specifier, exportName) => _chunkHTXKSREFcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4704
4711
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4705
4712
  });
4706
4713
  if (reactServer !== null) {
4707
4714
  code = reactServer;
4708
4715
  rewrotePackageImports = true;
4709
4716
  }
4710
- const internal = farmReactServerFiles.has(file) ? _chunkBE7AQXJBcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4717
+ const internal = farmReactServerFiles.has(file) ? _chunkHTXKSREFcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4711
4718
  code,
4712
4719
  file,
4713
- reference: (clientFile) => _chunkBE7AQXJBcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4720
+ reference: (clientFile) => _chunkHTXKSREFcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4714
4721
  }) : null;
4715
4722
  if (internal !== null) {
4716
4723
  code = internal;
4717
4724
  rewrotePackageImports = true;
4718
4725
  }
4719
4726
  }
4720
- const rewritePackageImports = (source2) => _chunkBE7AQXJBcjs.rewriteFarmPackageClientImports.call(void 0, {
4727
+ const rewritePackageImports = (source2) => _chunkHTXKSREFcjs.rewriteFarmPackageClientImports.call(void 0, {
4721
4728
  code: source2,
4722
4729
  file,
4723
4730
  root: projectRoot,
4724
- isClientPackage: (specifier) => _chunkBE7AQXJBcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4731
+ isClientPackage: (specifier) => _chunkHTXKSREFcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4725
4732
  });
4726
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406()]);
4733
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _409 => _409.getRouteManager, 'call', _410 => _410()]);
4727
4734
  const source = code;
4728
4735
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4729
4736
  if (referenced !== null) {
4730
4737
  code = referenced;
4731
4738
  rewrotePackageImports = true;
4732
4739
  }
4733
- if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
4740
+ if (_optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true) {
4734
4741
  const cached = rewriteFarmReactCacheImport(
4735
4742
  code,
4736
4743
  file,
4737
- _optionalChain([runtimeModule, 'optionalCall', _408 => _408(FARM_REACT_CACHE_MODULE)])
4744
+ _optionalChain([runtimeModule, 'optionalCall', _412 => _412(FARM_REACT_CACHE_MODULE)])
4738
4745
  );
4739
4746
  if (cached !== null) {
4740
4747
  code = cached;
@@ -4744,44 +4751,44 @@ export const manifest = getManifest();
4744
4751
  }
4745
4752
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4746
4753
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4747
- environment: _optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) === true ? "rsc" : "client"
4754
+ environment: _optionalChain([transformOptions, 'optionalAccess', _413 => _413.ssr]) === true ? "rsc" : "client"
4748
4755
  });
4749
4756
  if (serverFns) {
4750
4757
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
4751
4758
  code = serverFns.code;
4752
4759
  }
4753
4760
  }
4754
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _410 => _410.experimental, 'optionalAccess', _411 => _411.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4761
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4755
4762
  const file = id.split("?", 1)[0];
4756
4763
  const actionModule = transformFarmFormActionModule({
4757
4764
  code,
4758
4765
  id,
4759
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _412 => _412.config, 'access', _413 => _413.root]) || process.cwd(),
4760
- ssr: _optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) === true,
4766
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _416 => _416.config, 'access', _417 => _417.root]) || process.cwd(),
4767
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true,
4761
4768
  // Parsed by file type: page components are TSX.
4762
4769
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
4763
4770
  runtimeModule
4764
4771
  });
4765
4772
  if (actionModule) return { code: actionModule, map: null };
4766
4773
  }
4767
- if (!_optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr])) {
4768
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417(), 'optionalAccess', _418 => _418.docs]));
4769
- if (_chunkCBLRSZQLcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4770
- const redacted = _chunkCBLRSZQLcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4774
+ if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
4775
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421(), 'optionalAccess', _422 => _422.docs]));
4776
+ if (_chunkTAU3OF5Bcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4777
+ const redacted = _chunkTAU3OF5Bcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4771
4778
  if (redacted !== null) return { code: redacted, map: null };
4772
4779
  }
4773
4780
  }
4774
- if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
4775
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421()]), () => ( options));
4776
- if ((_optionalChain([currentConfig, 'access', _422 => _422.experimental, 'optionalAccess', _423 => _423.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
4781
+ if (!_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr])) {
4782
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _424 => _424.getConfig, 'call', _425 => _425()]), () => ( options));
4783
+ if ((_optionalChain([currentConfig, 'access', _426 => _426.experimental, 'optionalAccess', _427 => _427.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
4777
4784
  const violation = findClientServerFnViolation(code, id);
4778
4785
  if (violation) {
4779
4786
  this.error(formatServerFnBoundaryError(violation, id));
4780
4787
  }
4781
4788
  }
4782
4789
  }
4783
- if (!_optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) && shouldInspectClientBoundary(id, code)) {
4784
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _425 => _425.getConfig, 'call', _426 => _426()]), () => ( options)));
4790
+ if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr]) && shouldInspectClientBoundary(id, code)) {
4791
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430()]), () => ( options)));
4785
4792
  }
4786
4793
  if (typeof imageImports.transform === "function") {
4787
4794
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -4796,13 +4803,13 @@ export const manifest = getManifest();
4796
4803
  id,
4797
4804
  transformOptions
4798
4805
  );
4799
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _427 => _427.code, 'optionalAccess', _428 => _428.toString, 'call', _429 => _429()]);
4806
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _431 => _431.code, 'optionalAccess', _432 => _432.toString, 'call', _433 => _433()]);
4800
4807
  if (fontCode) {
4801
4808
  transformedCode = fontCode;
4802
4809
  transformed = true;
4803
4810
  }
4804
4811
  }
4805
- if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) && server) {
4812
+ if (_optionalChain([transformOptions, 'optionalAccess', _434 => _434.ssr]) && server) {
4806
4813
  const rewrittenImports = rewriteEarlySsrRelativeImports({
4807
4814
  code: transformedCode,
4808
4815
  id,
@@ -4814,26 +4821,26 @@ export const manifest = getManifest();
4814
4821
  transformed = true;
4815
4822
  }
4816
4823
  }
4817
- if (_chunkBE7AQXJBcjs.hasUseClientDirective.call(void 0, transformedCode)) {
4824
+ if (_chunkHTXKSREFcjs.hasUseClientDirective.call(void 0, transformedCode)) {
4818
4825
  const clientBoundarySource = transformedCode;
4819
4826
  const moduleInfo = this.getModuleInfo(id);
4820
4827
  if (moduleInfo) {
4821
4828
  moduleInfo.isClientComponent = true;
4822
4829
  }
4823
- transformedCode = _chunkBE7AQXJBcjs.stripUseClientDirective.call(void 0, transformedCode);
4830
+ transformedCode = _chunkHTXKSREFcjs.stripUseClientDirective.call(void 0, transformedCode);
4824
4831
  transformed = true;
4825
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
4832
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _435 => _435.getConfig, 'call', _436 => _436()]), () => ( options));
4826
4833
  let isolatedModuleReference = null;
4827
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd();
4834
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _437 => _437.config, 'access', _438 => _438.root]) || process.cwd();
4828
4835
  const cleanId = id.split("?", 1)[0];
4829
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _435 => _435.getRouteManager, 'call', _436 => _436(), 'access', _437 => _437.getIsolatedClientBoundaryModules, 'call', _438 => _438(root)])));
4830
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _439 => _439.has, 'call', _440 => _440(path6.resolve(cleanId))]) === true;
4831
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkBE7AQXJBcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
4832
- cleanId.replace(/\\/g, "/").includes(_chunkBE7AQXJBcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
4836
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _439 => _439.getRouteManager, 'call', _440 => _440(), 'access', _441 => _441.getIsolatedClientBoundaryModules, 'call', _442 => _442(root)])));
4837
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _443 => _443.has, 'call', _444 => _444(path6.resolve(cleanId))]) === true;
4838
+ if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkHTXKSREFcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
4839
+ cleanId.replace(/\\/g, "/").includes(_chunkHTXKSREFcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
4833
4840
  isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
4834
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _441 => _441.experimental, 'optionalAccess', _442 => _442.serverComponents])) === "islands";
4835
- const explicitStrategy = _chunkBE7AQXJBcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
4836
- const inference = islandsMode && explicitStrategy === null ? _chunkCBLRSZQLcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
4841
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _445 => _445.experimental, 'optionalAccess', _446 => _446.serverComponents])) === "islands";
4842
+ const explicitStrategy = _chunkHTXKSREFcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
4843
+ const inference = islandsMode && explicitStrategy === null ? _chunkTAU3OF5Bcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
4837
4844
  if (inference) {
4838
4845
  for (const file of inference.files) {
4839
4846
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -4846,8 +4853,8 @@ export const manifest = getManifest();
4846
4853
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
4847
4854
  parse: (source) => this.parse(source),
4848
4855
  slots: islandsMode,
4849
- browser: _optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) !== true,
4850
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _444 => _444.strategy]) === "interaction",
4856
+ browser: _optionalChain([transformOptions, 'optionalAccess', _447 => _447.ssr]) !== true,
4857
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _448 => _448.strategy]) === "interaction",
4851
4858
  runtimeModule
4852
4859
  });
4853
4860
  if (!transformedBoundary) {
@@ -4878,7 +4885,7 @@ export const manifest = getManifest();
4878
4885
  );
4879
4886
  return;
4880
4887
  }` : "";
4881
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
4888
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _449 => _449.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
4882
4889
  if (import.meta.hot) {
4883
4890
  import.meta.hot.accept((newModule) => {
4884
4891
  ${isolatedHmrUpdate}
@@ -4934,14 +4941,14 @@ if (import.meta.hot) {
4934
4941
  }
4935
4942
  _chunkQMNWKQL4cjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
4936
4943
  _chunkQMNWKQL4cjs.logger.info("Pre-rendering SSG pages...");
4937
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd(), options.outDir || "dist");
4944
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _450 => _450.config, 'access', _451 => _451.root]) || process.cwd(), options.outDir || "dist");
4938
4945
  const clientDir = path6.join(outDir, "client");
4939
4946
  for (const page of ssgPages) {
4940
4947
  try {
4941
4948
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
4942
4949
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
4943
4950
  const mod = await routeManager.loadRouteModule(page.filePath);
4944
- if (!_optionalChain([mod, 'optionalAccess', _448 => _448.default])) return;
4951
+ if (!_optionalChain([mod, 'optionalAccess', _452 => _452.default])) return;
4945
4952
  const { layouts } = routeManager.matchRoute(page.urlPath);
4946
4953
  const layoutModules = await Promise.all(
4947
4954
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -4973,7 +4980,7 @@ if (import.meta.hot) {
4973
4980
  const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
4974
4981
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
4975
4982
  const fullHtml = `<!DOCTYPE html>
4976
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _449 => _449.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
4983
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _453 => _453.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
4977
4984
  <head>
4978
4985
  <meta charset="utf-8">
4979
4986
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5018,12 +5025,12 @@ if (import.meta.hot) {
5018
5025
  watchChange(id, change) {
5019
5026
  const watched = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, id);
5020
5027
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5021
- _optionalChain([farmApp, 'optionalAccess', _450 => _450.getRouteManager, 'call', _451 => _451(), 'access', _452 => _452.noteSourceChange, 'call', _453 => _453(id, change.event)]);
5028
+ _optionalChain([farmApp, 'optionalAccess', _454 => _454.getRouteManager, 'call', _455 => _455(), 'access', _456 => _456.noteSourceChange, 'call', _457 => _457(id, change.event)]);
5022
5029
  }
5023
- _chunkBE7AQXJBcjs.invalidateFarmClientReachableModules.call(void 0, );
5024
- _chunkBE7AQXJBcjs.invalidateFarmClientOnlyScan.call(void 0, );
5025
- _chunkCBLRSZQLcjs.invalidateFarmRouteRootInferences.call(void 0, );
5026
- _chunkBE7AQXJBcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5030
+ _chunkHTXKSREFcjs.invalidateFarmClientReachableModules.call(void 0, );
5031
+ _chunkHTXKSREFcjs.invalidateFarmClientOnlyScan.call(void 0, );
5032
+ _chunkTAU3OF5Bcjs.invalidateFarmRouteRootInferences.call(void 0, );
5033
+ _chunkHTXKSREFcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5027
5034
  },
5028
5035
  async handleHotUpdate(ctx) {
5029
5036
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5048,13 +5055,13 @@ if (import.meta.hot) {
5048
5055
  server2.moduleGraph.invalidateModule(mod);
5049
5056
  }
5050
5057
  }
5051
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _454 => _454.getConfig, 'call', _455 => _455()]);
5058
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _458 => _458.getConfig, 'call', _459 => _459()]);
5052
5059
  const normalizedFile = file.replace(/\\/g, "/");
5053
5060
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5054
5061
  (appDir) => normalizedFile.startsWith(`${_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appDir)}/api/`)
5055
5062
  )) {
5056
5063
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5057
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _456 => _456(`updated ${file}`)]);
5064
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5058
5065
  server2.ws.send({ type: "full-reload", path: "*" });
5059
5066
  return [];
5060
5067
  }
@@ -5064,7 +5071,7 @@ if (import.meta.hot) {
5064
5071
  for (const mod of modules) {
5065
5072
  server2.moduleGraph.invalidateModule(mod);
5066
5073
  }
5067
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _457 => _457(`updated ${file}`)]);
5074
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5068
5075
  server2.ws.send({
5069
5076
  type: "full-reload",
5070
5077
  path: "*"
@@ -5077,7 +5084,7 @@ if (import.meta.hot) {
5077
5084
  for (const mod of modules) {
5078
5085
  server2.moduleGraph.invalidateModule(mod);
5079
5086
  }
5080
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
5087
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
5081
5088
  server2.ws.send({
5082
5089
  type: "full-reload",
5083
5090
  path: "*"
@@ -5085,16 +5092,16 @@ if (import.meta.hot) {
5085
5092
  return [];
5086
5093
  }
5087
5094
  if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5088
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
5095
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
5089
5096
  }
5090
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _460 => _460.experimental, 'optionalAccess', _461 => _461.isolatedClientHydration]);
5091
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _462 => _462.getRouteManager, 'call', _463 => _463()]);
5097
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
5098
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
5092
5099
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5093
- const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.renderer])) && planRouteManager !== void 0;
5100
+ const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
5094
5101
  let clientPlanCurrent = false;
5095
5102
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5096
5103
  const routeManager = planRouteManager;
5097
- if (_optionalChain([routeManager, 'optionalAccess', _465 => _465.isEditPlanNeutral, 'call', _466 => _466(file)])) {
5104
+ if (_optionalChain([routeManager, 'optionalAccess', _469 => _469.isEditPlanNeutral, 'call', _470 => _470(file)])) {
5098
5105
  clientPlanCurrent = true;
5099
5106
  } else if (routeManager) {
5100
5107
  routeManager.noteSourceChange(file, "update");
@@ -5155,7 +5162,7 @@ if (import.meta.hot) {
5155
5162
  }
5156
5163
  return [];
5157
5164
  }
5158
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _467 => _467.getRouteManager, 'call', _468 => _468(), 'access', _469 => _469.invalidateClientManifest, 'call', _470 => _470()]);
5165
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _471 => _471.getRouteManager, 'call', _472 => _472(), 'access', _473 => _473.invalidateClientManifest, 'call', _474 => _474()]);
5159
5166
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5160
5167
  if (manifestModule) {
5161
5168
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5173,7 +5180,7 @@ if (import.meta.hot) {
5173
5180
  return [];
5174
5181
  }
5175
5182
  }
5176
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _471 => _471.environments, 'access', _472 => _472.client, 'optionalAccess', _473 => _473.moduleGraph, 'access', _474 => _474.getModulesByFile, 'call', _475 => _475(normalizedFile), 'optionalAccess', _476 => _476.size]) && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5183
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _475 => _475.environments, 'access', _476 => _476.client, 'optionalAccess', _477 => _477.moduleGraph, 'access', _478 => _478.getModulesByFile, 'call', _479 => _479(normalizedFile), 'optionalAccess', _480 => _480.size]) && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5177
5184
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5178
5185
  server2.ws.send({ type: "full-reload", path: "*" });
5179
5186
  return [];
@@ -5271,7 +5278,7 @@ function createPageDataMiddlewareResponse(res) {
5271
5278
  return (...args) => {
5272
5279
  if (captures(target.statusCode, target.getHeader("location"))) {
5273
5280
  const callback = args.find((arg) => typeof arg === "function");
5274
- _optionalChain([callback, 'optionalCall', _477 => _477()]);
5281
+ _optionalChain([callback, 'optionalCall', _481 => _481()]);
5275
5282
  return property === "write" ? true : response;
5276
5283
  }
5277
5284
  return target[property](...args);
@@ -5335,12 +5342,12 @@ function isFarmClientVirtualId(id) {
5335
5342
  }
5336
5343
  function isClientEnvironment(context, loadOptions) {
5337
5344
  const environment = context.environment;
5338
- if (_optionalChain([environment, 'optionalAccess', _478 => _478.config, 'optionalAccess', _479 => _479.consumer])) return environment.config.consumer === "client";
5339
- if (_optionalChain([environment, 'optionalAccess', _480 => _480.name])) return environment.name === "client";
5340
- return _optionalChain([loadOptions, 'optionalAccess', _481 => _481.ssr]) !== true;
5345
+ if (_optionalChain([environment, 'optionalAccess', _482 => _482.config, 'optionalAccess', _483 => _483.consumer])) return environment.config.consumer === "client";
5346
+ if (_optionalChain([environment, 'optionalAccess', _484 => _484.name])) return environment.name === "client";
5347
+ return _optionalChain([loadOptions, 'optionalAccess', _485 => _485.ssr]) !== true;
5341
5348
  }
5342
5349
  function invalidateProgrammaticClientRouteModules(server) {
5343
- const graph = _optionalChain([server, 'access', _482 => _482.environments, 'optionalAccess', _483 => _483.client, 'optionalAccess', _484 => _484.moduleGraph]);
5350
+ const graph = _optionalChain([server, 'access', _486 => _486.environments, 'optionalAccess', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph]);
5344
5351
  if (!graph) return;
5345
5352
  for (const [id, module] of graph.idToModuleMap) {
5346
5353
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5350,19 +5357,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5350
5357
  const parsed = _chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5351
5358
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5352
5359
  watchFile(routesFile);
5353
- return _chunkBE7AQXJBcjs.generateProgrammaticClientRouteModule.call(void 0, {
5360
+ return _chunkHTXKSREFcjs.generateProgrammaticClientRouteModule.call(void 0, {
5354
5361
  kind: parsed.kind,
5355
5362
  routePath: parsed.routePath,
5356
5363
  routesFile,
5357
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _485 => _485.routes, 'access', _486 => _486.get, 'call', _487 => _487(
5358
- _chunkBE7AQXJBcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5364
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _489 => _489.routes, 'access', _490 => _490.get, 'call', _491 => _491(
5365
+ _chunkHTXKSREFcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5359
5366
  )]),
5360
5367
  rendererServer: renderer.server,
5361
5368
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5362
5369
  });
5363
5370
  }
5364
5371
  function resolveRealModuleFile(filePath, root) {
5365
- const resolved = _nullishCoalesce(_chunkBE7AQXJBcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5372
+ const resolved = _nullishCoalesce(_chunkHTXKSREFcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5366
5373
  try {
5367
5374
  return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5368
5375
  } catch (e28) {
@@ -5676,12 +5683,12 @@ async function parseRouteModuleProps(routeModule, input) {
5676
5683
  }
5677
5684
  const schemas = routeModule.__farmRouteSchemas;
5678
5685
  const params = parseRouteModuleSchema(
5679
- _optionalChain([schemas, 'optionalAccess', _488 => _488.params]),
5686
+ _optionalChain([schemas, 'optionalAccess', _492 => _492.params]),
5680
5687
  input.props.params,
5681
5688
  "params",
5682
5689
  input.routePath
5683
5690
  );
5684
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _489 => _489.search]), input.search, "search", input.routePath);
5691
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _493 => _493.search]), input.search, "search", input.routePath);
5685
5692
  return {
5686
5693
  ...input.props,
5687
5694
  params,
@@ -5701,7 +5708,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5701
5708
  }
5702
5709
  }
5703
5710
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5704
- const providerClientCode = _chunkCBLRSZQLcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5711
+ const providerClientCode = _chunkTAU3OF5Bcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5705
5712
  integrationProviders,
5706
5713
  root,
5707
5714
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -5755,7 +5762,7 @@ async function createFarmServerTreePageElement(source, pathname) {
5755
5762
  return null;
5756
5763
  }
5757
5764
  }
5758
- ${islandValues ? `${_chunkCBLRSZQLcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5765
+ ${islandValues ? `${_chunkTAU3OF5Bcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5759
5766
  let farmLastRouteState = null;
5760
5767
 
5761
5768
  // A hot update to a layout tree's client module renders the route again.
@@ -5846,6 +5853,35 @@ function wrapFarmClientRouteGraph(element) {
5846
5853
  // Fallback to empty manifest if not available yet
5847
5854
  const getManifest = () => window.__FARM_MANIFEST__ || { routes: {}, layouts: {}, slots: [], clientEntry: '', sharedAssets: [] };
5848
5855
 
5856
+ // A document inlines only the entries its page boots with and names the module that has the
5857
+ // whole manifest (manifest.module), as production keeps its route table out of the HTML. Code
5858
+ // that matches another route awaits this first; it imports the module once. A failed import
5859
+ // keeps the inlined entries, so the router treats other routes as it treats an unknown one.
5860
+ let farmManifestLoad = null;
5861
+ function ensureFarmManifest() {
5862
+ const inlined = window.__FARM_MANIFEST__;
5863
+ if (!inlined || typeof inlined.module !== 'string') return Promise.resolve();
5864
+ if (!farmManifestLoad) {
5865
+ farmManifestLoad = import(/* @vite-ignore */ new URL(inlined.module, location.origin).href)
5866
+ .then((loaded) => {
5867
+ const manifest = loaded.getManifest();
5868
+ if (window.__FARM_MANIFEST__ !== inlined) return;
5869
+ const { module: _module, ...boot } = inlined;
5870
+ window.__FARM_MANIFEST__ = {
5871
+ ...boot,
5872
+ routes: manifest.routes,
5873
+ layouts: manifest.layouts,
5874
+ slots: manifest.slots,
5875
+ };
5876
+ })
5877
+ .catch((error) => {
5878
+ farmManifestLoad = null;
5879
+ console.warn('[Farm.js] Could not load the route manifest: ' + inlined.module, error);
5880
+ });
5881
+ }
5882
+ return farmManifestLoad;
5883
+ }
5884
+
5849
5885
  // ====== CLIENT-SIDE ROUTE MATCHING ======
5850
5886
  // Matches URL to route using manifest (no server request!)
5851
5887
 
@@ -6566,7 +6602,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6566
6602
  return loadedLayouts;
6567
6603
  }
6568
6604
 
6569
- ${_chunkCBLRSZQLcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6605
+ ${_chunkTAU3OF5Bcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6570
6606
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6571
6607
  let wrapped = element;
6572
6608
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6851,7 +6887,7 @@ function readActiveLayoutPatterns() {
6851
6887
  .filter(Boolean);
6852
6888
  }
6853
6889
 
6854
- ${_chunkCBLRSZQLcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6890
+ ${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6855
6891
 
6856
6892
  function activateFragmentScripts(root) {
6857
6893
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -6910,7 +6946,7 @@ function getLayoutShell(root, patterns, index, find) {
6910
6946
  return shell.innerHTML;
6911
6947
  }
6912
6948
 
6913
- ${islandValues ? _chunkCBLRSZQLcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
6949
+ ${islandValues ? _chunkTAU3OF5Bcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
6914
6950
  container,
6915
6951
  fragment,
6916
6952
  currentPatterns,
@@ -6983,7 +7019,7 @@ ${islandValues ? `
6983
7019
  return nextTarget;
6984
7020
  }
6985
7021
 
6986
- ${islandValues ? `${_chunkCBLRSZQLcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7022
+ ${islandValues ? `${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
6987
7023
 
6988
7024
  // Islands mode navigates as the production client does: it fetches the page itself, names the
6989
7025
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7044,6 +7080,7 @@ async function fetchFarmNavigationDocument(path, context) {
7044
7080
  // A prefetch reads the page whole for the router's cache, and leaves a page that streams alone.
7045
7081
  if (!context.prefetch) farmNavigationStreamGeneration++;
7046
7082
  const url = new URL(path, window.location.href);
7083
+ await ensureFarmManifest();
7047
7084
  const match = farmDocumentNavigationRoute(url.pathname);
7048
7085
  const container = document.getElementById('root');
7049
7086
  if (!match || !container) return null;
@@ -7190,6 +7227,9 @@ async function renderPage(pageData, info) {
7190
7227
  return;
7191
7228
  }
7192
7229
 
7230
+ // Page data carries the route's render plan, which the manifest entry only backs up. Islands
7231
+ // mode also reads which layouts render as server trees (loadLayoutComponents).
7232
+ if (${islandValues ? "true" : "!pageData.renderPlan"}) await ensureFarmManifest();
7193
7233
  const manifestRoute = findRoute(window.location.pathname)?.route;
7194
7234
  const renderPlan = pageData.renderPlan || manifestRoute?.renderPlan;
7195
7235
  const hydrationMode = renderPlan?.hydration;
@@ -7680,7 +7720,7 @@ function generateClientManifest(bundle) {
7680
7720
  async function defineConfig(config = {}) {
7681
7721
  const tailwindVitePlugin = await _chunkDMXMIE2Ccjs.loadTailwindVitePlugin.call(void 0, );
7682
7722
  const appRoot = path6.resolve(config.root || process.cwd());
7683
- if (_optionalChain([config, 'access', _490 => _490.extends, 'optionalAccess', _491 => _491.length])) {
7723
+ if (_optionalChain([config, 'access', _494 => _494.extends, 'optionalAccess', _495 => _495.length])) {
7684
7724
  const { config: layeredConfig } = await import("./layers-7P4RLKVX.cjs").then(
7685
7725
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
7686
7726
  root: appRoot,
@@ -7690,7 +7730,7 @@ async function defineConfig(config = {}) {
7690
7730
  config = layeredConfig;
7691
7731
  }
7692
7732
  config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7693
- config.images = _chunkCBLRSZQLcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7733
+ config.images = _chunkTAU3OF5Bcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7694
7734
  const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
7695
7735
  ssr: true
7696
7736
  });
@@ -7782,13 +7822,13 @@ async function defineConfig(config = {}) {
7782
7822
  if (!serverStarted) {
7783
7823
  serverStarted = true;
7784
7824
  const elapsed = Date.now() - startTime;
7785
- const address = _optionalChain([server, 'access', _492 => _492.httpServer, 'optionalAccess', _493 => _493.address, 'call', _494 => _494()]);
7825
+ const address = _optionalChain([server, 'access', _496 => _496.httpServer, 'optionalAccess', _497 => _497.address, 'call', _498 => _498()]);
7786
7826
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
7787
7827
  const hostConfig = server.config.server.host;
7788
7828
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
7789
7829
  console.log("");
7790
7830
  console.log(
7791
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkZDZUFD67cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
7831
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkUVQRMUARcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
7792
7832
  );
7793
7833
  console.log("");
7794
7834
  console.log(
@@ -7822,22 +7862,23 @@ async function defineConfig(config = {}) {
7822
7862
  plugins: [
7823
7863
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
7824
7864
  _chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
7825
- _chunkCBLRSZQLcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7865
+ _chunkTAU3OF5Bcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7826
7866
  tailwindVitePlugin,
7827
7867
  ...rendererVitePlugins,
7828
7868
  ...reactRefreshPlugins,
7829
7869
  viteBrowserExternalPlugin,
7830
7870
  farmI18nClientBridgePlugin(),
7831
7871
  farmServerOnlyEntriesPlugin(),
7872
+ farmIslandContainersPlugin(config),
7832
7873
  farmPlugin(config),
7833
- _chunkBE7AQXJBcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7874
+ _chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7834
7875
  farmBrandingPlugin
7835
7876
  ],
7836
7877
  customLogger: farmLogger,
7837
7878
  clearScreen: false,
7838
7879
  optimizeDeps: {
7839
- ..._chunkCBLRSZQLcjs.createFarmClientOptimizeDepsConfig.call(void 0,
7840
- _chunkCBLRSZQLcjs.createFarmClientOptimizeDepsEntries.call(void 0,
7880
+ ..._chunkTAU3OF5Bcjs.createFarmClientOptimizeDepsConfig.call(void 0,
7881
+ _chunkTAU3OF5Bcjs.createFarmClientOptimizeDepsEntries.call(void 0,
7841
7882
  appRoot,
7842
7883
  _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
7843
7884
  ),
@@ -7880,7 +7921,7 @@ async function defineConfig(config = {}) {
7880
7921
  // Stub out problematic server-only modules during dev mode
7881
7922
  alias: {
7882
7923
  ..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, config.layers),
7883
- ..._chunkCBLRSZQLcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
7924
+ ..._chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
7884
7925
  // Nitro internals that should not be resolved in browser
7885
7926
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
7886
7927
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -7911,4 +7952,5 @@ async function defineConfig(config = {}) {
7911
7952
 
7912
7953
 
7913
7954
 
7914
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
7955
+
7956
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;