@farm.js/core 0.1.73 → 0.1.74

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 (362) hide show
  1. package/dist/{agent-mcp-handler-RK7LDYEL.mjs → agent-mcp-handler-HX4F4VKN.mjs} +4 -4
  2. package/dist/{agent-mcp-handler-VBCA3WZ6.cjs → agent-mcp-handler-NRIL4JBC.cjs} +5 -5
  3. package/dist/{agent-mcp.d-PvEf-1mi.d.mts → agent-mcp.d-BEhDfdWc.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-D_gHjCAE.d.ts → agent-mcp.d-CX8_oOT_.d.ts} +1 -1
  5. package/dist/agent-runtime.cjs +4 -4
  6. package/dist/agent-runtime.d.mts +4 -4
  7. package/dist/agent-runtime.d.ts +4 -4
  8. package/dist/agent-runtime.mjs +3 -3
  9. package/dist/{analyzer-MFYCJT75.mjs → analyzer-2K35LIQZ.mjs} +2 -2
  10. package/dist/analyzer-6EOYURMV.cjs +16 -0
  11. package/dist/api/client.d.mts +3 -3
  12. package/dist/api/client.d.ts +3 -3
  13. package/dist/api/client.native.d.mts +4 -4
  14. package/dist/api/client.native.d.ts +4 -4
  15. package/dist/api/node.cjs +9 -8
  16. package/dist/api/node.d.mts +6 -6
  17. package/dist/api/node.d.ts +6 -6
  18. package/dist/api/node.mjs +8 -7
  19. package/dist/api/route-manager.cjs +11 -9
  20. package/dist/api/route-manager.d.mts +9 -7
  21. package/dist/api/route-manager.d.ts +9 -7
  22. package/dist/api/route-manager.mjs +10 -8
  23. package/dist/api/runtime.cjs +8 -7
  24. package/dist/api/runtime.d.mts +5 -5
  25. package/dist/api/runtime.d.ts +5 -5
  26. package/dist/api/runtime.mjs +7 -6
  27. package/dist/{api-client.d-Bp35zMqR.d.mts → api-client.d-CyVmI4Di.d.mts} +2 -2
  28. package/dist/{api-client.d-CFI_xL0V.d.ts → api-client.d-DrTM7BdH.d.ts} +2 -2
  29. package/dist/api.cjs +13 -11
  30. package/dist/api.d.mts +9 -9
  31. package/dist/api.d.ts +9 -9
  32. package/dist/api.mjs +12 -10
  33. package/dist/{app-manifest.d-CN7cEWHX.d.mts → app-manifest.d-BcXt2yCx.d.mts} +10 -1
  34. package/dist/{app-manifest.d-BpVTg43i.d.ts → app-manifest.d-CVEx1CFB.d.ts} +10 -1
  35. package/dist/app-markdown.cjs +8 -4
  36. package/dist/app-markdown.d.mts +6 -6
  37. package/dist/app-markdown.d.ts +6 -6
  38. package/dist/app-markdown.mjs +7 -3
  39. package/dist/{app.d-DO4PTCWm.d.ts → app.d-B6i8CSrx.d.ts} +30 -4
  40. package/dist/{app.d-BFWzAdTe.d.mts → app.d-DowzSmT5.d.mts} +30 -4
  41. package/dist/cache.cjs +2 -2
  42. package/dist/cache.d.mts +8 -0
  43. package/dist/cache.d.ts +8 -0
  44. package/dist/cache.mjs +1 -1
  45. package/dist/chunk-2DOI6HLJ.cjs +284 -0
  46. package/dist/chunk-2GQBBOFH.mjs +76 -0
  47. package/dist/{chunk-5LOARKDP.cjs → chunk-2TZ3F6TN.cjs} +29 -17
  48. package/dist/{chunk-TDCP3Z4T.cjs → chunk-35GBGSQZ.cjs} +3 -3
  49. package/dist/{chunk-VPETSSWN.cjs → chunk-3BUJIPKE.cjs} +2 -2
  50. package/dist/{chunk-Y5LEPEVH.mjs → chunk-3ODLJRA6.mjs} +1 -1
  51. package/dist/{chunk-DMAP4RND.cjs → chunk-3OMLZLDE.cjs} +54 -16
  52. package/dist/{chunk-VNBDN5W2.cjs → chunk-47ZDUDN5.cjs} +64 -27
  53. package/dist/{chunk-2W4GNXGX.cjs → chunk-4AB62NMW.cjs} +2 -2
  54. package/dist/{chunk-HDPT6OYE.cjs → chunk-4M5ESTJ2.cjs} +10 -2
  55. package/dist/{chunk-TAU3OF5B.cjs → chunk-56HHUSR5.cjs} +420 -337
  56. package/dist/chunk-5XD2ULJG.mjs +114 -0
  57. package/dist/{chunk-JX5VOLAV.cjs → chunk-65OS2TOT.cjs} +4 -4
  58. package/dist/{chunk-7GMBETHM.mjs → chunk-6JEXH7N6.mjs} +1 -1
  59. package/dist/{chunk-TY5KCYDE.mjs → chunk-72NTEYCX.mjs} +10 -3
  60. package/dist/{chunk-KDOZORJD.cjs → chunk-737MIVX3.cjs} +22 -22
  61. package/dist/{chunk-ROCF6UQD.cjs → chunk-77SVUQM5.cjs} +74 -17
  62. package/dist/{chunk-CKQAQFF6.mjs → chunk-7RKHXF4P.mjs} +2 -2
  63. package/dist/{chunk-GJEC5S4V.mjs → chunk-7VCLTNED.mjs} +1 -1
  64. package/dist/{chunk-CLEWORVY.cjs → chunk-ACAEFEOH.cjs} +38 -41
  65. package/dist/{chunk-OBYM5S5G.mjs → chunk-AL6E63FZ.mjs} +2 -2
  66. package/dist/{chunk-DQ2DI3Y7.mjs → chunk-AO5IRA2N.mjs} +2 -2
  67. package/dist/{chunk-CYRIIVD4.mjs → chunk-AU5UPNOD.mjs} +2 -2
  68. package/dist/{chunk-Z3IN6GEX.mjs → chunk-B3XY6FMC.mjs} +69 -12
  69. package/dist/{chunk-U7VH3Q5E.cjs → chunk-B5WZP3T3.cjs} +15 -2
  70. package/dist/{chunk-IBVN7SW5.mjs → chunk-BFOMCSZ2.mjs} +292 -120
  71. package/dist/{chunk-I4KPA2C6.mjs → chunk-BIX46FTI.mjs} +1 -1
  72. package/dist/{chunk-YZLEOMMA.mjs → chunk-BNXV3PRM.mjs} +4 -4
  73. package/dist/{chunk-3GNVIYPO.cjs → chunk-BSJMWCWM.cjs} +7 -7
  74. package/dist/{chunk-WVQNXXNE.cjs → chunk-BWFBTTJ5.cjs} +2 -2
  75. package/dist/{chunk-FEFCISOX.cjs → chunk-CEVXKJKF.cjs} +2 -2
  76. package/dist/{chunk-B67CW2LM.mjs → chunk-CF77L6RL.mjs} +33 -36
  77. package/dist/{chunk-OB45EAQL.mjs → chunk-CXQZQK6R.mjs} +3 -2
  78. package/dist/{chunk-255J7K4X.mjs → chunk-D2IAYGYA.mjs} +1 -1
  79. package/dist/{chunk-ILQ5DKYF.cjs → chunk-D4TYE6MY.cjs} +2 -2
  80. package/dist/{chunk-4YHGQDTT.cjs → chunk-DM2YGTRH.cjs} +24 -17
  81. package/dist/{chunk-ICFPTHXM.mjs → chunk-DRBXYJZ6.mjs} +7 -3
  82. package/dist/{chunk-E3HDJCWF.mjs → chunk-DRHHTHA3.mjs} +1 -1
  83. package/dist/{chunk-YXIQYWOK.cjs → chunk-DTBRSRTR.cjs} +23 -5
  84. package/dist/{chunk-JZQS3ZOI.mjs → chunk-E4T7WJJN.mjs} +10 -2
  85. package/dist/{chunk-YAEN3L2F.cjs → chunk-EF5AP4CV.cjs} +21 -2
  86. package/dist/{chunk-SPP3EZTJ.cjs → chunk-EHJOSIXM.cjs} +137 -67
  87. package/dist/{chunk-JZBU7V4D.mjs → chunk-ELJQWUAR.mjs} +125 -55
  88. package/dist/{chunk-DMXMIE2C.cjs → chunk-ENYBDM4U.cjs} +2 -2
  89. package/dist/{chunk-ZFEJ2SF2.cjs → chunk-EWIEJQP6.cjs} +28 -28
  90. package/dist/{chunk-ODBM54RT.cjs → chunk-F244KE2D.cjs} +7 -7
  91. package/dist/{chunk-WW3LRNQV.mjs → chunk-FCBUNILW.mjs} +1 -1
  92. package/dist/{chunk-GZOKWJIW.mjs → chunk-FEQ72ZHD.mjs} +16 -9
  93. package/dist/{chunk-ME7RVELR.mjs → chunk-FGXSWRWA.mjs} +20 -1
  94. package/dist/{chunk-2AFW7673.cjs → chunk-FNWL5DMG.cjs} +4 -3
  95. package/dist/{chunk-XUSJVHHD.cjs → chunk-FYV6DTAG.cjs} +738 -485
  96. package/dist/{chunk-7PPLTD3P.cjs → chunk-G7S6XG6X.cjs} +6 -6
  97. package/dist/{chunk-AQIO3RNL.mjs → chunk-GK2GBIXD.mjs} +3 -3
  98. package/dist/{chunk-IHTDLCDJ.cjs → chunk-GRHSQYD4.cjs} +17 -4
  99. package/dist/{chunk-W44X6IC2.cjs → chunk-HBLYSWIJ.cjs} +13 -9
  100. package/dist/chunk-HK4VJI27.cjs +76 -0
  101. package/dist/{chunk-EGIY4A7V.cjs → chunk-HKZVC5GP.cjs} +2 -2
  102. package/dist/{chunk-EYPSKXO4.mjs → chunk-HRQV5Q3J.mjs} +1 -1
  103. package/dist/{chunk-S7MWSFFP.cjs → chunk-IBEHVSU4.cjs} +2 -2
  104. package/dist/{chunk-JMOCMXTQ.mjs → chunk-IG4IQMIW.mjs} +1 -1
  105. package/dist/{chunk-GPO3LJDJ.cjs → chunk-IJFNXP3D.cjs} +2 -2
  106. package/dist/{chunk-FRO4BB2T.mjs → chunk-IP2R2TAE.mjs} +1 -1
  107. package/dist/{chunk-FETMUBIA.mjs → chunk-IZ5WOTQP.mjs} +1 -1
  108. package/dist/{chunk-CSLHNBPS.cjs → chunk-J42QN7OC.cjs} +6 -6
  109. package/dist/{chunk-NDDRTFN4.mjs → chunk-J7EUGGTY.mjs} +2 -2
  110. package/dist/{chunk-MJEKMT6B.mjs → chunk-JI6N4W2I.mjs} +125 -42
  111. package/dist/{chunk-GJ7QVFAG.mjs → chunk-JOECBGY7.mjs} +1 -1
  112. package/dist/{chunk-CL52PD6D.cjs → chunk-JSUVQ5HG.cjs} +8 -8
  113. package/dist/{chunk-DZHTNSQ5.cjs → chunk-JWHRVBCZ.cjs} +14 -14
  114. package/dist/{chunk-462MUII7.mjs → chunk-JZ43UD6S.mjs} +7 -7
  115. package/dist/{chunk-RLEALQEN.mjs → chunk-KIRIFO6T.mjs} +43 -5
  116. package/dist/{chunk-XGTFLG73.cjs → chunk-KMYOKQPP.cjs} +18 -11
  117. package/dist/{chunk-WX63N6C5.mjs → chunk-KNEYWPZV.mjs} +64 -27
  118. package/dist/{chunk-XI3OXOMK.mjs → chunk-KUMKBBYP.mjs} +1 -1
  119. package/dist/{chunk-VT25ERQK.mjs → chunk-KWUZJZ23.mjs} +21 -3
  120. package/dist/{chunk-SVQX5HYW.mjs → chunk-LHFGTR7F.mjs} +2 -2
  121. package/dist/{chunk-4P5634G6.cjs → chunk-LIQJYEQP.cjs} +14 -9
  122. package/dist/chunk-LXTYJ2HW.mjs +139 -0
  123. package/dist/{chunk-5PDMBWAF.cjs → chunk-MKQ27TGW.cjs} +5 -5
  124. package/dist/{chunk-SUQACHER.mjs → chunk-MQ5HA7H2.mjs} +2 -2
  125. package/dist/{chunk-HY6IVQ54.mjs → chunk-MUITBU5Z.mjs} +1 -1
  126. package/dist/{chunk-QKEZLYON.cjs → chunk-NET6PBUH.cjs} +2 -2
  127. package/dist/{chunk-YBY34UHB.mjs → chunk-NKETXVKP.mjs} +15 -2
  128. package/dist/chunk-NRWEY2CM.mjs +25 -0
  129. package/dist/chunk-NU5XLYRN.cjs +139 -0
  130. package/dist/{chunk-HTXKSREF.cjs → chunk-NXGQIXR7.cjs} +345 -173
  131. package/dist/{chunk-PXAHSCR6.cjs → chunk-O2A6HE76.cjs} +4 -4
  132. package/dist/{chunk-OAEDVXVE.mjs → chunk-O6K4G7YA.mjs} +5 -2
  133. package/dist/{chunk-73K53YPP.mjs → chunk-OSKIG4OP.mjs} +1 -1
  134. package/dist/{chunk-OXNZUCHN.cjs → chunk-P3EZKU6L.cjs} +18 -18
  135. package/dist/{chunk-HGB4PM2C.cjs → chunk-PG6ZIHKE.cjs} +102 -30
  136. package/dist/{chunk-YZK64PZT.cjs → chunk-Q3MVNRAO.cjs} +1071 -650
  137. package/dist/{chunk-AZ6IW6SF.mjs → chunk-Q4G52OSW.mjs} +1 -1
  138. package/dist/{chunk-TPYAYFMF.cjs → chunk-QL3YZTGZ.cjs} +2 -2
  139. package/dist/{chunk-UVZMSRHF.mjs → chunk-R4BWNP73.mjs} +2 -2
  140. package/dist/{chunk-OIP62QEL.mjs → chunk-R6Q6VSGU.mjs} +24 -9
  141. package/dist/{chunk-B6RBJJ5G.mjs → chunk-RBRIKT6B.mjs} +15 -2
  142. package/dist/{chunk-C6CUUBY5.cjs → chunk-RHI67C2V.cjs} +5 -5
  143. package/dist/chunk-RK3YYUX6.cjs +114 -0
  144. package/dist/{chunk-Y2LU4LE5.mjs → chunk-ROPMQNCG.mjs} +2 -2
  145. package/dist/{chunk-QIXEU2WV.cjs → chunk-RQ4UZJPR.cjs} +3 -3
  146. package/dist/{chunk-UVQRMUAR.cjs → chunk-RSL3YFJG.cjs} +1 -1
  147. package/dist/{chunk-JWY66PID.cjs → chunk-S3D6SL2V.cjs} +9 -6
  148. package/dist/{chunk-4HGLJOXZ.cjs → chunk-TPDKFRQX.cjs} +11 -11
  149. package/dist/{chunk-6O6PAZZR.mjs → chunk-UHAARKF3.mjs} +2 -2
  150. package/dist/{chunk-QSTRBKHZ.mjs → chunk-UJWRXBVP.mjs} +2 -2
  151. package/dist/{chunk-KTDG4THT.cjs → chunk-V6T3UJAH.cjs} +7 -7
  152. package/dist/{chunk-IXZSBO76.mjs → chunk-VFPFXMTF.mjs} +1 -1
  153. package/dist/{chunk-CPMME66W.mjs → chunk-VKLV7GF4.mjs} +72 -0
  154. package/dist/{chunk-TU6VAH4V.cjs → chunk-VKRMO3EZ.cjs} +8 -8
  155. package/dist/chunk-VWIW47FW.cjs +25 -0
  156. package/dist/{chunk-LGR7565L.cjs → chunk-VZKCGHWC.cjs} +39 -24
  157. package/dist/{chunk-JWLRBDDC.cjs → chunk-WH3PBJS7.cjs} +2 -2
  158. package/dist/{chunk-QGCSUC5O.mjs → chunk-WS4SLJW5.mjs} +403 -150
  159. package/dist/{chunk-5OFNUETM.mjs → chunk-WTTJ2YS2.mjs} +9 -1
  160. package/dist/{chunk-RLFGKJQ6.mjs → chunk-X2KNHD4B.mjs} +14 -2
  161. package/dist/{chunk-5CFHQ7HM.mjs → chunk-XXKMAHYE.mjs} +1 -1
  162. package/dist/{chunk-MBCRWU3P.cjs → chunk-XZPI44Q7.cjs} +4 -4
  163. package/dist/{chunk-ACGBXN3U.cjs → chunk-Y4FEQBKY.cjs} +17 -9
  164. package/dist/{chunk-4CTCSKAF.mjs → chunk-YH33PZ3K.mjs} +1 -1
  165. package/dist/chunk-YQWRBBAA.mjs +284 -0
  166. package/dist/{chunk-REK6HZSU.mjs → chunk-YWDRWG4L.mjs} +962 -541
  167. package/dist/{chunk-E46NXBNJ.mjs → chunk-ZD7JUTBY.mjs} +11 -6
  168. package/dist/{chunk-JDO346NV.mjs → chunk-ZLRWO5GK.mjs} +1 -1
  169. package/dist/{chunk-HFUOLILA.cjs → chunk-ZRCGPSUM.cjs} +4 -4
  170. package/dist/{chunk-4Z3YLMSW.cjs → chunk-ZZGANFQH.cjs} +10 -10
  171. package/dist/client/lifecycle.d.mts +1 -1
  172. package/dist/client/lifecycle.d.ts +1 -1
  173. package/dist/{client-component.d-sF-Znk0j.d.ts → client-component.d-DYOwmq0c.d.ts} +80 -3
  174. package/dist/{client-component.d-C71rMuHF.d.mts → client-component.d-edV76QvU.d.mts} +80 -3
  175. package/dist/{client-plugins.d-MFibjgBg.d.ts → client-plugins.d-BmJYW2FY.d.ts} +19 -6
  176. package/dist/{client-plugins.d-B-Gd9mWR.d.mts → client-plugins.d-DwvqqGsU.d.mts} +19 -6
  177. package/dist/client-plugins.d.mts +4 -4
  178. package/dist/client-plugins.d.ts +4 -4
  179. package/dist/client.cjs +6 -5
  180. package/dist/client.d.mts +11 -11
  181. package/dist/client.d.ts +11 -11
  182. package/dist/client.mjs +5 -4
  183. package/dist/config.d.mts +4 -4
  184. package/dist/config.d.ts +4 -4
  185. package/dist/cron.cjs +6 -2
  186. package/dist/cron.d.mts +11 -2
  187. package/dist/cron.d.ts +11 -2
  188. package/dist/cron.mjs +7 -3
  189. package/dist/desktop.d.mts +5 -5
  190. package/dist/desktop.d.ts +5 -5
  191. package/dist/{devtools-TDIJ6HVC.mjs → devtools-WPX62NG2.mjs} +10 -9
  192. package/dist/{devtools-6K4QXFRL.cjs → devtools-YMDS7PUA.cjs} +12 -11
  193. package/dist/docs.cjs +13 -12
  194. package/dist/docs.d.mts +5 -5
  195. package/dist/docs.d.ts +5 -5
  196. package/dist/docs.mjs +12 -11
  197. package/dist/{endpoint.d-BkMSCRf6.d.mts → endpoint.d-BXbBpKoh.d.mts} +42 -1
  198. package/dist/{endpoint.d-BgHn0lhl.d.ts → endpoint.d-Dx_1k6Du.d.ts} +42 -1
  199. package/dist/environment/vite.cjs +3 -3
  200. package/dist/environment/vite.mjs +2 -2
  201. package/dist/headers.cjs +3 -3
  202. package/dist/{headers.d-uQ6BR59u.d.ts → headers.d-BIbQyAxJ.d.ts} +1 -1
  203. package/dist/{headers.d-BUxGJTsj.d.mts → headers.d-BtNxFc2s.d.mts} +1 -1
  204. package/dist/headers.mjs +2 -2
  205. package/dist/index.cjs +70 -59
  206. package/dist/{index.d-BCGfxCXY.d.ts → index.d-CQ_wUzOV.d.ts} +1 -1
  207. package/dist/{index.d-CuWOJ-un.d.mts → index.d-CQdDRXd1.d.mts} +1 -1
  208. package/dist/index.d.mts +62 -28
  209. package/dist/index.d.ts +62 -28
  210. package/dist/index.mjs +66 -55
  211. package/dist/integrations/orm.d.mts +4 -4
  212. package/dist/integrations/orm.d.ts +4 -4
  213. package/dist/integrations.cjs +4 -4
  214. package/dist/integrations.d.mts +4 -4
  215. package/dist/integrations.d.ts +4 -4
  216. package/dist/integrations.mjs +3 -3
  217. package/dist/internal/app-markdown-runtime.cjs +7 -3
  218. package/dist/internal/app-markdown-runtime.d.mts +17 -6
  219. package/dist/internal/app-markdown-runtime.d.ts +17 -6
  220. package/dist/internal/app-markdown-runtime.mjs +6 -2
  221. package/dist/internal/build-runtime.cjs +41 -39
  222. package/dist/internal/build-runtime.d.mts +6 -6
  223. package/dist/internal/build-runtime.d.ts +6 -6
  224. package/dist/internal/build-runtime.mjs +40 -38
  225. package/dist/internal/cli-runtime.cjs +20 -19
  226. package/dist/internal/cli-runtime.mjs +19 -18
  227. package/dist/internal/client-error-overlay.cjs +6 -6
  228. package/dist/internal/client-error-overlay.mjs +2 -2
  229. package/dist/internal/client-runtime.cjs +6 -2
  230. package/dist/internal/client-runtime.d.mts +21 -9
  231. package/dist/internal/client-runtime.d.ts +21 -9
  232. package/dist/internal/client-runtime.mjs +5 -1
  233. package/dist/internal/compression-runtime.d.mts +4 -4
  234. package/dist/internal/compression-runtime.d.ts +4 -4
  235. package/dist/internal/config-runtime.cjs +12 -11
  236. package/dist/internal/config-runtime.d.mts +6 -6
  237. package/dist/internal/config-runtime.d.ts +6 -6
  238. package/dist/internal/config-runtime.mjs +11 -10
  239. package/dist/internal/form-actions.cjs +5 -4
  240. package/dist/internal/form-actions.d.mts +2 -2
  241. package/dist/internal/form-actions.d.ts +2 -2
  242. package/dist/internal/form-actions.mjs +4 -3
  243. package/dist/internal/infra-analytics-runtime.cjs +10 -10
  244. package/dist/internal/infra-analytics-runtime.mjs +8 -8
  245. package/dist/internal/native-server-fns.cjs +4 -4
  246. package/dist/internal/native-server-fns.mjs +3 -3
  247. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  248. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  249. package/dist/internal/production-runtime.cjs +32 -22
  250. package/dist/internal/production-runtime.d.mts +64 -13
  251. package/dist/internal/production-runtime.d.ts +64 -13
  252. package/dist/internal/production-runtime.mjs +31 -21
  253. package/dist/internal/react-cache.cjs +3 -3
  254. package/dist/internal/react-cache.mjs +1 -1
  255. package/dist/internal/vercel-edge-middleware.cjs +4 -4
  256. package/dist/internal/vercel-edge-middleware.mjs +3 -3
  257. package/dist/{lifecycle.d-keQs5Swc.d.mts → lifecycle.d-OtGWAvJT.d.mts} +4 -0
  258. package/dist/{lifecycle.d-keQs5Swc.d.ts → lifecycle.d-OtGWAvJT.d.ts} +4 -0
  259. package/dist/{manager-JIA66YJ2.mjs → manager-RHB2P35B.mjs} +4 -1
  260. package/dist/{manager-JOHU6BQI.cjs → manager-S77ZARTC.cjs} +5 -2
  261. package/dist/markdown.cjs +2 -2
  262. package/dist/markdown.d.mts +4 -4
  263. package/dist/markdown.d.ts +4 -4
  264. package/dist/markdown.mjs +1 -1
  265. package/dist/middleware.cjs +6 -6
  266. package/dist/middleware.d.mts +4 -4
  267. package/dist/middleware.d.ts +4 -4
  268. package/dist/middleware.mjs +5 -5
  269. package/dist/{mount.d-BIYmcGGg.d.mts → mount.d-6bhpBQQB.d.mts} +1 -1
  270. package/dist/{mount.d-q8k0cJV0.d.ts → mount.d-C-u7rFkM.d.ts} +1 -1
  271. package/dist/{native-server-fn-handler-EP5AFJYE.mjs → native-server-fn-handler-I66X4E5S.mjs} +6 -5
  272. package/dist/{native-server-fn-handler-QRTXGZA4.cjs → native-server-fn-handler-W4FSD76W.cjs} +7 -6
  273. package/dist/{native-tree-OYGKP2NZ.mjs → native-tree-3X23BT3N.mjs} +2 -2
  274. package/dist/{native-tree-R6CQMDTI.cjs → native-tree-TAPKR7QJ.cjs} +3 -3
  275. package/dist/{navigation-delegate.d-CYBUupsv.d.mts → navigation-delegate.d-nx6gtsY4.d.mts} +1 -1
  276. package/dist/{navigation-delegate.d-Btfs6Uoa.d.ts → navigation-delegate.d-xsG4T1x-.d.ts} +1 -1
  277. package/dist/navigation.cjs +4 -4
  278. package/dist/navigation.d.mts +7 -7
  279. package/dist/navigation.d.ts +7 -7
  280. package/dist/navigation.mjs +3 -3
  281. package/dist/{nitro-2LMOMIST.cjs → nitro-SSFTPZMW.cjs} +4 -4
  282. package/dist/{nitro-72TFIGGO.mjs → nitro-XTQ2HKDL.mjs} +1 -1
  283. package/dist/plugin.cjs +36 -33
  284. package/dist/plugin.d.mts +7 -7
  285. package/dist/plugin.d.ts +7 -7
  286. package/dist/plugin.mjs +35 -32
  287. package/dist/query/client.cjs +5 -5
  288. package/dist/query/client.mjs +1 -1
  289. package/dist/{render-plan.d-BlyxqKMu.d.mts → render-plan.d-B5y3h97B.d.mts} +1 -1
  290. package/dist/{render-plan.d-0FHusf1D.d.ts → render-plan.d-gW0fwKz2.d.ts} +1 -1
  291. package/dist/renderer-client.cjs +4 -4
  292. package/dist/renderer-client.d.mts +7 -7
  293. package/dist/renderer-client.d.ts +7 -7
  294. package/dist/renderer-client.mjs +1 -1
  295. package/dist/request.cjs +2 -2
  296. package/dist/{request.d-CX-gks1l.d.mts → request.d-B0ugAadD.d.ts} +9 -2
  297. package/dist/{request.d-CPdVjssg.d.ts → request.d-DLq33nYo.d.mts} +9 -2
  298. package/dist/request.d.mts +5 -5
  299. package/dist/request.d.ts +5 -5
  300. package/dist/request.mjs +1 -1
  301. package/dist/{route-rendering.d-CcvZ_4N2.d.mts → route-rendering.d-DSeIV7yV.d.mts} +1 -1
  302. package/dist/{route-rendering.d-DcOoSNoG.d.ts → route-rendering.d-ytaqDQD6.d.ts} +1 -1
  303. package/dist/{route.d-DrXkpvcg.d.mts → route.d-Cd4Fi6BA.d.ts} +3 -1
  304. package/dist/{route.d-hs-_cyHn.d.ts → route.d-ShmtqqVQ.d.mts} +3 -1
  305. package/dist/{router.d-D2QnK8cM.d.ts → router.d-BaEAEGPg.d.ts} +1 -1
  306. package/dist/{router.d-C8RHma4A.d.mts → router.d-Chd5cpe3.d.mts} +1 -1
  307. package/dist/routes.cjs +5 -3
  308. package/dist/routes.d.mts +4 -4
  309. package/dist/routes.d.ts +4 -4
  310. package/dist/routes.mjs +4 -2
  311. package/dist/{rsc-pipeline-LC2FBZAR.mjs → rsc-pipeline-DPMYONEV.mjs} +12 -11
  312. package/dist/{rsc-pipeline-NTAM65NT.cjs → rsc-pipeline-XIUUMMG5.cjs} +13 -12
  313. package/dist/{runtime-U4PAMTVH.cjs → runtime-WD77S3C5.cjs} +25 -25
  314. package/dist/{runtime-MWAC7NWR.mjs → runtime-XIUJZTZ3.mjs} +16 -16
  315. package/dist/{runtime.d-BQUHHq8M.d.mts → runtime.d-DpCs0eAO.d.mts} +3 -3
  316. package/dist/{runtime.d-1l_1bLrL.d.ts → runtime.d-h2USyQsz.d.ts} +3 -3
  317. package/dist/server-action-security.cjs +5 -3
  318. package/dist/server-action-security.d.mts +11 -3
  319. package/dist/server-action-security.d.ts +11 -3
  320. package/dist/server-action-security.mjs +4 -2
  321. package/dist/server-fn-client.d.mts +3 -3
  322. package/dist/server-fn-client.d.ts +3 -3
  323. package/dist/server-fn.cjs +6 -5
  324. package/dist/server-fn.d.mts +1 -1
  325. package/dist/server-fn.d.ts +1 -1
  326. package/dist/server-fn.mjs +5 -4
  327. package/dist/server-plugins.cjs +4 -4
  328. package/dist/server-plugins.d.mts +53 -9
  329. package/dist/server-plugins.d.ts +53 -9
  330. package/dist/server-plugins.mjs +3 -3
  331. package/dist/server-query-client.d.mts +1 -1
  332. package/dist/server-query-client.d.ts +1 -1
  333. package/dist/server-query.cjs +7 -6
  334. package/dist/server-query.d.mts +1 -1
  335. package/dist/server-query.d.ts +1 -1
  336. package/dist/server-query.mjs +6 -5
  337. package/dist/server.cjs +62 -67
  338. package/dist/server.d.mts +14 -14
  339. package/dist/server.d.ts +14 -14
  340. package/dist/server.mjs +41 -46
  341. package/dist/{spa-router.d-BzPdi48R.d.mts → spa-router.d-DCQVtEaE.d.mts} +11 -5
  342. package/dist/{spa-router.d-BJtXNeqo.d.ts → spa-router.d-DpdJHs1q.d.ts} +11 -5
  343. package/dist/testing.cjs +16 -14
  344. package/dist/testing.d.mts +4 -4
  345. package/dist/testing.d.ts +4 -4
  346. package/dist/testing.mjs +12 -10
  347. package/dist/theme/server.cjs +3 -3
  348. package/dist/theme/server.mjs +2 -2
  349. package/dist/{utils.d-B4ZW-6z6.d.mts → utils.d-DKDZtAY5.d.mts} +1 -1
  350. package/dist/{utils.d-DquC6qxy.d.ts → utils.d-DmicwMvS.d.ts} +1 -1
  351. package/dist/version.cjs +2 -2
  352. package/dist/version.mjs +1 -1
  353. package/dist/vite.cjs +36 -33
  354. package/dist/vite.d.mts +13 -8
  355. package/dist/vite.d.ts +13 -8
  356. package/dist/vite.mjs +35 -32
  357. package/package.json +1 -1
  358. package/dist/analyzer-V5ZMRIIY.cjs +0 -16
  359. package/dist/chunk-6I4BFRE7.cjs +0 -51
  360. package/dist/chunk-EIVGPQN5.mjs +0 -51
  361. /package/dist/{chunk-QEJWNXRI.cjs → chunk-EMRYJG4U.cjs} +0 -0
  362. /package/dist/{chunk-TXE4SAMV.mjs → chunk-H2ZJ35NW.mjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkDMXMIE2Ccjs = require('./chunk-DMXMIE2C.cjs');
4
+ var _chunkENYBDM4Ucjs = require('./chunk-ENYBDM4U.cjs');
5
5
 
6
6
 
7
7
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
@@ -9,7 +9,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkCLEWORVYcjs = require('./chunk-CLEWORVY.cjs');
12
+ var _chunkACAEFEOHcjs = require('./chunk-ACAEFEOH.cjs');
13
13
 
14
14
 
15
15
  var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
@@ -42,10 +42,10 @@ var _chunkAXVRUDMBcjs = require('./chunk-AXVRUDMB.cjs');
42
42
 
43
43
 
44
44
 
45
- var _chunkPXAHSCR6cjs = require('./chunk-PXAHSCR6.cjs');
45
+ var _chunkO2A6HE76cjs = require('./chunk-O2A6HE76.cjs');
46
46
 
47
47
 
48
- var _chunk4YHGQDTTcjs = require('./chunk-4YHGQDTT.cjs');
48
+ var _chunkDM2YGTRHcjs = require('./chunk-DM2YGTRH.cjs');
49
49
 
50
50
 
51
51
 
@@ -53,12 +53,12 @@ var _chunk4YHGQDTTcjs = require('./chunk-4YHGQDTT.cjs');
53
53
 
54
54
 
55
55
 
56
- var _chunkTU6VAH4Vcjs = require('./chunk-TU6VAH4V.cjs');
56
+ var _chunkVKRMO3EZcjs = require('./chunk-VKRMO3EZ.cjs');
57
57
 
58
58
 
59
59
 
60
60
 
61
- var _chunkW44X6IC2cjs = require('./chunk-W44X6IC2.cjs');
61
+ var _chunkHBLYSWIJcjs = require('./chunk-HBLYSWIJ.cjs');
62
62
 
63
63
 
64
64
 
@@ -84,14 +84,16 @@ var _chunkXGJVRPYLcjs = require('./chunk-XGJVRPYL.cjs');
84
84
 
85
85
 
86
86
 
87
- var _chunkHTXKSREFcjs = require('./chunk-HTXKSREF.cjs');
87
+
88
+
89
+ var _chunkNXGQIXR7cjs = require('./chunk-NXGQIXR7.cjs');
88
90
 
89
91
 
90
92
  var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
91
93
 
92
94
 
93
95
 
94
- var _chunkQIXEU2WVcjs = require('./chunk-QIXEU2WV.cjs');
96
+ var _chunkRQ4UZJPRcjs = require('./chunk-RQ4UZJPR.cjs');
95
97
 
96
98
 
97
99
  var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
@@ -111,7 +113,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
111
113
 
112
114
 
113
115
 
114
- var _chunkODBM54RTcjs = require('./chunk-ODBM54RT.cjs');
116
+ var _chunkF244KE2Dcjs = require('./chunk-F244KE2D.cjs');
115
117
 
116
118
 
117
119
 
@@ -121,7 +123,7 @@ var _chunkODBM54RTcjs = require('./chunk-ODBM54RT.cjs');
121
123
 
122
124
 
123
125
 
124
- var _chunk5PDMBWAFcjs = require('./chunk-5PDMBWAF.cjs');
126
+ var _chunkMKQ27TGWcjs = require('./chunk-MKQ27TGW.cjs');
125
127
 
126
128
 
127
129
 
@@ -155,17 +157,17 @@ var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
155
157
  var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
156
158
 
157
159
 
158
- var _chunkYAEN3L2Fcjs = require('./chunk-YAEN3L2F.cjs');
160
+ var _chunkEF5AP4CVcjs = require('./chunk-EF5AP4CV.cjs');
159
161
 
160
162
 
161
- var _chunk4P5634G6cjs = require('./chunk-4P5634G6.cjs');
163
+ var _chunkLIQJYEQPcjs = require('./chunk-LIQJYEQP.cjs');
162
164
 
163
165
 
164
166
 
165
- var _chunkGPO3LJDJcjs = require('./chunk-GPO3LJDJ.cjs');
167
+ var _chunkIJFNXP3Dcjs = require('./chunk-IJFNXP3D.cjs');
166
168
 
167
169
 
168
- var _chunkLGR7565Lcjs = require('./chunk-LGR7565L.cjs');
170
+ var _chunkVZKCGHWCcjs = require('./chunk-VZKCGHWC.cjs');
169
171
 
170
172
 
171
173
 
@@ -178,7 +180,7 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
178
180
 
179
181
 
180
182
 
181
- var _chunkHGB4PM2Ccjs = require('./chunk-HGB4PM2C.cjs');
183
+ var _chunkPG6ZIHKEcjs = require('./chunk-PG6ZIHKE.cjs');
182
184
 
183
185
 
184
186
  var _chunkFSODPZRTcjs = require('./chunk-FSODPZRT.cjs');
@@ -189,7 +191,7 @@ var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
189
191
 
190
192
 
191
193
 
192
- var _chunkJX5VOLAVcjs = require('./chunk-JX5VOLAV.cjs');
194
+ var _chunk65OS2TOTcjs = require('./chunk-65OS2TOT.cjs');
193
195
 
194
196
 
195
197
  var _chunkJMYXO572cjs = require('./chunk-JMYXO572.cjs');
@@ -210,7 +212,7 @@ var _chunkYDXLC4DWcjs = require('./chunk-YDXLC4DW.cjs');
210
212
 
211
213
 
212
214
 
213
- var _chunkQEJWNXRIcjs = require('./chunk-QEJWNXRI.cjs');
215
+ var _chunkEMRYJG4Ucjs = require('./chunk-EMRYJG4U.cjs');
214
216
 
215
217
 
216
218
 
@@ -239,7 +241,7 @@ var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
239
241
 
240
242
 
241
243
 
242
- var _chunkDMAP4RNDcjs = require('./chunk-DMAP4RND.cjs');
244
+ var _chunk3OMLZLDEcjs = require('./chunk-3OMLZLDE.cjs');
243
245
 
244
246
 
245
247
  var _chunkJRGR5Z4Kcjs = require('./chunk-JRGR5Z4K.cjs');
@@ -272,6 +274,7 @@ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
272
274
 
273
275
 
274
276
 
277
+
275
278
  var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
276
279
 
277
280
 
@@ -286,7 +289,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
286
289
  var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
287
290
 
288
291
 
289
- var _chunkUVQRMUARcjs = require('./chunk-UVQRMUAR.cjs');
292
+ var _chunkRSL3YFJGcjs = require('./chunk-RSL3YFJG.cjs');
290
293
 
291
294
 
292
295
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -337,7 +340,7 @@ var _chunkPWKAX5MScjs = require('./chunk-PWKAX5MS.cjs');
337
340
 
338
341
 
339
342
 
340
- var _chunkHDPT6OYEcjs = require('./chunk-HDPT6OYE.cjs');
343
+ var _chunk4M5ESTJ2cjs = require('./chunk-4M5ESTJ2.cjs');
341
344
 
342
345
 
343
346
 
@@ -470,13 +473,16 @@ var RouteManager = class _RouteManager {
470
473
  this.redirects = /* @__PURE__ */ new Map();
471
474
  this.programmaticPages = /* @__PURE__ */ new Map();
472
475
  this.programmaticLayouts = /* @__PURE__ */ new Map();
473
- this.programmaticClientRoutes = _chunkHTXKSREFcjs.mergeProgrammaticClientRoutes.call(void 0, []);
476
+ this.programmaticClientRoutes = _chunkNXGQIXR7cjs.mergeProgrammaticClientRoutes.call(void 0, []);
474
477
  this.discovery = Promise.resolve();
475
478
  this.reportedIslandsErrors = /* @__PURE__ */ new Set();
476
479
  // Each route module's hydration plan from the last plan, with the source files it read, so a dev
477
480
  // replan recomputes only the modules that read an edited file. Every replan used to read and
478
481
  // walk every route's import graph again, seconds on a large app, before an edit could update.
479
482
  this.ownerPlans = /* @__PURE__ */ new Map();
483
+ // Outside the dev server: the size and mtime each source file the last plan read had when it was
484
+ // read, so a production build can tell whether a route module's plan still holds.
485
+ this.planStamps = /* @__PURE__ */ new Map();
480
486
  this.sourceChangeTracking = false;
481
487
  this.linkedSources = /* @__PURE__ */ new Map();
482
488
  // Source files edited since the last plan; null when the next plan must recompute every module.
@@ -527,7 +533,7 @@ var RouteManager = class _RouteManager {
527
533
  await this.discoverFileRoutes(source);
528
534
  await this.discoverProgrammaticRoutes(source, programmaticClientRoutes);
529
535
  }
530
- this.programmaticClientRoutes = _chunkHTXKSREFcjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
536
+ this.programmaticClientRoutes = _chunkNXGQIXR7cjs.mergeProgrammaticClientRoutes.call(void 0, programmaticClientRoutes);
531
537
  for (const slot of this.routeSlots.values()) {
532
538
  if (slot.interception && !this.pageRouteShapes.has(_chunkYTVSWXEZcjs.getRoutePatternShape.call(void 0, slot.pattern))) {
533
539
  throw new (0, _chunkYTVSWXEZcjs.AmbiguousRouteError)(
@@ -546,8 +552,8 @@ var RouteManager = class _RouteManager {
546
552
  )
547
553
  );
548
554
  this.orderedLayouts = Array.from(this.layouts.values()).sort(
549
- (left, right) => _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, right.pattern)
550
- ).map((entry) => ({ entry, groupScope: _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, entry.pattern) }));
555
+ (left, right) => _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, left.pattern) - _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, right.pattern)
556
+ ).map((entry) => ({ entry, groupScope: _chunkO2A6HE76cjs.getRouteGroupScope.call(void 0, entry.pattern) }));
551
557
  for (const slot of this.routeSlots.values()) {
552
558
  if (!this.routeSlotOwnerSegments.has(slot.ownerPattern)) {
553
559
  this.routeSlotOwnerSegments.set(
@@ -796,11 +802,11 @@ var RouteManager = class _RouteManager {
796
802
  return this.clientManifestCache.manifest;
797
803
  }
798
804
  const cacheFile = this.packageClientBoundaryCacheFile;
799
- const compute = () => _chunkHTXKSREFcjs.withFarmSourceSnapshot.call(void 0,
805
+ const compute = () => _chunkNXGQIXR7cjs.withFarmSourceSnapshot.call(void 0,
800
806
  () => this.computeClientManifest(normalizedProjectRoot),
801
807
  this.sourceSnapshot
802
808
  );
803
- return cacheFile ? _chunkHTXKSREFcjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
809
+ return cacheFile ? _chunkNXGQIXR7cjs.runWithPackageClientBoundaryCacheFile.call(void 0, cacheFile, compute) : compute();
804
810
  }
805
811
  /**
806
812
  * @internal The dev server reports every watched change (`noteSourceChange`), so a replan can
@@ -809,7 +815,26 @@ var RouteManager = class _RouteManager {
809
815
  */
810
816
  trackSourceChanges() {
811
817
  this.sourceChangeTracking = true;
812
- _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkHTXKSREFcjs.FarmSourceSnapshotStore)())));
818
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkNXGQIXR7cjs.FarmSourceSnapshotStore)())));
819
+ }
820
+ /**
821
+ * @internal A production build edits no source while it runs, so what the plan reads, parses and
822
+ * resolves as the app initializes stays valid for the build's later analyses of the same modules:
823
+ * the route tables' plans and the bundles' package import rewrites (takeBuildSourceSnapshot).
824
+ */
825
+ keepBuildSourceSnapshot() {
826
+ if (this.sourceChangeTracking) return;
827
+ _nullishCoalesce(this.sourceSnapshot, () => ( (this.sourceSnapshot = new (0, _chunkNXGQIXR7cjs.FarmSourceSnapshotStore)(false))));
828
+ }
829
+ /**
830
+ * @internal Hands the snapshot keepBuildSourceSnapshot kept to the build, which clears it once
831
+ * its bundles are written; later plans start without one. Undefined on the dev server.
832
+ */
833
+ takeBuildSourceSnapshot() {
834
+ if (this.sourceChangeTracking) return void 0;
835
+ const store = this.sourceSnapshot;
836
+ this.sourceSnapshot = void 0;
837
+ return store;
813
838
  }
814
839
  /**
815
840
  * @internal A watched file changed. An edit to a script narrows the next replan to the route
@@ -841,26 +866,55 @@ var RouteManager = class _RouteManager {
841
866
  return false;
842
867
  }
843
868
  const previous = _optionalChain([this, 'access', _12 => _12.sourceSnapshot, 'optionalAccess', _13 => _13.peekSource, 'call', _14 => _14(path3.default.resolve(file))]);
844
- return previous !== void 0 && _chunkHTXKSREFcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
869
+ return previous !== void 0 && _chunkNXGQIXR7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous);
845
870
  }
846
871
  /**
847
872
  * A route module's plan: the last one when it read none of `edited`, recomputed otherwise.
848
873
  * Callers get a copy, since the route budget rewrites a plan's fields in place.
849
874
  */
850
- planRouteModule(key, edited, compute) {
875
+ planRouteModule(key, edited, compute, planKey) {
851
876
  const previous = this.ownerPlans.get(key);
852
877
  if (previous && edited && ![...edited].some((file) => previous.files.has(file))) {
853
878
  return { ...previous.plan };
854
879
  }
855
- const { result, files } = _chunkHTXKSREFcjs.traceFarmSourceReads.call(void 0, compute);
880
+ const { result, files } = _chunkNXGQIXR7cjs.traceFarmSourceReads.call(void 0, compute);
856
881
  const sources = /* @__PURE__ */ new Set();
857
882
  for (const file of files) {
858
883
  const source = this.planSourcePath(file);
859
884
  if (source) sources.add(source);
860
885
  }
861
- this.ownerPlans.set(key, { plan: result, files: sources });
886
+ if (!this.sourceChangeTracking) {
887
+ for (const source of sources) {
888
+ if (!this.planStamps.has(source)) this.planStamps.set(source, _chunkNXGQIXR7cjs.getFarmSourceStamp.call(void 0, source));
889
+ }
890
+ }
891
+ this.ownerPlans.set(key, { plan: result, files: sources, planKey });
862
892
  return { ...result };
863
893
  }
894
+ /**
895
+ * @internal The plans of the pages and layouts the last client manifest planned, by
896
+ * getClientModuleHydrationPlanKey, so a production build plans each route module once. A plan
897
+ * that read a source file changed since then is left out, as is every plan of the dev server,
898
+ * which replans after edits. Installed packages are not compared: they do not change during a
899
+ * build.
900
+ */
901
+ getRouteModuleHydrationPlans() {
902
+ const plans = /* @__PURE__ */ new Map();
903
+ if (this.sourceChangeTracking || !this.clientManifestCache) return plans;
904
+ const unchanged = /* @__PURE__ */ new Map();
905
+ const isUnchanged = (file) => {
906
+ let result = unchanged.get(file);
907
+ if (result === void 0) {
908
+ result = this.planStamps.get(file) === _chunkNXGQIXR7cjs.getFarmSourceStamp.call(void 0, file);
909
+ unchanged.set(file, result);
910
+ }
911
+ return result;
912
+ };
913
+ for (const { plan, files, planKey } of this.ownerPlans.values()) {
914
+ if (planKey && [...files].every(isUnchanged)) plans.set(planKey, plan);
915
+ }
916
+ return plans;
917
+ }
864
918
  /**
865
919
  * The path the watcher reports for a file a plan read: itself, or the real path of a workspace
866
920
  * package's source read through its `node_modules` link. Null for an installed package's file.
@@ -893,7 +947,7 @@ var RouteManager = class _RouteManager {
893
947
  */
894
948
  inspectPackages(operation) {
895
949
  const file = this.packageClientBoundaryCacheFile;
896
- return file ? _chunkHTXKSREFcjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
950
+ return file ? _chunkNXGQIXR7cjs.runWithLatestPackageClientBoundaryCache.call(void 0, file, operation) : operation();
897
951
  }
898
952
  computeClientManifest(normalizedProjectRoot) {
899
953
  const toUrlPath = (absolutePath) => {
@@ -905,7 +959,7 @@ var RouteManager = class _RouteManager {
905
959
  }
906
960
  return absolutePath;
907
961
  };
908
- const integrationProviders = _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
962
+ const integrationProviders = _chunk65OS2TOTcjs.getIntegrationProviders.call(void 0, this.config.integrations).filter(
909
963
  (provider) => provider.component || provider.type === "clerk"
910
964
  );
911
965
  const unsupportedIntegrationProvider = integrationProviders.find(
@@ -916,14 +970,14 @@ var RouteManager = class _RouteManager {
916
970
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
917
971
  );
918
972
  }
919
- const isolatedMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
973
+ const isolatedMode = _chunkNXGQIXR7cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
920
974
  _optionalChain([this, 'access', _21 => _21.config, 'access', _22 => _22.experimental, 'optionalAccess', _23 => _23.isolatedClientHydration]),
921
975
  {
922
976
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _24 => _24.config, 'access', _25 => _25.experimental, 'optionalAccess', _26 => _26.serverComponents])) === "rsc",
923
977
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
924
978
  }
925
979
  );
926
- const planOptions = _chunkHTXKSREFcjs.getFarmClientHydrationPlanOptions.call(void 0,
980
+ const planOptions = _chunkNXGQIXR7cjs.getFarmClientHydrationPlanOptions.call(void 0,
927
981
  this.config.renderer,
928
982
  Boolean(unsupportedIntegrationProvider)
929
983
  );
@@ -933,26 +987,36 @@ var RouteManager = class _RouteManager {
933
987
  if (this.sourceChangeTracking && this.editedSources && this.ownerPlans.size > 0) {
934
988
  edited = /* @__PURE__ */ new Set();
935
989
  for (const [file, previous] of _nullishCoalesce(changed, () => ( []))) {
936
- if (_chunkHTXKSREFcjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
990
+ if (_chunkNXGQIXR7cjs.isFarmClientModulePlanUnchanged.call(void 0, file, previous)) continue;
937
991
  const source = this.planSourcePath(file);
938
992
  if (source) edited.add(source);
939
993
  }
940
994
  }
941
- if (!edited) this.ownerPlans.clear();
995
+ if (!edited) {
996
+ this.ownerPlans.clear();
997
+ this.planStamps.clear();
998
+ }
999
+ const layoutPlanOptions = islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions;
942
1000
  const layoutEntries = Array.from(this.layouts.values()).map((entry) => ({
943
1001
  entry,
944
1002
  metadata: this.planRouteModule(
945
1003
  `layout:${entry.modulePath}`,
946
1004
  edited,
947
- () => _chunkHTXKSREFcjs.getClientModuleHydrationPlan.call(void 0,
1005
+ () => _chunkNXGQIXR7cjs.getClientModuleHydrationPlan.call(void 0,
1006
+ entry.modulePath,
1007
+ normalizedProjectRoot,
1008
+ isolatedMode,
1009
+ layoutPlanOptions
1010
+ ),
1011
+ _chunkNXGQIXR7cjs.getClientModuleHydrationPlanKey.call(void 0,
948
1012
  entry.modulePath,
949
1013
  normalizedProjectRoot,
950
1014
  isolatedMode,
951
- islandsMode ? { ...planOptions, serverTreeLayouts: true } : planOptions
1015
+ layoutPlanOptions
952
1016
  )
953
1017
  )
954
1018
  }));
955
- const markdownComponentsPlan = _chunkHTXKSREFcjs.createMarkdownPageHydrationPlanner.call(void 0,
1019
+ const markdownComponentsPlan = _chunkNXGQIXR7cjs.createMarkdownPageHydrationPlanner.call(void 0,
956
1020
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx), normalizedProjectRoot),
957
1021
  normalizedProjectRoot,
958
1022
  isolatedMode,
@@ -962,51 +1026,60 @@ var RouteManager = class _RouteManager {
962
1026
  const markdownPagePlan = () => ({
963
1027
  ..._nullishCoalesce(markdownPlan, () => ( (markdownPlan = this.planRouteModule("markdown", edited, markdownComponentsPlan))))
964
1028
  });
1029
+ const pagePlanOptions = { ...planOptions, serverOwners: islandsMode };
965
1030
  const routeEntries = Array.from(this.routes.values()).map((entry) => ({
966
1031
  entry,
967
- metadata: _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
1032
+ metadata: _chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? markdownPagePlan() : this.planRouteModule(
968
1033
  `page:${entry.modulePath}`,
969
1034
  edited,
970
- () => _chunkHTXKSREFcjs.getClientModuleHydrationPlan.call(void 0, entry.modulePath, normalizedProjectRoot, isolatedMode, {
971
- ...planOptions,
972
- serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _33 => _33.config, 'access', _34 => _34.experimental, 'optionalAccess', _35 => _35.serverComponents])) === "islands"
973
- })
1035
+ () => _chunkNXGQIXR7cjs.getClientModuleHydrationPlan.call(void 0,
1036
+ entry.modulePath,
1037
+ normalizedProjectRoot,
1038
+ isolatedMode,
1039
+ pagePlanOptions
1040
+ ),
1041
+ _chunkNXGQIXR7cjs.getClientModuleHydrationPlanKey.call(void 0,
1042
+ entry.modulePath,
1043
+ normalizedProjectRoot,
1044
+ isolatedMode,
1045
+ pagePlanOptions
1046
+ )
974
1047
  )
975
1048
  }));
976
1049
  const markdownFallback = routeEntries.find(
977
- ({ entry, metadata }) => _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
1050
+ ({ entry, metadata }) => _chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.fallbackReason
978
1051
  );
979
1052
  if (markdownFallback) {
980
1053
  _chunkQMNWKQL4cjs.logger.warn(
981
1054
  `[Farm.js] client components in Markdown pages stay static: ${markdownFallback.metadata.fallbackReason}.`
982
1055
  );
983
1056
  }
984
- const markdownStaticPackages = _optionalChain([routeEntries, 'access', _36 => _36.find, 'call', _37 => _37(
985
- ({ entry, metadata }) => _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
986
- ), 'optionalAccess', _38 => _38.metadata, 'access', _39 => _39.staticPackageBoundaries]);
1057
+ const markdownStaticPackages = _optionalChain([routeEntries, 'access', _33 => _33.find, 'call', _34 => _34(
1058
+ ({ entry, metadata }) => _chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) && metadata.staticPackageBoundaries
1059
+ ), 'optionalAccess', _35 => _35.metadata, 'access', _36 => _36.staticPackageBoundaries]);
987
1060
  if (markdownStaticPackages) {
988
1061
  _chunkQMNWKQL4cjs.logger.info(
989
1062
  `[Farm.js] Markdown pages render client components from ${markdownStaticPackages.join(", ")} as static HTML: package client components cannot be isolated yet.`
990
1063
  );
991
1064
  }
992
1065
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
993
- if (_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
1066
+ if (_chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) || !metadata.staticPackageBoundaries) continue;
994
1067
  _chunkQMNWKQL4cjs.logger.info(
995
1068
  `[Farm.js] ${entry.pattern} renders client components from ${metadata.staticPackageBoundaries.join(", ")} as static HTML: package client components cannot be isolated yet.`
996
1069
  );
997
1070
  }
998
- _chunkHTXKSREFcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
1071
+ _chunkNXGQIXR7cjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
999
1072
  layoutEntries.map(({ entry, metadata }) => ({
1000
1073
  pattern: entry.pattern,
1001
- depth: _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1074
+ depth: _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, entry.pattern),
1002
1075
  metadata
1003
1076
  })),
1004
1077
  routeEntries.map(({ entry, metadata }) => ({
1005
1078
  pattern: getRouteEntryDirectory(entry),
1006
- depth: _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1079
+ depth: _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, getRouteEntryDirectory(entry)),
1007
1080
  metadata
1008
1081
  })),
1009
- _chunkPXAHSCR6cjs.routeBoundaryCoversDirectory,
1082
+ _chunkO2A6HE76cjs.routeBoundaryCoversDirectory,
1010
1083
  { serverOwners: islandsMode }
1011
1084
  );
1012
1085
  for (const { entry, metadata } of [...layoutEntries, ...routeEntries]) {
@@ -1026,7 +1099,7 @@ var RouteManager = class _RouteManager {
1026
1099
  const routes = routeEntries.map(({ entry, metadata }) => {
1027
1100
  const programmaticPage = this.programmaticPages.get(entry.modulePath);
1028
1101
  const layoutShouldHydrate = layoutEntries.some(
1029
- ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkPXAHSCR6cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1102
+ ({ entry: layout, metadata: layoutMetadata }) => layoutMetadata.shouldHydrate && _chunkO2A6HE76cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, getRouteEntryDirectory(entry))
1030
1103
  );
1031
1104
  return {
1032
1105
  pattern: entry.pattern,
@@ -1042,15 +1115,15 @@ var RouteManager = class _RouteManager {
1042
1115
  modulePath: toUrlPath(boundary.modulePath)
1043
1116
  }))
1044
1117
  } : {},
1045
- ..._chunkHTXKSREFcjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1046
- renderPlan: _chunkPXAHSCR6cjs.createFarmRouteRenderPlan.call(void 0, {
1118
+ ..._chunkNXGQIXR7cjs.usesFarmServerTree.call(void 0, metadata) ? { serverTree: true } : {},
1119
+ renderPlan: _chunkO2A6HE76cjs.createFarmRouteRenderPlan.call(void 0, {
1047
1120
  pageShouldHydrate: metadata.shouldHydrate,
1048
1121
  layoutShouldHydrate,
1049
1122
  islandStrategy: metadata.islandStrategy
1050
1123
  }),
1051
1124
  suppressedAsyncHydration: metadata.suppressedAsyncHydration,
1052
1125
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {},
1053
- search: _chunkE7QOEV5Zcjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _40 => _40.search])),
1126
+ search: _chunkE7QOEV5Zcjs.getProgrammaticRouteSearchClientOptions.call(void 0, _optionalChain([programmaticPage, 'optionalAccess', _37 => _37.search])),
1054
1127
  segments: entry.route.segments.map((seg) => ({
1055
1128
  segment: seg.segment,
1056
1129
  isDynamic: seg.isDynamic,
@@ -1059,7 +1132,7 @@ var RouteManager = class _RouteManager {
1059
1132
  }))
1060
1133
  };
1061
1134
  });
1062
- const treeLayoutPatterns = islandsMode ? _chunkPXAHSCR6cjs.getFarmServerTreeLayoutPatterns.call(void 0,
1135
+ const treeLayoutPatterns = islandsMode ? _chunkO2A6HE76cjs.getFarmServerTreeLayoutPatterns.call(void 0,
1063
1136
  layoutEntries.map(({ entry, metadata }) => ({
1064
1137
  pattern: entry.pattern,
1065
1138
  shouldHydrate: metadata.shouldHydrate,
@@ -1084,7 +1157,7 @@ var RouteManager = class _RouteManager {
1084
1157
  ...metadata.suppressedAsyncHydration && metadata.fallbackReason ? { suppressedAsyncHydrationReason: metadata.fallbackReason } : {}
1085
1158
  }));
1086
1159
  const slots = Array.from(this.routeSlots.values()).map((entry) => {
1087
- const metadata = _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1160
+ const metadata = _chunkNXGQIXR7cjs.getClientModuleMetadata.call(void 0, entry.modulePath, normalizedProjectRoot);
1088
1161
  return {
1089
1162
  name: entry.name,
1090
1163
  ownerPattern: entry.ownerPattern,
@@ -1100,7 +1173,7 @@ var RouteManager = class _RouteManager {
1100
1173
  };
1101
1174
  });
1102
1175
  const slotPlans = islandsMode ? Array.from(this.routeSlots.values()).map((entry) => ({
1103
- metadata: _chunkHTXKSREFcjs.getClientModuleHydrationPlan.call(void 0,
1176
+ metadata: _chunkNXGQIXR7cjs.getClientModuleHydrationPlan.call(void 0,
1104
1177
  entry.modulePath,
1105
1178
  normalizedProjectRoot,
1106
1179
  isolatedMode,
@@ -1165,7 +1238,7 @@ var RouteManager = class _RouteManager {
1165
1238
  getIsolatedClientBoundaryModules(projectRoot = this.config.root) {
1166
1239
  const normalizedProjectRoot = path3.default.resolve(projectRoot);
1167
1240
  this.generateClientManifest(normalizedProjectRoot);
1168
- return _nullishCoalesce(_optionalChain([this, 'access', _41 => _41.clientManifestCache, 'optionalAccess', _42 => _42.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
1241
+ return _nullishCoalesce(_optionalChain([this, 'access', _38 => _38.clientManifestCache, 'optionalAccess', _39 => _39.isolatedClientBoundaryModules]), () => ( /* @__PURE__ */ new Set()));
1169
1242
  }
1170
1243
  /**
1171
1244
  * @internal Islands-mode pages with a client component that cannot become an island. Hydrating
@@ -1173,7 +1246,7 @@ var RouteManager = class _RouteManager {
1173
1246
  */
1174
1247
  getIslandsErrors(projectRoot = this.config.root) {
1175
1248
  this.generateClientManifest(path3.default.resolve(projectRoot));
1176
- return _nullishCoalesce(_optionalChain([this, 'access', _43 => _43.clientManifestCache, 'optionalAccess', _44 => _44.islandsErrors]), () => ( []));
1249
+ return _nullishCoalesce(_optionalChain([this, 'access', _40 => _40.clientManifestCache, 'optionalAccess', _41 => _41.islandsErrors]), () => ( []));
1177
1250
  }
1178
1251
  /**
1179
1252
  * Invalidate build-time route metadata after a page or layout changes in dev.
@@ -1192,12 +1265,12 @@ var RouteManager = class _RouteManager {
1192
1265
  const { createRouteModuleFromProgrammaticPage } = await import("./routes.cjs");
1193
1266
  return createRouteModuleFromProgrammaticPage(programmaticPage, this.rendererRuntime);
1194
1267
  }
1195
- if (_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
1268
+ if (_chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, modulePath)) {
1196
1269
  const mdxConfig = _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, this.config.mdx);
1197
1270
  const viteServer = this.viteServer;
1198
- return await _chunkGPO3LJDJcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
1271
+ return await _chunkIJFNXP3Dcjs.createFarmMarkdownRouteModuleFromFile.call(void 0, modulePath, {
1199
1272
  // Loaded on render: the route runtime manifest only reads metadata and rendering config.
1200
- components: () => _chunkGPO3LJDJcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
1273
+ components: () => _chunkIJFNXP3Dcjs.loadFarmMdxComponents.call(void 0, mdxConfig, {
1201
1274
  root: this.config.root,
1202
1275
  loadModule: viteServer ? (componentModulePath) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, viteServer, componentModulePath) : void 0
1203
1276
  }),
@@ -1249,7 +1322,7 @@ var RouteManager = class _RouteManager {
1249
1322
  */
1250
1323
  createRoutePattern(route) {
1251
1324
  if (route.segments.length === 0) return "/";
1252
- return "/" + route.segments.map(_chunkPXAHSCR6cjs.formatRouteSegment).join("/");
1325
+ return "/" + route.segments.map(_chunkO2A6HE76cjs.formatRouteSegment).join("/");
1253
1326
  }
1254
1327
  registerPageRoute(entry) {
1255
1328
  _chunkYTVSWXEZcjs.assertUniqueRouteParameters.call(void 0, entry.pattern);
@@ -1300,8 +1373,8 @@ var RouteManager = class _RouteManager {
1300
1373
  }
1301
1374
  }
1302
1375
  for (const [pattern, group] of canonicalPageGroups) {
1303
- const componentFiles = group.files.filter((file) => !_chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, file));
1304
- const markdownFiles = group.files.filter(_chunkLGR7565Lcjs.isFarmMarkdownPageFile);
1376
+ const componentFiles = group.files.filter((file) => !_chunkVZKCGHWCcjs.isFarmMarkdownPageFile.call(void 0, file));
1377
+ const markdownFiles = group.files.filter(_chunkVZKCGHWCcjs.isFarmMarkdownPageFile);
1305
1378
  if (componentFiles.length > 1) {
1306
1379
  throw new Error(
1307
1380
  `Duplicate page route "${pattern}". Found ${componentFiles.map((file) => path3.default.join(appDir, file)).join(" and ")}.`
@@ -1318,7 +1391,7 @@ var RouteManager = class _RouteManager {
1318
1391
  if (!primaryFile) continue;
1319
1392
  const modulePath = path3.default.join(appDir, primaryFile);
1320
1393
  const existing = this.routes.get(pattern);
1321
- if (_optionalChain([existing, 'optionalAccess', _45 => _45.sourceRoot]) === source.root) {
1394
+ if (_optionalChain([existing, 'optionalAccess', _42 => _42.sourceRoot]) === source.root) {
1322
1395
  throw new Error(
1323
1396
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1324
1397
  );
@@ -1343,9 +1416,9 @@ var RouteManager = class _RouteManager {
1343
1416
  for (const file of files) {
1344
1417
  const route = _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, file);
1345
1418
  const modulePath = path3.default.join(appDir, file);
1346
- const pattern = _chunkPXAHSCR6cjs.createRouteDirectoryPattern.call(void 0, route);
1419
+ const pattern = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, route);
1347
1420
  const existing = target.get(pattern);
1348
- if (_optionalChain([existing, 'optionalAccess', _46 => _46.sourceRoot]) === source.root) {
1421
+ if (_optionalChain([existing, 'optionalAccess', _43 => _43.sourceRoot]) === source.root) {
1349
1422
  throw new Error(
1350
1423
  `Duplicate ${kind} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1351
1424
  );
@@ -1365,10 +1438,10 @@ var RouteManager = class _RouteManager {
1365
1438
  const modulePath = path3.default.join(appDir, file);
1366
1439
  const pattern = this.createRoutePattern(slot.route);
1367
1440
  const ownerPattern = this.createRoutePattern(slot.ownerRoute);
1368
- const ownerDirectory = _chunkPXAHSCR6cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1441
+ const ownerDirectory = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, slot.ownerRoute);
1369
1442
  const key = `${ownerPattern}:${slot.name}:${slot.interception ? "intercept" : "slot"}:${slot.fallback ? "default" : pattern}`;
1370
1443
  const existing = this.routeSlots.get(key);
1371
- if (_optionalChain([existing, 'optionalAccess', _47 => _47.sourceRoot]) === source.root) {
1444
+ if (_optionalChain([existing, 'optionalAccess', _44 => _44.sourceRoot]) === source.root) {
1372
1445
  throw new Error(
1373
1446
  `Duplicate route slot "${slot.name}" for "${pattern}". Found both ${existing.modulePath} and ${modulePath}.`
1374
1447
  );
@@ -1397,7 +1470,7 @@ var RouteManager = class _RouteManager {
1397
1470
  const key = `${kind}:${pattern}`;
1398
1471
  const existing = this.metadataImages.get(key);
1399
1472
  const sourceType = isStaticMetadataImageFile(file) ? "static" : "module";
1400
- if (_optionalChain([existing, 'optionalAccess', _48 => _48.sourceRoot]) === source.root) {
1473
+ if (_optionalChain([existing, 'optionalAccess', _45 => _45.sourceRoot]) === source.root) {
1401
1474
  throw new Error(
1402
1475
  `Duplicate ${fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one static image or module per route segment.`
1403
1476
  );
@@ -1425,7 +1498,7 @@ var RouteManager = class _RouteManager {
1425
1498
  const pattern = this.createRoutePattern(route);
1426
1499
  const key = `${descriptor.kind}:${pattern}`;
1427
1500
  const existing = this.metadataRoutes.get(key);
1428
- if (_optionalChain([existing, 'optionalAccess', _49 => _49.sourceRoot]) === source.root) {
1501
+ if (_optionalChain([existing, 'optionalAccess', _46 => _46.sourceRoot]) === source.root) {
1429
1502
  throw new Error(
1430
1503
  `Duplicate ${descriptor.fileName} route "${pattern}". Found both ${existing.modulePath} and ${modulePath}. Keep only one .ts or .js metadata route per segment.`
1431
1504
  );
@@ -1442,16 +1515,16 @@ var RouteManager = class _RouteManager {
1442
1515
  }
1443
1516
  async discoverProgrammaticRoutes(source, clientRoutes) {
1444
1517
  if (this.viteServer) _chunkE7QOEV5Zcjs.trackProgrammaticRouteSources.call(void 0, );
1445
- const manifests = await _chunkQEJWNXRIcjs.loadProgrammaticRouteManifests.call(void 0, {
1518
+ const manifests = await _chunkEMRYJG4Ucjs.loadProgrammaticRouteManifests.call(void 0, {
1446
1519
  root: source.root,
1447
1520
  srcDir: source.srcDir,
1448
1521
  loadModule: (filePath) => this.loadProgrammaticRoutesModule(filePath)
1449
1522
  });
1450
- const graph = this.viteServer ? _chunkHTXKSREFcjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1523
+ const graph = this.viteServer ? _chunkNXGQIXR7cjs.createEvaluatedRouteGraph.call(void 0, this.viteServer) : void 0;
1451
1524
  for (const { filePath, manifest } of manifests) {
1452
1525
  if (graph) {
1453
1526
  clientRoutes.push(
1454
- _chunkHTXKSREFcjs.resolveProgrammaticClientRoutes.call(void 0, {
1527
+ _chunkNXGQIXR7cjs.resolveProgrammaticClientRoutes.call(void 0, {
1455
1528
  graph,
1456
1529
  routesFile: toRealPath(filePath),
1457
1530
  routes: manifest.routes,
@@ -1464,7 +1537,7 @@ var RouteManager = class _RouteManager {
1464
1537
  const route = _chunkE7QOEV5Zcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "page");
1465
1538
  const pattern = this.createRoutePattern(route);
1466
1539
  const existing = this.routes.get(pattern);
1467
- if (_optionalChain([existing, 'optionalAccess', _50 => _50.sourceRoot]) === source.root) {
1540
+ if (_optionalChain([existing, 'optionalAccess', _47 => _47.sourceRoot]) === source.root) {
1468
1541
  throw new Error(
1469
1542
  `Duplicate page route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1470
1543
  );
@@ -1482,9 +1555,9 @@ var RouteManager = class _RouteManager {
1482
1555
  }
1483
1556
  if (definition.kind === "layout") {
1484
1557
  const route = _chunkE7QOEV5Zcjs.parseProgrammaticRoutePath.call(void 0, definition.path, "layout");
1485
- const pattern = _chunkPXAHSCR6cjs.createRouteDirectoryPattern.call(void 0, route);
1558
+ const pattern = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, route);
1486
1559
  const existing = this.layouts.get(pattern);
1487
- if (_optionalChain([existing, 'optionalAccess', _51 => _51.sourceRoot]) === source.root) {
1560
+ if (_optionalChain([existing, 'optionalAccess', _48 => _48.sourceRoot]) === source.root) {
1488
1561
  throw new Error(
1489
1562
  `Duplicate layout route "${pattern}". Found both ${existing.modulePath} and programmatic route in ${filePath}.`
1490
1563
  );
@@ -1513,7 +1586,7 @@ var RouteManager = class _RouteManager {
1513
1586
  }
1514
1587
  async loadProgrammaticRoutesModule(filePath) {
1515
1588
  if (this.viteServer) {
1516
- const viteRoot = _optionalChain([this, 'access', _52 => _52.viteServer, 'access', _53 => _53.config, 'optionalAccess', _54 => _54.root]) || this.config.root || process.cwd();
1589
+ const viteRoot = _optionalChain([this, 'access', _49 => _49.viteServer, 'access', _50 => _50.config, 'optionalAccess', _51 => _51.root]) || this.config.root || process.cwd();
1517
1590
  return await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, filePath, viteRoot));
1518
1591
  }
1519
1592
  return await import(
@@ -1529,7 +1602,7 @@ var RouteManager = class _RouteManager {
1529
1602
  const matchingLayouts = [];
1530
1603
  for (const { entry, groupScope } of this.orderedLayouts) {
1531
1604
  if (!_chunkQMNWKQL4cjs.matchRoutePrefixParts.call(void 0, pathnameParts, entry.route.segments)) continue;
1532
- if (groupScope !== null && !_chunkPXAHSCR6cjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1605
+ if (groupScope !== null && !_chunkO2A6HE76cjs.isInRouteGroupScope.call(void 0, route && getRouteEntryDirectory(route), groupScope)) {
1533
1606
  continue;
1534
1607
  }
1535
1608
  matchingLayouts.push(entry);
@@ -1610,14 +1683,14 @@ var RouteManager = class _RouteManager {
1610
1683
  let page = route;
1611
1684
  for (const boundaryEntry of boundaries.values()) {
1612
1685
  if (!_chunkQMNWKQL4cjs.matchRoutePrefix.call(void 0, normalizedPath, boundaryEntry.route.segments)) continue;
1613
- const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1686
+ const groupScope = _chunkO2A6HE76cjs.getRouteGroupScope.call(void 0, boundaryEntry.pattern);
1614
1687
  if (groupScope !== null) {
1615
1688
  if (page === void 0) page = this.matchPageRoute(_chunkQMNWKQL4cjs.splitRoutePath.call(void 0, normalizedPath));
1616
- if (!_chunkPXAHSCR6cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1689
+ if (!_chunkO2A6HE76cjs.isInRouteGroupScope.call(void 0, page && getRouteEntryDirectory(page), groupScope)) continue;
1617
1690
  }
1618
1691
  const depth = boundaryEntry.route.segments.length;
1619
- const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _55 => _55.route, 'access', _56 => _56.segments, 'access', _57 => _57.length]), () => ( -1));
1620
- if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkPXAHSCR6cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1692
+ const bestDepth = _nullishCoalesce(_optionalChain([bestMatch, 'optionalAccess', _52 => _52.route, 'access', _53 => _53.segments, 'access', _54 => _54.length]), () => ( -1));
1693
+ if (!bestMatch || depth > bestDepth || depth === bestDepth && _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, boundaryEntry.pattern) > _chunkO2A6HE76cjs.getRouteDirectoryDepth.call(void 0, bestMatch.pattern)) {
1621
1694
  bestMatch = boundaryEntry;
1622
1695
  }
1623
1696
  }
@@ -1667,7 +1740,7 @@ var RouteManager = class _RouteManager {
1667
1740
  }));
1668
1741
  const i18n = this.getI18nConfig();
1669
1742
  const docsAdapterRoutes = this.getDocsAdapterRoutes();
1670
- const result = await _chunkCLEWORVYcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1743
+ const result = await _chunkACAEFEOHcjs.collectSSGPages.call(void 0, routes, (filePath) => this.loadRouteModule(filePath), {
1671
1744
  suggestStaticRendering: shouldSuggestStaticRenderingForI18n(i18n),
1672
1745
  ...docsAdapterRoutes ? { docsAdapterRoutes } : {}
1673
1746
  });
@@ -1714,7 +1787,7 @@ var RouteManager = class _RouteManager {
1714
1787
  async isRouteSSG(modulePath) {
1715
1788
  try {
1716
1789
  const mod = await this.loadRouteModule(modulePath);
1717
- const rendering = await _chunkCLEWORVYcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1790
+ const rendering = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1718
1791
  return rendering.ssg;
1719
1792
  } catch (e2) {
1720
1793
  return false;
@@ -1726,7 +1799,7 @@ var RouteManager = class _RouteManager {
1726
1799
  async hasRouteISR(modulePath) {
1727
1800
  try {
1728
1801
  const mod = await this.loadRouteModule(modulePath);
1729
- const rendering = await _chunkCLEWORVYcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1802
+ const rendering = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1730
1803
  return rendering.ssg && typeof rendering.revalidate === "number" && rendering.revalidate > 0;
1731
1804
  } catch (e3) {
1732
1805
  return false;
@@ -1738,7 +1811,7 @@ var RouteManager = class _RouteManager {
1738
1811
  async getRouteRevalidateInterval(modulePath) {
1739
1812
  try {
1740
1813
  const mod = await this.loadRouteModule(modulePath);
1741
- const rendering = await _chunkCLEWORVYcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1814
+ const rendering = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0, mod, modulePath);
1742
1815
  return rendering.revalidate;
1743
1816
  } catch (e4) {
1744
1817
  return void 0;
@@ -1746,7 +1819,7 @@ var RouteManager = class _RouteManager {
1746
1819
  }
1747
1820
  };
1748
1821
  function getPageDirectoryField(route, pattern) {
1749
- const directory = _chunkPXAHSCR6cjs.createRouteDirectoryPattern.call(void 0, route);
1822
+ const directory = _chunkO2A6HE76cjs.createRouteDirectoryPattern.call(void 0, route);
1750
1823
  return directory === pattern ? {} : { directory };
1751
1824
  }
1752
1825
  function interpolateRedirectDestination(destination, params, catchAllSegments = {}) {
@@ -1870,11 +1943,11 @@ function createFarmDevClientManifest(manifest, options) {
1870
1943
  }
1871
1944
  for (const layout of manifest.layouts) {
1872
1945
  if (layoutPatterns && !layoutPatterns.has(layout.pattern)) continue;
1873
- const groupScope = _chunkPXAHSCR6cjs.getRouteGroupScope.call(void 0, layout.pattern);
1946
+ const groupScope = _chunkO2A6HE76cjs.getRouteGroupScope.call(void 0, layout.pattern);
1874
1947
  clientManifest.layouts[layout.pattern] = {
1875
1948
  modulePath: layout.modulePath,
1876
1949
  pattern: layout.pattern,
1877
- ...groupScope ? { urlPattern: _chunkPXAHSCR6cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
1950
+ ...groupScope ? { urlPattern: _chunkO2A6HE76cjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
1878
1951
  shouldHydrate: layout.shouldHydrate,
1879
1952
  islandStrategy: layout.islandStrategy,
1880
1953
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -1977,7 +2050,7 @@ function farmFontImportsPlugin(options = {}) {
1977
2050
  return;
1978
2051
  }
1979
2052
  const resource = registry.getDevResource(pathname);
1980
- if (!_optionalChain([resource, 'optionalAccess', _58 => _58.bytes])) {
2053
+ if (!_optionalChain([resource, 'optionalAccess', _55 => _55.bytes])) {
1981
2054
  next();
1982
2055
  return;
1983
2056
  }
@@ -2495,7 +2568,7 @@ function readFontOptions(code, id, call) {
2495
2568
  const declaration = call.ancestors.at(-2);
2496
2569
  const statement = call.ancestors.at(-3);
2497
2570
  const statementParent = call.ancestors.at(-4);
2498
- const isModuleScope = _optionalChain([declaration, 'optionalAccess', _59 => _59.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _60 => _60.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _61 => _61.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _62 => _62.type]) === "Program");
2571
+ const isModuleScope = _optionalChain([declaration, 'optionalAccess', _56 => _56.type]) === "VariableDeclaration" && (_optionalChain([statement, 'optionalAccess', _57 => _57.type]) === "Program" || _optionalChain([statement, 'optionalAccess', _58 => _58.type]) === "ExportNamedDeclaration" && _optionalChain([statementParent, 'optionalAccess', _59 => _59.type]) === "Program");
2499
2572
  if (!isModuleScope || call.ancestors.some((ancestor) => isFunctionNode(ancestor))) {
2500
2573
  throw fontError(id, `${call.kind}() must be declared directly at module scope`);
2501
2574
  }
@@ -2931,7 +3004,7 @@ function generateFarmIntegrationProviderClientCode(providers, root, rendererComp
2931
3004
  let hasClerkProvider = false;
2932
3005
  renderedProviders.forEach((provider, index) => {
2933
3006
  let componentExpression = "null";
2934
- if (_chunkJX5VOLAVcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
3007
+ if (_chunk65OS2TOTcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
2935
3008
  const namespace = `FarmIntegrationProviderModule${index}`;
2936
3009
  imports.push(
2937
3010
  `import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
@@ -2988,7 +3061,7 @@ function generateFarmIntegrationProviderServerModules(providers, root, rendererC
2988
3061
  const entries = [];
2989
3062
  let needsMarkHelper = false;
2990
3063
  providers.forEach((provider, index) => {
2991
- if (!_chunkJX5VOLAVcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
3064
+ if (!_chunk65OS2TOTcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) return;
2992
3065
  const namespace = `FarmServerIntegrationProviderModule${index}`;
2993
3066
  imports.push(
2994
3067
  `import * as ${namespace} from ${JSON.stringify(resolveProviderModule(provider.component.module, root))};`
@@ -3056,7 +3129,7 @@ function inferFarmIslandStrategy(filePath, root) {
3056
3129
  const result = _compiler.inferStrategy.call(void 0, file, code, {
3057
3130
  parse: parseFarmIslandSource,
3058
3131
  resolve: (specifier, importer) => {
3059
- const resolved = _chunkHTXKSREFcjs.resolveImportedModule.call(void 0, importer, specifier, root);
3132
+ const resolved = _chunkNXGQIXR7cjs.resolveImportedModule.call(void 0, importer, specifier, root);
3060
3133
  return resolved.local ? resolved.path : null;
3061
3134
  }
3062
3135
  });
@@ -3076,7 +3149,7 @@ function inferFarmRouteRootStrategy(owners, root) {
3076
3149
  if (cached && cached.stamps.every(([read2, stamp]) => modifiedAt(read2) === stamp)) {
3077
3150
  return cached.result;
3078
3151
  }
3079
- const { result, files } = _chunkHTXKSREFcjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3152
+ const { result, files } = _chunkNXGQIXR7cjs.traceFarmSourceReads.call(void 0, () => inferRouteRoot(owners, root));
3080
3153
  const read = new Set([...files, ...result.files].filter((file) => !isInstalledPackageFile(file)));
3081
3154
  routeRootInferences.set(key, {
3082
3155
  stamps: [...read].map((file) => [file, modifiedAt(file)]),
@@ -3084,14 +3157,16 @@ function inferFarmRouteRootStrategy(owners, root) {
3084
3157
  });
3085
3158
  return result;
3086
3159
  }
3160
+ var NODE_MODULES = "node_modules";
3161
+ var NODE_MODULES_SEGMENT2 = `${path3.default.sep}${NODE_MODULES}${path3.default.sep}`;
3087
3162
  function isInstalledPackageFile(file) {
3088
- return file.split(path3.default.sep).includes("node_modules");
3163
+ return file.includes(NODE_MODULES_SEGMENT2) || file.startsWith(`${NODE_MODULES}${path3.default.sep}`) || file.endsWith(`${path3.default.sep}${NODE_MODULES}`) || file === NODE_MODULES;
3089
3164
  }
3090
3165
  function inferRouteRoot(owners, root) {
3091
3166
  const files = [];
3092
3167
  const modules = [];
3093
3168
  for (const owner of owners) {
3094
- const rendered = _chunkHTXKSREFcjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3169
+ const rendered = _chunkNXGQIXR7cjs.collectFarmRenderedClientModules.call(void 0, owner, root);
3095
3170
  if (!rendered) {
3096
3171
  return {
3097
3172
  strategy: null,
@@ -3107,7 +3182,7 @@ function inferRouteRoot(owners, root) {
3107
3182
  source = fs.default.readFileSync(module, "utf8");
3108
3183
  } catch (e11) {
3109
3184
  }
3110
- if (_chunkHTXKSREFcjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3185
+ if (_chunkNXGQIXR7cjs.getIslandStrategyExport.call(void 0, source) !== null) return { strategy: null, files, declared: true };
3111
3186
  }
3112
3187
  for (const module of modules) {
3113
3188
  const result = inferFarmIslandStrategy(module, root);
@@ -3119,7 +3194,7 @@ function inferRouteRoot(owners, root) {
3119
3194
  function resolveFarmRouteRootStrategy(route, page, layouts, root, islandsMode) {
3120
3195
  const directory = _nullishCoalesce(route.directory, () => ( route.pattern));
3121
3196
  const onRoute = layouts.filter(
3122
- (layout) => _chunkPXAHSCR6cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3197
+ (layout) => _chunkO2A6HE76cjs.routeBoundaryCoversDirectory.call(void 0, layout.pattern, directory)
3123
3198
  );
3124
3199
  const declared = [
3125
3200
  ...page.islandStrategy ? [page.islandStrategy] : [],
@@ -3152,7 +3227,7 @@ var _stream = require('stream');
3152
3227
 
3153
3228
  function resolveFarmNotFoundComponentPath(config, appDirs) {
3154
3229
  const extensions = _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer);
3155
- const configuredPath = _optionalChain([config, 'access', _63 => _63.notFound, 'optionalAccess', _64 => _64.component, 'optionalAccess', _65 => _65.trim, 'call', _66 => _66()]);
3230
+ const configuredPath = _optionalChain([config, 'access', _60 => _60.notFound, 'optionalAccess', _61 => _61.component, 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]);
3156
3231
  if (configuredPath) {
3157
3232
  const componentPath = path3.default.isAbsolute(configuredPath) ? path3.default.normalize(configuredPath) : path3.default.resolve(config.root, configuredPath);
3158
3233
  if (!extensions.some((extension) => componentPath.endsWith(extension))) {
@@ -3190,11 +3265,11 @@ function getFarmLayoutKey(pattern, params) {
3190
3265
  );
3191
3266
  }
3192
3267
  function countFarmKeptLayouts(layoutsHeader, layouts, params) {
3193
- const chain = _chunkPXAHSCR6cjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3268
+ const chain = _chunkO2A6HE76cjs.parseFarmLayoutChainHeader.call(void 0, _nullishCoalesce(layoutsHeader, () => ( null)));
3194
3269
  if (chain.length === 0) return 0;
3195
3270
  const keys = layouts.map((layout) => getFarmLayoutKey(layout.pattern, params));
3196
- if (chain[0] === keys[0]) return _chunkPXAHSCR6cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
3197
- return keys.length > 1 ? 1 + _chunkPXAHSCR6cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
3271
+ if (chain[0] === keys[0]) return _chunkO2A6HE76cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys);
3272
+ return keys.length > 1 ? 1 + _chunkO2A6HE76cjs.getSharedLayoutPrefixLength.call(void 0, chain, keys.slice(1)) : 0;
3198
3273
  }
3199
3274
  function createFarmFlushToken() {
3200
3275
  const bytes = new Uint8Array(16);
@@ -3449,7 +3524,7 @@ function createDefaultErrorDiagnostics(error, root) {
3449
3524
  function canBootFarmIslandsClient(config) {
3450
3525
  const docs = config.docs;
3451
3526
  const docsEnabled = docs === true || typeof docs === "object" && docs !== null && docs.enabled !== false;
3452
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _67 => _67.experimental, 'optionalAccess', _68 => _68.serverComponents])) === "islands" && !docsEnabled && _chunkDMXMIE2Ccjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkDMXMIE2Ccjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3527
+ return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _64 => _64.experimental, 'optionalAccess', _65 => _65.serverComponents])) === "islands" && !docsEnabled && _chunkENYBDM4Ucjs.resolveFarmClientPlugins.call(void 0, config.plugins, config.root).length === 0 && !_chunkENYBDM4Ucjs.resolveFarmAppClientEntry.call(void 0, config.root, config.srcDir || "src");
3453
3528
  }
3454
3529
 
3455
3530
  // src/server/renderer.ts
@@ -3528,7 +3603,7 @@ var warnedSuppressedAsyncHydrationModules = /* @__PURE__ */ new Set();
3528
3603
  function warnSuppressedAsyncHydrationOnce(modulePath, reason) {
3529
3604
  if (warnedSuppressedAsyncHydrationModules.has(modulePath)) return;
3530
3605
  warnedSuppressedAsyncHydrationModules.add(modulePath);
3531
- _chunkQMNWKQL4cjs.logger.warn(_chunkHTXKSREFcjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3606
+ _chunkQMNWKQL4cjs.logger.warn(_chunkNXGQIXR7cjs.describeSuppressedAsyncHydration.call(void 0, modulePath, reason));
3532
3607
  }
3533
3608
  var fullDocumentRoutes = /* @__PURE__ */ new Set();
3534
3609
  var documentLayouts = /* @__PURE__ */ new WeakMap();
@@ -3565,7 +3640,7 @@ function appendResponseHeader(res, name, value) {
3565
3640
  }
3566
3641
  }
3567
3642
  function requestHeader(req, name) {
3568
- const value = _optionalChain([req, 'access', _69 => _69.headers, 'optionalAccess', _70 => _70[name]]);
3643
+ const value = _optionalChain([req, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67[name]]);
3569
3644
  return Array.isArray(value) ? value[0] : value;
3570
3645
  }
3571
3646
  function appendResponseVary(res, value) {
@@ -3579,7 +3654,7 @@ function appendResponseVary(res, value) {
3579
3654
  function renderI18nAlternateLinks(requestPath, snapshot, options) {
3580
3655
  if (snapshot.routing === "none") return "";
3581
3656
  const url = new URL(requestPath, "http://farm.local");
3582
- return _chunkPXAHSCR6cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
3657
+ return _chunkO2A6HE76cjs.renderFarmLocaleAlternateLinks.call(void 0, url.pathname, snapshot, options);
3583
3658
  }
3584
3659
  var PPR_REFRESH_MAX_ATTEMPTS = 3;
3585
3660
  function createPPRRefreshScript() {
@@ -3674,12 +3749,12 @@ async function parseRouteModuleProps(routeModule, input) {
3674
3749
  }
3675
3750
  const schemas = routeModule.__farmRouteSchemas;
3676
3751
  const params = parseRouteModuleSchema(
3677
- _optionalChain([schemas, 'optionalAccess', _71 => _71.params]),
3752
+ _optionalChain([schemas, 'optionalAccess', _68 => _68.params]),
3678
3753
  input.props.params,
3679
3754
  "params",
3680
3755
  input.routePath
3681
3756
  );
3682
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _72 => _72.search]), input.search, "search", input.routePath);
3757
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _69 => _69.search]), input.search, "search", input.routePath);
3683
3758
  return {
3684
3759
  ...input.props,
3685
3760
  params,
@@ -3720,7 +3795,7 @@ function readAppPackageIdentity(root) {
3720
3795
  var ServerRenderer = class {
3721
3796
  constructor(config, routeManager, i18nRuntime, viteServer) {
3722
3797
  this.ssgManifest = [];
3723
- this.dataCache = _chunkDMAP4RNDcjs.getFarmDataCache.call(void 0, );
3798
+ this.dataCache = _chunk3OMLZLDEcjs.getFarmDataCache.call(void 0, );
3724
3799
  this.config = config;
3725
3800
  this.routeManager = routeManager;
3726
3801
  this.i18nRuntime = i18nRuntime;
@@ -3737,7 +3812,7 @@ var ServerRenderer = class {
3737
3812
  } else {
3738
3813
  _chunkXGJVRPYLcjs.uninstallFarmIslandValues.call(void 0, );
3739
3814
  }
3740
- if (_optionalChain([this, 'access', _73 => _73.config, 'access', _74 => _74.notFound, 'optionalAccess', _75 => _75.component, 'optionalAccess', _76 => _76.trim, 'call', _77 => _77()])) {
3815
+ if (_optionalChain([this, 'access', _70 => _70.config, 'access', _71 => _71.notFound, 'optionalAccess', _72 => _72.component, 'optionalAccess', _73 => _73.trim, 'call', _74 => _74()])) {
3741
3816
  resolveFarmNotFoundComponentPath(this.config, _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, this.config));
3742
3817
  }
3743
3818
  const loaded = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer) ? await import("./renderer/react/server.cjs") : _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer) ? await import("./renderer/none/server.cjs") : this.viteServer ? await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, this.viteServer, this.config.renderer.server) : await import(_url.pathToFileURL.call(void 0,
@@ -3762,7 +3837,7 @@ var ServerRenderer = class {
3762
3837
  "node"
3763
3838
  );
3764
3839
  this.rendererRuntime = islands && this.islandValues() ? withFarmIslandsRenders(runtime, islands) : runtime;
3765
- _optionalChain([this, 'access', _78 => _78.routeManager, 'access', _79 => _79.setRendererRuntime, 'optionalCall', _80 => _80(this.rendererRuntime)]);
3840
+ _optionalChain([this, 'access', _75 => _75.routeManager, 'access', _76 => _76.setRendererRuntime, 'optionalCall', _77 => _77(this.rendererRuntime)]);
3766
3841
  await this.applyRendererAppSetup();
3767
3842
  }
3768
3843
  /**
@@ -3819,7 +3894,7 @@ var ServerRenderer = class {
3819
3894
  /// Stylesheets the app imported through JS (fontsource packages, component
3820
3895
  /// CSS) that the document must link alongside globals.css — see #658.
3821
3896
  collectDevStyleHrefs() {
3822
- const graph = _optionalChain([this, 'access', _81 => _81.viteServer, 'optionalAccess', _82 => _82.moduleGraph]);
3897
+ const graph = _optionalChain([this, 'access', _78 => _78.viteServer, 'optionalAccess', _79 => _79.moduleGraph]);
3823
3898
  if (!graph) return [];
3824
3899
  return collectDevStylesheetUrls(
3825
3900
  graph.idToModuleMap.values(),
@@ -3870,7 +3945,7 @@ var ServerRenderer = class {
3870
3945
  "data-farm-layout-boundary": "true",
3871
3946
  "data-farm-layout-pattern": pattern,
3872
3947
  ...segment ? { "data-farm-layout-key": segment.key } : {},
3873
- ..._optionalChain([segment, 'optionalAccess', _83 => _83.kept]) ? { "data-farm-layout-kept": "true" } : {},
3948
+ ..._optionalChain([segment, 'optionalAccess', _80 => _80.kept]) ? { "data-farm-layout-kept": "true" } : {},
3874
3949
  style: { display: "contents" }
3875
3950
  },
3876
3951
  layoutElement
@@ -3922,7 +3997,7 @@ var ServerRenderer = class {
3922
3997
  writable.once("error", reject);
3923
3998
  const stream = renderToPipeableStream(element, {
3924
3999
  nonce: _chunk3BIASUGRcjs._resolveCurrentCspNonce.call(void 0, ),
3925
- formState: _chunkW44X6IC2cjs.getFarmFormState.call(void 0, ),
4000
+ formState: _chunkHBLYSWIJcjs.getFarmFormState.call(void 0, ),
3926
4001
  ...inlineBoundaries ? {
3927
4002
  progressiveChunkSize: Number.MAX_SAFE_INTEGER,
3928
4003
  onAllReady() {
@@ -3966,7 +4041,7 @@ var ServerRenderer = class {
3966
4041
  );
3967
4042
  return { html: rendered.html, head: rendered.head || "" };
3968
4043
  }
3969
- const { head, body } = _chunkPXAHSCR6cjs.takeFarmHoistedHead.call(void 0,
4044
+ const { head, body } = _chunkO2A6HE76cjs.takeFarmHoistedHead.call(void 0,
3970
4045
  await this.renderElementToCompleteHTML(element, options),
3971
4046
  true
3972
4047
  );
@@ -3974,7 +4049,7 @@ var ServerRenderer = class {
3974
4049
  }
3975
4050
  /** Islands mode sends large prop values once, keyed by content (RFC 0003). */
3976
4051
  islandValues() {
3977
- return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _84 => _84.config, 'access', _85 => _85.experimental, 'optionalAccess', _86 => _86.serverComponents])) === "islands";
4052
+ return _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _81 => _81.config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) === "islands";
3978
4053
  }
3979
4054
  /**
3980
4055
  * Render the route tree used by client navigation without producing a second
@@ -4049,9 +4124,9 @@ var ServerRenderer = class {
4049
4124
  });
4050
4125
  }
4051
4126
  async runWithRequestContext(request2, fn) {
4052
- return _chunkHDPT6OYEcjs._runWithCurrentRequest.call(void 0,
4127
+ return _chunk4M5ESTJ2cjs._runWithCurrentRequest.call(void 0,
4053
4128
  request2,
4054
- () => _optionalChain([this, 'access', _87 => _87.i18nRuntime, 'optionalAccess', _88 => _88.config, 'access', _89 => _89.enabled]) ? _chunkNLBK37HIcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4129
+ () => _optionalChain([this, 'access', _84 => _84.i18nRuntime, 'optionalAccess', _85 => _85.config, 'access', _86 => _86.enabled]) ? _chunkNLBK37HIcjs._runWithFarmI18nRequest.call(void 0, this.i18nRuntime, request2, fn, {
4055
4130
  redirect: false
4056
4131
  }) : fn()
4057
4132
  );
@@ -4082,7 +4157,7 @@ var ServerRenderer = class {
4082
4157
  * Check if a path should be served from SSG cache
4083
4158
  */
4084
4159
  async shouldServeSSG(pathname) {
4085
- const ssgPage = _chunkCLEWORVYcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4160
+ const ssgPage = _chunkACAEFEOHcjs.matchSSGPage.call(void 0, pathname, this.ssgManifest);
4086
4161
  if (!ssgPage) return null;
4087
4162
  const cached = await this.getCachedSSGPage(pathname);
4088
4163
  if (cached && await this.dataCache.isStaleAsync(cached)) {
@@ -4091,10 +4166,10 @@ var ServerRenderer = class {
4091
4166
  return ssgPage;
4092
4167
  }
4093
4168
  getSSGCacheKey(urlPath) {
4094
- return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, ["ssg", _chunkDMAP4RNDcjs.normalizeRevalidatePath.call(void 0, urlPath)]);
4169
+ return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, ["ssg", _chunk3OMLZLDEcjs.normalizeRevalidatePath.call(void 0, urlPath)]);
4095
4170
  }
4096
4171
  getPPRCacheKey(pathname, search = "", locale = "", origin = "") {
4097
- const key = ["ppr", locale, _chunkDMAP4RNDcjs.normalizeRevalidatePath.call(void 0, pathname), search, this.getDeploymentId()];
4172
+ const key = ["ppr", locale, _chunk3OMLZLDEcjs.normalizeRevalidatePath.call(void 0, pathname), search, this.getDeploymentId()];
4098
4173
  return _chunkDXUXQP2Tcjs.createFarmCacheKey.call(void 0, origin ? [...key, origin] : key);
4099
4174
  }
4100
4175
  getCachedSSGPage(urlPath) {
@@ -4203,7 +4278,7 @@ var ServerRenderer = class {
4203
4278
  setImmediate(async () => {
4204
4279
  try {
4205
4280
  const mod = await this.routeManager.loadRouteModule(page.filePath);
4206
- if (!_optionalChain([mod, 'optionalAccess', _90 => _90.default])) return;
4281
+ if (!_optionalChain([mod, 'optionalAccess', _87 => _87.default])) return;
4207
4282
  const { route, layouts } = this.routeManager.matchRoute(page.urlPath);
4208
4283
  const layoutModules = await Promise.all(
4209
4284
  layouts.map((l) => this.routeManager.loadLayoutModule(l.modulePath))
@@ -4217,7 +4292,7 @@ var ServerRenderer = class {
4217
4292
  };
4218
4293
  let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
4219
4294
  const pageMetadata = _nullishCoalesce(routeManifest.routes.find(
4220
- (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _91 => _91.pattern])
4295
+ (entry) => entry.pattern === _optionalChain([route, 'optionalAccess', _88 => _88.pattern])
4221
4296
  ), () => ( {
4222
4297
  shouldHydrate: false,
4223
4298
  islandStrategy: null
@@ -4326,11 +4401,9 @@ var ServerRenderer = class {
4326
4401
  const header = _chunk6JHZPB52cjs.getFarmSecurityHeader.call(void 0, this.security, cspNonce);
4327
4402
  res.setHeader(header.key, header.value);
4328
4403
  }
4329
- const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
4330
- trustProxy: _optionalChain([this, 'access', _92 => _92.config, 'access', _93 => _93.server, 'optionalAccess', _94 => _94.trustProxy])
4331
- });
4404
+ const request2 = this.createPageRequest(req, res);
4332
4405
  const runtime = this.i18nRuntime;
4333
- if (_optionalChain([runtime, 'optionalAccess', _95 => _95.config, 'access', _96 => _96.enabled])) {
4406
+ if (_optionalChain([runtime, 'optionalAccess', _89 => _89.config, 'access', _90 => _90.enabled])) {
4334
4407
  const resolution = runtime.resolveRequest(request2);
4335
4408
  const varyHeaders = _chunkGPICBTDVcjs.getFarmLocaleVaryHeaders.call(void 0, runtime.config, resolution);
4336
4409
  for (const header of varyHeaders) appendResponseVary(res, header);
@@ -4349,11 +4422,26 @@ var ServerRenderer = class {
4349
4422
  return;
4350
4423
  }
4351
4424
  }
4352
- return _chunkHDPT6OYEcjs._runWithFarmCspNonce.call(void 0,
4425
+ return _chunk4M5ESTJ2cjs._runWithFarmCspNonce.call(void 0,
4353
4426
  cspNonce,
4354
4427
  () => this.runWithRequestContext(request2, () => this.renderPageInContext(req, res))
4355
4428
  );
4356
4429
  }
4430
+ /**
4431
+ * The Request a page, its layouts, and its server functions read. Its signal aborts when the
4432
+ * client goes away before the response finishes, as in production, so rendering that observes
4433
+ * it can stop.
4434
+ */
4435
+ createPageRequest(req, res) {
4436
+ const observable = typeof req.once === "function" && typeof res.once === "function";
4437
+ return _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
4438
+ trustProxy: _optionalChain([this, 'access', _91 => _91.config, 'access', _92 => _92.server, 'optionalAccess', _93 => _93.trustProxy]),
4439
+ signal: observable ? _chunkCFG4QERRcjs.createFarmNodeRequestAbortSignal.call(void 0,
4440
+ req,
4441
+ res
4442
+ ) : void 0
4443
+ });
4444
+ }
4357
4445
  async renderPageInContext(req, res) {
4358
4446
  const renderStartTime = Date.now();
4359
4447
  let pathname = "/";
@@ -4376,7 +4464,7 @@ var ServerRenderer = class {
4376
4464
  });
4377
4465
  };
4378
4466
  try {
4379
- const url = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _97 => _97.config, 'access', _98 => _98.server, 'optionalAccess', _99 => _99.trustProxy]) });
4467
+ const url = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _94 => _94.config, 'access', _95 => _95.server, 'optionalAccess', _96 => _96.trustProxy]) });
4380
4468
  pathname = url.pathname;
4381
4469
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, { type: "render.start", route: pathname, pathname });
4382
4470
  searchParamsObject = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, url.searchParams);
@@ -4446,7 +4534,7 @@ var ServerRenderer = class {
4446
4534
  layouts = match.layouts;
4447
4535
  routeSlots = _nullishCoalesce(match.slots, () => ( []));
4448
4536
  if (!route) {
4449
- if (_chunkTU6VAH4Vcjs.isFarmDefaultMCPPathname.call(void 0, pathname) && this.getDefaultMCPServer()) {
4537
+ if (_chunkVKRMO3EZcjs.isFarmDefaultMCPPathname.call(void 0, pathname) && this.getDefaultMCPServer()) {
4450
4538
  await this.renderDefaultMCP(req, res);
4451
4539
  completeRender(res.statusCode || 200, pathname);
4452
4540
  return;
@@ -4463,22 +4551,20 @@ var ServerRenderer = class {
4463
4551
  params
4464
4552
  });
4465
4553
  let actionRequest;
4466
- if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _100 => _100.config, 'access', _101 => _101.experimental, 'optionalAccess', _102 => _102.serverComponents])) === "islands") {
4554
+ if (req.method === "POST" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([this, 'access', _97 => _97.config, 'access', _98 => _98.experimental, 'optionalAccess', _99 => _99.serverComponents])) === "islands") {
4467
4555
  await Promise.all([
4468
4556
  this.routeManager.loadRouteModule(route.modulePath),
4469
4557
  ...layouts.map((layout) => this.routeManager.loadLayoutModule(layout.modulePath))
4470
4558
  ]);
4471
- actionRequest = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
4472
- trustProxy: _optionalChain([this, 'access', _103 => _103.config, 'access', _104 => _104.server, 'optionalAccess', _105 => _105.trustProxy])
4473
- });
4559
+ actionRequest = this.createPageRequest(req, res);
4474
4560
  const formActionRequest = actionRequest;
4475
4561
  const actionResponse = await _chunkYDXLC4DWcjs._runWithMiddlewareData.call(void 0,
4476
4562
  toMiddlewareMap(req.__FARM_MIDDLEWARE_DATA__),
4477
4563
  () => _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0,
4478
4564
  toMiddlewareMap(req.__FARM_MIDDLEWARE_CONTEXT__),
4479
- () => _chunkW44X6IC2cjs.handleFarmFormActionRequest.call(void 0,
4565
+ () => _chunkHBLYSWIJcjs.handleFarmFormActionRequest.call(void 0,
4480
4566
  formActionRequest,
4481
- _chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, this.config.serverActions),
4567
+ _chunkLIQJYEQPcjs.resolveServerActionsConfig.call(void 0, this.config.serverActions),
4482
4568
  // Before a rewrite, the URL the browser posted to.
4483
4569
  new URL(
4484
4570
  _nullishCoalesce(_nullishCoalesce(req.originalUrl, () => ( req.url)), () => ( "/")),
@@ -4500,9 +4586,7 @@ var ServerRenderer = class {
4500
4586
  pluginExposedContext = _chunkJYT7AN37cjs.getRequestContextSnapshot.call(void 0, req, {
4501
4587
  exposedOnly: true
4502
4588
  });
4503
- const currentRequest = _nullishCoalesce(actionRequest, () => ( _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
4504
- trustProxy: _optionalChain([this, 'access', _106 => _106.config, 'access', _107 => _107.server, 'optionalAccess', _108 => _108.trustProxy])
4505
- })));
4589
+ const currentRequest = _nullishCoalesce(actionRequest, () => ( this.createPageRequest(req, res)));
4506
4590
  const routeContext = await this.resolveRouteContext({
4507
4591
  request: currentRequest,
4508
4592
  rawRequest: req,
@@ -4543,11 +4627,11 @@ var ServerRenderer = class {
4543
4627
  searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParamsObject),
4544
4628
  error
4545
4629
  };
4546
- if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _109 => _109.notFound])) {
4630
+ if (_chunk7JUIK547cjs.isFarmNotFoundError.call(void 0, error) && _optionalChain([programmaticRouteComponents, 'optionalAccess', _100 => _100.notFound])) {
4547
4631
  res.statusCode = 404;
4548
4632
  PageComponent = programmaticRouteComponents.notFound;
4549
4633
  pageProps = routeStateProps;
4550
- } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _110 => _110.error])) {
4634
+ } else if (_optionalChain([programmaticRouteComponents, 'optionalAccess', _101 => _101.error])) {
4551
4635
  res.statusCode = 500;
4552
4636
  PageComponent = programmaticRouteComponents.error;
4553
4637
  pageProps = routeStateProps;
@@ -4555,10 +4639,10 @@ var ServerRenderer = class {
4555
4639
  throw error;
4556
4640
  }
4557
4641
  }
4558
- const renderingConfig = await _chunkCLEWORVYcjs.resolveRouteRenderingConfigFromFile.call(void 0,
4642
+ const renderingConfig = await _chunkACAEFEOHcjs.resolveRouteRenderingConfigFromFile.call(void 0,
4559
4643
  routeModule,
4560
4644
  route.modulePath,
4561
- { experimentalPPR: _optionalChain([this, 'access', _111 => _111.config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.ppr]) === true }
4645
+ { experimentalPPR: _optionalChain([this, 'access', _102 => _102.config, 'access', _103 => _103.experimental, 'optionalAccess', _104 => _104.ppr]) === true }
4562
4646
  );
4563
4647
  const pprBypassReason = renderingConfig.ppr ? this.getPPRShellBypassReason(req, middlewareMap, middlewareContext, pluginExposedContext) : void 0;
4564
4648
  const islandsNavigationRequest = Boolean(
@@ -4569,7 +4653,7 @@ var ServerRenderer = class {
4569
4653
  const pprShellOptions = canCachePPRShell ? {
4570
4654
  pathname,
4571
4655
  search: url.search,
4572
- locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _114 => _114.locale]), () => ( "")),
4656
+ locale: _nullishCoalesce(_optionalChain([pprI18nSnapshot, 'optionalAccess', _105 => _105.locale]), () => ( "")),
4573
4657
  origin: pprI18nSnapshot && pprI18nSnapshot.routing !== "none" ? url.origin : "",
4574
4658
  revalidate: renderingConfig.revalidate
4575
4659
  } : void 0;
@@ -4619,7 +4703,7 @@ var ServerRenderer = class {
4619
4703
  });
4620
4704
  }
4621
4705
  const outerRequest = _chunk3BIASUGRcjs._peekCurrentRequest.call(void 0, );
4622
- const countRequestReads = () => (outerRequest ? _chunkHDPT6OYEcjs._getRequestReadCount.call(void 0, outerRequest) : 0) + _chunkHDPT6OYEcjs._getRequestReadCount.call(void 0, currentRequest);
4706
+ const countRequestReads = () => (outerRequest ? _chunk4M5ESTJ2cjs._getRequestReadCount.call(void 0, outerRequest) : 0) + _chunk4M5ESTJ2cjs._getRequestReadCount.call(void 0, currentRequest);
4623
4707
  const requestReadsBeforeRender = countRequestReads();
4624
4708
  let LoadingFallbackComponent = null;
4625
4709
  if (loadingBoundaryEntry) {
@@ -4641,7 +4725,7 @@ var ServerRenderer = class {
4641
4725
  const routeManifestEntry = routeManifest.routes.find(
4642
4726
  (entry) => entry.pattern === route.pattern
4643
4727
  );
4644
- const moduleMetadata = routeManifestEntry || _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
4728
+ const moduleMetadata = routeManifestEntry || _chunkNXGQIXR7cjs.getClientModuleMetadata.call(void 0, route.modulePath, this.config.root);
4645
4729
  const isClientComponent = moduleMetadata.isClientComponent;
4646
4730
  const renderedRouteSlots = await Promise.all(
4647
4731
  routeSlots.map(async (slot) => {
@@ -4692,20 +4776,20 @@ var ServerRenderer = class {
4692
4776
  if (moduleMetadata.suppressedAsyncHydration) {
4693
4777
  warnSuppressedAsyncHydrationOnce(
4694
4778
  route.modulePath,
4695
- _optionalChain([routeManifestEntry, 'optionalAccess', _115 => _115.suppressedAsyncHydrationReason])
4779
+ _optionalChain([routeManifestEntry, 'optionalAccess', _106 => _106.suppressedAsyncHydrationReason])
4696
4780
  );
4697
4781
  }
4698
4782
  const layoutHydrationMetadata = layouts.map((layout) => {
4699
4783
  const manifestEntry = routeManifest.layouts.find(
4700
4784
  (entry) => entry.pattern === layout.pattern
4701
4785
  );
4702
- if (_optionalChain([manifestEntry, 'optionalAccess', _116 => _116.suppressedAsyncHydration])) {
4786
+ if (_optionalChain([manifestEntry, 'optionalAccess', _107 => _107.suppressedAsyncHydration])) {
4703
4787
  warnSuppressedAsyncHydrationOnce(
4704
4788
  layout.modulePath,
4705
4789
  manifestEntry.suppressedAsyncHydrationReason
4706
4790
  );
4707
4791
  }
4708
- if (typeof _optionalChain([manifestEntry, 'optionalAccess', _117 => _117.shouldHydrate]) === "boolean") {
4792
+ if (typeof _optionalChain([manifestEntry, 'optionalAccess', _108 => _108.shouldHydrate]) === "boolean") {
4709
4793
  return {
4710
4794
  isClientComponent: manifestEntry.isClientComponent === true,
4711
4795
  shouldHydrate: manifestEntry.shouldHydrate,
@@ -4726,11 +4810,11 @@ var ServerRenderer = class {
4726
4810
  const clientLayouts = layouts.map((layout, index) => ({
4727
4811
  pattern: layout.pattern,
4728
4812
  modulePath: _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, layout.modulePath, this.config.root),
4729
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _118 => _118[index], 'optionalAccess', _119 => _119.shouldHydrate]) === true,
4730
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _120 => _120[index], 'optionalAccess', _121 => _121.islandStrategy]), () => ( null)),
4731
- ..._optionalChain([layoutHydrationMetadata, 'access', _122 => _122[index], 'optionalAccess', _123 => _123.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
4813
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _109 => _109[index], 'optionalAccess', _110 => _110.shouldHydrate]) === true,
4814
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _111 => _111[index], 'optionalAccess', _112 => _112.islandStrategy]), () => ( null)),
4815
+ ..._optionalChain([layoutHydrationMetadata, 'access', _113 => _113[index], 'optionalAccess', _114 => _114.hasIsolatedClientBoundaries]) === true ? { hasIsolatedClientBoundaries: true } : {},
4732
4816
  // Islands mode: the browser rebuilds this layout from its tree, not its module.
4733
- ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _124 => _124[index], 'optionalAccess', _125 => _125.serverTree]) === true ? { serverTree: true } : {}
4817
+ ...shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _115 => _115[index], 'optionalAccess', _116 => _116.serverTree]) === true ? { serverTree: true } : {}
4734
4818
  }));
4735
4819
  const hydrationStrategies = [
4736
4820
  ...shouldHydrate && moduleMetadata.islandStrategy ? [moduleMetadata.islandStrategy] : [],
@@ -4744,9 +4828,9 @@ var ServerRenderer = class {
4744
4828
  layouts.map((layout, index) => ({
4745
4829
  pattern: layout.pattern,
4746
4830
  modulePath: layout.modulePath,
4747
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _126 => _126[index], 'optionalAccess', _127 => _127.shouldHydrate]) === true,
4748
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _128 => _128[index], 'optionalAccess', _129 => _129.hasIsolatedClientBoundaries]) === true,
4749
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _130 => _130[index], 'optionalAccess', _131 => _131.islandStrategy]), () => ( null))
4831
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _117 => _117[index], 'optionalAccess', _118 => _118.shouldHydrate]) === true,
4832
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _119 => _119[index], 'optionalAccess', _120 => _120.hasIsolatedClientBoundaries]) === true,
4833
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _121 => _121[index], 'optionalAccess', _122 => _122.islandStrategy]), () => ( null))
4750
4834
  })),
4751
4835
  this.config.root || process.cwd(),
4752
4836
  true
@@ -4754,7 +4838,7 @@ var ServerRenderer = class {
4754
4838
  const hasHydratableRouteSlots = renderedRouteSlots.some(
4755
4839
  (slot) => slot.isClientComponent || slot.shouldHydrate
4756
4840
  );
4757
- const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _132 => _132.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
4841
+ const hasIsolatedClientBoundaries = _optionalChain([routeManifestEntry, 'optionalAccess', _123 => _123.hasIsolatedClientBoundaries]) === true || layoutHydrationMetadata.some((metadata) => metadata.hasIsolatedClientBoundaries === true);
4758
4842
  req.__FARM_PAGE_PATH__ = route.modulePath;
4759
4843
  req.__FARM_ROUTE__ = pathname;
4760
4844
  req.__FARM_IS_CLIENT_COMPONENT__ = isClientComponent;
@@ -4767,7 +4851,7 @@ var ServerRenderer = class {
4767
4851
  req.__FARM_SHOULD_HYDRATE__ = shouldHydrate || shouldHydrateLayout || hasIsolatedClientBoundaries;
4768
4852
  req.__FARM_ISLAND_STRATEGY__ = hydrationIslandStrategy;
4769
4853
  req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ = hasHydratableRouteSlots;
4770
- req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _133 => _133.modulePath]) ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
4854
+ req.__FARM_LOADING_MODULE_PATH__ = _optionalChain([loadingBoundaryEntry, 'optionalAccess', _124 => _124.modulePath]) ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, loadingBoundaryEntry.modulePath, this.config.root) : null;
4771
4855
  req.__FARM_ROUTE_SLOTS__ = renderedRouteSlots.map((slot) => ({
4772
4856
  name: slot.name,
4773
4857
  ownerPattern: slot.ownerPattern,
@@ -4816,7 +4900,7 @@ var ServerRenderer = class {
4816
4900
  const middlewareDataForContext = middlewareMap;
4817
4901
  await _chunkYDXLC4DWcjs._runWithMiddlewareData.call(void 0, middlewareDataForContext, async () => {
4818
4902
  await _chunkYDXLC4DWcjs._runWithMiddlewareContext.call(void 0, middlewareContext, async () => {
4819
- await _chunkHDPT6OYEcjs._runWithCurrentRequest.call(void 0, currentRequest, async () => {
4903
+ await _chunk4M5ESTJ2cjs._runWithCurrentRequest.call(void 0, currentRequest, async () => {
4820
4904
  let pageElement = this.rendererRuntime.createElement(PageComponent, pageProps);
4821
4905
  if (LoadingFallbackComponent && !islandsNavigationRequest) {
4822
4906
  const loadingFallback = this.rendererRuntime.createElement(LoadingFallbackComponent, {
@@ -4839,7 +4923,7 @@ var ServerRenderer = class {
4839
4923
  } else if (shouldHydrateLayout && !(isClientComponent || shouldHydrate) && this.rendererRuntime.isolateServerPageGraph) {
4840
4924
  pageElement = await this.isolateServerPage(
4841
4925
  pageElement,
4842
- _optionalChain([routeManifestEntry, 'optionalAccess', _134 => _134.serverTree]) === true
4926
+ _optionalChain([routeManifestEntry, 'optionalAccess', _125 => _125.serverTree]) === true
4843
4927
  );
4844
4928
  }
4845
4929
  pageElement = this.createPageBoundary(pageElement, {
@@ -4853,7 +4937,7 @@ var ServerRenderer = class {
4853
4937
  if (keptLayouts > 0) {
4854
4938
  let keptElement = null;
4855
4939
  for (let i = keptLayouts - 1; i >= 0; i--) {
4856
- const KeptLayout = _optionalChain([layoutModules, 'access', _135 => _135[i], 'optionalAccess', _136 => _136.default]);
4940
+ const KeptLayout = _optionalChain([layoutModules, 'access', _126 => _126[i], 'optionalAccess', _127 => _127.default]);
4857
4941
  if (KeptLayout) {
4858
4942
  keptElement = this.rendererRuntime.createElement(KeptLayout, {
4859
4943
  children: keptElement,
@@ -4863,7 +4947,7 @@ var ServerRenderer = class {
4863
4947
  }
4864
4948
  try {
4865
4949
  await this.renderElementToCompleteHTML(
4866
- await this.wrapWithIntegrationProviders(keptElement),
4950
+ await this.wrapWithIntegrationProviders(this.wrapClientGraph(keptElement)),
4867
4951
  { rejectLateErrors: true }
4868
4952
  );
4869
4953
  } catch (e15) {
@@ -4902,7 +4986,7 @@ var ServerRenderer = class {
4902
4986
  );
4903
4987
  slotProps[slot.name] = slotElement;
4904
4988
  }
4905
- wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _137 => _137[i], 'optionalAccess', _138 => _138.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
4989
+ wrappedElement = shouldHydrateLayout && _optionalChain([layoutHydrationMetadata, 'access', _128 => _128[i], 'optionalAccess', _129 => _129.serverTree]) === true && islands && this.islandValues() ? await islands.renderFarmServerTreeLayout(
4906
4990
  LayoutComponent,
4907
4991
  { params },
4908
4992
  { children: wrappedElement, ...slotProps },
@@ -5038,7 +5122,7 @@ var ServerRenderer = class {
5038
5122
  }
5039
5123
  }
5040
5124
  emitFarmRenderError(req, pathname, error);
5041
- const errorStatus = _chunkPXAHSCR6cjs.resolveDefaultErrorStatus.call(void 0, error);
5125
+ const errorStatus = _chunkO2A6HE76cjs.resolveDefaultErrorStatus.call(void 0, error);
5042
5126
  if (pprRefreshRoute) {
5043
5127
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
5044
5128
  type: "ppr.refresh.error",
@@ -5074,7 +5158,7 @@ var ServerRenderer = class {
5074
5158
  }
5075
5159
  }
5076
5160
  async wrapWithIntegrationProviders(element) {
5077
- const providers = _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, this.config.integrations);
5161
+ const providers = _chunk65OS2TOTcjs.getIntegrationProviders.call(void 0, this.config.integrations);
5078
5162
  let wrapped = element;
5079
5163
  for (let i = providers.length - 1; i >= 0; i--) {
5080
5164
  const provider = providers[i];
@@ -5082,7 +5166,7 @@ var ServerRenderer = class {
5082
5166
  const rendererCapabilities = _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, this.config.renderer);
5083
5167
  if (!rendererCapabilities.functionComponents) {
5084
5168
  throw new Error(
5085
- `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _139 => _139.config, 'access', _140 => _140.renderer, 'optionalAccess', _141 => _141.name]), () => ( "the configured renderer"))}\` cannot.`
5169
+ `Integration provider \`${provider.name}\` requires a renderer that can host function components; \`${_nullishCoalesce(_optionalChain([this, 'access', _130 => _130.config, 'access', _131 => _131.renderer, 'optionalAccess', _132 => _132.name]), () => ( "the configured renderer"))}\` cannot.`
5086
5170
  );
5087
5171
  }
5088
5172
  if (provider.type === "clerk" && !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer)) {
@@ -5092,7 +5176,7 @@ var ServerRenderer = class {
5092
5176
  }
5093
5177
  let ProviderComponent;
5094
5178
  let providerSourceModule;
5095
- if (_chunkJX5VOLAVcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
5179
+ if (_chunk65OS2TOTcjs.isFarmIntegrationProviderComponentReference.call(void 0, provider.component)) {
5096
5180
  providerSourceModule = provider.component.module;
5097
5181
  const providerModuleId = provider.component.module.startsWith(".") ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0,
5098
5182
  path9.resolve(this.config.root, provider.component.module),
@@ -5121,7 +5205,7 @@ var ServerRenderer = class {
5121
5205
  }
5122
5206
  if (provider.type !== "clerk" && typeof this.rendererRuntime.markFunctionComponent === "function" && !isRendererCompiledComponent(
5123
5207
  _nullishCoalesce(providerSourceModule, () => ( "")),
5124
- _chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _142 => _142.config, 'access', _143 => _143.renderer, 'optionalAccess', _144 => _144.componentExtensions]))
5208
+ _chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, _optionalChain([this, 'access', _133 => _133.config, 'access', _134 => _134.renderer, 'optionalAccess', _135 => _135.componentExtensions]))
5125
5209
  )) {
5126
5210
  ProviderComponent = this.rendererRuntime.markFunctionComponent(ProviderComponent);
5127
5211
  }
@@ -5190,7 +5274,7 @@ var ServerRenderer = class {
5190
5274
  );
5191
5275
  metadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
5192
5276
  metadata,
5193
- _chunkHGB4PM2Ccjs.getFarmMarkdownAlternatePath.call(void 0, _chunkHGB4PM2Ccjs.resolveMarkdownConfig.call(void 0, this.config.md), publicPathname, {
5277
+ _chunkPG6ZIHKEcjs.getFarmMarkdownAlternatePath.call(void 0, _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, this.config.md), publicPathname, {
5194
5278
  routePathname: (pathname) => this.routeManager.toRoutePathname(pathname)
5195
5279
  })
5196
5280
  );
@@ -5249,8 +5333,8 @@ var ServerRenderer = class {
5249
5333
  `Metadata route module ${match.metadata.modulePath} does not export a default value or handler`
5250
5334
  );
5251
5335
  }
5252
- const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5253
- trustProxy: _optionalChain([this, 'access', _145 => _145.config, 'access', _146 => _146.server, 'optionalAccess', _147 => _147.trustProxy])
5336
+ const request2 = _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5337
+ trustProxy: _optionalChain([this, 'access', _136 => _136.config, 'access', _137 => _137.server, 'optionalAccess', _138 => _138.trustProxy])
5254
5338
  });
5255
5339
  const url = new URL(request2.url);
5256
5340
  const llmsContext = match.metadata.kind === "llms" || match.metadata.kind === "llms-full" ? await this.createLlmsTxtContext(request2, {
@@ -5264,11 +5348,11 @@ var ServerRenderer = class {
5264
5348
  path: match.routePath,
5265
5349
  ...llmsContext
5266
5350
  }) : routeModule.default;
5267
- const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await _chunk5PDMBWAFcjs.renderFarmLlmsFullTxt.call(void 0, value, {
5351
+ const body = match.metadata.kind === "llms-full" && !(value instanceof Response) ? await _chunkMKQ27TGWcjs.renderFarmLlmsFullTxt.call(void 0, value, {
5268
5352
  origin: await this.getAgentOrigin(request2),
5269
5353
  readMarkdown: llmsContext.markdown
5270
5354
  }) : value;
5271
- const response = _chunkPXAHSCR6cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5355
+ const response = _chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0, match.metadata.kind, body, routeModule, {
5272
5356
  method,
5273
5357
  request: request2
5274
5358
  });
@@ -5286,25 +5370,25 @@ var ServerRenderer = class {
5286
5370
  }
5287
5371
  /** `/llms.txt` and `/llms-full.txt` from `agent.llmsTxt` when no file route owns them. */
5288
5372
  getGeneratedLlmsKind(pathname) {
5289
- const config = _chunk5PDMBWAFcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _148 => _148.config, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.llmsTxt]));
5373
+ const config = _chunkMKQ27TGWcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _139 => _139.config, 'access', _140 => _140.agent, 'optionalAccess', _141 => _141.llmsTxt]));
5290
5374
  if (!config.enabled) return null;
5291
5375
  if (pathname === "/llms.txt") return "llms";
5292
5376
  return pathname === "/llms-full.txt" && config.full ? "llms-full" : null;
5293
5377
  }
5294
5378
  async renderGeneratedLlmsTxt(req, res, kind) {
5295
5379
  try {
5296
- const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5297
- trustProxy: _optionalChain([this, 'access', _151 => _151.config, 'access', _152 => _152.server, 'optionalAccess', _153 => _153.trustProxy])
5380
+ const request2 = _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5381
+ trustProxy: _optionalChain([this, 'access', _142 => _142.config, 'access', _143 => _143.server, 'optionalAccess', _144 => _144.trustProxy])
5298
5382
  });
5299
- const config = _chunk5PDMBWAFcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _154 => _154.config, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.llmsTxt]));
5383
+ const config = _chunkMKQ27TGWcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _145 => _145.config, 'access', _146 => _146.agent, 'optionalAccess', _147 => _147.llmsTxt]));
5300
5384
  const context = await this.createLlmsTxtContext(request2, { full: kind === "llms-full", req });
5301
- const body = kind === "llms-full" ? await _chunk5PDMBWAFcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
5385
+ const body = kind === "llms-full" ? await _chunkMKQ27TGWcjs.renderFarmLlmsFullTxt.call(void 0, context.defaults, {
5302
5386
  origin: await this.getAgentOrigin(request2),
5303
5387
  readMarkdown: context.markdown
5304
5388
  }) : context.defaults;
5305
5389
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5306
5390
  res,
5307
- _chunkPXAHSCR6cjs.createFarmMetadataRouteResponse.call(void 0,
5391
+ _chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0,
5308
5392
  kind,
5309
5393
  body,
5310
5394
  { revalidate: config.revalidate },
@@ -5323,23 +5407,23 @@ var ServerRenderer = class {
5323
5407
  }
5324
5408
  }
5325
5409
  getAgentCrawlers() {
5326
- return _chunkODBM54RTcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _157 => _157.config, 'access', _158 => _158.agent, 'optionalAccess', _159 => _159.crawlers]));
5410
+ return _chunkF244KE2Dcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([this, 'access', _148 => _148.config, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.crawlers]));
5327
5411
  }
5328
5412
  /** `/robots.txt` from `agent.crawlers` when no robots.ts owns it. */
5329
5413
  async renderGeneratedRobotsTxt(req, res) {
5330
5414
  try {
5331
- const sitemapPath = _optionalChain([this, 'access', _160 => _160.routeManager, 'access', _161 => _161.matchMetadataRoute, 'call', _162 => _162("/sitemap.xml"), 'optionalAccess', _163 => _163.metadata, 'access', _164 => _164.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
5415
+ const sitemapPath = _optionalChain([this, 'access', _151 => _151.routeManager, 'access', _152 => _152.matchMetadataRoute, 'call', _153 => _153("/sitemap.xml"), 'optionalAccess', _154 => _154.metadata, 'access', _155 => _155.kind]) === "sitemap" || this.getAgentSitemap().enabled ? "/sitemap.xml" : void 0;
5332
5416
  const rootLayout = this.routeManager.getLayouts().get("/");
5333
5417
  const rootMetadata = sitemapPath && rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5334
- const robots = _chunkODBM54RTcjs.createFarmAgentRobots.call(void 0, {
5418
+ const robots = _chunkF244KE2Dcjs.createFarmAgentRobots.call(void 0, {
5335
5419
  crawlers: this.getAgentCrawlers(),
5336
5420
  sitemapPath,
5337
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _165 => _165.metadataBase]),
5421
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _156 => _156.metadataBase]),
5338
5422
  basePath: this.config.basePath
5339
5423
  });
5340
5424
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5341
5425
  res,
5342
- _chunkPXAHSCR6cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
5426
+ _chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0, "robots", robots, {}, { method: req.method })
5343
5427
  );
5344
5428
  } catch (error) {
5345
5429
  _chunkQMNWKQL4cjs.logger.error(`Generated robots.txt failed: ${error}`);
@@ -5353,13 +5437,13 @@ var ServerRenderer = class {
5353
5437
  }
5354
5438
  }
5355
5439
  getAgentSitemap() {
5356
- return _chunkODBM54RTcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _166 => _166.config, 'access', _167 => _167.agent, 'optionalAccess', _168 => _168.sitemap]));
5440
+ return _chunkF244KE2Dcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([this, 'access', _157 => _157.config, 'access', _158 => _158.agent, 'optionalAccess', _159 => _159.sitemap]));
5357
5441
  }
5358
5442
  /** `/sitemap.xml` from `agent.sitemap` when no sitemap.ts owns it. */
5359
5443
  async renderGeneratedSitemap(req, res) {
5360
5444
  try {
5361
- const request2 = _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, {
5362
- trustProxy: _optionalChain([this, 'access', _169 => _169.config, 'access', _170 => _170.server, 'optionalAccess', _171 => _171.trustProxy])
5445
+ const request2 = _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, {
5446
+ trustProxy: _optionalChain([this, 'access', _160 => _160.config, 'access', _161 => _161.server, 'optionalAccess', _162 => _162.trustProxy])
5363
5447
  });
5364
5448
  const sources = await Promise.all(
5365
5449
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -5370,26 +5454,26 @@ var ServerRenderer = class {
5370
5454
  }),
5371
5455
  fs5.promises.stat(route.modulePath).catch(() => void 0)
5372
5456
  ]);
5373
- if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _172 => _172.metadata]))) return null;
5374
- return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _173 => _173.mtime, 'access', _174 => _174.toISOString, 'call', _175 => _175()]) };
5457
+ if (await this.isAgentPageNoIndex(pattern, _optionalChain([module, 'optionalAccess', _163 => _163.metadata]))) return null;
5458
+ return { pattern, module, lastModified: _optionalChain([stat, 'optionalAccess', _164 => _164.mtime, 'access', _165 => _165.toISOString, 'call', _166 => _166()]) };
5375
5459
  })
5376
5460
  );
5377
5461
  const rootLayout = this.routeManager.getLayouts().get("/");
5378
5462
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5379
- const sitemap = _chunkODBM54RTcjs.createFarmDefaultSitemap.call(void 0,
5463
+ const sitemap = _chunkF244KE2Dcjs.createFarmDefaultSitemap.call(void 0,
5380
5464
  sources.filter((source) => source !== null),
5381
5465
  {
5382
5466
  origin: new URL(request2.url).origin,
5383
5467
  config: this.getAgentSitemap(),
5384
- metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _176 => _176.metadataBase]),
5468
+ metadataBase: _optionalChain([rootMetadata, 'optionalAccess', _167 => _167.metadataBase]),
5385
5469
  basePath: this.config.basePath,
5386
5470
  trailingSlash: this.config.trailingSlash,
5387
- i18n: _optionalChain([this, 'access', _177 => _177.i18nRuntime, 'optionalAccess', _178 => _178.config])
5471
+ i18n: _optionalChain([this, 'access', _168 => _168.i18nRuntime, 'optionalAccess', _169 => _169.config])
5388
5472
  }
5389
5473
  );
5390
5474
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
5391
5475
  res,
5392
- _chunkPXAHSCR6cjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
5476
+ _chunkO2A6HE76cjs.createFarmMetadataRouteResponse.call(void 0, "sitemap", sitemap, {}, { method: req.method })
5393
5477
  );
5394
5478
  } catch (error) {
5395
5479
  _chunkQMNWKQL4cjs.logger.error(`Generated sitemap.xml failed: ${error}`);
@@ -5416,9 +5500,9 @@ var ServerRenderer = class {
5416
5500
  * matcher) covers, as the production build decides.
5417
5501
  */
5418
5502
  getAgentListedRoutes() {
5419
- const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _179 => _179.middlewareRoutes, 'optionalCall', _180 => _180()]), () => ( [])) };
5503
+ const guards = { config: this.config, middlewareRoutes: _nullishCoalesce(_optionalChain([this, 'access', _170 => _170.middlewareRoutes, 'optionalCall', _171 => _171()]), () => ( [])) };
5420
5504
  return [...this.routeManager.getRoutes()].filter(
5421
- ([pattern]) => !pattern.includes("[") && !_chunkPXAHSCR6cjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
5505
+ ([pattern]) => !pattern.includes("[") && !_chunkO2A6HE76cjs.farmPathGuardCoversPage.call(void 0, guards, pattern)
5422
5506
  );
5423
5507
  }
5424
5508
  /**
@@ -5434,7 +5518,7 @@ var ServerRenderer = class {
5434
5518
  )
5435
5519
  )
5436
5520
  );
5437
- return _chunk5PDMBWAFcjs.isFarmPageNoIndex.call(void 0, metadata, layoutMetadata);
5521
+ return _chunkMKQ27TGWcjs.isFarmPageNoIndex.call(void 0, metadata, layoutMetadata);
5438
5522
  }
5439
5523
  /**
5440
5524
  * The default read-only MCP server (`agent.mcp`), or undefined when the app has an MCP
@@ -5442,22 +5526,22 @@ var ServerRenderer = class {
5442
5526
  * or a registered server such as the docs engine's. Production applies the same rules.
5443
5527
  */
5444
5528
  getDefaultMCPServer() {
5445
- if (_optionalChain([this, 'access', _181 => _181.config, 'access', _182 => _182.agent, 'optionalAccess', _183 => _183.mcp]) !== true || _chunkTU6VAH4Vcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
5446
- if (_optionalChain([this, 'access', _184 => _184.apiRouteExists, 'optionalCall', _185 => _185("/api/mcp")])) return void 0;
5447
- if (this.routeManager.matchRoute(_chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
5448
- _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkTU6VAH4Vcjs.createFarmDefaultMCPServer.call(void 0,
5529
+ if (_optionalChain([this, 'access', _172 => _172.config, 'access', _173 => _173.agent, 'optionalAccess', _174 => _174.mcp]) !== true || _chunkVKRMO3EZcjs.farmConfigMountsMCP.call(void 0, this.config)) return void 0;
5530
+ if (_optionalChain([this, 'access', _175 => _175.apiRouteExists, 'optionalCall', _176 => _176("/api/mcp")])) return void 0;
5531
+ if (this.routeManager.matchRoute(_chunkVKRMO3EZcjs.FARM_DEFAULT_MCP_PATH).route) return void 0;
5532
+ _nullishCoalesce(this.defaultMCPServer, () => ( (this.defaultMCPServer = _chunkVKRMO3EZcjs.createFarmDefaultMCPServer.call(void 0,
5449
5533
  readAppPackageIdentity(this.config.root),
5450
- _chunkUVQRMUARcjs.FARM_VERSION
5534
+ _chunkRSL3YFJGcjs.FARM_VERSION
5451
5535
  ))));
5452
- return _chunkTU6VAH4Vcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
5536
+ return _chunkVKRMO3EZcjs.resolveFarmDefaultMCPServer.call(void 0, this.defaultMCPServer);
5453
5537
  }
5454
5538
  async renderDefaultMCP(req, res) {
5455
5539
  const server = this.getDefaultMCPServer();
5456
- const request2 = _nullishCoalesce(_chunkHDPT6OYEcjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunkHDPT6OYEcjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _186 => _186.config, 'access', _187 => _187.server, 'optionalAccess', _188 => _188.trustProxy]) })));
5540
+ const request2 = _nullishCoalesce(_chunk4M5ESTJ2cjs.getCurrentRequestOrNull.call(void 0, ), () => ( _chunk4M5ESTJ2cjs.createWebRequestFromFarmRequest.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _177 => _177.config, 'access', _178 => _178.server, 'optionalAccess', _179 => _179.trustProxy]) })));
5457
5541
  try {
5458
- const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-VBCA3WZ6.cjs");
5542
+ const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-NRIL4JBC.cjs");
5459
5543
  const origin = new URL(request2.url).origin;
5460
- const i18n = _optionalChain([this, 'access', _189 => _189.i18nRuntime, 'optionalAccess', _190 => _190.config]);
5544
+ const i18n = _optionalChain([this, 'access', _180 => _180.i18nRuntime, 'optionalAccess', _181 => _181.config]);
5461
5545
  const metadataBase = await this.getRootMetadataBase();
5462
5546
  const response = await handleFarmDefaultMCPRequest(request2, {
5463
5547
  server,
@@ -5472,13 +5556,13 @@ var ServerRenderer = class {
5472
5556
  return await this.isAgentPageNoIndex(pattern, metadata) ? null : { pattern, module };
5473
5557
  })
5474
5558
  );
5475
- return _chunkTU6VAH4Vcjs.collectFarmDefaultMCPPages.call(void 0,
5559
+ return _chunkVKRMO3EZcjs.collectFarmDefaultMCPPages.call(void 0,
5476
5560
  sources.filter((source) => source !== null),
5477
5561
  {
5478
5562
  origin,
5479
5563
  metadataBase,
5480
5564
  basePath: this.config.basePath,
5481
- markdown: _chunkHGB4PM2Ccjs.resolveMarkdownConfig.call(void 0, this.config.md),
5565
+ markdown: _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, this.config.md),
5482
5566
  trailingSlash: this.config.trailingSlash,
5483
5567
  i18n
5484
5568
  }
@@ -5505,7 +5589,7 @@ var ServerRenderer = class {
5505
5589
  }
5506
5590
  /** Same inputs the production server gives llms.txt: static pages and root metadata. */
5507
5591
  async createLlmsTxtContext(request2, options = {}) {
5508
- const config = _chunk5PDMBWAFcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _191 => _191.config, 'access', _192 => _192.agent, 'optionalAccess', _193 => _193.llmsTxt]));
5592
+ const config = _chunkMKQ27TGWcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([this, 'access', _182 => _182.config, 'access', _183 => _183.agent, 'optionalAccess', _184 => _184.llmsTxt]));
5509
5593
  const origin = await this.getAgentOrigin(request2);
5510
5594
  const sources = await Promise.all(
5511
5595
  this.getAgentListedRoutes().map(async ([pattern, route]) => {
@@ -5522,26 +5606,26 @@ var ServerRenderer = class {
5522
5606
  );
5523
5607
  const rootLayout = this.routeManager.getLayouts().get("/");
5524
5608
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5525
- const pages = _chunk5PDMBWAFcjs.collectFarmLlmsTxtPages.call(void 0,
5609
+ const pages = _chunkMKQ27TGWcjs.collectFarmLlmsTxtPages.call(void 0,
5526
5610
  sources.filter((source) => source !== null),
5527
5611
  {
5528
5612
  origin,
5529
5613
  basePath: this.config.basePath,
5530
- markdown: _chunkHGB4PM2Ccjs.resolveMarkdownConfig.call(void 0, this.config.md),
5614
+ markdown: _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, this.config.md),
5531
5615
  include: config.include,
5532
5616
  exclude: config.exclude,
5533
5617
  trailingSlash: this.config.trailingSlash,
5534
- i18n: _optionalChain([this, 'access', _194 => _194.i18nRuntime, 'optionalAccess', _195 => _195.config])
5618
+ i18n: _optionalChain([this, 'access', _185 => _185.i18nRuntime, 'optionalAccess', _186 => _186.config])
5535
5619
  }
5536
5620
  );
5537
5621
  return {
5538
5622
  pages,
5539
- defaults: _chunk5PDMBWAFcjs.createFarmDefaultLlmsTxt.call(void 0, {
5623
+ defaults: _chunkMKQ27TGWcjs.createFarmDefaultLlmsTxt.call(void 0, {
5540
5624
  origin,
5541
5625
  pages,
5542
5626
  config,
5543
5627
  rootMetadata,
5544
- mcp: _optionalChain([this, 'access', _196 => _196.config, 'access', _197 => _197.agent, 'optionalAccess', _198 => _198.aiCatalog]) === false ? [] : _chunk4YHGQDTTcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
5628
+ mcp: _optionalChain([this, 'access', _187 => _187.config, 'access', _188 => _188.agent, 'optionalAccess', _189 => _189.aiCatalog]) === false ? [] : _chunkDM2YGTRHcjs.listFarmMCPLlmsTxtLinks.call(void 0, origin, {
5545
5629
  basePath: this.config.basePath,
5546
5630
  apiServerBasePath: _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0,
5547
5631
  _chunkPMJSG4JScjs.normalizeFarmAPIConfig.call(void 0,
@@ -5552,7 +5636,7 @@ var ServerRenderer = class {
5552
5636
  })
5553
5637
  }),
5554
5638
  ...options.full ? {
5555
- markdown: _chunk5PDMBWAFcjs.readFarmLlmsMarkdownFrom.call(void 0,
5639
+ markdown: _chunkMKQ27TGWcjs.readFarmLlmsMarkdownFrom.call(void 0,
5556
5640
  new URL(request2.url).origin,
5557
5641
  origin,
5558
5642
  this.createDevMarkdownReader(options.req)
@@ -5565,13 +5649,13 @@ var ServerRenderer = class {
5565
5649
  * `metadataBase`, else the request's origin, as for the sitemap and the production server.
5566
5650
  */
5567
5651
  async getAgentOrigin(request2) {
5568
- return _chunk5PDMBWAFcjs.resolveFarmAgentOrigin.call(void 0, await this.getRootMetadataBase(), new URL(request2.url).origin);
5652
+ return _chunkMKQ27TGWcjs.resolveFarmAgentOrigin.call(void 0, await this.getRootMetadataBase(), new URL(request2.url).origin);
5569
5653
  }
5570
5654
  /** The root layout's `metadataBase`, which generated agent files and list_pages link to. */
5571
5655
  async getRootMetadataBase() {
5572
5656
  const rootLayout = this.routeManager.getLayouts().get("/");
5573
5657
  const rootMetadata = rootLayout ? (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).metadata : void 0;
5574
- return _optionalChain([rootMetadata, 'optionalAccess', _199 => _199.metadataBase]);
5658
+ return _optionalChain([rootMetadata, 'optionalAccess', _190 => _190.metadataBase]);
5575
5659
  }
5576
5660
  /**
5577
5661
  * Reads page mirrors back through this dev server, the way its .md handler
@@ -5583,17 +5667,17 @@ var ServerRenderer = class {
5583
5667
  * body is discarded.
5584
5668
  */
5585
5669
  createDevMarkdownReader(req) {
5586
- const socket = _optionalChain([req, 'optionalAccess', _200 => _200.socket]);
5587
- if (_optionalChain([req, 'optionalAccess', _201 => _201.method, 'optionalAccess', _202 => _202.toUpperCase, 'call', _203 => _203()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _204 => _204.localAddress]) || !socket.localPort) {
5670
+ const socket = _optionalChain([req, 'optionalAccess', _191 => _191.socket]);
5671
+ if (_optionalChain([req, 'optionalAccess', _192 => _192.method, 'optionalAccess', _193 => _193.toUpperCase, 'call', _194 => _194()]) === "HEAD" || !_optionalChain([socket, 'optionalAccess', _195 => _195.localAddress]) || !socket.localPort) {
5588
5672
  return async () => null;
5589
5673
  }
5590
5674
  if (socket.encrypted) {
5591
5675
  const address = { host: socket.localAddress, port: socket.localPort };
5592
- return _chunk5PDMBWAFcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => requestOwnHttpsServer(page, address));
5676
+ return _chunkMKQ27TGWcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => requestOwnHttpsServer(page, address));
5593
5677
  }
5594
5678
  const host = socket.localAddress.includes(":") ? `[${socket.localAddress}]` : socket.localAddress;
5595
5679
  const localOrigin = `http://${host}:${socket.localPort}`;
5596
- const read = _chunk5PDMBWAFcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => fetch(page));
5680
+ const read = _chunkMKQ27TGWcjs.createFarmLlmsMarkdownReader.call(void 0, (page) => fetch(page));
5597
5681
  return (url) => {
5598
5682
  const target = new URL(url);
5599
5683
  return read(`${localOrigin}${target.pathname}${target.search}`);
@@ -5649,8 +5733,8 @@ var ServerRenderer = class {
5649
5733
  return;
5650
5734
  }
5651
5735
  const etag = `"${image.staticInfo.hash}"`;
5652
- const requestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
5653
- trustProxy: _optionalChain([this, 'access', _205 => _205.config, 'access', _206 => _206.server, 'optionalAccess', _207 => _207.trustProxy])
5736
+ const requestUrl = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
5737
+ trustProxy: _optionalChain([this, 'access', _196 => _196.config, 'access', _197 => _197.server, 'optionalAccess', _198 => _198.trustProxy])
5654
5738
  });
5655
5739
  const isVersioned = requestUrl.searchParams.get("v") === image.staticInfo.hash;
5656
5740
  res.setHeader("Content-Type", image.staticInfo.contentType);
@@ -5779,12 +5863,12 @@ window.__FARM_ISLAND_STRATEGY__ = ${JSON.stringify(req.__FARM_ISLAND_STRATEGY__
5779
5863
  window.__FARM_PAGE_MODULE__ = ${JSON.stringify(relativePath)};
5780
5864
  window.__FARM_LOADING_MODULE__ = ${JSON.stringify(req.__FARM_LOADING_MODULE_PATH__ || null)};
5781
5865
  window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
5782
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkJX5VOLAVcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
5866
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunk65OS2TOTcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
5783
5867
  window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
5784
5868
  </script>`);
5785
5869
  const deferredScript = farmScripts(createDeferredHydrationScript(deferredProps.records));
5786
5870
  const rendererHydrationScript = farmScripts(
5787
- _optionalChain([this, 'access', _208 => _208.rendererRuntime, 'access', _209 => _209.generateHydrationScript, 'optionalCall', _210 => _210()]) || ""
5871
+ _optionalChain([this, 'access', _199 => _199.rendererRuntime, 'access', _200 => _200.generateHydrationScript, 'optionalCall', _201 => _201()]) || ""
5788
5872
  );
5789
5873
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
5790
5874
  const farmClientScript = farmScripts(
@@ -5793,8 +5877,8 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5793
5877
  const { html: content, head: rendererHead } = await this.renderElementToDocumentParts(
5794
5878
  element,
5795
5879
  {
5796
- rejectLateNavigation: _chunkHGB4PM2Ccjs._isFarmMarkdownPageCheck.call(void 0,
5797
- _optionalChain([req, 'access', _211 => _211.headers, 'optionalAccess', _212 => _212[_chunkHGB4PM2Ccjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
5880
+ rejectLateNavigation: _chunkPG6ZIHKEcjs._isFarmMarkdownPageCheck.call(void 0,
5881
+ _optionalChain([req, 'access', _202 => _202.headers, 'optionalAccess', _203 => _203[_chunkPG6ZIHKEcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])
5798
5882
  )
5799
5883
  }
5800
5884
  );
@@ -5806,7 +5890,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5806
5890
  viewport: viewportTags
5807
5891
  } = _chunk6IOZPJ3Icjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
5808
5892
  pathname: getFarmMetadataPathname(req),
5809
- jsonLd: _optionalChain([this, 'access', _213 => _213.config, 'access', _214 => _214.agent, 'optionalAccess', _215 => _215.jsonLd])
5893
+ jsonLd: _optionalChain([this, 'access', _204 => _204.config, 'access', _205 => _205.agent, 'optionalAccess', _206 => _206.jsonLd])
5810
5894
  });
5811
5895
  const documentTitleTag = !hasExplicitTitle && /<title[\s>]/i.test(rendererHead) ? "" : `<title>${title}</title>`;
5812
5896
  const rendererHasTitle = /<title[\s>]/i.test(rendererHead);
@@ -5816,19 +5900,19 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5816
5900
  i18nSnapshot,
5817
5901
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
5818
5902
  ) : "";
5819
- const themeDocument = _chunkPXAHSCR6cjs.createFarmThemeDocumentParts.call(void 0,
5903
+ const themeDocument = _chunkO2A6HE76cjs.createFarmThemeDocumentParts.call(void 0,
5820
5904
  this.config.theme,
5821
5905
  this.config.basePath,
5822
- _chunkQIXEU2WVcjs.getTheme.call(void 0, )
5906
+ _chunkRQ4UZJPRcjs.getTheme.call(void 0, )
5823
5907
  );
5824
5908
  themeDocument.head = farmScripts(themeDocument.head);
5825
- const fullDocument = _chunkPXAHSCR6cjs.extractFarmFullDocument.call(void 0, content);
5909
+ const fullDocument = _chunkO2A6HE76cjs.extractFarmFullDocument.call(void 0, content);
5826
5910
  let html;
5827
5911
  if (fullDocument) {
5828
5912
  const shouldReplaceLayoutTitle = hasExplicitTitle || rendererHasTitle;
5829
- const documentHtml = shouldReplaceLayoutTitle ? _chunkPXAHSCR6cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
5830
- const effectiveRendererHead = hasExplicitTitle ? _chunkPXAHSCR6cjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
5831
- html = _chunkPXAHSCR6cjs.composeFarmFullDocument.call(void 0, documentHtml, {
5913
+ const documentHtml = shouldReplaceLayoutTitle ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument;
5914
+ const effectiveRendererHead = hasExplicitTitle ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, rendererHead) : rendererHead;
5915
+ html = _chunkO2A6HE76cjs.composeFarmFullDocument.call(void 0, documentHtml, {
5832
5916
  fallbackIcon: !hasFavicon,
5833
5917
  viewport: viewportTags,
5834
5918
  htmlAttributes: `${i18nSnapshot ? ` lang="${escapeHtmlAttribute2(i18nSnapshot.locale)}" dir="${escapeHtmlAttribute2(i18nSnapshot.direction)}"` : ""}${themeDocument.attributes}`,
@@ -5854,7 +5938,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5854
5938
  });
5855
5939
  } else {
5856
5940
  html = `<!DOCTYPE html>
5857
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _216 => _216.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
5941
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _207 => _207.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
5858
5942
  <head>
5859
5943
  ${themeDocument.head}
5860
5944
  <meta charset="utf-8">
@@ -5885,7 +5969,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5885
5969
  const securedHtml = this.secureDocumentHTML(req, html);
5886
5970
  if ((req.method || "GET").toUpperCase() !== "HEAD") res.write(securedHtml);
5887
5971
  res.end();
5888
- if (!options.captureStaticShell) await _optionalChain([options, 'access', _217 => _217.onComplete, 'optionalCall', _218 => _218(securedHtml)]);
5972
+ if (!options.captureStaticShell) await _optionalChain([options, 'access', _208 => _208.onComplete, 'optionalCall', _209 => _209(securedHtml)]);
5889
5973
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
5890
5974
  type: "render.stream.complete",
5891
5975
  route,
@@ -5895,7 +5979,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5895
5979
  emitFarmRenderError(req, route, error);
5896
5980
  throw error;
5897
5981
  } finally {
5898
- _optionalChain([clearMiddlewareData, 'optionalCall', _219 => _219()]);
5982
+ _optionalChain([clearMiddlewareData, 'optionalCall', _210 => _210()]);
5899
5983
  }
5900
5984
  }
5901
5985
  /**
@@ -5910,7 +5994,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5910
5994
  if (!rootLayout) return false;
5911
5995
  try {
5912
5996
  const Layout = (await this.routeManager.loadLayoutModule(rootLayout.modulePath)).default;
5913
- if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _220 => _220.prototype, 'optionalAccess', _221 => _221.isReactComponent]) || _optionalChain([Layout, 'access', _222 => _222.constructor, 'optionalAccess', _223 => _223.name]) === "AsyncFunction") {
5997
+ if (typeof Layout !== "function" || _optionalChain([Layout, 'access', _211 => _211.prototype, 'optionalAccess', _212 => _212.isReactComponent]) || _optionalChain([Layout, 'access', _213 => _213.constructor, 'optionalAccess', _214 => _214.name]) === "AsyncFunction") {
5914
5998
  return false;
5915
5999
  }
5916
6000
  const cached = documentLayouts.get(Layout);
@@ -5935,7 +6019,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
5935
6019
  const renderToPipeableStream = this.rendererRuntime.renderToPipeableStream;
5936
6020
  const fullDocumentRouteKey = options.observabilityRoute || req.__FARM_ROUTE__ || req.url || "/";
5937
6021
  const streamDocument = fullDocumentRoutes.has(fullDocumentRouteKey) || await this.rootLayoutRendersDocument();
5938
- if (!renderToPipeableStream || _chunkHGB4PM2Ccjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _224 => _224.headers, 'optionalAccess', _225 => _225[_chunkHGB4PM2Ccjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
6022
+ if (!renderToPipeableStream || _chunkPG6ZIHKEcjs._isFarmMarkdownPageCheck.call(void 0, _optionalChain([req, 'access', _215 => _215.headers, 'optionalAccess', _216 => _216[_chunkPG6ZIHKEcjs.FARM_MARKDOWN_PAGE_CHECK_HEADER]])) || streamDocument && (options.captureStaticShell || !_chunk67MZTLTFcjs.isReactRenderer.call(void 0, this.config.renderer))) {
5939
6023
  return this.renderBufferedSSR(element, req, res, clearMiddlewareData, options);
5940
6024
  }
5941
6025
  return new Promise((resolve3, reject) => {
@@ -6005,9 +6089,9 @@ window.__FARM_LOADING_MODULE__ = ${JSON.stringify(
6005
6089
  req.__FARM_LOADING_MODULE_PATH__ || null
6006
6090
  )};
6007
6091
  window.__FARM_MANIFEST__ = ${JSON.stringify(clientManifest)};
6008
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkJX5VOLAVcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6092
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunk65OS2TOTcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6009
6093
  window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, ) ? serializeInlineValue(_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )) : "null"};
6010
- </script>${_chunkW44X6IC2cjs.renderFarmFormStateScript.call(void 0, )}`;
6094
+ </script>${_chunkHBLYSWIJcjs.renderFarmFormStateScript.call(void 0, )}`;
6011
6095
  const islandsOnlyPage = this.islandValues() && req.__FARM_PAGE_SHOULD_HYDRATE__ !== true && req.__FARM_LAYOUT_SHOULD_HYDRATE__ !== true && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true;
6012
6096
  const rootStrategy = req.__FARM_ISLAND_STRATEGY__;
6013
6097
  const waitingRoot = this.islandValues() && !islandsOnlyPage && req.__FARM_HAS_HYDRATABLE_ROUTE_SLOTS__ !== true && rootStrategy !== void 0 && rootStrategy !== "load" ? req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? "root" : "__farm_page__" : null;
@@ -6021,7 +6105,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6021
6105
  viewport: viewportTags
6022
6106
  } = _chunk6IOZPJ3Icjs.renderMetadataHead.call(void 0, req.__FARM_METADATA__, {
6023
6107
  pathname: getFarmMetadataPathname(req),
6024
- jsonLd: _optionalChain([this, 'access', _226 => _226.config, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.jsonLd])
6108
+ jsonLd: _optionalChain([this, 'access', _217 => _217.config, 'access', _218 => _218.agent, 'optionalAccess', _219 => _219.jsonLd])
6025
6109
  });
6026
6110
  const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
6027
6111
  const i18nAlternateTags = i18nSnapshot ? renderI18nAlternateLinks(
@@ -6030,10 +6114,10 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6030
6114
  this.getI18nAlternateOptions(req, req.__FARM_METADATA__)
6031
6115
  ) : "";
6032
6116
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
6033
- const themeDocument = _chunkPXAHSCR6cjs.createFarmThemeDocumentParts.call(void 0,
6117
+ const themeDocument = _chunkO2A6HE76cjs.createFarmThemeDocumentParts.call(void 0,
6034
6118
  this.config.theme,
6035
6119
  this.config.basePath,
6036
- _chunkQIXEU2WVcjs.getTheme.call(void 0, )
6120
+ _chunkRQ4UZJPRcjs.getTheme.call(void 0, )
6037
6121
  );
6038
6122
  const streamRoot = req.__FARM_LAYOUT_SHOULD_HYDRATE__ === true ? element : this.rendererRuntime.createElement("div", { style: { display: "contents" } }, element);
6039
6123
  const devStyleLinks = this.collectDevStyleLinks();
@@ -6046,10 +6130,10 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6046
6130
  const earlyClientScript = bootClient ? createFarmDevBootScript(waitingRoot, rootStrategy) : FARM_DEV_EARLY_CLIENT_SCRIPT;
6047
6131
  const { pipe, abort } = renderToPipeableStream(streamRoot, {
6048
6132
  nonce: cspNonce,
6049
- formState: _chunkW44X6IC2cjs.getFarmFormState.call(void 0, ),
6133
+ formState: _chunkHBLYSWIJcjs.getFarmFormState.call(void 0, ),
6050
6134
  onShellReady() {
6051
6135
  if (pendingNavigationError) {
6052
- _optionalChain([abort, 'optionalCall', _229 => _229(pendingNavigationError)]);
6136
+ _optionalChain([abort, 'optionalCall', _220 => _220(pendingNavigationError)]);
6053
6137
  if (clearMiddlewareData) {
6054
6138
  clearMiddlewareData();
6055
6139
  }
@@ -6067,7 +6151,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6067
6151
  console.log(`[FARM STREAM] onShellReady at ${shellReadyMs}ms`);
6068
6152
  }
6069
6153
  const shell = `<!DOCTYPE html>
6070
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _230 => _230.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6154
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _221 => _221.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6071
6155
  <head>
6072
6156
  ${themeDocument.head}
6073
6157
  <meta charset="utf-8">
@@ -6088,14 +6172,14 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6088
6172
  let pendingShell = streamDocument ? "" : stampDocumentHTML(shell);
6089
6173
  let heldHead = "";
6090
6174
  const releaseShell = (complete) => {
6091
- const split = _chunkPXAHSCR6cjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6175
+ const split = _chunkO2A6HE76cjs.takeFarmHoistedHead.call(void 0, heldHead, complete);
6092
6176
  if (!split) return null;
6093
- const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkPXAHSCR6cjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
6094
- const opened = _chunkPXAHSCR6cjs.appendFarmHead.call(void 0, shellHead, split.head);
6177
+ const shellHead = !hasExplicitTitle && /<title[\s>]/i.test(split.head) ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, pendingShell) : pendingShell;
6178
+ const opened = _chunkO2A6HE76cjs.appendFarmHead.call(void 0, shellHead, split.head);
6095
6179
  pendingShell = "";
6096
6180
  heldHead = "";
6097
6181
  htmlParts.push(opened);
6098
- _optionalChain([staticShellParts, 'optionalAccess', _231 => _231.push, 'call', _232 => _232(opened)]);
6182
+ _optionalChain([staticShellParts, 'optionalAccess', _222 => _222.push, 'call', _223 => _223(opened)]);
6099
6183
  res.write(opened);
6100
6184
  return split.body;
6101
6185
  };
@@ -6107,10 +6191,10 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6107
6191
  ${stampDocumentHTML(earlyClientScript)}`
6108
6192
  )
6109
6193
  } : document;
6110
- const documentTransform = streamDocument ? _chunkPXAHSCR6cjs.createFarmStreamedDocumentTransform.call(void 0,
6194
+ const documentTransform = streamDocument ? _chunkO2A6HE76cjs.createFarmStreamedDocumentTransform.call(void 0,
6111
6195
  (opening) => withEarlyClient(
6112
- _chunkPXAHSCR6cjs.openFarmStreamedDocument.call(void 0,
6113
- hasExplicitTitle ? _chunkPXAHSCR6cjs.removeFarmDocumentTitles.call(void 0, opening) : opening,
6196
+ _chunkO2A6HE76cjs.openFarmStreamedDocument.call(void 0,
6197
+ hasExplicitTitle ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, opening) : opening,
6114
6198
  {
6115
6199
  fallbackIcon: !hasFavicon,
6116
6200
  viewport: viewportTags,
@@ -6149,7 +6233,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6149
6233
  const recordRenderedChunk = (chunkText, renderedText = chunkText) => {
6150
6234
  if (!checkedFullDocument && renderedText) {
6151
6235
  documentPrefix += renderedText;
6152
- const prefix = _chunkPXAHSCR6cjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6236
+ const prefix = _chunkO2A6HE76cjs.classifyFarmDocumentPrefix.call(void 0, documentPrefix);
6153
6237
  if (prefix !== "pending") {
6154
6238
  checkedFullDocument = true;
6155
6239
  documentPrefix = "";
@@ -6168,7 +6252,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6168
6252
  staticShellClosed = true;
6169
6253
  if (!suspenseHoleEmitted) {
6170
6254
  suspenseHoleEmitted = true;
6171
- _optionalChain([options, 'access', _233 => _233.onSuspenseHoleDetected, 'optionalCall', _234 => _234()]);
6255
+ _optionalChain([options, 'access', _224 => _224.onSuspenseHoleDetected, 'optionalCall', _225 => _225()]);
6172
6256
  }
6173
6257
  } else {
6174
6258
  staticShellParts.push(chunkText);
@@ -6220,7 +6304,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6220
6304
  const body = releaseShell(true);
6221
6305
  if (body) {
6222
6306
  htmlParts.push(body);
6223
- _optionalChain([staticShellParts, 'optionalAccess', _235 => _235.push, 'call', _236 => _236(body)]);
6307
+ _optionalChain([staticShellParts, 'optionalAccess', _226 => _226.push, 'call', _227 => _227(body)]);
6224
6308
  res.write(body);
6225
6309
  }
6226
6310
  }
@@ -6252,8 +6336,8 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6252
6336
  recordRenderedChunk(tail, rewritten);
6253
6337
  if (tail) res.write(tail);
6254
6338
  }
6255
- const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _237 => _237.end, 'call', _238 => _238()]);
6256
- if (_optionalChain([documentEnd, 'optionalAccess', _239 => _239.text])) {
6339
+ const documentEnd = _optionalChain([documentTransform, 'optionalAccess', _228 => _228.end, 'call', _229 => _229()]);
6340
+ if (_optionalChain([documentEnd, 'optionalAccess', _230 => _230.text])) {
6257
6341
  recordRenderedChunk(documentEnd.text, "");
6258
6342
  res.write(documentEnd.text);
6259
6343
  }
@@ -6264,7 +6348,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6264
6348
  deferredHydrationScript: createDeferredHydrationScript(deferredProps.records),
6265
6349
  earlyClient,
6266
6350
  // A full document: Farm's #root closes only where Farm opened it.
6267
- ..._optionalChain([documentEnd, 'optionalAccess', _240 => _240.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6351
+ ..._optionalChain([documentEnd, 'optionalAccess', _231 => _231.document]) ? { closeRoot: documentEnd.rootOpened } : {}
6268
6352
  })
6269
6353
  );
6270
6354
  htmlParts.push(footer);
@@ -6376,7 +6460,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6376
6460
  return await this.routeManager.loadRouteModule(notFoundPath);
6377
6461
  }
6378
6462
  async loadNotFoundComponent() {
6379
- return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _241 => _241.default]), async () => ( null));
6463
+ return await _asyncNullishCoalesce(await _asyncOptionalChain([(await this.loadNotFoundModule()), 'optionalAccess', async _232 => _232.default]), async () => ( null));
6380
6464
  }
6381
6465
  /** The not-found document's head: layout and not-found metadata, as production renders it. */
6382
6466
  async notFoundMetadataHead(layoutModule, notFoundModule) {
@@ -6399,13 +6483,13 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6399
6483
  */
6400
6484
  async createLateNavigationRecoveryHTML(req, error) {
6401
6485
  if (_chunk7JUIK547cjs.isFarmRedirectError.call(void 0, error)) {
6402
- return _chunkPXAHSCR6cjs.createLateRedirectRecovery.call(void 0,
6486
+ return _chunkO2A6HE76cjs.createLateRedirectRecovery.call(void 0,
6403
6487
  this.localizeRedirectUrl(_chunk7JUIK547cjs.getFarmRedirectError.call(void 0, error).url),
6404
6488
  this.getCspNonce(req) || ""
6405
6489
  );
6406
6490
  }
6407
- const pathname = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
6408
- trustProxy: _optionalChain([this, 'access', _242 => _242.config, 'access', _243 => _243.server, 'optionalAccess', _244 => _244.trustProxy])
6491
+ const pathname = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
6492
+ trustProxy: _optionalChain([this, 'access', _233 => _233.config, 'access', _234 => _234.server, 'optionalAccess', _235 => _235.trustProxy])
6409
6493
  }).pathname;
6410
6494
  let content = this.defaultNotFoundContent();
6411
6495
  const NotFoundComponent = await this.loadNotFoundComponent();
@@ -6420,12 +6504,12 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6420
6504
  _chunkQMNWKQL4cjs.logger.warn(`not-found page could not render outside its layout, using Farm's: ${error2}`);
6421
6505
  }
6422
6506
  }
6423
- return _chunkPXAHSCR6cjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
6507
+ return _chunkO2A6HE76cjs.createLateNotFoundRecovery.call(void 0, content, this.getCspNonce(req) || "");
6424
6508
  }
6425
6509
  async render404(req, res) {
6426
6510
  res.statusCode = 404;
6427
- const pathname = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
6428
- trustProxy: _optionalChain([this, 'access', _245 => _245.config, 'access', _246 => _246.server, 'optionalAccess', _247 => _247.trustProxy])
6511
+ const pathname = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
6512
+ trustProxy: _optionalChain([this, 'access', _236 => _236.config, 'access', _237 => _237.server, 'optionalAccess', _238 => _238.trustProxy])
6429
6513
  }).pathname;
6430
6514
  if (_chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, this.config.renderer)) {
6431
6515
  res.setHeader("Content-Type", "application/json");
@@ -6442,11 +6526,11 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6442
6526
  }
6443
6527
  const acceptHeader = req.headers.accept;
6444
6528
  const accept = Array.isArray(acceptHeader) ? acceptHeader.join(",") : acceptHeader;
6445
- if (_chunkHGB4PM2Ccjs.farmRequestWantsMarkdown.call(void 0, pathname, accept)) {
6446
- res.setHeader("Content-Type", _chunkHGB4PM2Ccjs.FARM_MARKDOWN_CONTENT_TYPE);
6529
+ if (_chunkPG6ZIHKEcjs.farmRequestWantsMarkdown.call(void 0, pathname, accept)) {
6530
+ res.setHeader("Content-Type", _chunkPG6ZIHKEcjs.FARM_MARKDOWN_CONTENT_TYPE);
6447
6531
  res.setHeader("X-Farm-Markdown-Error", "404");
6448
6532
  res.setHeader("Cache-Control", "no-store");
6449
- res.end(_chunkHGB4PM2Ccjs.createFarmMarkdownErrorBody.call(void 0, 404, pathname, this.config.basePath || "/"));
6533
+ res.end(_chunkPG6ZIHKEcjs.createFarmMarkdownErrorBody.call(void 0, 404, pathname, this.config.basePath || "/"));
6450
6534
  return;
6451
6535
  }
6452
6536
  const appDir = path9.join(this.config.root, this.config.srcDir, "app");
@@ -6466,9 +6550,9 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6466
6550
  );
6467
6551
  if (notFoundPath) {
6468
6552
  const notFoundModule = await this.loadNotFoundModule();
6469
- const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _248 => _248.default]), () => ( null));
6553
+ const NotFoundComponent = _nullishCoalesce(_optionalChain([notFoundModule, 'optionalAccess', _239 => _239.default]), () => ( null));
6470
6554
  if (NotFoundComponent) {
6471
- const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _249 => _249.default]), () => ( null));
6555
+ const LayoutComponent = _nullishCoalesce(_optionalChain([layoutModule, 'optionalAccess', _240 => _240.default]), () => ( null));
6472
6556
  let element = this.rendererRuntime.createElement(NotFoundComponent, { pathname });
6473
6557
  if (LayoutComponent) {
6474
6558
  element = this.rendererRuntime.createElement(LayoutComponent, {
@@ -6504,24 +6588,24 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6504
6588
  }
6505
6589
  res.statusCode = statusCode;
6506
6590
  const isDev = process.env.NODE_ENV === "development";
6507
- const requestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
6508
- trustProxy: _optionalChain([this, 'access', _250 => _250.config, 'access', _251 => _251.server, 'optionalAccess', _252 => _252.trustProxy])
6591
+ const requestUrl = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, {
6592
+ trustProxy: _optionalChain([this, 'access', _241 => _241.config, 'access', _242 => _242.server, 'optionalAccess', _243 => _243.trustProxy])
6509
6593
  });
6510
6594
  const diagnostics = isDev ? createDefaultErrorDiagnostics(error, this.config.root || process.cwd()) : void 0;
6511
- const statusText = _chunkPXAHSCR6cjs.getDefaultErrorStatusText.call(void 0, statusCode);
6595
+ const statusText = _chunkO2A6HE76cjs.getDefaultErrorStatusText.call(void 0, statusCode);
6512
6596
  const content = this.stampFarmScripts(
6513
6597
  req,
6514
- _chunkPXAHSCR6cjs.createDefaultErrorMarkup.call(void 0, {
6598
+ _chunkO2A6HE76cjs.createDefaultErrorMarkup.call(void 0, {
6515
6599
  statusCode,
6516
6600
  statusText,
6517
6601
  requestPath: requestUrl.pathname,
6518
6602
  method: req.method || "GET",
6519
- message: _optionalChain([diagnostics, 'optionalAccess', _253 => _253.message]),
6520
- errorName: _optionalChain([diagnostics, 'optionalAccess', _254 => _254.name]),
6521
- stack: _optionalChain([diagnostics, 'optionalAccess', _255 => _255.stack]),
6522
- sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _256 => _256.sourceFrame]),
6603
+ message: _optionalChain([diagnostics, 'optionalAccess', _244 => _244.message]),
6604
+ errorName: _optionalChain([diagnostics, 'optionalAccess', _245 => _245.name]),
6605
+ stack: _optionalChain([diagnostics, 'optionalAccess', _246 => _246.stack]),
6606
+ sourceFrame: _optionalChain([diagnostics, 'optionalAccess', _247 => _247.sourceFrame]),
6523
6607
  development: isDev,
6524
- farmVersion: _chunkUVQRMUARcjs.FARM_VERSION,
6608
+ farmVersion: _chunkRSL3YFJGcjs.FARM_VERSION,
6525
6609
  nodeVersion: process.version,
6526
6610
  mode: isDev ? "development" : "production"
6527
6611
  })
@@ -6547,8 +6631,8 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6547
6631
  */
6548
6632
  getI18nAlternateOptions(req, metadata) {
6549
6633
  return {
6550
- metadataBase: _optionalChain([metadata, 'optionalAccess', _257 => _257.metadataBase]),
6551
- origin: req ? _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _258 => _258.config, 'access', _259 => _259.server, 'optionalAccess', _260 => _260.trustProxy]) }).origin : void 0
6634
+ metadataBase: _optionalChain([metadata, 'optionalAccess', _248 => _248.metadataBase]),
6635
+ origin: req ? _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _249 => _249.config, 'access', _250 => _250.server, 'optionalAccess', _251 => _251.trustProxy]) }).origin : void 0
6552
6636
  };
6553
6637
  }
6554
6638
  createFullHTML(content, isClientComponent = false, requestPath = "/", metadataHead, alternates = {}) {
@@ -6558,7 +6642,7 @@ window.__FARM_I18N__ = ${_chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0
6558
6642
  const viteClientScript = farmScripts(`<script type="module" src="/@vite/client"></script>`);
6559
6643
  const integrationManifestScript = farmScripts(`<script>
6560
6644
  window.__FARM_DEPLOYMENT_ID__ = ${serializeInlineValue(this.getDeploymentId())};
6561
- window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunkJX5VOLAVcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6645
+ window.__FARM_INTEGRATION_API_MANIFEST__ = ${JSON.stringify(_chunk65OS2TOTcjs.getRegisteredIntegrationAPIManifest.call(void 0, ))};
6562
6646
  ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};` : ""}
6563
6647
  </script>`);
6564
6648
  const alternateLinks = i18nSnapshot ? renderI18nAlternateLinks(
@@ -6567,20 +6651,20 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
6567
6651
  this.getI18nAlternateOptions(alternates.req, alternates.metadata)
6568
6652
  ) : "";
6569
6653
  const fontHead = renderFarmFontDevHead(this.config.root || process.cwd());
6570
- const themeDocument = _chunkPXAHSCR6cjs.createFarmThemeDocumentParts.call(void 0,
6654
+ const themeDocument = _chunkO2A6HE76cjs.createFarmThemeDocumentParts.call(void 0,
6571
6655
  this.config.theme,
6572
6656
  this.config.basePath,
6573
- _chunkQIXEU2WVcjs.getTheme.call(void 0, )
6657
+ _chunkRQ4UZJPRcjs.getTheme.call(void 0, )
6574
6658
  );
6575
6659
  themeDocument.head = farmScripts(themeDocument.head);
6576
6660
  const rendererHydrationScript = farmScripts(
6577
- _optionalChain([this, 'access', _261 => _261.rendererRuntime, 'access', _262 => _262.generateHydrationScript, 'optionalCall', _263 => _263()]) || ""
6661
+ _optionalChain([this, 'access', _252 => _252.rendererRuntime, 'access', _253 => _253.generateHydrationScript, 'optionalCall', _254 => _254()]) || ""
6578
6662
  );
6579
- const viewportTags = _chunk6IOZPJ3Icjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _264 => _264.metadata, 'optionalAccess', _265 => _265.viewport]));
6580
- const fullDocument = _chunkPXAHSCR6cjs.extractFarmFullDocument.call(void 0, content);
6663
+ const viewportTags = _chunk6IOZPJ3Icjs.renderViewportHead.call(void 0, _optionalChain([alternates, 'access', _255 => _255.metadata, 'optionalAccess', _256 => _256.viewport]));
6664
+ const fullDocument = _chunkO2A6HE76cjs.extractFarmFullDocument.call(void 0, content);
6581
6665
  if (fullDocument) {
6582
- return _chunkPXAHSCR6cjs.composeFarmFullDocument.call(void 0,
6583
- metadataHead ? _chunkPXAHSCR6cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
6666
+ return _chunkO2A6HE76cjs.composeFarmFullDocument.call(void 0,
6667
+ metadataHead ? _chunkO2A6HE76cjs.removeFarmDocumentTitles.call(void 0, fullDocument) : fullDocument,
6584
6668
  {
6585
6669
  fallbackIcon: !metadataHead,
6586
6670
  viewport: viewportTags,
@@ -6606,7 +6690,7 @@ ${i18nSnapshot ? `window.__FARM_I18N__ = ${serializeInlineValue(i18nSnapshot)};`
6606
6690
  );
6607
6691
  }
6608
6692
  return `<!DOCTYPE html>
6609
- <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _266 => _266.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6693
+ <html lang="${escapeHtmlAttribute2(_optionalChain([i18nSnapshot, 'optionalAccess', _257 => _257.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}${themeDocument.attributes}>
6610
6694
  <head>
6611
6695
  ${themeDocument.head}
6612
6696
  <meta charset="utf-8">
@@ -6647,8 +6731,7 @@ ${clientScript}
6647
6731
  const deploymentId = this.getDeploymentId();
6648
6732
  res.setHeader(_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER, deploymentId);
6649
6733
  if ((req.method || "GET").toUpperCase() !== "GET") return;
6650
- const forwardedProto = req.headers["x-forwarded-proto"];
6651
- const isSecure = _optionalChain([(Array.isArray(forwardedProto) ? forwardedProto[0] : forwardedProto), 'optionalAccess', _267 => _267.split, 'call', _268 => _268(","), 'access', _269 => _269[0], 'optionalAccess', _270 => _270.trim, 'call', _271 => _271()]) === "https" || Boolean(_optionalChain([req, 'access', _272 => _272.socket, 'optionalAccess', _273 => _273.encrypted]));
6734
+ const isSecure = _chunk4M5ESTJ2cjs.resolveFarmRequestURL.call(void 0, req, { trustProxy: _optionalChain([this, 'access', _258 => _258.config, 'access', _259 => _259.server, 'optionalAccess', _260 => _260.trustProxy]) }).protocol === "https:";
6652
6735
  const cookie = _chunkNLBHLPEOcjs.createFarmDeploymentCookie.call(void 0, deploymentId, this.config.basePath || "/", isSecure);
6653
6736
  const existing = res.getHeader("Set-Cookie");
6654
6737
  if (Array.isArray(existing)) {
@@ -6689,7 +6772,7 @@ var FarmApp = class {
6689
6772
  constructor(config = {}, viteServer) {
6690
6773
  this.config = this.normalizeConfig(config);
6691
6774
  _chunkEVIWKPJVcjs.configureFarmObservability.call(void 0, this.config.observability);
6692
- _chunkQIXEU2WVcjs._setDefaultFarmThemeConfig.call(void 0, this.config.theme);
6775
+ _chunkRQ4UZJPRcjs._setDefaultFarmThemeConfig.call(void 0, this.config.theme);
6693
6776
  this.i18nRuntime = _chunkNLBK37HIcjs.createFarmI18nRuntime.call(void 0, this.config.i18n);
6694
6777
  _chunkNLBK37HIcjs._setDefaultFarmI18nRuntime.call(void 0, this.i18nRuntime);
6695
6778
  this.viteServer = viteServer;
@@ -6706,7 +6789,7 @@ var FarmApp = class {
6706
6789
  _chunkQMNWKQL4cjs.logger.info("Initializing Farm.js application...");
6707
6790
  }
6708
6791
  await _chunkJMYXO572cjs.initStorage.call(void 0, this.config.storage);
6709
- await _chunkDMAP4RNDcjs.configureFarmCache.call(void 0, this.config.cache);
6792
+ await _chunk3OMLZLDEcjs.configureFarmCache.call(void 0, this.config.cache);
6710
6793
  await this.i18nRuntime.initialize();
6711
6794
  await this.serverRenderer.initialize();
6712
6795
  await this.verifyAppStructure();
@@ -6750,20 +6833,20 @@ var FarmApp = class {
6750
6833
  integrations: config.integrations || {},
6751
6834
  plugins: config.plugins || [],
6752
6835
  migrations: config.migrations || { commands: [] },
6753
- cron: _chunkYAEN3L2Fcjs.resolveCronConfig.call(void 0, config.cron),
6836
+ cron: _chunkEF5AP4CVcjs.resolveCronConfig.call(void 0, config.cron),
6754
6837
  workflows: _chunkFSODPZRTcjs.resolveWorkflowsConfig.call(void 0, config.workflows),
6755
6838
  api: normalizeFarmAppAPIConfig(config.api),
6756
6839
  middleware: config.middleware || {},
6757
6840
  routeRules: _chunkMQ4DYVFScjs.normalizeRouteRules.call(void 0, config.routeRules),
6758
6841
  context: config.context || (() => void 0),
6759
6842
  server: _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, config.server),
6760
- serverActions: _chunk4P5634G6cjs.resolveServerActionsConfig.call(void 0, config.serverActions),
6843
+ serverActions: _chunkLIQJYEQPcjs.resolveServerActionsConfig.call(void 0, config.serverActions),
6761
6844
  security: _chunk6JHZPB52cjs.resolveFarmSecurityConfig.call(void 0, config.security),
6762
6845
  images: _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
6763
6846
  config.images,
6764
6847
  _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
6765
6848
  ),
6766
- performance: _chunkODBM54RTcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
6849
+ performance: _chunkF244KE2Dcjs.resolveFarmPerformanceConfig.call(void 0, config.performance),
6767
6850
  theme: _chunkWT6RAN2Icjs.resolveFarmThemeConfig.call(void 0, config.theme, basePath),
6768
6851
  i18n: isResolvedI18nConfig(config.i18n) ? config.i18n : _chunkZMSVKVI3cjs.resolveFarmI18nConfig.call(void 0, config.i18n, {
6769
6852
  root,
@@ -6775,7 +6858,7 @@ var FarmApp = class {
6775
6858
  serverRuntimeConfig: config.serverRuntimeConfig || {},
6776
6859
  publicRuntimeConfig: config.publicRuntimeConfig || {},
6777
6860
  docs: isResolvedDocsConfig(config.docs) ? config.docs : defaultDocsConfig,
6778
- md: _chunkHGB4PM2Ccjs.resolveMarkdownConfig.call(void 0, config.md),
6861
+ md: _chunkPG6ZIHKEcjs.resolveMarkdownConfig.call(void 0, config.md),
6779
6862
  mdx: _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx),
6780
6863
  observability: _nullishCoalesce(config.observability, () => ( false)),
6781
6864
  telemetry: config.telemetry !== false,
@@ -6791,10 +6874,10 @@ var FarmApp = class {
6791
6874
  env: config.env || { server: {}, public: {} },
6792
6875
  suppressLintOnLink: _nullishCoalesce(config.suppressLintOnLink, () => ( false)),
6793
6876
  experimental: {
6794
- serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _274 => _274.experimental, 'optionalAccess', _275 => _275.serverComponents]), () => ( false)),
6795
- serverActions: _nullishCoalesce(_optionalChain([config, 'access', _276 => _276.experimental, 'optionalAccess', _277 => _277.serverActions]), () => ( false)),
6796
- isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _278 => _278.experimental, 'optionalAccess', _279 => _279.isolatedClientHydration]), () => ( "off")),
6797
- ppr: _nullishCoalesce(_optionalChain([config, 'access', _280 => _280.experimental, 'optionalAccess', _281 => _281.ppr]), () => ( false)),
6877
+ serverComponents: _nullishCoalesce(_optionalChain([config, 'access', _261 => _261.experimental, 'optionalAccess', _262 => _262.serverComponents]), () => ( false)),
6878
+ serverActions: _nullishCoalesce(_optionalChain([config, 'access', _263 => _263.experimental, 'optionalAccess', _264 => _264.serverActions]), () => ( false)),
6879
+ isolatedClientHydration: _nullishCoalesce(_optionalChain([config, 'access', _265 => _265.experimental, 'optionalAccess', _266 => _266.isolatedClientHydration]), () => ( "off")),
6880
+ ppr: _nullishCoalesce(_optionalChain([config, 'access', _267 => _267.experimental, 'optionalAccess', _268 => _268.ppr]), () => ( false)),
6798
6881
  ...config.experimental
6799
6882
  },
6800
6883
  agent: _nullishCoalesce(config.agent, () => ( {})),
@@ -6820,7 +6903,7 @@ var FarmApp = class {
6820
6903
  );
6821
6904
  if (!hasAppDirectory) {
6822
6905
  const routeFiles = _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, this.config).flatMap(
6823
- (source) => _chunkQEJWNXRIcjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
6906
+ (source) => _chunkEMRYJG4Ucjs.findProgrammaticRouteFiles.call(void 0, source.root, source.srcDir)
6824
6907
  );
6825
6908
  if (routeFiles.length > 0) {
6826
6909
  return;
@@ -6853,7 +6936,7 @@ function isResolvedAuthConfig(value) {
6853
6936
  );
6854
6937
  }
6855
6938
  function normalizeFarmAppAPIConfig(config) {
6856
- if (typeof _optionalChain([config, 'optionalAccess', _282 => _282.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _283 => _283.basePath]) === "function") {
6939
+ if (typeof _optionalChain([config, 'optionalAccess', _269 => _269.baseURL]) === "function" || typeof _optionalChain([config, 'optionalAccess', _270 => _270.basePath]) === "function") {
6857
6940
  throw new Error(
6858
6941
  "Farm API config resolver functions must be processed with resolveConfig() before creating a FarmApp."
6859
6942
  );
@@ -6868,7 +6951,7 @@ function createFarmApp(config, viteServer) {
6868
6951
  var SHARP_INSTALL_HINT = _chunkKORZ6PREcjs.formatOptionalPeerInstallHint.call(void 0, "sharp", "optimize images");
6869
6952
  var CLOUDFLARE_IMAGE_PRESETS = /* @__PURE__ */ new Set(["cloudflare", "cloudflare-pages", "cloudflare-module"]);
6870
6953
  function resolveFarmImageProviderForRuntime(images, options) {
6871
- const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _284 => _284.provider]), () => ( "auto"));
6954
+ const provider = _nullishCoalesce(_optionalChain([images, 'optionalAccess', _271 => _271.provider]), () => ( "auto"));
6872
6955
  if (provider === "none") return images;
6873
6956
  const usesSharp = options.dev ? true : provider === "node" || provider === "auto" && !CLOUDFLARE_IMAGE_PRESETS.has(options.preset || "");
6874
6957
  if (!usesSharp || _chunkKORZ6PREcjs.isOptionalPeerInstalled.call(void 0, options.root, "sharp")) return images;
@@ -6997,9 +7080,9 @@ function staticValue(node) {
6997
7080
  }
6998
7081
  }
6999
7082
  function property(object, name) {
7000
- return _optionalChain([object, 'access', _285 => _285.properties, 'access', _286 => _286.find, 'call', _287 => _287(
7083
+ return _optionalChain([object, 'access', _272 => _272.properties, 'access', _273 => _273.find, 'call', _274 => _274(
7001
7084
  (entry) => entry.type === "Property" && !entry.computed && (entry.key.name === name || entry.key.value === name)
7002
- ), 'optionalAccess', _288 => _288.value]);
7085
+ ), 'optionalAccess', _275 => _275.value]);
7003
7086
  }
7004
7087
  function toolFromObject(object) {
7005
7088
  const name = staticValue(property(object, "name"));
@@ -7045,7 +7128,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
7045
7128
  if (statement.type !== "ImportDeclaration" || statement.source.value !== WEBMCP_CLIENT)
7046
7129
  continue;
7047
7130
  for (const specifier of statement.specifiers) {
7048
- const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _289 => _289.imported, 'optionalAccess', _290 => _290.name]), () => ( _optionalChain([specifier, 'access', _291 => _291.imported, 'optionalAccess', _292 => _292.value])));
7131
+ const imported = _nullishCoalesce(_optionalChain([specifier, 'access', _276 => _276.imported, 'optionalAccess', _277 => _277.name]), () => ( _optionalChain([specifier, 'access', _278 => _278.imported, 'optionalAccess', _279 => _279.value])));
7049
7132
  if (specifier.type === "ImportSpecifier" && DEFINERS.has(imported))
7050
7133
  locals.set(specifier.local.name, imported);
7051
7134
  }
@@ -7061,7 +7144,7 @@ function findFarmWebMCPTools(code, filename = "module.tsx") {
7061
7144
  const [argument] = current.arguments;
7062
7145
  if (definer && argument) {
7063
7146
  const objects = definer === "registerWebMCPTools" ? argument.type === "ArrayExpression" ? argument.elements.filter(
7064
- (element) => _optionalChain([element, 'optionalAccess', _293 => _293.type]) === "ObjectExpression"
7147
+ (element) => _optionalChain([element, 'optionalAccess', _280 => _280.type]) === "ObjectExpression"
7065
7148
  ) : [] : argument.type === "ObjectExpression" ? [argument] : [];
7066
7149
  for (const object of objects) {
7067
7150
  const tool = toolFromObject(object);
@@ -7122,8 +7205,8 @@ function collectFarmWebMCPTools(root, srcDir = "src") {
7122
7205
 
7123
7206
  var ADAPTER_EXTENSIONS = ["ts", "tsx", "js", "jsx", "mts", "mjs"];
7124
7207
  function resolveFarmClientCacheAdapterEntry(root, cache2) {
7125
- const client = _optionalChain([cache2, 'optionalAccess', _294 => _294.client]);
7126
- const adapter = _optionalChain([client, 'optionalAccess', _295 => _295.adapter]);
7208
+ const client = _optionalChain([cache2, 'optionalAccess', _281 => _281.client]);
7209
+ const adapter = _optionalChain([client, 'optionalAccess', _282 => _282.adapter]);
7127
7210
  if (adapter === void 0) return void 0;
7128
7211
  if (typeof adapter !== "string" || adapter.trim().length === 0) {
7129
7212
  throw new Error(
@@ -7138,8 +7221,8 @@ function resolveFarmClientCacheAdapterEntry(root, cache2) {
7138
7221
  );
7139
7222
  }
7140
7223
  const options = {};
7141
- if (_optionalChain([client, 'optionalAccess', _296 => _296.version]) !== void 0) options.version = client.version;
7142
- if (_optionalChain([client, 'optionalAccess', _297 => _297.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
7224
+ if (_optionalChain([client, 'optionalAccess', _283 => _283.version]) !== void 0) options.version = client.version;
7225
+ if (_optionalChain([client, 'optionalAccess', _284 => _284.flushDelayMs]) !== void 0) options.flushDelayMs = client.flushDelayMs;
7143
7226
  return { importPath: found.replace(/\\/g, "/"), options };
7144
7227
  }
7145
7228
  function resolveAdapterFile(resolved) {
@@ -7545,7 +7628,7 @@ function redactFarmDocsClientConfig(code, filename) {
7545
7628
  const current = node;
7546
7629
  if (current.type === "Property") {
7547
7630
  const name = propertyKeyName(current);
7548
- const valueType = _optionalChain([current, 'access', _298 => _298.value, 'optionalAccess', _299 => _299.type]);
7631
+ const valueType = _optionalChain([current, 'access', _285 => _285.value, 'optionalAccess', _286 => _286.type]);
7549
7632
  const credential = name !== void 0 && (name.toLowerCase() === "headers" || _chunkSM2SYWARcjs.isSecretDocsConfigKey.call(void 0, name) && valueType !== "ObjectExpression" && valueType !== "ArrayExpression");
7550
7633
  if (name && credential) {
7551
7634
  edits.push(
@@ -7588,7 +7671,7 @@ function farmDocsClientConfigPlugin(configModule) {
7588
7671
  // Never matches without a docs config module, so the bundler never calls the handler.
7589
7672
  filter: { id: configModule ? fileNamePattern([configModule]) : /(?!)/ },
7590
7673
  handler(code, id, options) {
7591
- if (_optionalChain([options, 'optionalAccess', _300 => _300.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
7674
+ if (_optionalChain([options, 'optionalAccess', _287 => _287.ssr]) || !isFarmDocsClientConfigModule(id, configModule)) return null;
7592
7675
  const redacted = redactFarmDocsClientConfig(code, id.split("?")[0]);
7593
7676
  return redacted === null ? null : { code: redacted, map: null };
7594
7677
  }
@@ -7620,7 +7703,7 @@ var FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE = [
7620
7703
  ];
7621
7704
  function getFarmClientOptimizeDepsInclude(renderer) {
7622
7705
  return Array.from(
7623
- /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _301 => _301.optimizeDeps]) || []])
7706
+ /* @__PURE__ */ new Set([...FARM_CLIENT_OPTIMIZE_DEPS_INCLUDE, ..._optionalChain([renderer, 'optionalAccess', _288 => _288.optimizeDeps]) || []])
7624
7707
  );
7625
7708
  }
7626
7709
  function createFarmClientOptimizeDepsEntries(projectRoot, appDirectories) {
@@ -7644,7 +7727,7 @@ function createFarmClientOptimizeDepsConfig(entries, renderer) {
7644
7727
  // Farm's HTML boots through a virtual module and imports route UI lazily.
7645
7728
  // Explicit entries let Vite finish that crawl before a navigation can
7646
7729
  // rotate the optimizer hash underneath a hydrated React runtime.
7647
- ..._optionalChain([entries, 'optionalAccess', _302 => _302.length]) ? { entries: [...entries] } : {}
7730
+ ..._optionalChain([entries, 'optionalAccess', _289 => _289.length]) ? { entries: [...entries] } : {}
7648
7731
  };
7649
7732
  }
7650
7733
  function createFarmSourceAlias(projectRoot, srcDir = "src") {
@@ -7676,8 +7759,8 @@ function mergeFarmViteAlias(farmValue, userValue) {
7676
7759
  return [...userEntries, ...normalize(farmValue).filter((entry) => !userNames.has(entry.find))];
7677
7760
  }
7678
7761
  function mergeFarmViteConfig(farmConfig, userConfig = {}) {
7679
- const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _303 => _303.optimizeDeps, 'optionalAccess', _304 => _304.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _305 => _305.optimizeDeps, 'optionalAccess', _306 => _306.noDiscovery])));
7680
- const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _307 => _307.optimizeDeps, 'optionalAccess', _308 => _308.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _309 => _309.optimizeDeps, 'optionalAccess', _310 => _310.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _311 => _311.optimizeDeps, 'optionalAccess', _312 => _312.holdUntilCrawlEnd]))));
7762
+ const noDiscovery = _nullishCoalesce(_optionalChain([userConfig, 'access', _290 => _290.optimizeDeps, 'optionalAccess', _291 => _291.noDiscovery]), () => ( _optionalChain([farmConfig, 'access', _292 => _292.optimizeDeps, 'optionalAccess', _293 => _293.noDiscovery])));
7763
+ const holdUntilCrawlEnd = _nullishCoalesce(_optionalChain([userConfig, 'access', _294 => _294.optimizeDeps, 'optionalAccess', _295 => _295.holdUntilCrawlEnd]), () => ( (_optionalChain([userConfig, 'access', _296 => _296.optimizeDeps, 'optionalAccess', _297 => _297.noDiscovery]) === true ? false : _optionalChain([farmConfig, 'access', _298 => _298.optimizeDeps, 'optionalAccess', _299 => _299.holdUntilCrawlEnd]))));
7681
7764
  return {
7682
7765
  ...farmConfig,
7683
7766
  ...userConfig,
@@ -7689,9 +7772,9 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
7689
7772
  resolve: {
7690
7773
  ...farmConfig.resolve,
7691
7774
  ...userConfig.resolve,
7692
- alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _313 => _313.resolve, 'optionalAccess', _314 => _314.alias]), _optionalChain([userConfig, 'access', _315 => _315.resolve, 'optionalAccess', _316 => _316.alias])),
7775
+ alias: mergeFarmViteAlias(_optionalChain([farmConfig, 'access', _300 => _300.resolve, 'optionalAccess', _301 => _301.alias]), _optionalChain([userConfig, 'access', _302 => _302.resolve, 'optionalAccess', _303 => _303.alias])),
7693
7776
  dedupe: Array.from(
7694
- /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _317 => _317.resolve, 'optionalAccess', _318 => _318.dedupe]) || [], ..._optionalChain([userConfig, 'access', _319 => _319.resolve, 'optionalAccess', _320 => _320.dedupe]) || []])
7777
+ /* @__PURE__ */ new Set([..._optionalChain([farmConfig, 'access', _304 => _304.resolve, 'optionalAccess', _305 => _305.dedupe]) || [], ..._optionalChain([userConfig, 'access', _306 => _306.resolve, 'optionalAccess', _307 => _307.dedupe]) || []])
7695
7778
  )
7696
7779
  },
7697
7780
  optimizeDeps: {
@@ -7701,21 +7784,21 @@ function mergeFarmViteConfig(farmConfig, userConfig = {}) {
7701
7784
  holdUntilCrawlEnd,
7702
7785
  include: Array.from(
7703
7786
  /* @__PURE__ */ new Set([
7704
- ..._optionalChain([farmConfig, 'access', _321 => _321.optimizeDeps, 'optionalAccess', _322 => _322.include]) || [],
7705
- ..._optionalChain([userConfig, 'access', _323 => _323.optimizeDeps, 'optionalAccess', _324 => _324.include]) || []
7787
+ ..._optionalChain([farmConfig, 'access', _308 => _308.optimizeDeps, 'optionalAccess', _309 => _309.include]) || [],
7788
+ ..._optionalChain([userConfig, 'access', _310 => _310.optimizeDeps, 'optionalAccess', _311 => _311.include]) || []
7706
7789
  ])
7707
7790
  ),
7708
7791
  exclude: Array.from(
7709
7792
  /* @__PURE__ */ new Set([
7710
- ..._optionalChain([farmConfig, 'access', _325 => _325.optimizeDeps, 'optionalAccess', _326 => _326.exclude]) || [],
7711
- ..._optionalChain([userConfig, 'access', _327 => _327.optimizeDeps, 'optionalAccess', _328 => _328.exclude]) || []
7793
+ ..._optionalChain([farmConfig, 'access', _312 => _312.optimizeDeps, 'optionalAccess', _313 => _313.exclude]) || [],
7794
+ ..._optionalChain([userConfig, 'access', _314 => _314.optimizeDeps, 'optionalAccess', _315 => _315.exclude]) || []
7712
7795
  ])
7713
7796
  )
7714
7797
  },
7715
7798
  ssr: {
7716
7799
  ...farmConfig.ssr,
7717
7800
  ...userConfig.ssr,
7718
- noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _329 => _329.ssr, 'optionalAccess', _330 => _330.noExternal]), _optionalChain([userConfig, 'access', _331 => _331.ssr, 'optionalAccess', _332 => _332.noExternal]))
7801
+ noExternal: mergeNoExternal(_optionalChain([farmConfig, 'access', _316 => _316.ssr, 'optionalAccess', _317 => _317.noExternal]), _optionalChain([userConfig, 'access', _318 => _318.ssr, 'optionalAccess', _319 => _319.noExternal]))
7719
7802
  }
7720
7803
  };
7721
7804
  }
@@ -7786,8 +7869,8 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
7786
7869
  ...userRolldownOptions
7787
7870
  };
7788
7871
  const merged = mergeFarmViteConfig(farmConfig, shared);
7789
- const farmBundlerOptions = _optionalChain([farmConfig, 'access', _333 => _333.build, 'optionalAccess', _334 => _334.rollupOptions]);
7790
- const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _335 => _335.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _336 => _336.output]);
7872
+ const farmBundlerOptions = _optionalChain([farmConfig, 'access', _320 => _320.build, 'optionalAccess', _321 => _321.rollupOptions]);
7873
+ const output = options.clientOutput ? mergeFarmClientOutputOptions(_optionalChain([farmBundlerOptions, 'optionalAccess', _322 => _322.output]), userOutput) : _optionalChain([farmBundlerOptions, 'optionalAccess', _323 => _323.output]);
7791
7874
  return {
7792
7875
  ...merged,
7793
7876
  build: {
@@ -7804,7 +7887,7 @@ function mergeFarmProductionViteConfig(farmConfig, userConfig = {}, options = {}
7804
7887
  esbuild: typeof userEsbuild === "object" && farmConfig.esbuild !== false ? { ...userEsbuild, ...farmConfig.esbuild } : _nullishCoalesce(farmConfig.esbuild, () => ( userEsbuild)),
7805
7888
  ssr: {
7806
7889
  ...merged.ssr,
7807
- external: mergeExternal(_optionalChain([farmConfig, 'access', _337 => _337.ssr, 'optionalAccess', _338 => _338.external]), _optionalChain([userConfig, 'access', _339 => _339.ssr, 'optionalAccess', _340 => _340.external]))
7890
+ external: mergeExternal(_optionalChain([farmConfig, 'access', _324 => _324.ssr, 'optionalAccess', _325 => _325.external]), _optionalChain([userConfig, 'access', _326 => _326.ssr, 'optionalAccess', _327 => _327.external]))
7808
7891
  }
7809
7892
  };
7810
7893
  }