@farm.js/core 0.1.51-beta.3 → 0.1.61

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 (1248) hide show
  1. package/dist/after.cjs +3 -3
  2. package/dist/after.mjs +2 -2
  3. package/dist/agent-mcp-handler-LPJ2CADR.mjs +19 -0
  4. package/dist/agent-mcp-handler-SJAHFSPI.cjs +19 -0
  5. package/dist/agent-runtime.cjs +59 -36
  6. package/dist/agent-runtime.mjs +58 -35
  7. package/dist/api/client.cjs +14 -14
  8. package/dist/api/client.mjs +13 -13
  9. package/dist/api/route-manager.cjs +39 -41
  10. package/dist/api/route-manager.mjs +38 -40
  11. package/dist/api/runtime.cjs +22 -24
  12. package/dist/api/runtime.mjs +22 -24
  13. package/dist/api.cjs +50 -52
  14. package/dist/api.mjs +49 -51
  15. package/dist/app-markdown.cjs +15 -15
  16. package/dist/app-markdown.mjs +14 -14
  17. package/dist/cache.cjs +7 -10
  18. package/dist/cache.mjs +6 -9
  19. package/dist/chunk-23MGIV4X.mjs +579 -0
  20. package/dist/chunk-27ZWSI3W.cjs +64 -0
  21. package/dist/chunk-2A3EQHXX.mjs +173 -0
  22. package/dist/chunk-2CQ74SP6.cjs +13 -0
  23. package/dist/chunk-2ELDTQRN.mjs +85 -0
  24. package/dist/chunk-2J7W2WND.mjs +149 -0
  25. package/dist/chunk-2NNMOPDN.mjs +237 -0
  26. package/dist/chunk-2PQNJXFM.mjs +20 -0
  27. package/dist/chunk-2SJ4RQ6P.cjs +57 -0
  28. package/dist/chunk-2UC36WAC.mjs +22 -0
  29. package/dist/chunk-2VQKKQ6D.mjs +51 -0
  30. package/dist/chunk-2Y3JRYVG.mjs +71 -0
  31. package/dist/chunk-35GKZR22.mjs +157 -0
  32. package/dist/chunk-3BU22U3M.cjs +237 -0
  33. package/dist/chunk-3KZS4SUS.mjs +414 -0
  34. package/dist/chunk-3SDFA7UF.cjs +701 -0
  35. package/dist/chunk-3TLO7SBY.cjs +240 -0
  36. package/dist/chunk-3UEVPCGW.mjs +435 -0
  37. package/dist/chunk-3WNDJT2E.cjs +109 -0
  38. package/dist/chunk-44SYJEG3.mjs +13 -0
  39. package/dist/chunk-45ZSJLDT.mjs +183 -0
  40. package/dist/chunk-4E5AEDKY.mjs +696 -0
  41. package/dist/chunk-4E5WBPEG.mjs +1157 -0
  42. package/dist/chunk-4GLOOWKE.mjs +1344 -0
  43. package/dist/chunk-4JCQDWPX.mjs +24 -0
  44. package/dist/chunk-4NU4GGTC.cjs +484 -0
  45. package/dist/chunk-4OOBRCJX.mjs +300 -0
  46. package/dist/chunk-4PPEPOZZ.cjs +21 -0
  47. package/dist/chunk-4RB44K6Z.mjs +94 -0
  48. package/dist/chunk-4SIYUGRY.mjs +93 -0
  49. package/dist/chunk-4WQ6PGSJ.cjs +367 -0
  50. package/dist/chunk-4WVJLURN.mjs +417 -0
  51. package/dist/chunk-4ZFL5GFN.cjs +520 -0
  52. package/dist/chunk-54UPOYFS.mjs +35 -0
  53. package/dist/chunk-55YI3RRB.mjs +192 -0
  54. package/dist/chunk-5I3OT426.cjs +11021 -0
  55. package/dist/chunk-5QIKR7RR.cjs +224 -0
  56. package/dist/chunk-5SJWVY6R.mjs +26 -0
  57. package/dist/chunk-5WI2S4CO.mjs +20 -0
  58. package/dist/chunk-63H6BKXG.cjs +389 -0
  59. package/dist/chunk-655RLQQL.mjs +43 -0
  60. package/dist/chunk-6EODJYCX.cjs +183 -0
  61. package/dist/chunk-6EXBPJ24.cjs +434 -0
  62. package/dist/chunk-6MVFL3R5.cjs +506 -0
  63. package/dist/chunk-6NT6S2VQ.mjs +180 -0
  64. package/dist/chunk-6QQDAAAZ.cjs +38 -0
  65. package/dist/chunk-6SJ2KJTA.mjs +314 -0
  66. package/dist/chunk-6SM5XXFS.cjs +70 -0
  67. package/dist/chunk-6V4TDWEC.cjs +455 -0
  68. package/dist/chunk-72ADZ6GQ.cjs +19 -0
  69. package/dist/chunk-72AK62H5.mjs +55 -0
  70. package/dist/chunk-75RZHGLS.cjs +135 -0
  71. package/dist/chunk-77GNHH2Z.cjs +236 -0
  72. package/dist/chunk-7DBXEASO.cjs +40 -0
  73. package/dist/chunk-7LTCDQRS.mjs +166 -0
  74. package/dist/chunk-7W3CPVXS.cjs +24 -0
  75. package/dist/chunk-A6WIQH5Z.cjs +31 -0
  76. package/dist/chunk-ADEA7PN3.cjs +1101 -0
  77. package/dist/chunk-AELACLOB.mjs +47 -0
  78. package/dist/chunk-AHGECQEW.mjs +49 -0
  79. package/dist/chunk-AI7QMY7O.cjs +41 -0
  80. package/dist/chunk-AJQTP4OO.mjs +212 -0
  81. package/dist/chunk-AMDMVWMI.cjs +39 -0
  82. package/dist/chunk-ARJWXNQL.cjs +256 -0
  83. package/dist/chunk-BCMSYSN2.mjs +183 -0
  84. package/dist/chunk-BIDYX3SL.cjs +91 -0
  85. package/dist/chunk-BJIYRUGQ.mjs +35 -0
  86. package/dist/chunk-BJPBQNIE.cjs +2355 -0
  87. package/dist/chunk-BO36SELV.cjs +395 -0
  88. package/dist/chunk-BOYNDCZL.mjs +54 -0
  89. package/dist/chunk-BPMATOP2.cjs +687 -0
  90. package/dist/chunk-BPOF5U4N.mjs +566 -0
  91. package/dist/chunk-BRYHOB4X.mjs +18 -0
  92. package/dist/chunk-BSC7JTOK.mjs +70 -0
  93. package/dist/chunk-BTHHUD7Q.mjs +51 -0
  94. package/dist/chunk-BUGNQIHC.mjs +449 -0
  95. package/dist/chunk-C4NCTZLM.mjs +22 -0
  96. package/dist/chunk-C4SPBWFM.cjs +26 -0
  97. package/dist/chunk-C5GUTBZK.cjs +173 -0
  98. package/dist/chunk-CBBLJMR5.mjs +74 -0
  99. package/dist/chunk-CBJJH36A.cjs +2187 -0
  100. package/dist/chunk-CGBDNNSM.cjs +664 -0
  101. package/dist/chunk-CI6E3UOH.cjs +314 -0
  102. package/dist/chunk-CMGMGHUZ.cjs +27 -0
  103. package/dist/chunk-CNOQY6Z7.mjs +156 -0
  104. package/dist/chunk-CQ6OSQ3K.mjs +36 -0
  105. package/dist/chunk-CU625VAY.mjs +13 -0
  106. package/dist/chunk-CVOSWIQA.mjs +15300 -0
  107. package/dist/chunk-CXEN47J3.mjs +550 -0
  108. package/dist/chunk-CXP5U3RW.cjs +54 -0
  109. package/dist/chunk-D227TIEN.cjs +1114 -0
  110. package/dist/chunk-D2BB47NB.cjs +157 -0
  111. package/dist/chunk-D2ULAULS.cjs +166 -0
  112. package/dist/chunk-D7JTOLFK.cjs +285 -0
  113. package/dist/chunk-DAATZTKJ.mjs +220 -0
  114. package/dist/chunk-DAO7JGTS.mjs +73 -0
  115. package/dist/chunk-DQQOKWYA.cjs +42 -0
  116. package/dist/chunk-DTSROJ5J.mjs +367 -0
  117. package/dist/chunk-DVM4FKZL.cjs +169 -0
  118. package/dist/chunk-DZ5ZVB2K.cjs +9 -0
  119. package/dist/chunk-E2ROOWQC.cjs +2225 -0
  120. package/dist/chunk-E3UK5IIB.cjs +593 -0
  121. package/dist/chunk-E5GNDG5F.mjs +701 -0
  122. package/dist/chunk-EA5K5BKU.mjs +455 -0
  123. package/dist/chunk-ECKF2BAM.cjs +403 -0
  124. package/dist/chunk-EK4QAEFZ.cjs +550 -0
  125. package/dist/chunk-EMLAPBEM.mjs +256 -0
  126. package/dist/chunk-ENLZ4R3Y.mjs +55 -0
  127. package/dist/chunk-EUV4YR3V.cjs +1362 -0
  128. package/dist/chunk-EWET4D2Y.mjs +395 -0
  129. package/dist/chunk-EZDQRNQ7.mjs +1496 -0
  130. package/dist/chunk-F2SE2VDO.mjs +65 -0
  131. package/dist/chunk-F3LTXB63.mjs +40 -0
  132. package/dist/chunk-F3VB7ONA.mjs +338 -0
  133. package/dist/chunk-F5QO4FNE.mjs +664 -0
  134. package/dist/chunk-FA2W42OV.mjs +25 -0
  135. package/dist/chunk-FDR64H6B.mjs +140 -0
  136. package/dist/chunk-FFFW3OQ7.cjs +65 -0
  137. package/dist/chunk-FJ3M4CUX.cjs +46 -0
  138. package/dist/chunk-FK6GO24V.cjs +54 -0
  139. package/dist/chunk-FNO7A7CM.cjs +1496 -0
  140. package/dist/chunk-FO427P6I.cjs +392 -0
  141. package/dist/chunk-FP2INE7H.mjs +113 -0
  142. package/dist/chunk-FUZEBRP3.mjs +593 -0
  143. package/dist/chunk-FZ6YYU2W.mjs +65 -0
  144. package/dist/chunk-G2KY33I6.mjs +202 -0
  145. package/dist/chunk-G4MWPDSE.mjs +19 -0
  146. package/dist/chunk-G643DQCH.cjs +13 -0
  147. package/dist/chunk-G7HXGLEC.cjs +175 -0
  148. package/dist/chunk-GC3SUL6M.mjs +109 -0
  149. package/dist/chunk-GCXWJJKH.mjs +169 -0
  150. package/dist/chunk-GHFS7RUB.mjs +152 -0
  151. package/dist/chunk-GQ3Z3IZI.cjs +241 -0
  152. package/dist/chunk-H4AMB6ZE.mjs +421 -0
  153. package/dist/chunk-H77NVNJ2.mjs +57 -0
  154. package/dist/chunk-HALDNTIV.mjs +2225 -0
  155. package/dist/chunk-HITLGIAO.cjs +55 -0
  156. package/dist/chunk-HLJ6MBUZ.cjs +183 -0
  157. package/dist/chunk-HOXTWRGB.mjs +484 -0
  158. package/dist/chunk-HREOKQWT.cjs +45 -0
  159. package/dist/chunk-I2BHUNBU.mjs +14 -0
  160. package/dist/chunk-I57LW5VZ.cjs +94 -0
  161. package/dist/chunk-IE7XCHH3.cjs +85 -0
  162. package/dist/chunk-IHNIDL6H.cjs +772 -0
  163. package/dist/chunk-IK6LVLKC.cjs +51 -0
  164. package/dist/chunk-IOEH4VWN.mjs +202 -0
  165. package/dist/chunk-IWZKTWHZ.cjs +435 -0
  166. package/dist/chunk-IZY3V5XW.mjs +23 -0
  167. package/dist/chunk-J63ZH5OQ.cjs +62 -0
  168. package/dist/chunk-J7FSKED3.cjs +93 -0
  169. package/dist/chunk-JBSVKMC5.mjs +28 -0
  170. package/dist/chunk-JDNHKPTD.cjs +22 -0
  171. package/dist/chunk-JG6DJF5A.mjs +238 -0
  172. package/dist/chunk-JGLC4TO3.cjs +192 -0
  173. package/dist/chunk-JM5XPKWH.mjs +41 -0
  174. package/dist/chunk-JNUWCDTF.cjs +1344 -0
  175. package/dist/chunk-JNZ4TDWM.mjs +445 -0
  176. package/dist/chunk-JPLUGGRV.mjs +230 -0
  177. package/dist/chunk-JSROZYYO.cjs +164 -0
  178. package/dist/chunk-KCMTCM6I.cjs +53 -0
  179. package/dist/chunk-KGB5UXJJ.mjs +27 -0
  180. package/dist/chunk-KGZIORNL.cjs +43 -0
  181. package/dist/chunk-KI3MESHB.mjs +224 -0
  182. package/dist/chunk-KIIMAWOJ.cjs +505 -0
  183. package/dist/chunk-KMTGADN3.mjs +95 -0
  184. package/dist/chunk-KN7K4VQN.mjs +236 -0
  185. package/dist/chunk-KNBBQHO2.cjs +51 -0
  186. package/dist/chunk-KR6CKSXT.cjs +15 -0
  187. package/dist/chunk-KXWRO25S.cjs +85 -0
  188. package/dist/chunk-L3KT7IXV.mjs +91 -0
  189. package/dist/chunk-LCCBO7PJ.cjs +46 -0
  190. package/dist/chunk-LIUGYUX3.cjs +22 -0
  191. package/dist/chunk-LPEX4YW6.mjs +13 -0
  192. package/dist/chunk-LSKZMJMP.cjs +65 -0
  193. package/dist/chunk-LSZAVSGY.mjs +1101 -0
  194. package/dist/chunk-LTNGXMQ6.cjs +55 -0
  195. package/dist/chunk-LYLEZIG3.cjs +73 -0
  196. package/dist/chunk-LYV44OIR.mjs +256 -0
  197. package/dist/chunk-M2L4MYDQ.cjs +14 -0
  198. package/dist/chunk-M7MKQXAF.cjs +87 -0
  199. package/dist/chunk-MKYBIIAQ.mjs +2187 -0
  200. package/dist/chunk-MQ3H6LT5.cjs +202 -0
  201. package/dist/chunk-MRMI32SN.cjs +1157 -0
  202. package/dist/chunk-MSSFIQGM.mjs +1002 -0
  203. package/dist/chunk-MT763TDW.cjs +43 -0
  204. package/dist/chunk-MVL2RAJW.mjs +62 -0
  205. package/dist/chunk-MWSK6C4J.cjs +18 -0
  206. package/dist/chunk-MWWVKDW3.cjs +169 -0
  207. package/dist/chunk-N2NAS2AM.cjs +725 -0
  208. package/dist/chunk-N46M65CI.mjs +54 -0
  209. package/dist/chunk-N4UOK6ZI.cjs +256 -0
  210. package/dist/chunk-NI2TCCTG.mjs +11020 -0
  211. package/dist/chunk-NO3WWW3N.cjs +192 -0
  212. package/dist/chunk-NPC7VWJE.mjs +277 -0
  213. package/dist/chunk-NRDBW4MP.mjs +45 -0
  214. package/dist/chunk-NRSN7G7E.mjs +42 -0
  215. package/dist/chunk-NYJMY3JA.cjs +156 -0
  216. package/dist/chunk-NZKJGRB3.cjs +230 -0
  217. package/dist/chunk-O6BCQV2T.mjs +46 -0
  218. package/dist/chunk-O6I6VWKK.mjs +493 -0
  219. package/dist/chunk-O6WAEAX3.mjs +2028 -0
  220. package/dist/chunk-O7BH5O46.mjs +175 -0
  221. package/dist/chunk-OFZUJMCU.mjs +601 -0
  222. package/dist/chunk-OHLSEQ57.mjs +910 -0
  223. package/dist/chunk-OHY2ZWUG.cjs +25 -0
  224. package/dist/chunk-OI6CMLWX.cjs +47 -0
  225. package/dist/chunk-ONUEYC6N.mjs +27 -0
  226. package/dist/chunk-OO7GXVSR.mjs +9 -0
  227. package/dist/chunk-OT6ZEW74.mjs +139 -0
  228. package/dist/chunk-OTC5BDGO.mjs +687 -0
  229. package/dist/chunk-OX6O6WVA.cjs +74 -0
  230. package/dist/chunk-OYEUREB6.cjs +35 -0
  231. package/dist/chunk-OZVEHHMA.cjs +194 -0
  232. package/dist/chunk-P5TJO5IS.mjs +240 -0
  233. package/dist/chunk-PCOTGFSM.cjs +139 -0
  234. package/dist/chunk-PNGWZFUQ.mjs +39 -0
  235. package/dist/chunk-PSV6XKPO.cjs +220 -0
  236. package/dist/chunk-PTZ2TVNE.cjs +178 -0
  237. package/dist/chunk-PZNL3WEG.mjs +772 -0
  238. package/dist/chunk-PZYCPSCC.cjs +35 -0
  239. package/dist/chunk-Q2KB32T4.mjs +690 -0
  240. package/dist/chunk-Q5B3KJBP.cjs +152 -0
  241. package/dist/chunk-QBK2AA4U.cjs +445 -0
  242. package/dist/chunk-QCFBDFRS.mjs +169 -0
  243. package/dist/chunk-QCVE2OCI.cjs +169 -0
  244. package/dist/chunk-QE6VAKLT.mjs +85 -0
  245. package/dist/chunk-QNPEUFHQ.cjs +27 -0
  246. package/dist/chunk-QORUJDIV.mjs +46 -0
  247. package/dist/chunk-QV4VE2OW.mjs +166 -0
  248. package/dist/chunk-QVKYGNVM.mjs +27 -0
  249. package/dist/chunk-QVYLBY73.mjs +93 -0
  250. package/dist/chunk-R3DS7A2T.mjs +21 -0
  251. package/dist/chunk-R5A5KNVX.cjs +20 -0
  252. package/dist/chunk-R5JIFR6B.cjs +42 -0
  253. package/dist/chunk-RHAZ22ZN.mjs +87 -0
  254. package/dist/chunk-RKPDESVW.cjs +15301 -0
  255. package/dist/chunk-RSOJ7DRT.mjs +506 -0
  256. package/dist/chunk-S3A45T7F.cjs +166 -0
  257. package/dist/chunk-S3FNNQHR.mjs +31 -0
  258. package/dist/chunk-S3JO3N4H.cjs +17 -0
  259. package/dist/chunk-S67OYZU7.mjs +711 -0
  260. package/dist/chunk-S6VYG6XU.cjs +493 -0
  261. package/dist/chunk-SAXPH6G5.mjs +169 -0
  262. package/dist/chunk-SC2WYWPF.mjs +241 -0
  263. package/dist/chunk-SDOTRX3V.cjs +690 -0
  264. package/dist/chunk-SEJ5N6SL.mjs +38 -0
  265. package/dist/chunk-SFGWNC43.mjs +97 -0
  266. package/dist/chunk-SHB3GYXI.mjs +285 -0
  267. package/dist/chunk-SHLXACIO.cjs +95 -0
  268. package/dist/chunk-SJNMVDDF.cjs +86 -0
  269. package/dist/chunk-SK35NQKK.cjs +27 -0
  270. package/dist/chunk-SKNL7VA2.mjs +42 -0
  271. package/dist/chunk-SLQCDJSO.mjs +18 -0
  272. package/dist/chunk-SOR334EB.cjs +149 -0
  273. package/dist/chunk-SU7MH53P.cjs +180 -0
  274. package/dist/chunk-SVRTJOUF.cjs +113 -0
  275. package/dist/chunk-SYQ3MOWW.cjs +73 -0
  276. package/dist/chunk-T4OGRVNS.mjs +392 -0
  277. package/dist/chunk-T5OJPTVN.cjs +417 -0
  278. package/dist/chunk-TE2G5ION.cjs +2028 -0
  279. package/dist/chunk-TFQG7TBC.mjs +43 -0
  280. package/dist/chunk-TIWHTW3Q.cjs +24 -0
  281. package/dist/chunk-TKJZFIML.cjs +20 -0
  282. package/dist/chunk-TKSCR644.cjs +414 -0
  283. package/dist/chunk-TVGP4BBZ.mjs +45 -0
  284. package/dist/chunk-U4KT7QP3.cjs +23 -0
  285. package/dist/chunk-UDNPLXW7.mjs +86 -0
  286. package/dist/chunk-UFDAAQFX.cjs +169 -0
  287. package/dist/chunk-UFDV5N3C.cjs +711 -0
  288. package/dist/chunk-UH6QN5NL.mjs +178 -0
  289. package/dist/chunk-UP4CW6WP.mjs +169 -0
  290. package/dist/chunk-UQZ4AYTH.cjs +168 -0
  291. package/dist/chunk-US2QVW3E.cjs +36 -0
  292. package/dist/chunk-UVW64BCB.cjs +910 -0
  293. package/dist/chunk-UWPLULNK.mjs +520 -0
  294. package/dist/chunk-UXFQ3UDA.cjs +140 -0
  295. package/dist/chunk-UYIHRDE4.cjs +97 -0
  296. package/dist/chunk-V2FTMRS7.mjs +223 -0
  297. package/dist/chunk-VB6UCX3V.cjs +421 -0
  298. package/dist/chunk-VEKFLAQM.cjs +300 -0
  299. package/dist/chunk-VILIPRS6.mjs +725 -0
  300. package/dist/chunk-VQLJWDVW.cjs +696 -0
  301. package/dist/chunk-W3B4PKAW.mjs +28 -0
  302. package/dist/chunk-W4E7WMXE.cjs +71 -0
  303. package/dist/chunk-W7LF2J2S.mjs +64 -0
  304. package/dist/chunk-WBKEZXWE.cjs +449 -0
  305. package/dist/chunk-WC5UV2HQ.cjs +212 -0
  306. package/dist/chunk-WMAPPDMM.cjs +28 -0
  307. package/dist/chunk-WMOGFOUJ.cjs +223 -0
  308. package/dist/chunk-WNSDDRNU.mjs +24 -0
  309. package/dist/chunk-WWFTAUFG.cjs +45 -0
  310. package/dist/chunk-WWIKMBRN.mjs +1362 -0
  311. package/dist/chunk-XCMCS4DA.mjs +1114 -0
  312. package/dist/chunk-XJJVLDM6.mjs +194 -0
  313. package/dist/chunk-XJXBIP67.cjs +277 -0
  314. package/dist/chunk-XNPDONUH.mjs +389 -0
  315. package/dist/chunk-XSIRSMAS.cjs +339 -0
  316. package/dist/chunk-XZNTNMHT.mjs +15 -0
  317. package/dist/chunk-Y5SJM2W7.cjs +579 -0
  318. package/dist/chunk-YDQZGSDS.mjs +2355 -0
  319. package/dist/chunk-YFILVET3.mjs +192 -0
  320. package/dist/chunk-YFPGHF5F.cjs +202 -0
  321. package/dist/chunk-YHOCRI4H.mjs +434 -0
  322. package/dist/chunk-YJRZR7VU.cjs +28 -0
  323. package/dist/chunk-YKX5BK66.cjs +46 -0
  324. package/dist/chunk-YOZYCI6Z.mjs +73 -0
  325. package/dist/chunk-YSCV4SJF.cjs +49 -0
  326. package/dist/chunk-YSLWRWWP.cjs +601 -0
  327. package/dist/chunk-YWMZUGIS.mjs +403 -0
  328. package/dist/chunk-YWN746US.cjs +1002 -0
  329. package/dist/chunk-YX3DBN4M.cjs +18 -0
  330. package/dist/chunk-Z2HLU4IX.cjs +238 -0
  331. package/dist/chunk-Z2RZJZIZ.mjs +168 -0
  332. package/dist/chunk-Z3HATSKO.mjs +46 -0
  333. package/dist/chunk-ZEG3OPIB.cjs +93 -0
  334. package/dist/chunk-ZLAT2CWY.mjs +135 -0
  335. package/dist/chunk-ZMMBIVQM.mjs +505 -0
  336. package/dist/chunk-ZMSZZXOR.mjs +164 -0
  337. package/dist/chunk-ZWM5KGAA.cjs +566 -0
  338. package/dist/chunk-ZZSRYEYU.mjs +53 -0
  339. package/dist/client/lifecycle.cjs +3 -3
  340. package/dist/client/lifecycle.mjs +2 -2
  341. package/dist/client-plugins.cjs +3 -3
  342. package/dist/client-plugins.mjs +2 -2
  343. package/dist/client.cjs +40 -45
  344. package/dist/client.mjs +41 -46
  345. package/dist/config.cjs +3 -3
  346. package/dist/config.mjs +2 -2
  347. package/dist/cron.cjs +9 -9
  348. package/dist/cron.mjs +8 -8
  349. package/dist/deferred.cjs +3 -3
  350. package/dist/deferred.mjs +2 -2
  351. package/dist/deployment.cjs +3 -3
  352. package/dist/deployment.mjs +2 -2
  353. package/dist/devtools-ERIKFEXX.mjs +472 -0
  354. package/dist/devtools-JZJJY5CK.cjs +472 -0
  355. package/dist/devtools-client-CXQ6PXI6.cjs +254 -0
  356. package/dist/devtools-client-HJS2T34Y.mjs +254 -0
  357. package/dist/devtools-ui-5GBDIGMK.cjs +1296 -0
  358. package/dist/devtools-ui-5KDAVPIF.mjs +1296 -0
  359. package/dist/docs.cjs +58 -66
  360. package/dist/docs.mjs +57 -65
  361. package/dist/env-types.cjs +4 -4
  362. package/dist/env-types.mjs +3 -3
  363. package/dist/env.cjs +4 -4
  364. package/dist/env.mjs +3 -3
  365. package/dist/environment/vite.cjs +3 -7
  366. package/dist/environment/vite.mjs +2 -6
  367. package/dist/environment.cjs +3 -3
  368. package/dist/environment.mjs +2 -2
  369. package/dist/font.cjs +3 -3
  370. package/dist/font.mjs +2 -2
  371. package/dist/headers.cjs +6 -8
  372. package/dist/headers.mjs +5 -7
  373. package/dist/i18n/client.cjs +30 -19
  374. package/dist/i18n/client.mjs +20 -9
  375. package/dist/i18n/index.cjs +6 -6
  376. package/dist/i18n/index.mjs +5 -5
  377. package/dist/i18n/server.cjs +10 -10
  378. package/dist/i18n/server.mjs +9 -9
  379. package/dist/image/server.cjs +5 -9
  380. package/dist/image/server.mjs +4 -8
  381. package/dist/image/sharp.cjs +20 -16
  382. package/dist/image/sharp.mjs +12 -8
  383. package/dist/image.cjs +18 -9
  384. package/dist/image.mjs +13 -4
  385. package/dist/index.cjs +175 -236
  386. package/dist/index.mjs +245 -306
  387. package/dist/instrumentation.cjs +5 -5
  388. package/dist/instrumentation.mjs +4 -4
  389. package/dist/integration-orm-55F7CII5.cjs +13 -0
  390. package/dist/integration-orm-KV5B3BGZ.mjs +13 -0
  391. package/dist/integrations.cjs +17 -23
  392. package/dist/integrations.mjs +18 -24
  393. package/dist/internal/app-markdown-runtime.cjs +13 -13
  394. package/dist/internal/app-markdown-runtime.mjs +12 -12
  395. package/dist/internal/build-runtime.cjs +133 -161
  396. package/dist/internal/build-runtime.mjs +121 -149
  397. package/dist/internal/cli-runtime.cjs +79 -101
  398. package/dist/internal/cli-runtime.mjs +79 -101
  399. package/dist/internal/client-error-overlay.cjs +49 -18
  400. package/dist/internal/client-error-overlay.mjs +45 -14
  401. package/dist/internal/client-runtime.cjs +50 -59
  402. package/dist/internal/client-runtime.mjs +50 -59
  403. package/dist/internal/compression-runtime.cjs +4 -4
  404. package/dist/internal/compression-runtime.mjs +3 -3
  405. package/dist/internal/config-runtime.cjs +65 -94
  406. package/dist/internal/config-runtime.mjs +51 -80
  407. package/dist/internal/docs-precompiled-runtime.cjs +24 -18
  408. package/dist/internal/docs-precompiled-runtime.mjs +20 -14
  409. package/dist/internal/infra-analytics-runtime.cjs +8 -22
  410. package/dist/internal/infra-analytics-runtime.mjs +6 -20
  411. package/dist/internal/isolated-boundary.cjs +4 -5
  412. package/dist/internal/isolated-boundary.mjs +3 -4
  413. package/dist/internal/metadata-image-runtime.cjs +7 -8
  414. package/dist/internal/metadata-image-runtime.mjs +6 -7
  415. package/dist/internal/product-telemetry-runtime.cjs +17 -5
  416. package/dist/internal/product-telemetry-runtime.mjs +15 -3
  417. package/dist/internal/production-node-env.cjs +3 -7
  418. package/dist/internal/production-node-env.mjs +2 -6
  419. package/dist/internal/production-runtime.cjs +90 -236
  420. package/dist/internal/production-runtime.mjs +115 -261
  421. package/dist/internal/request-cookies.cjs +3 -3
  422. package/dist/internal/request-cookies.mjs +2 -2
  423. package/dist/internal/server-tree.cjs +4 -7
  424. package/dist/internal/server-tree.mjs +5 -8
  425. package/dist/json-ld.cjs +16 -3
  426. package/dist/json-ld.mjs +16 -3
  427. package/dist/layers-UTB43B7A.mjs +18 -0
  428. package/dist/layers-VUWIOFEO.cjs +18 -0
  429. package/dist/manager-RT733VRK.mjs +14 -0
  430. package/dist/manager-XZ5TX7AO.cjs +14 -0
  431. package/dist/markdown.cjs +12 -19
  432. package/dist/markdown.mjs +11 -18
  433. package/dist/middleware.cjs +26 -34
  434. package/dist/middleware.mjs +30 -38
  435. package/dist/navigation.cjs +21 -22
  436. package/dist/navigation.mjs +20 -21
  437. package/dist/nitro-7F65EZZS.cjs +653 -0
  438. package/dist/nitro-MPZJGPXK.mjs +653 -0
  439. package/dist/node-module-bundle-L5L7JCZ4.mjs +11 -0
  440. package/dist/node-module-bundle-VAFZOXMJ.cjs +11 -0
  441. package/dist/observability.cjs +3 -3
  442. package/dist/observability.mjs +2 -2
  443. package/dist/og.cjs +1 -1
  444. package/dist/og.mjs +1 -1
  445. package/dist/plugin.cjs +124 -153
  446. package/dist/plugin.mjs +107 -136
  447. package/dist/query/client.cjs +69 -59
  448. package/dist/query/client.mjs +61 -51
  449. package/dist/query/index.cjs +4 -4
  450. package/dist/query/index.mjs +3 -3
  451. package/dist/query/parsers.cjs +3 -3
  452. package/dist/query/parsers.mjs +2 -2
  453. package/dist/query/server.cjs +11 -5
  454. package/dist/query/server.mjs +9 -3
  455. package/dist/renderer/react/client.cjs +1 -1
  456. package/dist/renderer/react/client.mjs +1 -1
  457. package/dist/renderer/react/server.cjs +14 -10
  458. package/dist/renderer/react/server.mjs +14 -10
  459. package/dist/renderer/react/vite.cjs +4 -1
  460. package/dist/renderer/react/vite.mjs +4 -1
  461. package/dist/renderer-client.cjs +77 -71
  462. package/dist/renderer-client.mjs +57 -51
  463. package/dist/renderer.cjs +3 -3
  464. package/dist/renderer.mjs +2 -2
  465. package/dist/request.cjs +4 -4
  466. package/dist/request.mjs +3 -3
  467. package/dist/router.cjs +5 -5
  468. package/dist/router.mjs +4 -4
  469. package/dist/routes.cjs +12 -14
  470. package/dist/routes.mjs +11 -13
  471. package/dist/schema-dev-notice-O67CPXJ6.mjs +56 -0
  472. package/dist/schema-dev-notice-Y7MQEFGN.cjs +56 -0
  473. package/dist/schema.cjs +3 -3
  474. package/dist/schema.mjs +2 -2
  475. package/dist/search-client-G3RICOFU.cjs +13 -0
  476. package/dist/search-client-KR7YRIVR.mjs +13 -0
  477. package/dist/server-action-security.cjs +7 -8
  478. package/dist/server-action-security.mjs +6 -7
  479. package/dist/server-fn-client.cjs +4 -4
  480. package/dist/server-fn-client.mjs +3 -3
  481. package/dist/server-fn.cjs +14 -15
  482. package/dist/server-fn.mjs +13 -14
  483. package/dist/server-plugins.cjs +15 -15
  484. package/dist/server-plugins.mjs +14 -14
  485. package/dist/server-query-client.cjs +8 -9
  486. package/dist/server-query-client.mjs +7 -8
  487. package/dist/server-query.cjs +16 -17
  488. package/dist/server-query.mjs +15 -16
  489. package/dist/server.cjs +199 -265
  490. package/dist/server.mjs +172 -238
  491. package/dist/storage.cjs +3 -7
  492. package/dist/storage.mjs +2 -6
  493. package/dist/testing.cjs +76 -59
  494. package/dist/testing.mjs +66 -49
  495. package/dist/theme/client.cjs +5 -5
  496. package/dist/theme/client.mjs +4 -4
  497. package/dist/theme/index.cjs +3 -3
  498. package/dist/theme/index.mjs +2 -2
  499. package/dist/theme/runtime.cjs +3 -3
  500. package/dist/theme/runtime.mjs +2 -2
  501. package/dist/theme/server.cjs +8 -8
  502. package/dist/theme/server.mjs +7 -7
  503. package/dist/version.cjs +3 -3
  504. package/dist/version.mjs +2 -2
  505. package/dist/vite.cjs +121 -166
  506. package/dist/vite.mjs +107 -152
  507. package/dist/workflows.cjs +13 -14
  508. package/dist/workflows.mjs +12 -13
  509. package/package.json +22 -3
  510. package/dist/after.d.mts +0 -25
  511. package/dist/after.d.ts +0 -25
  512. package/dist/agent-mcp-handler-7JSKGSOW.mjs +0 -18
  513. package/dist/agent-mcp-handler-YE4AGWHN.cjs +0 -18
  514. package/dist/agent-mcp.d-BAR9njbJ.d.ts +0 -115
  515. package/dist/agent-mcp.d-BJKChOrO.d.mts +0 -115
  516. package/dist/agent-runtime.d.mts +0 -105
  517. package/dist/agent-runtime.d.ts +0 -105
  518. package/dist/analyzer-OTPEWH5W.mjs +0 -1126
  519. package/dist/analyzer-TSQXZCZN.cjs +0 -1126
  520. package/dist/api/client.d.mts +0 -5
  521. package/dist/api/client.d.ts +0 -5
  522. package/dist/api/route-manager.d.mts +0 -119
  523. package/dist/api/route-manager.d.ts +0 -119
  524. package/dist/api/runtime.d.mts +0 -35
  525. package/dist/api/runtime.d.ts +0 -35
  526. package/dist/api-client.d-BWcqZciH.d.ts +0 -622
  527. package/dist/api-client.d-CeA6tNA6.d.mts +0 -622
  528. package/dist/api.d.mts +0 -103
  529. package/dist/api.d.ts +0 -103
  530. package/dist/app-manifest.d-BLFbaqx8.d.ts +0 -120
  531. package/dist/app-manifest.d-DEQNnNhV.d.mts +0 -120
  532. package/dist/app-markdown.d.mts +0 -48
  533. package/dist/app-markdown.d.ts +0 -48
  534. package/dist/app.d-CNPaUYaa.d.ts +0 -564
  535. package/dist/app.d-CT7xDkj2.d.mts +0 -564
  536. package/dist/base-path.d-BOUV5ozD.d.mts +0 -10
  537. package/dist/base-path.d-BOUV5ozD.d.ts +0 -10
  538. package/dist/cache.d.mts +0 -333
  539. package/dist/cache.d.ts +0 -333
  540. package/dist/chunk-22W4FNTG.mjs +0 -538
  541. package/dist/chunk-23LVFSID.mjs +0 -182
  542. package/dist/chunk-2DA7CLY7.mjs +0 -560
  543. package/dist/chunk-2DLGV2ZG.mjs +0 -71
  544. package/dist/chunk-2HW5LWAH.cjs +0 -19
  545. package/dist/chunk-2IAPKPEB.cjs +0 -368
  546. package/dist/chunk-2KMIJDY6.cjs +0 -20
  547. package/dist/chunk-2KVDHNQS.mjs +0 -224
  548. package/dist/chunk-2NGZFOKG.mjs +0 -190
  549. package/dist/chunk-2NHOYYUT.mjs +0 -2250
  550. package/dist/chunk-2WZTGPK6.mjs +0 -65
  551. package/dist/chunk-2XGBJSDV.cjs +0 -408
  552. package/dist/chunk-3BIASUGR.cjs +0 -59
  553. package/dist/chunk-3BLEXUGE.mjs +0 -35
  554. package/dist/chunk-3EEET2Q5.cjs +0 -1044
  555. package/dist/chunk-3EIPOTZV.cjs +0 -272
  556. package/dist/chunk-3HLQTOVU.cjs +0 -6
  557. package/dist/chunk-3OWVWZ6R.cjs +0 -60
  558. package/dist/chunk-3SMXQNFD.mjs +0 -433
  559. package/dist/chunk-3TLKUBXG.mjs +0 -8948
  560. package/dist/chunk-3WSIYBMG.mjs +0 -6257
  561. package/dist/chunk-3XQ57EFI.cjs +0 -713
  562. package/dist/chunk-3Z63X45F.mjs +0 -277
  563. package/dist/chunk-4353ZRE5.mjs +0 -153
  564. package/dist/chunk-46KXZBOG.cjs +0 -169
  565. package/dist/chunk-46P5KNTE.mjs +0 -8
  566. package/dist/chunk-47JV57DA.cjs +0 -69
  567. package/dist/chunk-4CGOMZP3.cjs +0 -6257
  568. package/dist/chunk-4DCWVSL2.cjs +0 -15
  569. package/dist/chunk-4MU4QCX4.mjs +0 -158
  570. package/dist/chunk-4SEHMBL4.cjs +0 -491
  571. package/dist/chunk-4TKAIO2F.mjs +0 -491
  572. package/dist/chunk-4ZJ5C7UJ.cjs +0 -75
  573. package/dist/chunk-52Y3C3HG.mjs +0 -421
  574. package/dist/chunk-53EHWHT2.cjs +0 -166
  575. package/dist/chunk-53SACYBY.cjs +0 -293
  576. package/dist/chunk-5A77OEIG.cjs +0 -778
  577. package/dist/chunk-5C7XMKQ4.cjs +0 -410
  578. package/dist/chunk-5DX3O6TT.cjs +0 -266
  579. package/dist/chunk-5ENW27SL.mjs +0 -36
  580. package/dist/chunk-5FXPJIOT.mjs +0 -713
  581. package/dist/chunk-5IONBVJY.cjs +0 -588
  582. package/dist/chunk-5J45H65F.mjs +0 -48
  583. package/dist/chunk-5PZJ63PK.mjs +0 -17
  584. package/dist/chunk-5Y2P454O.cjs +0 -421
  585. package/dist/chunk-5Y4GYKKH.mjs +0 -13
  586. package/dist/chunk-5YPBFMBN.cjs +0 -19
  587. package/dist/chunk-65Y5SIBH.cjs +0 -112
  588. package/dist/chunk-6BLAY2VQ.mjs +0 -45
  589. package/dist/chunk-6CTFVBAT.cjs +0 -29
  590. package/dist/chunk-6FXBJPF5.cjs +0 -35
  591. package/dist/chunk-6HRAK7I5.mjs +0 -215
  592. package/dist/chunk-6IOZPJ3I.cjs +0 -549
  593. package/dist/chunk-6JHZPB52.cjs +0 -538
  594. package/dist/chunk-6ONBZGVH.cjs +0 -124
  595. package/dist/chunk-6XQSPIN6.cjs +0 -155
  596. package/dist/chunk-6YFC3ZFX.mjs +0 -449
  597. package/dist/chunk-6ZFRWRHO.mjs +0 -54
  598. package/dist/chunk-724WT3NI.mjs +0 -83
  599. package/dist/chunk-72KCTHLV.cjs +0 -723
  600. package/dist/chunk-72NBDVWQ.mjs +0 -588
  601. package/dist/chunk-75XSZIRE.mjs +0 -180
  602. package/dist/chunk-7EPYN7GW.cjs +0 -30
  603. package/dist/chunk-7FVVQEVL.cjs +0 -541
  604. package/dist/chunk-7H4SVNC4.cjs +0 -700
  605. package/dist/chunk-7JUIK547.cjs +0 -62
  606. package/dist/chunk-7KJJ4SBS.cjs +0 -13
  607. package/dist/chunk-7MD37P5V.cjs +0 -433
  608. package/dist/chunk-7PTISZSQ.cjs +0 -176
  609. package/dist/chunk-7PZVXMWG.mjs +0 -113
  610. package/dist/chunk-7S7AAK2D.mjs +0 -82
  611. package/dist/chunk-A25FXJ7D.cjs +0 -38
  612. package/dist/chunk-A4PWGL46.mjs +0 -141
  613. package/dist/chunk-A5BJKSZE.cjs +0 -657
  614. package/dist/chunk-AER5I65K.mjs +0 -368
  615. package/dist/chunk-ALEUMLJN.mjs +0 -190
  616. package/dist/chunk-ANHZ6SUL.mjs +0 -657
  617. package/dist/chunk-AOKXITZ6.cjs +0 -16
  618. package/dist/chunk-AQLHD6HZ.cjs +0 -196
  619. package/dist/chunk-ATYTLVSI.cjs +0 -45
  620. package/dist/chunk-AV26KHTG.mjs +0 -712
  621. package/dist/chunk-AY2YD5ZX.mjs +0 -34
  622. package/dist/chunk-AYP2YFVN.mjs +0 -168
  623. package/dist/chunk-AZQXXXDX.mjs +0 -80
  624. package/dist/chunk-B3GM5I6N.cjs +0 -277
  625. package/dist/chunk-B3GZAQSC.cjs +0 -36
  626. package/dist/chunk-B5BBTPJQ.cjs +0 -44
  627. package/dist/chunk-BBPDJGCU.cjs +0 -157
  628. package/dist/chunk-BLD5GVCG.mjs +0 -152
  629. package/dist/chunk-BMQAPZXD.mjs +0 -31
  630. package/dist/chunk-BNH53KOT.cjs +0 -69
  631. package/dist/chunk-BPAXGCKX.mjs +0 -166
  632. package/dist/chunk-BPNOYILC.cjs +0 -450
  633. package/dist/chunk-BRWIVOV4.cjs +0 -48
  634. package/dist/chunk-BRYPZIMB.mjs +0 -6
  635. package/dist/chunk-BTZ5O6VM.cjs +0 -14
  636. package/dist/chunk-BUC3FDYC.cjs +0 -158
  637. package/dist/chunk-C3BOESDW.mjs +0 -541
  638. package/dist/chunk-C64XOPBZ.mjs +0 -380
  639. package/dist/chunk-C7LCTVJ2.cjs +0 -30
  640. package/dist/chunk-CA7DNRHO.cjs +0 -164
  641. package/dist/chunk-CECUDGXQ.cjs +0 -1964
  642. package/dist/chunk-CKPTIEDX.cjs +0 -12
  643. package/dist/chunk-CL2ONP73.cjs +0 -180
  644. package/dist/chunk-CO6UYM2D.mjs +0 -172
  645. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  646. package/dist/chunk-CSLUBKGG.mjs +0 -44
  647. package/dist/chunk-CU5SYTJG.mjs +0 -23
  648. package/dist/chunk-CV6MFQ4Y.mjs +0 -259
  649. package/dist/chunk-CZ35L6PL.mjs +0 -1029
  650. package/dist/chunk-D22BUQKW.cjs +0 -82
  651. package/dist/chunk-D2LCAV6L.mjs +0 -79
  652. package/dist/chunk-D4XGKF67.cjs +0 -127
  653. package/dist/chunk-D7UQC4O6.cjs +0 -1359
  654. package/dist/chunk-D7Y63SOY.mjs +0 -15
  655. package/dist/chunk-DMAP4RND.cjs +0 -998
  656. package/dist/chunk-DQJ2CIH7.cjs +0 -87
  657. package/dist/chunk-DU4VHHPJ.mjs +0 -157
  658. package/dist/chunk-DUIP64BF.cjs +0 -16
  659. package/dist/chunk-DV52ZS53.cjs +0 -40
  660. package/dist/chunk-DXUXQP2T.cjs +0 -142
  661. package/dist/chunk-DZZHTMWM.cjs +0 -190
  662. package/dist/chunk-E36C43IX.cjs +0 -224
  663. package/dist/chunk-E552H232.cjs +0 -154
  664. package/dist/chunk-E5DXF5GE.mjs +0 -169
  665. package/dist/chunk-E7QOEV5Z.cjs +0 -449
  666. package/dist/chunk-EDPENAVO.mjs +0 -266
  667. package/dist/chunk-EFLNOZGH.mjs +0 -30
  668. package/dist/chunk-EFZGB7JC.cjs +0 -114
  669. package/dist/chunk-EGHPFXPZ.cjs +0 -590
  670. package/dist/chunk-EHB77D5U.cjs +0 -80
  671. package/dist/chunk-EJCVG25Z.mjs +0 -49
  672. package/dist/chunk-EKJYE4Y7.cjs +0 -712
  673. package/dist/chunk-EMDGXYUD.mjs +0 -75
  674. package/dist/chunk-EOXPRC2C.cjs +0 -48
  675. package/dist/chunk-ERMUL73L.cjs +0 -39
  676. package/dist/chunk-ES2LD2YD.mjs +0 -203
  677. package/dist/chunk-EV4SBMPX.mjs +0 -208
  678. package/dist/chunk-EVIWKPJV.cjs +0 -560
  679. package/dist/chunk-EVMXPJCB.mjs +0 -133
  680. package/dist/chunk-EX6ZSN5P.cjs +0 -224
  681. package/dist/chunk-EZTKXD6P.cjs +0 -182
  682. package/dist/chunk-F3N52U7S.mjs +0 -138
  683. package/dist/chunk-F6TLUMH7.mjs +0 -172
  684. package/dist/chunk-FBEBSAVI.cjs +0 -225
  685. package/dist/chunk-FEFCISOX.cjs +0 -102
  686. package/dist/chunk-FFE2EMF7.cjs +0 -593
  687. package/dist/chunk-FHURJABM.mjs +0 -45
  688. package/dist/chunk-FK25QSVC.cjs +0 -386
  689. package/dist/chunk-FSQMN2MQ.mjs +0 -386
  690. package/dist/chunk-FSXSQQTV.mjs +0 -79
  691. package/dist/chunk-G2KTRMWA.mjs +0 -40
  692. package/dist/chunk-GAO7MS5O.mjs +0 -1010
  693. package/dist/chunk-GBMWLDCC.cjs +0 -138
  694. package/dist/chunk-GFT5AHAT.mjs +0 -423
  695. package/dist/chunk-GHNW564E.mjs +0 -1044
  696. package/dist/chunk-GL3ZDHKI.mjs +0 -274
  697. package/dist/chunk-GLOICKDO.mjs +0 -142
  698. package/dist/chunk-GNZIAJGB.mjs +0 -358
  699. package/dist/chunk-GSVJ3IIF.cjs +0 -173
  700. package/dist/chunk-GUZC226X.mjs +0 -164
  701. package/dist/chunk-GWXZS7K5.mjs +0 -24
  702. package/dist/chunk-GYMGK467.mjs +0 -214
  703. package/dist/chunk-H227LYHT.mjs +0 -88
  704. package/dist/chunk-H33PJEXN.cjs +0 -341
  705. package/dist/chunk-H3ASZDT7.mjs +0 -42
  706. package/dist/chunk-H4WUWLQR.mjs +0 -16
  707. package/dist/chunk-HA7YRO53.cjs +0 -214
  708. package/dist/chunk-HASX6DC7.cjs +0 -150
  709. package/dist/chunk-HEPJIKKQ.cjs +0 -190
  710. package/dist/chunk-HLWOWZFX.cjs +0 -153
  711. package/dist/chunk-HLYRXN2I.cjs +0 -242
  712. package/dist/chunk-HNAISJFD.cjs +0 -215
  713. package/dist/chunk-HPP2II4Z.mjs +0 -332
  714. package/dist/chunk-HXNLKCWH.cjs +0 -13
  715. package/dist/chunk-HZOMT5DY.mjs +0 -30
  716. package/dist/chunk-I2BYNELA.cjs +0 -380
  717. package/dist/chunk-I2DQGS56.cjs +0 -1095
  718. package/dist/chunk-IAPTECEB.mjs +0 -48
  719. package/dist/chunk-IFTGERT3.mjs +0 -408
  720. package/dist/chunk-IGL6CO6M.mjs +0 -9
  721. package/dist/chunk-IRSS4HS4.mjs +0 -80
  722. package/dist/chunk-ITV4QQL2.cjs +0 -93
  723. package/dist/chunk-IWFV5ZED.cjs +0 -152
  724. package/dist/chunk-IYEY3JWJ.mjs +0 -186
  725. package/dist/chunk-JGAE5XPL.cjs +0 -26
  726. package/dist/chunk-JMYXO572.cjs +0 -531
  727. package/dist/chunk-JNYFXL7X.mjs +0 -62
  728. package/dist/chunk-JRHGJVJH.mjs +0 -44
  729. package/dist/chunk-JWI5PUO2.mjs +0 -1461
  730. package/dist/chunk-JXEPLIXD.cjs +0 -389
  731. package/dist/chunk-JXIYH2NO.cjs +0 -24
  732. package/dist/chunk-JYNNIGQO.cjs +0 -87
  733. package/dist/chunk-JYT7AN37.cjs +0 -79
  734. package/dist/chunk-K5EW7GUU.mjs +0 -417
  735. package/dist/chunk-K76CBYQM.mjs +0 -157
  736. package/dist/chunk-KBGZ5FD6.cjs +0 -17
  737. package/dist/chunk-KHXAJ2KA.cjs +0 -387
  738. package/dist/chunk-KJMWAUKE.mjs +0 -124
  739. package/dist/chunk-KLNFJDFM.cjs +0 -1010
  740. package/dist/chunk-KORZ6PRE.cjs +0 -64
  741. package/dist/chunk-KPAJWD3N.mjs +0 -168
  742. package/dist/chunk-KQH2COEJ.mjs +0 -42
  743. package/dist/chunk-KY32FWK7.mjs +0 -387
  744. package/dist/chunk-L5JDKFMQ.cjs +0 -44
  745. package/dist/chunk-LDNSSHEG.mjs +0 -593
  746. package/dist/chunk-LEIXUFJN.cjs +0 -1461
  747. package/dist/chunk-LIFUPCXW.cjs +0 -423
  748. package/dist/chunk-LJDIFIJ2.mjs +0 -453
  749. package/dist/chunk-LLZSYFOM.mjs +0 -6
  750. package/dist/chunk-LM2YOGDK.mjs +0 -44
  751. package/dist/chunk-LM55GS4R.mjs +0 -38
  752. package/dist/chunk-LMFJCXDD.mjs +0 -55
  753. package/dist/chunk-LNM57D3H.cjs +0 -100
  754. package/dist/chunk-LNVGXUL3.cjs +0 -172
  755. package/dist/chunk-LPDKG6RA.mjs +0 -1359
  756. package/dist/chunk-LSHX2H5G.cjs +0 -57
  757. package/dist/chunk-LZ4SB57H.mjs +0 -651
  758. package/dist/chunk-M25IONJP.mjs +0 -16
  759. package/dist/chunk-MF3IA2AW.cjs +0 -25
  760. package/dist/chunk-MFQGU5CC.mjs +0 -127
  761. package/dist/chunk-MIGFX2FN.mjs +0 -758
  762. package/dist/chunk-MNIR7I7B.mjs +0 -217
  763. package/dist/chunk-MPU5DOXX.cjs +0 -21
  764. package/dist/chunk-MRNDAJEV.mjs +0 -293
  765. package/dist/chunk-MU5V7XHL.mjs +0 -172
  766. package/dist/chunk-N33DLJBC.mjs +0 -272
  767. package/dist/chunk-N35YPV4N.mjs +0 -48
  768. package/dist/chunk-N4AQNEXR.cjs +0 -17
  769. package/dist/chunk-N7JQXQAV.cjs +0 -2072
  770. package/dist/chunk-N7XWC6BN.mjs +0 -21
  771. package/dist/chunk-NBIVGHAT.mjs +0 -50
  772. package/dist/chunk-NCIAP562.mjs +0 -27
  773. package/dist/chunk-NK2VWS7P.cjs +0 -954
  774. package/dist/chunk-NN3MOPSI.mjs +0 -527
  775. package/dist/chunk-NOTSHVRN.mjs +0 -12519
  776. package/dist/chunk-NR63PD3P.mjs +0 -64
  777. package/dist/chunk-NRNAHZ57.mjs +0 -39
  778. package/dist/chunk-NWUHS6GV.cjs +0 -79
  779. package/dist/chunk-O4F3JUST.mjs +0 -176
  780. package/dist/chunk-OAJOQU5J.mjs +0 -225
  781. package/dist/chunk-OAMUSC7H.cjs +0 -9
  782. package/dist/chunk-OCS3PSYR.cjs +0 -51
  783. package/dist/chunk-OHWM2VI4.mjs +0 -29
  784. package/dist/chunk-OJO2GOM3.mjs +0 -69
  785. package/dist/chunk-OLGQZRW6.mjs +0 -700
  786. package/dist/chunk-ONG4RDW3.mjs +0 -155
  787. package/dist/chunk-OOJBBHYW.cjs +0 -38
  788. package/dist/chunk-OOZEU5KK.cjs +0 -18
  789. package/dist/chunk-OWQV6MLM.cjs +0 -82
  790. package/dist/chunk-OY5XDG24.cjs +0 -113
  791. package/dist/chunk-OYNNA4DD.cjs +0 -453
  792. package/dist/chunk-OYZXVBZP.cjs +0 -133
  793. package/dist/chunk-OZC2JPW6.cjs +0 -10
  794. package/dist/chunk-OZK2DS44.mjs +0 -203
  795. package/dist/chunk-P2355C6E.cjs +0 -186
  796. package/dist/chunk-P6MHI5O2.cjs +0 -758
  797. package/dist/chunk-PAKCHVUS.mjs +0 -450
  798. package/dist/chunk-PENBZAHJ.cjs +0 -88
  799. package/dist/chunk-PFV2KPDZ.cjs +0 -172
  800. package/dist/chunk-PIHKO25G.mjs +0 -100
  801. package/dist/chunk-PIUTGRDI.cjs +0 -358
  802. package/dist/chunk-PO5MXV5X.cjs +0 -13
  803. package/dist/chunk-PSUYE5HR.mjs +0 -25
  804. package/dist/chunk-PTLXHRJZ.mjs +0 -57
  805. package/dist/chunk-PZXYAWYG.cjs +0 -274
  806. package/dist/chunk-Q5B4LNON.mjs +0 -19
  807. package/dist/chunk-QGJ4FI2G.mjs +0 -723
  808. package/dist/chunk-QISW423S.cjs +0 -335
  809. package/dist/chunk-QMDU6QHN.mjs +0 -778
  810. package/dist/chunk-QOSDWGKT.mjs +0 -109
  811. package/dist/chunk-QPJ4MZTO.mjs +0 -60
  812. package/dist/chunk-QPNVDSFZ.mjs +0 -18
  813. package/dist/chunk-QQ44FYRO.cjs +0 -27
  814. package/dist/chunk-QSTRBKHZ.mjs +0 -102
  815. package/dist/chunk-QXJADAQB.cjs +0 -40
  816. package/dist/chunk-R4PHCZ3G.mjs +0 -9
  817. package/dist/chunk-R5U7OIPI.cjs +0 -34
  818. package/dist/chunk-R62SF5R4.mjs +0 -410
  819. package/dist/chunk-RD623KW4.cjs +0 -203
  820. package/dist/chunk-RFKTJTWZ.mjs +0 -26
  821. package/dist/chunk-RI3EVPKD.cjs +0 -57
  822. package/dist/chunk-RLEALQEN.mjs +0 -998
  823. package/dist/chunk-RVGLYMJM.cjs +0 -259
  824. package/dist/chunk-S32PDOLO.mjs +0 -13
  825. package/dist/chunk-S5AQ7CAC.cjs +0 -227
  826. package/dist/chunk-S6O2L47H.mjs +0 -549
  827. package/dist/chunk-SBDWCDS6.cjs +0 -8
  828. package/dist/chunk-SF3JB56B.mjs +0 -82
  829. package/dist/chunk-SG57PX7K.cjs +0 -65
  830. package/dist/chunk-SGBNF56S.cjs +0 -44
  831. package/dist/chunk-SHD265HW.cjs +0 -19
  832. package/dist/chunk-SHIWRBFI.cjs +0 -17
  833. package/dist/chunk-SHS6KXOZ.mjs +0 -135
  834. package/dist/chunk-SJ23LJ3N.cjs +0 -135
  835. package/dist/chunk-SM2SYWAR.cjs +0 -49
  836. package/dist/chunk-SMUW7UST.mjs +0 -196
  837. package/dist/chunk-SN5VSO3Q.mjs +0 -1095
  838. package/dist/chunk-SNP33A33.cjs +0 -9
  839. package/dist/chunk-STF6VDYQ.cjs +0 -23
  840. package/dist/chunk-SUCDVKUB.cjs +0 -42
  841. package/dist/chunk-SUV6YO4Q.cjs +0 -697
  842. package/dist/chunk-SVCUSOEF.mjs +0 -590
  843. package/dist/chunk-SXCL2MIN.cjs +0 -208
  844. package/dist/chunk-SYW346ZN.cjs +0 -71
  845. package/dist/chunk-T4EW7AAD.mjs +0 -150
  846. package/dist/chunk-TGSEVBPO.mjs +0 -93
  847. package/dist/chunk-TJVUTGED.mjs +0 -531
  848. package/dist/chunk-TQMI6BYO.cjs +0 -8951
  849. package/dist/chunk-TSFMFPRU.cjs +0 -878
  850. package/dist/chunk-TUOO6IK3.mjs +0 -87
  851. package/dist/chunk-TUPKMMXT.mjs +0 -173
  852. package/dist/chunk-TVCFY3KK.cjs +0 -217
  853. package/dist/chunk-TWHXBMLJ.cjs +0 -1980
  854. package/dist/chunk-UAQD67HM.mjs +0 -154
  855. package/dist/chunk-UB7RVEMX.mjs +0 -73
  856. package/dist/chunk-UIJOLBUL.mjs +0 -19
  857. package/dist/chunk-UJL4JOXV.cjs +0 -35
  858. package/dist/chunk-UN6N623E.mjs +0 -40
  859. package/dist/chunk-UNJZGVPU.cjs +0 -6
  860. package/dist/chunk-UPYIFH2H.cjs +0 -168
  861. package/dist/chunk-UQF3OJVE.mjs +0 -389
  862. package/dist/chunk-UQHIWZZ6.cjs +0 -1029
  863. package/dist/chunk-UUMKLGUU.mjs +0 -69
  864. package/dist/chunk-UYTAP4FQ.cjs +0 -60
  865. package/dist/chunk-UZCMMJJT.cjs +0 -80
  866. package/dist/chunk-V3UOEWCB.cjs +0 -46
  867. package/dist/chunk-V56632LA.cjs +0 -141
  868. package/dist/chunk-VAHBCI6X.mjs +0 -227
  869. package/dist/chunk-VE3FWJBO.mjs +0 -46
  870. package/dist/chunk-VFXE6NWR.mjs +0 -87
  871. package/dist/chunk-VHIXGZYH.mjs +0 -9
  872. package/dist/chunk-VISQDC6W.mjs +0 -10
  873. package/dist/chunk-VIXTAVEA.mjs +0 -59
  874. package/dist/chunk-VM57CK74.cjs +0 -42
  875. package/dist/chunk-VOQ7XZZT.cjs +0 -157
  876. package/dist/chunk-VQJYGZNX.cjs +0 -206
  877. package/dist/chunk-VR6QLTTX.mjs +0 -59
  878. package/dist/chunk-VS7EHLLW.mjs +0 -462
  879. package/dist/chunk-VSLM6BHX.cjs +0 -2250
  880. package/dist/chunk-VU3MYZPO.mjs +0 -432
  881. package/dist/chunk-VXCFJWK5.cjs +0 -59
  882. package/dist/chunk-VZY7MAVS.cjs +0 -432
  883. package/dist/chunk-WCLLPR6H.mjs +0 -35
  884. package/dist/chunk-WEGAVN37.cjs +0 -45
  885. package/dist/chunk-WFVSAT7Y.cjs +0 -83
  886. package/dist/chunk-WGUHDWT5.cjs +0 -12522
  887. package/dist/chunk-WNDAISB7.mjs +0 -51
  888. package/dist/chunk-WNLPQW7W.mjs +0 -19
  889. package/dist/chunk-WSDKXV4E.mjs +0 -2072
  890. package/dist/chunk-WT6RAN2I.cjs +0 -41
  891. package/dist/chunk-WXFY5JIY.mjs +0 -20
  892. package/dist/chunk-WYL4ODZ4.mjs +0 -38
  893. package/dist/chunk-X2AMN2WV.cjs +0 -527
  894. package/dist/chunk-X333W5KV.cjs +0 -31
  895. package/dist/chunk-X3EFRVXY.mjs +0 -12
  896. package/dist/chunk-X3JNB2TB.mjs +0 -406
  897. package/dist/chunk-X3XUZWRB.mjs +0 -141
  898. package/dist/chunk-XB24LZWI.cjs +0 -651
  899. package/dist/chunk-XGJVRPYL.cjs +0 -141
  900. package/dist/chunk-XLRLSTJ6.cjs +0 -40
  901. package/dist/chunk-XMHERKSE.mjs +0 -224
  902. package/dist/chunk-XPMC4E2G.cjs +0 -55
  903. package/dist/chunk-XQ4DPO4G.mjs +0 -13
  904. package/dist/chunk-XQSYOVCW.cjs +0 -417
  905. package/dist/chunk-XR2ZIBQK.mjs +0 -57
  906. package/dist/chunk-XURDCXNH.cjs +0 -48
  907. package/dist/chunk-XXXRRVY6.mjs +0 -697
  908. package/dist/chunk-XYL4HSVC.cjs +0 -406
  909. package/dist/chunk-Y2G5SJFB.mjs +0 -1964
  910. package/dist/chunk-Y3N5BFRJ.mjs +0 -206
  911. package/dist/chunk-Y3WG64CP.cjs +0 -9
  912. package/dist/chunk-Y6FXYEAI.mjs +0 -10
  913. package/dist/chunk-Y7NN63LS.mjs +0 -40
  914. package/dist/chunk-YAJTD3ZG.mjs +0 -341
  915. package/dist/chunk-YB44NKC2.cjs +0 -203
  916. package/dist/chunk-YDXLC4DW.cjs +0 -54
  917. package/dist/chunk-YIHRZBD7.cjs +0 -172
  918. package/dist/chunk-YKHRCY4T.cjs +0 -73
  919. package/dist/chunk-YP7YO3S3.mjs +0 -17
  920. package/dist/chunk-YT3SLLZK.mjs +0 -242
  921. package/dist/chunk-YTVSWXEZ.cjs +0 -168
  922. package/dist/chunk-YUEYBL35.mjs +0 -878
  923. package/dist/chunk-YWPNIYUP.mjs +0 -41
  924. package/dist/chunk-YX6AFPXC.mjs +0 -8
  925. package/dist/chunk-Z5A6CNV2.mjs +0 -60
  926. package/dist/chunk-Z64V4WZI.mjs +0 -17
  927. package/dist/chunk-ZD2VKAUI.mjs +0 -1980
  928. package/dist/chunk-ZNXTU4YH.mjs +0 -114
  929. package/dist/chunk-ZOWNWHK6.cjs +0 -462
  930. package/dist/chunk-ZQ5BDNKW.mjs +0 -954
  931. package/dist/chunk-ZXK2EYQW.cjs +0 -8
  932. package/dist/chunk-recovery.d-lnQFzcQP.d.mts +0 -26
  933. package/dist/chunk-recovery.d-lnQFzcQP.d.ts +0 -26
  934. package/dist/client/lifecycle.d.mts +0 -1
  935. package/dist/client/lifecycle.d.ts +0 -1
  936. package/dist/client-cache.d-Deoqq-nM.d.ts +0 -76
  937. package/dist/client-cache.d-di_Nasxa.d.mts +0 -76
  938. package/dist/client-plugins.d-DllmH8eM.d.mts +0 -4001
  939. package/dist/client-plugins.d-n3iWY1EJ.d.ts +0 -4001
  940. package/dist/client-plugins.d.mts +0 -33
  941. package/dist/client-plugins.d.ts +0 -33
  942. package/dist/client.d.mts +0 -452
  943. package/dist/client.d.ts +0 -452
  944. package/dist/client.react-server.mjs +0 -2
  945. package/dist/config.d-DqKaCr1r.d.mts +0 -199
  946. package/dist/config.d-DqKaCr1r.d.ts +0 -199
  947. package/dist/config.d.mts +0 -40
  948. package/dist/config.d.ts +0 -40
  949. package/dist/cron.d.mts +0 -78
  950. package/dist/cron.d.ts +0 -78
  951. package/dist/deferred.d.mts +0 -44
  952. package/dist/deferred.d.ts +0 -44
  953. package/dist/deployment.d.mts +0 -36
  954. package/dist/deployment.d.ts +0 -36
  955. package/dist/desktop.cjs +0 -13
  956. package/dist/desktop.d.mts +0 -120
  957. package/dist/desktop.d.ts +0 -120
  958. package/dist/desktop.mjs +0 -13
  959. package/dist/dev-guard-2UW2KERP.cjs +0 -59
  960. package/dist/dev-guard-ONNMVQUN.mjs +0 -59
  961. package/dist/devtools-TO6TAO32.cjs +0 -463
  962. package/dist/devtools-UESYARTF.mjs +0 -463
  963. package/dist/devtools-client-SU4XH46J.mjs +0 -250
  964. package/dist/devtools-client-X5OQCXDF.cjs +0 -250
  965. package/dist/devtools-ui-CYBVFLPH.mjs +0 -1265
  966. package/dist/devtools-ui-SYRUXUA7.cjs +0 -1265
  967. package/dist/docs.d.mts +0 -169
  968. package/dist/docs.d.ts +0 -169
  969. package/dist/endpoint.d-BgHn0lhl.d.ts +0 -370
  970. package/dist/endpoint.d-BkMSCRf6.d.mts +0 -370
  971. package/dist/env-types.d.mts +0 -12
  972. package/dist/env-types.d.ts +0 -12
  973. package/dist/env.d.mts +0 -65
  974. package/dist/env.d.ts +0 -65
  975. package/dist/environment/vite.d.mts +0 -31
  976. package/dist/environment/vite.d.ts +0 -31
  977. package/dist/environment.d.mts +0 -18
  978. package/dist/environment.d.ts +0 -18
  979. package/dist/font.d.mts +0 -95
  980. package/dist/font.d.ts +0 -95
  981. package/dist/generate-route-types.d-BL2pq6xC.d.ts +0 -33
  982. package/dist/generate-route-types.d-BoVDU8qX.d.mts +0 -33
  983. package/dist/headers.d.mts +0 -32
  984. package/dist/headers.d.ts +0 -32
  985. package/dist/i18n/client.d.mts +0 -32
  986. package/dist/i18n/client.d.ts +0 -32
  987. package/dist/i18n/index.d.mts +0 -3
  988. package/dist/i18n/index.d.ts +0 -3
  989. package/dist/i18n/server.d.mts +0 -30
  990. package/dist/i18n/server.d.ts +0 -30
  991. package/dist/image/server.d.mts +0 -59
  992. package/dist/image/server.d.ts +0 -59
  993. package/dist/image/sharp.d.mts +0 -20
  994. package/dist/image/sharp.d.ts +0 -20
  995. package/dist/image-config.d-CeDgNyX4.d.mts +0 -53
  996. package/dist/image-config.d-CeDgNyX4.d.ts +0 -53
  997. package/dist/image.d.mts +0 -39
  998. package/dist/image.d.ts +0 -39
  999. package/dist/index.d-BL7KKiwa.d.mts +0 -54
  1000. package/dist/index.d-BNNDpql4.d.ts +0 -20
  1001. package/dist/index.d-BXsAXm1U.d.ts +0 -54
  1002. package/dist/index.d-BqcfqJvt.d.mts +0 -20
  1003. package/dist/index.d.mts +0 -1053
  1004. package/dist/index.d.ts +0 -1053
  1005. package/dist/instrumentation-runtime.d-CX9Zh-16.d.mts +0 -22
  1006. package/dist/instrumentation-runtime.d-CX9Zh-16.d.ts +0 -22
  1007. package/dist/instrumentation.d.mts +0 -7
  1008. package/dist/instrumentation.d.ts +0 -7
  1009. package/dist/integration-orm-52GPGTHO.cjs +0 -14
  1010. package/dist/integration-orm-CO23MSFE.mjs +0 -14
  1011. package/dist/integrations.d.mts +0 -33
  1012. package/dist/integrations.d.ts +0 -33
  1013. package/dist/internal/app-markdown-runtime.d.mts +0 -86
  1014. package/dist/internal/app-markdown-runtime.d.ts +0 -86
  1015. package/dist/internal/build-runtime.d.mts +0 -46
  1016. package/dist/internal/build-runtime.d.ts +0 -46
  1017. package/dist/internal/client-error-overlay.d.mts +0 -25
  1018. package/dist/internal/client-error-overlay.d.ts +0 -25
  1019. package/dist/internal/client-runtime.d.mts +0 -93
  1020. package/dist/internal/client-runtime.d.ts +0 -93
  1021. package/dist/internal/compression-runtime.d.mts +0 -48
  1022. package/dist/internal/compression-runtime.d.ts +0 -48
  1023. package/dist/internal/config-runtime.d.mts +0 -248
  1024. package/dist/internal/config-runtime.d.ts +0 -248
  1025. package/dist/internal/desktop-guard.cjs +0 -17
  1026. package/dist/internal/desktop-guard.d.mts +0 -52
  1027. package/dist/internal/desktop-guard.d.ts +0 -52
  1028. package/dist/internal/desktop-guard.mjs +0 -17
  1029. package/dist/internal/docs-precompiled-runtime.d.mts +0 -43
  1030. package/dist/internal/docs-precompiled-runtime.d.ts +0 -43
  1031. package/dist/internal/form-actions-client.cjs +0 -14
  1032. package/dist/internal/form-actions-client.d.mts +0 -5
  1033. package/dist/internal/form-actions-client.d.ts +0 -5
  1034. package/dist/internal/form-actions-client.mjs +0 -14
  1035. package/dist/internal/form-actions.cjs +0 -19
  1036. package/dist/internal/form-actions.d.mts +0 -14
  1037. package/dist/internal/form-actions.d.ts +0 -14
  1038. package/dist/internal/form-actions.mjs +0 -19
  1039. package/dist/internal/infra-analytics-runtime.d.mts +0 -16
  1040. package/dist/internal/infra-analytics-runtime.d.ts +0 -16
  1041. package/dist/internal/island-codec.cjs +0 -22
  1042. package/dist/internal/island-codec.d.mts +0 -29
  1043. package/dist/internal/island-codec.d.ts +0 -29
  1044. package/dist/internal/island-codec.mjs +0 -22
  1045. package/dist/internal/island-value-store.cjs +0 -10
  1046. package/dist/internal/island-value-store.d.mts +0 -6
  1047. package/dist/internal/island-value-store.d.ts +0 -6
  1048. package/dist/internal/island-value-store.mjs +0 -10
  1049. package/dist/internal/islands-runtime.cjs +0 -161
  1050. package/dist/internal/islands-runtime.d.mts +0 -66
  1051. package/dist/internal/islands-runtime.d.ts +0 -66
  1052. package/dist/internal/islands-runtime.mjs +0 -161
  1053. package/dist/internal/islands-server.cjs +0 -16
  1054. package/dist/internal/islands-server.d.mts +0 -3
  1055. package/dist/internal/islands-server.d.ts +0 -3
  1056. package/dist/internal/islands-server.mjs +0 -16
  1057. package/dist/internal/islx-client.cjs +0 -5
  1058. package/dist/internal/islx-client.d.mts +0 -6
  1059. package/dist/internal/islx-client.d.ts +0 -6
  1060. package/dist/internal/islx-client.mjs +0 -3
  1061. package/dist/internal/islx-react.cjs +0 -4
  1062. package/dist/internal/islx-react.d.mts +0 -1
  1063. package/dist/internal/islx-react.d.ts +0 -1
  1064. package/dist/internal/islx-react.mjs +0 -2
  1065. package/dist/internal/islx-server.cjs +0 -5
  1066. package/dist/internal/islx-server.d.mts +0 -2
  1067. package/dist/internal/islx-server.d.ts +0 -2
  1068. package/dist/internal/islx-server.mjs +0 -3
  1069. package/dist/internal/isolated-boundary.d.mts +0 -66
  1070. package/dist/internal/isolated-boundary.d.ts +0 -66
  1071. package/dist/internal/metadata-image-runtime.d.mts +0 -30
  1072. package/dist/internal/metadata-image-runtime.d.ts +0 -30
  1073. package/dist/internal/product-telemetry-runtime.d.mts +0 -45
  1074. package/dist/internal/product-telemetry-runtime.d.ts +0 -45
  1075. package/dist/internal/production-node-env.d.mts +0 -21
  1076. package/dist/internal/production-node-env.d.ts +0 -21
  1077. package/dist/internal/production-runtime.d.mts +0 -533
  1078. package/dist/internal/production-runtime.d.ts +0 -533
  1079. package/dist/internal/request-cookies.d.mts +0 -16
  1080. package/dist/internal/request-cookies.d.ts +0 -16
  1081. package/dist/internal/server-fn-transform.cjs +0 -13
  1082. package/dist/internal/server-fn-transform.d.mts +0 -24
  1083. package/dist/internal/server-fn-transform.d.ts +0 -24
  1084. package/dist/internal/server-fn-transform.mjs +0 -13
  1085. package/dist/internal/server-tree.d.mts +0 -50
  1086. package/dist/internal/server-tree.d.ts +0 -50
  1087. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  1088. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  1089. package/dist/island.d-CfGru1MO.d.mts +0 -9
  1090. package/dist/island.d-CfGru1MO.d.ts +0 -9
  1091. package/dist/json-ld.d.mts +0 -94
  1092. package/dist/json-ld.d.ts +0 -94
  1093. package/dist/layers-DMRXRL7F.cjs +0 -18
  1094. package/dist/layers-T55SA47E.mjs +0 -18
  1095. package/dist/layers.d-CcS42OGR.d.mts +0 -55
  1096. package/dist/layers.d-CcS42OGR.d.ts +0 -55
  1097. package/dist/lifecycle.d-C2aLBOwu.d.mts +0 -176
  1098. package/dist/lifecycle.d-C2aLBOwu.d.ts +0 -176
  1099. package/dist/manager-2LUKNX2N.cjs +0 -14
  1100. package/dist/manager-H5ZM3HAM.mjs +0 -14
  1101. package/dist/markdown.d.mts +0 -33
  1102. package/dist/markdown.d.ts +0 -33
  1103. package/dist/middleware.d.mts +0 -225
  1104. package/dist/middleware.d.ts +0 -225
  1105. package/dist/mobile.cjs +0 -9
  1106. package/dist/mobile.d.mts +0 -110
  1107. package/dist/mobile.d.ts +0 -110
  1108. package/dist/mobile.mjs +0 -9
  1109. package/dist/native-tree-EBPDFTRW.mjs +0 -25
  1110. package/dist/native-tree-MMZS7S6W.cjs +0 -25
  1111. package/dist/navigation-delegate.d-C76gXTmO.d.mts +0 -29
  1112. package/dist/navigation-delegate.d-DIyDslxt.d.ts +0 -29
  1113. package/dist/navigation.d.mts +0 -51
  1114. package/dist/navigation.d.ts +0 -51
  1115. package/dist/nitro-CK7M4RMY.cjs +0 -650
  1116. package/dist/nitro-R444AF3O.mjs +0 -650
  1117. package/dist/node-module-bundle-7JHPPF6B.mjs +0 -11
  1118. package/dist/node-module-bundle-YJGYBOGK.cjs +0 -11
  1119. package/dist/observability.d-B2363jB6.d.mts +0 -448
  1120. package/dist/observability.d-B2363jB6.d.ts +0 -448
  1121. package/dist/observability.d.mts +0 -2
  1122. package/dist/observability.d.ts +0 -2
  1123. package/dist/og.d.mts +0 -1
  1124. package/dist/og.d.ts +0 -1
  1125. package/dist/params.d-BALtrRim.d.ts +0 -15
  1126. package/dist/params.d-ry-lxqmy.d.mts +0 -15
  1127. package/dist/platform.cjs +0 -29
  1128. package/dist/platform.d.mts +0 -24
  1129. package/dist/platform.d.ts +0 -24
  1130. package/dist/platform.mjs +0 -29
  1131. package/dist/plugin-53SY5YBS.mjs +0 -32
  1132. package/dist/plugin-HZIBL3DW.cjs +0 -32
  1133. package/dist/plugin.d.mts +0 -58
  1134. package/dist/plugin.d.ts +0 -58
  1135. package/dist/production-runtime.d-CDHztggO.d.mts +0 -123
  1136. package/dist/production-runtime.d-tyaGdbk6.d.ts +0 -123
  1137. package/dist/production-vite.d-BQFAlG7n.d.mts +0 -13
  1138. package/dist/production-vite.d-BQFAlG7n.d.ts +0 -13
  1139. package/dist/programmatic-routes-client.d-XfmIrCK1.d.ts +0 -192
  1140. package/dist/programmatic-routes-client.d-aAWiDd64.d.mts +0 -192
  1141. package/dist/query/client.d.mts +0 -61
  1142. package/dist/query/client.d.ts +0 -61
  1143. package/dist/query/index.d.mts +0 -90
  1144. package/dist/query/index.d.ts +0 -90
  1145. package/dist/query/parsers.d.mts +0 -29
  1146. package/dist/query/parsers.d.ts +0 -29
  1147. package/dist/query/server.d.mts +0 -55
  1148. package/dist/query/server.d.ts +0 -55
  1149. package/dist/render-plan.d-Diwybxo8.d.mts +0 -25
  1150. package/dist/render-plan.d-Dr5WRjoV.d.ts +0 -25
  1151. package/dist/renderer/react/client.d.mts +0 -3
  1152. package/dist/renderer/react/client.d.ts +0 -3
  1153. package/dist/renderer/react/server.d.mts +0 -48
  1154. package/dist/renderer/react/server.d.ts +0 -48
  1155. package/dist/renderer/react/vite.d.mts +0 -4
  1156. package/dist/renderer/react/vite.d.ts +0 -4
  1157. package/dist/renderer-client.d.mts +0 -126
  1158. package/dist/renderer-client.d.ts +0 -126
  1159. package/dist/renderer.d.mts +0 -260
  1160. package/dist/renderer.d.ts +0 -260
  1161. package/dist/request.d-D01fRn--.d.ts +0 -24
  1162. package/dist/request.d-Dd3AFR79.d.mts +0 -24
  1163. package/dist/request.d.mts +0 -34
  1164. package/dist/request.d.ts +0 -34
  1165. package/dist/resolver.d-BHyZgpa7.d.ts +0 -14
  1166. package/dist/resolver.d-JnZKKsc5.d.mts +0 -14
  1167. package/dist/response.d-BolW0Vx_.d.mts +0 -10
  1168. package/dist/response.d-BolW0Vx_.d.ts +0 -10
  1169. package/dist/route-pattern.d-CVsVbq5n.d.mts +0 -13
  1170. package/dist/route-pattern.d-CVsVbq5n.d.ts +0 -13
  1171. package/dist/route-rendering.d-BQ53lJ_D.d.mts +0 -44
  1172. package/dist/route-rendering.d-Bhx4QoJt.d.ts +0 -44
  1173. package/dist/route.d-BaVH3V0w.d.mts +0 -224
  1174. package/dist/route.d-DBTEqifW.d.ts +0 -224
  1175. package/dist/router.d-Bi23a6Xc.d.mts +0 -50
  1176. package/dist/router.d-DQ3k7EYn.d.ts +0 -50
  1177. package/dist/router.d.mts +0 -36
  1178. package/dist/router.d.ts +0 -36
  1179. package/dist/routes.d-BgTd7vI4.d.mts +0 -208
  1180. package/dist/routes.d-C7jMJFvP.d.ts +0 -208
  1181. package/dist/routes.d.mts +0 -273
  1182. package/dist/routes.d.ts +0 -273
  1183. package/dist/rsc-pipeline-K3ER3Q4N.mjs +0 -83
  1184. package/dist/rsc-pipeline-OCZIT5OF.cjs +0 -83
  1185. package/dist/runtime-DKNSIH7V.cjs +0 -1061
  1186. package/dist/runtime-MKYDEUZT.mjs +0 -1061
  1187. package/dist/runtime.d-3iJAKptR.d.mts +0 -28
  1188. package/dist/runtime.d-B2Js6qZ2.d.mts +0 -69
  1189. package/dist/runtime.d-BL-CGwoi.d.ts +0 -69
  1190. package/dist/runtime.d-BtL3PCL3.d.ts +0 -28
  1191. package/dist/schema-dev-notice-F6QYSOAI.mjs +0 -54
  1192. package/dist/schema-dev-notice-UU7DMZEU.cjs +0 -54
  1193. package/dist/schema.d.mts +0 -115
  1194. package/dist/schema.d.ts +0 -115
  1195. package/dist/search-client-OXH6GBNO.mjs +0 -15
  1196. package/dist/search-client-ZZLKVO5R.cjs +0 -15
  1197. package/dist/server-action-security.d.mts +0 -45
  1198. package/dist/server-action-security.d.ts +0 -45
  1199. package/dist/server-client-bridge.d-DKWDl5NB.d.mts +0 -7
  1200. package/dist/server-client-bridge.d-DKWDl5NB.d.ts +0 -7
  1201. package/dist/server-fn-client.d.mts +0 -60
  1202. package/dist/server-fn-client.d.ts +0 -60
  1203. package/dist/server-fn-error.d-DrcH9cc1.d.mts +0 -26
  1204. package/dist/server-fn-error.d-DrcH9cc1.d.ts +0 -26
  1205. package/dist/server-fn.d.mts +0 -192
  1206. package/dist/server-fn.d.ts +0 -192
  1207. package/dist/server-plugins.d.mts +0 -65
  1208. package/dist/server-plugins.d.ts +0 -65
  1209. package/dist/server-query-client.d.mts +0 -26
  1210. package/dist/server-query-client.d.ts +0 -26
  1211. package/dist/server-query-runtime.d-DXRNhX_3.d.ts +0 -36
  1212. package/dist/server-query-runtime.d-aP52iuL5.d.mts +0 -36
  1213. package/dist/server-query.d.mts +0 -46
  1214. package/dist/server-query.d.ts +0 -46
  1215. package/dist/server.d.mts +0 -78
  1216. package/dist/server.d.ts +0 -78
  1217. package/dist/session-AAU7RNRO.cjs +0 -23
  1218. package/dist/session-IGEDQ5PY.mjs +0 -23
  1219. package/dist/spa-router.d-B2rIFGs0.d.mts +0 -239
  1220. package/dist/spa-router.d-DqZ6Lfs0.d.ts +0 -239
  1221. package/dist/storage.d.mts +0 -60
  1222. package/dist/storage.d.ts +0 -60
  1223. package/dist/testing.d.mts +0 -110
  1224. package/dist/testing.d.ts +0 -110
  1225. package/dist/theme/client.d.mts +0 -10
  1226. package/dist/theme/client.d.ts +0 -10
  1227. package/dist/theme/index.d.mts +0 -6
  1228. package/dist/theme/index.d.ts +0 -6
  1229. package/dist/theme/runtime.d.mts +0 -13
  1230. package/dist/theme/runtime.d.ts +0 -13
  1231. package/dist/theme/server.d.mts +0 -8
  1232. package/dist/theme/server.d.ts +0 -8
  1233. package/dist/types.d-BnIqOn9w.d.mts +0 -73
  1234. package/dist/types.d-BnIqOn9w.d.ts +0 -73
  1235. package/dist/types.d-C41ePjvP.d.mts +0 -85
  1236. package/dist/types.d-C41ePjvP.d.ts +0 -85
  1237. package/dist/types.d-DQnyD3VD.d.mts +0 -30
  1238. package/dist/types.d-DQnyD3VD.d.ts +0 -30
  1239. package/dist/utils.d-Bv2MPeLR.d.ts +0 -48
  1240. package/dist/utils.d-fqXe8lNc.d.mts +0 -48
  1241. package/dist/version.d.mts +0 -3
  1242. package/dist/version.d.ts +0 -3
  1243. package/dist/vite.d.mts +0 -163
  1244. package/dist/vite.d.ts +0 -163
  1245. package/dist/workflows.d-CRMzQZ3k.d.mts +0 -188
  1246. package/dist/workflows.d-CRMzQZ3k.d.ts +0 -188
  1247. package/dist/workflows.d.mts +0 -1
  1248. package/dist/workflows.d.ts +0 -1
@@ -0,0 +1,2028 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return 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; }
2
+
3
+
4
+ var _chunkMWWVKDW3cjs = require('./chunk-MWWVKDW3.cjs');
5
+
6
+
7
+ var _chunkKGZIORNLcjs = require('./chunk-KGZIORNL.cjs');
8
+
9
+
10
+
11
+ var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
12
+
13
+
14
+
15
+ var _chunkHREOKQWTcjs = require('./chunk-HREOKQWT.cjs');
16
+
17
+
18
+ var _chunkEUV4YR3Vcjs = require('./chunk-EUV4YR3V.cjs');
19
+
20
+
21
+ var _chunkKIIMAWOJcjs = require('./chunk-KIIMAWOJ.cjs');
22
+
23
+
24
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
25
+
26
+ // src/docs/handler.ts
27
+ var _fs = require('fs');
28
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
29
+ var _marked = require('marked');
30
+ var _sugarhigh = require('sugar-high');
31
+
32
+ // src/docs/last-modified.ts
33
+ var _child_process = require('child_process');
34
+
35
+
36
+ var FARM_DOCS_LAST_MODIFIED_MANIFEST = ".farm-docs-last-modified.json";
37
+ var COMMIT_MARKER = "__FARM_DOCS_COMMIT__";
38
+ var DOCS_FILE_EXTENSIONS = /* @__PURE__ */ new Set([".md", ".mdx"]);
39
+ var manifestCache = /* @__PURE__ */ new Map();
40
+ function normalizeRelativePath(value) {
41
+ return value.replace(/\\/g, "/").replace(/^\.\/+/, "");
42
+ }
43
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRelativePath, "normalizeRelativePath");
44
+ function resolveExistingPath(filePath) {
45
+ try {
46
+ return _fs.realpathSync.call(void 0, filePath);
47
+ } catch (e) {
48
+ return _path2.default.resolve(filePath);
49
+ }
50
+ }
51
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveExistingPath, "resolveExistingPath");
52
+ function isDocsSourceFile(filePath) {
53
+ return DOCS_FILE_EXTENSIONS.has(_path2.default.extname(filePath).toLowerCase());
54
+ }
55
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isDocsSourceFile, "isDocsSourceFile");
56
+ function discoverDocsSourceFiles(contentDir) {
57
+ const files = [];
58
+ const visit = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (dir) => {
59
+ for (const entry of _fs.readdirSync.call(void 0, dir, { withFileTypes: true }).sort(
60
+ (a, b) => a.name.localeCompare(b.name)
61
+ )) {
62
+ if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
63
+ const absolutePath = _path2.default.join(dir, entry.name);
64
+ if (entry.isDirectory()) {
65
+ visit(absolutePath);
66
+ } else if (entry.isFile() && isDocsSourceFile(absolutePath)) {
67
+ files.push(absolutePath);
68
+ }
69
+ }
70
+ }, "visit");
71
+ if (_fs.existsSync.call(void 0, contentDir)) visit(contentDir);
72
+ return files;
73
+ }
74
+ _chunkS3JO3N4Hcjs.__name.call(void 0, discoverDocsSourceFiles, "discoverDocsSourceFiles");
75
+ function getGitLastModifiedDates(contentDir) {
76
+ try {
77
+ const gitRoot = _child_process.execFileSync.call(void 0, "git", ["-C", contentDir, "rev-parse", "--show-toplevel"], {
78
+ encoding: "utf8",
79
+ stdio: ["ignore", "pipe", "ignore"]
80
+ }).trim();
81
+ if (!gitRoot) return {};
82
+ const contentPathspec = normalizeRelativePath(_path2.default.relative(gitRoot, contentDir)) || ".";
83
+ const contentPrefix = contentPathspec === "." ? "" : `${contentPathspec}/`;
84
+ const history = _child_process.execFileSync.call(void 0,
85
+ "git",
86
+ [
87
+ "-C",
88
+ gitRoot,
89
+ "-c",
90
+ "core.quotePath=false",
91
+ "log",
92
+ `--format=${COMMIT_MARKER}%cI`,
93
+ "--name-only",
94
+ "--",
95
+ contentPathspec
96
+ ],
97
+ {
98
+ encoding: "utf8",
99
+ stdio: ["ignore", "pipe", "ignore"],
100
+ maxBuffer: 32 * 1024 * 1024
101
+ }
102
+ );
103
+ const pages = {};
104
+ let commitDate;
105
+ for (const rawLine of history.split(/\r?\n/)) {
106
+ const line = normalizeRelativePath(rawLine.trim());
107
+ if (!line) continue;
108
+ if (line.startsWith(COMMIT_MARKER)) {
109
+ commitDate = line.slice(COMMIT_MARKER.length);
110
+ continue;
111
+ }
112
+ if (!commitDate || contentPrefix && !line.startsWith(contentPrefix)) continue;
113
+ const relativePath = contentPrefix ? line.slice(contentPrefix.length) : line;
114
+ if (isDocsSourceFile(relativePath) && !pages[relativePath]) {
115
+ pages[relativePath] = commitDate;
116
+ }
117
+ }
118
+ return pages;
119
+ } catch (e2) {
120
+ return {};
121
+ }
122
+ }
123
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getGitLastModifiedDates, "getGitLastModifiedDates");
124
+ function readManifest(contentDir) {
125
+ const manifestPath = _path2.default.join(contentDir, FARM_DOCS_LAST_MODIFIED_MANIFEST);
126
+ if (!_fs.existsSync.call(void 0, manifestPath)) return null;
127
+ try {
128
+ const parsed = JSON.parse(
129
+ _fs.readFileSync.call(void 0, manifestPath, "utf8")
130
+ );
131
+ if (parsed.version !== 1 || !parsed.pages || typeof parsed.pages !== "object") return null;
132
+ const pages = Object.fromEntries(
133
+ Object.entries(parsed.pages).filter(
134
+ (entry) => typeof entry[1] === "string" && entry[1].length > 0
135
+ )
136
+ );
137
+ return { version: 1, pages };
138
+ } catch (e3) {
139
+ return null;
140
+ }
141
+ }
142
+ _chunkS3JO3N4Hcjs.__name.call(void 0, readManifest, "readManifest");
143
+ function createFarmDocsLastModifiedManifest(contentDir, options = {}) {
144
+ const resolvedContentDir = resolveExistingPath(contentDir);
145
+ const gitDates = getGitLastModifiedDates(resolvedContentDir);
146
+ const fallbackDate = (_nullishCoalesce(options.now, () => ( /* @__PURE__ */ new Date()))).toISOString();
147
+ const pages = {};
148
+ for (const sourcePath of discoverDocsSourceFiles(resolvedContentDir)) {
149
+ const relativePath = normalizeRelativePath(_path2.default.relative(resolvedContentDir, sourcePath));
150
+ pages[relativePath] = gitDates[relativePath] || (options.fallback === "now" ? fallbackDate : _fs.statSync.call(void 0, sourcePath).mtime.toISOString());
151
+ }
152
+ return { version: 1, pages };
153
+ }
154
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDocsLastModifiedManifest, "createFarmDocsLastModifiedManifest");
155
+ function getLastModifiedManifest(contentDir) {
156
+ const resolvedContentDir = resolveExistingPath(contentDir);
157
+ const manifestPath = _path2.default.join(resolvedContentDir, FARM_DOCS_LAST_MODIFIED_MANIFEST);
158
+ const manifestStat = _fs.existsSync.call(void 0, manifestPath) ? _fs.statSync.call(void 0, manifestPath) : null;
159
+ const signature = manifestStat ? `file:${manifestStat.mtimeMs}:${manifestStat.size}` : "generated";
160
+ const cached = manifestCache.get(resolvedContentDir);
161
+ if (_optionalChain([cached, 'optionalAccess', _ => _.signature]) === signature) return cached.manifest;
162
+ const manifest = _nullishCoalesce(readManifest(resolvedContentDir), () => ( createFarmDocsLastModifiedManifest(resolvedContentDir)));
163
+ manifestCache.set(resolvedContentDir, { signature, manifest });
164
+ return manifest;
165
+ }
166
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getLastModifiedManifest, "getLastModifiedManifest");
167
+ function resolveFarmDocsPageLastModified(contentDir, sourcePath, frontmatter) {
168
+ const configured = frontmatter.lastModified || frontmatter.lastmod || frontmatter.lastUpdated || frontmatter.updatedAt;
169
+ if (configured) return configured;
170
+ const resolvedContentDir = resolveExistingPath(contentDir);
171
+ const resolvedSourcePath = resolveExistingPath(sourcePath);
172
+ const relativePath = normalizeRelativePath(_path2.default.relative(resolvedContentDir, resolvedSourcePath));
173
+ const isInsideContentDir = relativePath !== ".." && !relativePath.startsWith("../") && !_path2.default.isAbsolute(relativePath);
174
+ if (isInsideContentDir) {
175
+ const generated = getLastModifiedManifest(resolvedContentDir).pages[relativePath];
176
+ if (generated) return generated;
177
+ }
178
+ return _fs.statSync.call(void 0, resolvedSourcePath).mtime.toISOString();
179
+ }
180
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmDocsPageLastModified, "resolveFarmDocsPageLastModified");
181
+
182
+ // src/docs/social-image.ts
183
+ var _crypto = require('crypto');
184
+ var FARM_DOCS_SOCIAL_IMAGE_WIDTH = 1200;
185
+ var FARM_DOCS_SOCIAL_IMAGE_HEIGHT = 630;
186
+ var FARM_DOCS_SOCIAL_IMAGE_VERSION = 3;
187
+ function normalizeEntry(entry) {
188
+ if (!entry || entry === "/") return "";
189
+ return `/${entry.replace(/^\/+|\/+$/g, "")}`;
190
+ }
191
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeEntry, "normalizeEntry");
192
+ function encodeSlugPath(slug) {
193
+ return slug.split("/").filter(Boolean).map((segment) => encodeURIComponent(segment)).join("/");
194
+ }
195
+ _chunkS3JO3N4Hcjs.__name.call(void 0, encodeSlugPath, "encodeSlugPath");
196
+ function getSocialImageConfig(docs) {
197
+ return typeof docs.config.socialImage === "object" && docs.config.socialImage ? docs.config.socialImage : void 0;
198
+ }
199
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getSocialImageConfig, "getSocialImageConfig");
200
+ function getNavTitle(docs) {
201
+ if (typeof docs.config.nav !== "object" || !docs.config.nav || !("title" in docs.config.nav)) {
202
+ return "Farm.js";
203
+ }
204
+ return String(docs.config.nav.title || "Farm.js");
205
+ }
206
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getNavTitle, "getNavTitle");
207
+ function isFalse(value) {
208
+ return value ? /^(false|no|none|off|disabled)$/i.test(value.trim()) : false;
209
+ }
210
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isFalse, "isFalse");
211
+ function isExternalOrRootPath(value) {
212
+ return /^(https?:)?\/\//i.test(value) || value.startsWith("/");
213
+ }
214
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isExternalOrRootPath, "isExternalOrRootPath");
215
+ function isFarmDocsSocialImageEnabled(page, docs) {
216
+ if (docs.config.socialImage === false || _optionalChain([getSocialImageConfig, 'call', _2 => _2(docs), 'optionalAccess', _3 => _3.enabled]) === false) {
217
+ return false;
218
+ }
219
+ return !isFalse(page.frontmatter.socialImage);
220
+ }
221
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isFarmDocsSocialImageEnabled, "isFarmDocsSocialImageEnabled");
222
+ function getFarmDocsCustomSocialImage(page) {
223
+ const value = page.frontmatter.socialImage || page.frontmatter.openGraphImage || page.frontmatter.ogImage;
224
+ return value && !isFalse(value) && isExternalOrRootPath(value) ? value : void 0;
225
+ }
226
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmDocsCustomSocialImage, "getFarmDocsCustomSocialImage");
227
+ function resolveIllustration(page) {
228
+ const explicit = _optionalChain([page, 'access', _4 => _4.frontmatter, 'access', _5 => _5.socialIllustration, 'optionalAccess', _6 => _6.toLowerCase, 'call', _7 => _7()]);
229
+ if (explicit === "auth" || explicit === "cache" || explicit === "cli" || explicit === "integrations" || explicit === "project" || explicit === "routing" || explicit === "runtime") {
230
+ return explicit;
231
+ }
232
+ const source = `${page.slug} ${page.title} ${page.section || ""}`.toLowerCase();
233
+ if (/auth|session|security|csrf/.test(source)) return "auth";
234
+ if (/cache|ppr|render|static|revalid|stream/.test(source)) return "cache";
235
+ if (/integration|stripe|prisma|better.auth|email|job|workflow/.test(source)) {
236
+ return "integrations";
237
+ }
238
+ if (/cli|test|deploy|preview|upgrade|migration|install/.test(source)) return "cli";
239
+ if (/project|structure|config|environment|markdown|docs.engine/.test(source)) {
240
+ return "project";
241
+ }
242
+ if (/rout|endpoint|middleware|navigation|server.function|server.action|api/.test(source)) {
243
+ return "routing";
244
+ }
245
+ return "runtime";
246
+ }
247
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveIllustration, "resolveIllustration");
248
+ function createHashValue(value) {
249
+ return _crypto.createHash.call(void 0, "sha256").update(JSON.stringify(value)).digest("hex").slice(0, 16);
250
+ }
251
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createHashValue, "createHashValue");
252
+ function resolveBaseUrl(requestUrl, config) {
253
+ return _optionalChain([config, 'optionalAccess', _8 => _8.baseUrl]) ? new URL(config.baseUrl) : new URL(requestUrl.origin);
254
+ }
255
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveBaseUrl, "resolveBaseUrl");
256
+ function createFarmDocsSocialImageDescriptor(page, docs, requestUrl) {
257
+ const config = getSocialImageConfig(docs);
258
+ const siteName = _optionalChain([config, 'optionalAccess', _9 => _9.siteName]) || getNavTitle(docs);
259
+ const brand = _optionalChain([config, 'optionalAccess', _10 => _10.brand]) || siteName;
260
+ const title = page.frontmatter.socialTitle || page.title;
261
+ const description = page.frontmatter.socialDescription || page.description || _optionalChain([docs, 'access', _11 => _11.config, 'access', _12 => _12.metadata, 'optionalAccess', _13 => _13.description]) || `Documentation for ${siteName}`;
262
+ const section = page.frontmatter.section || page.section || "Documentation";
263
+ const illustration = resolveIllustration(page);
264
+ const entry = normalizeEntry(docs.entry);
265
+ const slugPath = encodeSlugPath(page.slug) || "index";
266
+ const imagePath = `${entry}/_social/${slugPath}/opengraph-image.svg`;
267
+ const baseUrl = resolveBaseUrl(requestUrl, config);
268
+ const pageUrl = new URL(page.href, baseUrl).href;
269
+ const imageAlt = `${title} \u2014 ${siteName} documentation`;
270
+ const hash = createHashValue({
271
+ version: FARM_DOCS_SOCIAL_IMAGE_VERSION,
272
+ title,
273
+ description,
274
+ section,
275
+ siteName,
276
+ brand,
277
+ pageHref: page.href,
278
+ illustration,
279
+ fonts: _optionalChain([config, 'optionalAccess', _14 => _14.fonts])
280
+ });
281
+ return {
282
+ title,
283
+ description,
284
+ section,
285
+ siteName,
286
+ brand,
287
+ pageHref: page.href,
288
+ pageUrl,
289
+ imagePath,
290
+ imageUrl: new URL(`${imagePath}?v=${hash}`, baseUrl).href,
291
+ imageAlt,
292
+ illustration,
293
+ fonts: _optionalChain([config, 'optionalAccess', _15 => _15.fonts]),
294
+ hash
295
+ };
296
+ }
297
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDocsSocialImageDescriptor, "createFarmDocsSocialImageDescriptor");
298
+ function getFarmDocsSocialImageSlug(docs, requestUrl) {
299
+ const entry = normalizeEntry(docs.entry);
300
+ const prefix = `${entry}/_social/`;
301
+ const suffix = "/opengraph-image.svg";
302
+ if (!requestUrl.pathname.startsWith(prefix) || !requestUrl.pathname.endsWith(suffix)) {
303
+ return null;
304
+ }
305
+ const rawSlug = requestUrl.pathname.slice(prefix.length, -suffix.length);
306
+ if (!rawSlug) return null;
307
+ try {
308
+ const slug = rawSlug.split("/").map((segment) => decodeURIComponent(segment)).join("/");
309
+ if (slug.split("/").some((segment) => !segment || segment === ".." || segment === ".")) {
310
+ return null;
311
+ }
312
+ return slug === "index" ? "" : slug;
313
+ } catch (e4) {
314
+ return null;
315
+ }
316
+ }
317
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmDocsSocialImageSlug, "getFarmDocsSocialImageSlug");
318
+ function escapeXml(value) {
319
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
320
+ }
321
+ _chunkS3JO3N4Hcjs.__name.call(void 0, escapeXml, "escapeXml");
322
+ function truncate(value, length) {
323
+ if (value.length <= length) return value;
324
+ return `${value.slice(0, Math.max(0, length - 1)).trimEnd()}\u2026`;
325
+ }
326
+ _chunkS3JO3N4Hcjs.__name.call(void 0, truncate, "truncate");
327
+ function wrapText(value, maxCharacters, maxLines) {
328
+ const words = value.trim().split(/\s+/).filter(Boolean);
329
+ const lines = [];
330
+ let current = "";
331
+ let consumedWords = 0;
332
+ for (const word of words) {
333
+ const candidate = current ? `${current} ${word}` : word;
334
+ if (candidate.length <= maxCharacters || !current) {
335
+ current = candidate;
336
+ consumedWords += 1;
337
+ continue;
338
+ }
339
+ lines.push(current);
340
+ if (lines.length === maxLines) break;
341
+ current = word;
342
+ consumedWords += 1;
343
+ }
344
+ if (current && lines.length < maxLines) lines.push(current);
345
+ if (consumedWords < words.length && lines.length) {
346
+ lines[lines.length - 1] = truncate(`${lines[lines.length - 1]}\u2026`, maxCharacters);
347
+ }
348
+ return lines;
349
+ }
350
+ _chunkS3JO3N4Hcjs.__name.call(void 0, wrapText, "wrapText");
351
+ function renderTextLines(lines, x, y, lineHeight, attributes) {
352
+ return lines.map(
353
+ (line, index) => `<text x="${x}" y="${y + index * lineHeight}" ${attributes}>${escapeXml(line)}</text>`
354
+ ).join("");
355
+ }
356
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderTextLines, "renderTextLines");
357
+ function renderEmbeddedFont(name, source, weight) {
358
+ if (!source) return "";
359
+ return `@font-face{font-family:"${name}";src:url("${escapeXml(source)}") format("woff2");font-style:normal;font-weight:${weight};font-display:block;}`;
360
+ }
361
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderEmbeddedFont, "renderEmbeddedFont");
362
+ function renderArrow(x1, y, x2, color = "#8b8b8b") {
363
+ return `<path d="M${x1} ${y}H${x2 - 9}" fill="none" stroke="${color}"/><path d="m${x2 - 9} ${y - 5} 9 5-9 5" fill="none" stroke="${color}"/>`;
364
+ }
365
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderArrow, "renderArrow");
366
+ function renderPanelHeader(label, status) {
367
+ return `<text x="819" y="171" class="label">${escapeXml(label)}</text><text x="1134" y="171" class="label bright" text-anchor="end">${escapeXml(status)}</text>`;
368
+ }
369
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPanelHeader, "renderPanelHeader");
370
+ function renderRoutingIllustration() {
371
+ return `${renderPanelHeader("ROUTE BLUEPRINT", "TYPED")}
372
+ <rect x="819" y="296" width="92" height="54" fill="#a3a3a3"/>
373
+ <text x="832" y="327" class="diagram-title ink">src/app</text>
374
+ <path d="M911 323h41M952 232v181M952 232h44M952 323h44M952 413h44" fill="none" stroke="#696969"/>
375
+ <rect x="996" y="205" width="138" height="54" fill="#0a0a0a" stroke="#414141"/>
376
+ <text x="1010" y="228" class="diagram-title">/</text><text x="1010" y="246" class="micro">STATIC</text>
377
+ <rect x="996" y="296" width="138" height="54" fill="#0a0a0a" stroke="#414141"/>
378
+ <text x="1010" y="319" class="diagram-title">/blog/:slug</text><text x="1010" y="337" class="micro">DYNAMIC</text>
379
+ <rect x="996" y="386" width="138" height="55" fill="#f0f0f0"/>
380
+ <text x="1010" y="410" class="diagram-title ink">/docs/:path*</text><text x="1010" y="428" class="micro ink-muted">CATCH-ALL</text>
381
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
382
+ <text x="819" y="475" class="label bright">FILE ROUTES</text><text x="1134" y="475" class="label" text-anchor="end">TYPES INCLUDED</text>`;
383
+ }
384
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderRoutingIllustration, "renderRoutingIllustration");
385
+ function renderAuthIllustration() {
386
+ return `${renderPanelHeader("REQUEST GUARD", "SERVER VERIFIED")}
387
+ <rect x="819" y="269" width="86" height="54" fill="#0a0a0a" stroke="#454545"/>
388
+ <text x="837" y="292" class="micro bright">REQUEST</text><text x="837" y="310" class="diagram-title">GET /app</text>
389
+ ${renderArrow(905, 296, 943)}
390
+ <rect x="943" y="224" width="104" height="118" fill="#f0f0f0"/>
391
+ <path d="M974 271v-12a21 21 0 0 1 42 0v12M968 271h54v45h-54z" fill="#050505"/>
392
+ <circle cx="995" cy="292" r="4" fill="#f0f0f0"/><path d="M995 296v8" stroke="#f0f0f0" stroke-width="3"/>
393
+ <text x="995" y="332" class="micro ink" text-anchor="middle">auth()</text>
394
+ ${renderArrow(1047, 296, 1071)}
395
+ <rect x="1071" y="269" width="63" height="54" fill="#0a0a0a" stroke="#454545"/>
396
+ <text x="1082" y="292" class="micro bright">ALLOW</text><text x="1082" y="310" class="micro">/app</text>
397
+ <rect x="819" y="372" width="315" height="38" fill="#090909" stroke="#3d3d3d"/>
398
+ <rect x="832" y="385" width="11" height="11" fill="#a3a3a3"/>
399
+ <text x="856" y="395" class="code">session.user / verified</text>
400
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
401
+ <text x="819" y="475" class="label bright">SESSION TYPED</text><text x="1134" y="475" class="label" text-anchor="end">CSRF PROTECTED</text>`;
402
+ }
403
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderAuthIllustration, "renderAuthIllustration");
404
+ function renderCacheIllustration() {
405
+ return `${renderPanelHeader("PAGE / PRODUCT", "CACHE + PPR")}
406
+ <rect x="819" y="204" width="315" height="54" fill="#f0f0f0"/>
407
+ <text x="836" y="235" class="diagram-title ink">STATIC SHELL</text><text x="1116" y="235" class="micro ink-muted" text-anchor="end">BUILD</text>
408
+ <rect x="819" y="271" width="198" height="76" fill="#a3a3a3"/>
409
+ <text x="836" y="301" class="diagram-title ink">CACHED DATA</text><text x="836" y="326" class="micro ink-muted">tag: products</text>
410
+ <rect x="1029" y="271" width="105" height="76" fill="#0a0a0a" stroke="#555"/>
411
+ <text x="1045" y="301" class="diagram-title">LIVE</text><text x="1045" y="326" class="micro">stream</text>
412
+ <path d="M1081 347v43m-8-9 8 9 8-9" fill="none" stroke="#d4d4d4"/>
413
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
414
+ <text x="819" y="475" class="label bright">STATIC FIRST</text><text x="1134" y="475" class="label" text-anchor="end">DYNAMIC WHERE NEEDED</text>`;
415
+ }
416
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderCacheIllustration, "renderCacheIllustration");
417
+ function renderIntegrationsIllustration() {
418
+ return `${renderPanelHeader("INTEGRATION GRAPH", "ONE PRODUCT")}
419
+ <path d="M976 309H879V247M976 309H879v87M1030 309h93V247M1030 309h93v87" fill="none" stroke="#4a4a4a"/>
420
+ <rect x="819" y="214" width="120" height="57" fill="#0a0a0a" stroke="#4b4b4b"/><text x="839" y="247" class="diagram-title">BETTER AUTH</text>
421
+ <rect x="819" y="368" width="120" height="57" fill="#0a0a0a" stroke="#4b4b4b"/><text x="851" y="401" class="diagram-title">PRISMA</text>
422
+ <rect x="1061" y="214" width="73" height="57" fill="#0a0a0a" stroke="#4b4b4b"/><text x="1077" y="247" class="diagram-title">STRIPE</text>
423
+ <rect x="1061" y="368" width="73" height="57" fill="#a3a3a3"/><text x="1075" y="401" class="diagram-title ink">VERCEL</text>
424
+ <rect x="976" y="277" width="94" height="64" fill="#f0f0f0"/>
425
+ <text x="994" y="304" class="diagram-title ink">FARM.JS</text><text x="994" y="324" class="micro ink-muted">CORE</text>
426
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
427
+ <text x="819" y="475" class="label bright">BRING YOUR STACK</text><text x="1134" y="475" class="label" text-anchor="end">CONNECTED ONCE</text>`;
428
+ }
429
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderIntegrationsIllustration, "renderIntegrationsIllustration");
430
+ function renderCliIllustration() {
431
+ return `${renderPanelHeader("TERMINAL", "PRODUCTION OUTPUT")}
432
+ <rect x="819" y="203" width="315" height="213" fill="#050505" stroke="#555"/>
433
+ <line x1="819" y1="236" x2="1134" y2="236" stroke="#555"/>
434
+ <circle cx="837" cy="220" r="4" fill="#5d5d5d"/><circle cx="850" cy="220" r="4" fill="#7a7a7a"/><circle cx="863" cy="220" r="4" fill="#a3a3a3"/>
435
+ <text x="837" y="273" class="code bright"><tspan fill="#7a7a7a">$</tspan> farm build</text>
436
+ <rect x="837" y="293" width="11" height="11" fill="#a3a3a3"/><path d="m839 298 3 3 6-7" fill="none" stroke="#050505" stroke-width="1.5"/>
437
+ <text x="861" y="303" class="code">64 routes discovered</text>
438
+ <rect x="837" y="320" width="11" height="11" fill="#a3a3a3"/><path d="m839 325 3 3 6-7" fill="none" stroke="#050505" stroke-width="1.5"/>
439
+ <text x="861" y="330" class="code">client + server bundles</text>
440
+ <rect x="837" y="355" width="126" height="30" fill="#f0f0f0"/><text x="853" y="374" class="micro ink">BUILD COMPLETE</text>
441
+ <text x="1115" y="374" class="micro" text-anchor="end">/dist</text>
442
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
443
+ <text x="819" y="475" class="label bright">REAL COMMANDS</text><text x="1134" y="475" class="label" text-anchor="end">842MS</text>`;
444
+ }
445
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderCliIllustration, "renderCliIllustration");
446
+ function renderProjectIllustration() {
447
+ return `${renderPanelHeader("PROJECT MAP", "CONVENTION TYPED")}
448
+ <rect x="819" y="202" width="315" height="216" fill="#050505" stroke="#555"/>
449
+ <text x="837" y="227" class="diagram-title bright">my-app/</text>
450
+ <path d="M847 243v143M847 259h23M847 293h23M847 327h23M847 361h23" fill="none" stroke="#666"/>
451
+ <rect x="870" y="243" width="246" height="33" fill="#0a0a0a" stroke="#444"/><text x="886" y="264" class="code">src/app</text><text x="1098" y="264" class="micro" text-anchor="end">ROUTES</text>
452
+ <rect x="870" y="277" width="246" height="33" fill="#f0f0f0"/><text x="886" y="298" class="code ink">src/app/page.tsx</text>
453
+ <rect x="870" y="311" width="246" height="33" fill="#0a0a0a" stroke="#444"/><text x="886" y="332" class="code">src/app/api/users/route.ts</text><text x="1098" y="332" class="micro" text-anchor="end">API</text>
454
+ <rect x="870" y="345" width="246" height="33" fill="#0a0a0a" stroke="#444"/><text x="886" y="366" class="code">farm.config.ts</text><text x="1098" y="366" class="micro" text-anchor="end">CONFIG</text>
455
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
456
+ <text x="819" y="475" class="label bright">FILES BECOME FEATURES</text><text x="1134" y="475" class="label" text-anchor="end">ONE CONFIG</text>`;
457
+ }
458
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderProjectIllustration, "renderProjectIllustration");
459
+ function renderRuntimeIllustration() {
460
+ return `${renderPanelHeader("PRODUCT ARCHITECTURE", "FULL STACK")}
461
+ <rect x="819" y="211" width="315" height="55" fill="#f0f0f0"/>
462
+ <text x="836" y="244" class="diagram-title ink">PRODUCT SURFACE</text><text x="1116" y="244" class="micro ink-muted" text-anchor="end">UI + ROUTES</text>
463
+ <path d="M976 266v20m0 61v20" stroke="#727272"/>
464
+ <rect x="855" y="286" width="242" height="61" fill="#a3a3a3"/>
465
+ <text x="874" y="314" class="diagram-title ink">APPLICATION CORE</text><text x="874" y="334" class="micro ink-muted">APIS \xB7 MIDDLEWARE</text>
466
+ <rect x="819" y="367" width="315" height="55" fill="#4c4c4c"/>
467
+ <text x="836" y="400" class="diagram-title bright">CONNECTED STACK</text><text x="1116" y="400" class="micro" text-anchor="end">DATA \xB7 AUTH \xB7 DEPLOY</text>
468
+ <line x1="819" y1="450" x2="1134" y2="450" stroke="#343434"/>
469
+ <text x="819" y="475" class="label bright">ONE FRAMEWORK</text><text x="1134" y="475" class="label" text-anchor="end">ONE DEPLOYMENT MODEL</text>`;
470
+ }
471
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderRuntimeIllustration, "renderRuntimeIllustration");
472
+ function renderIllustration(type) {
473
+ switch (type) {
474
+ case "auth":
475
+ return renderAuthIllustration();
476
+ case "cache":
477
+ return renderCacheIllustration();
478
+ case "cli":
479
+ return renderCliIllustration();
480
+ case "integrations":
481
+ return renderIntegrationsIllustration();
482
+ case "project":
483
+ return renderProjectIllustration();
484
+ case "routing":
485
+ return renderRoutingIllustration();
486
+ default:
487
+ return renderRuntimeIllustration();
488
+ }
489
+ }
490
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderIllustration, "renderIllustration");
491
+ function renderFarmDocsSocialImageSvg(descriptor) {
492
+ const titleLines = wrapText(descriptor.title, 22, 2);
493
+ const longestTitleLine = Math.max(...titleLines.map((line) => line.length));
494
+ const titleSize = titleLines.length === 1 ? longestTitleLine > 17 ? 62 : 74 : 56;
495
+ const titleLineHeight = Math.round(titleSize * 0.98);
496
+ const titleY = titleLines.length === 1 ? 294 : 266;
497
+ const descriptionY = titleY + (titleLines.length - 1) * titleLineHeight + 59;
498
+ const descriptionLines = wrapText(descriptor.description, 68, 2);
499
+ const routeY = Math.max(418, descriptionY + descriptionLines.length * 29 + 24);
500
+ const section = truncate(descriptor.section.toUpperCase(), 27);
501
+ const route = truncate(descriptor.pageHref, 42);
502
+ const footerUrl = truncate(descriptor.pageUrl.replace(/^https?:\/\//, ""), 70);
503
+ const brand = truncate(descriptor.brand.toUpperCase(), 25);
504
+ const titleId = `farm-docs-og-${descriptor.hash}`;
505
+ return `<?xml version="1.0" encoding="UTF-8"?>
506
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${FARM_DOCS_SOCIAL_IMAGE_WIDTH}" height="${FARM_DOCS_SOCIAL_IMAGE_HEIGHT}" viewBox="0 0 ${FARM_DOCS_SOCIAL_IMAGE_WIDTH} ${FARM_DOCS_SOCIAL_IMAGE_HEIGHT}" role="img" aria-labelledby="${titleId}-title ${titleId}-description">
507
+ <title id="${titleId}-title">${escapeXml(descriptor.imageAlt)}</title>
508
+ <desc id="${titleId}-description">${escapeXml(descriptor.description)}</desc>
509
+ <metadata>${escapeXml(JSON.stringify({ generator: "Farm.js docs", page: descriptor.pageUrl, illustration: descriptor.illustration }))}</metadata>
510
+ <style type="text/css">
511
+ ${renderEmbeddedFont("Farm Sans", _optionalChain([descriptor, 'access', _16 => _16.fonts, 'optionalAccess', _17 => _17.sans]), "100 900")}
512
+ ${renderEmbeddedFont("Farm Mono", _optionalChain([descriptor, 'access', _18 => _18.fonts, 'optionalAccess', _19 => _19.mono]), "100 900")}
513
+ ${renderEmbeddedFont("Farm Pixel", _optionalChain([descriptor, 'access', _20 => _20.fonts, 'optionalAccess', _21 => _21.display]), "400 700")}
514
+ .sans{font-family:"Farm Sans","Arial",sans-serif}.mono,.label,.code,.diagram-title,.micro{font-family:"Farm Mono","Menlo","DejaVu Sans Mono",monospace}.pixel{font-family:"Farm Pixel","Farm Mono",monospace}.label{fill:#8b8b8b;font-size:10px;font-weight:600;letter-spacing:1.2px}.code{fill:#8b8b8b;font-size:11px}.diagram-title{fill:#e7e7e7;font-size:11px;font-weight:650}.micro{fill:#777;font-size:8px;letter-spacing:.45px}.bright{fill:#f5f5f4}.ink{fill:#050505}.ink-muted{fill:#4c4c4c}
515
+ </style>
516
+ <defs>
517
+ <pattern id="canvas-grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M40 0H0V40" fill="none" stroke="#151515"/></pattern>
518
+ <pattern id="diagonal" width="12" height="12" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><line x1="0" y1="0" x2="0" y2="12" stroke="#171717" stroke-width="2"/></pattern>
519
+ <clipPath id="frame-clip"><rect x="28" y="28" width="1144" height="574"/></clipPath>
520
+ </defs>
521
+ <rect width="1200" height="630" fill="#050505"/>
522
+ <rect width="1200" height="630" fill="url(#canvas-grid)"/>
523
+ <g clip-path="url(#frame-clip)">
524
+ <rect x="28" y="28" width="1144" height="574" fill="#020202"/>
525
+ <rect x="782" y="114" width="390" height="411" fill="url(#diagonal)"/>
526
+ </g>
527
+ <rect x="28.5" y="28.5" width="1143" height="573" fill="none" stroke="#323232"/>
528
+ <path d="M28 114.5h1144M28 525.5h1144M781.5 114v411" fill="none" stroke="#303030"/>
529
+
530
+ <g transform="translate(71 51)">
531
+ <rect width="11" height="11" rx="1" fill="#f5f5f4"/><rect x="15" width="28" height="11" rx="1" fill="#f5f5f4"/>
532
+ <rect y="15" width="11" height="11" rx="1" fill="#9b9b9b"/><rect x="15" y="15" width="28" height="11" rx="1" fill="#9b9b9b"/>
533
+ <rect y="30" width="11" height="11" rx="1" fill="#5f5f5f"/><rect x="15" y="30" width="20" height="11" rx="1" fill="#5f5f5f"/>
534
+ <text x="61" y="24" class="mono bright" font-size="24" font-weight="550">FARM<tspan fill="#777">.JS</tspan></text>
535
+ <text x="61" y="43" class="label">BY FARMING LABS</text>
536
+ </g>
537
+ <text x="1134" y="72" class="label" text-anchor="end">${escapeXml(brand)} \xB7 DOCUMENTATION</text>
538
+
539
+ <text x="71" y="198" class="mono bright" font-size="13" font-weight="650">DOCS</text>
540
+ <line x1="117" y1="193" x2="155" y2="193" stroke="#696969"/>
541
+ <text x="166" y="198" class="mono" fill="#9b9b9b" font-size="13">${escapeXml(section)}</text>
542
+ ${renderTextLines(titleLines, 71, titleY, titleLineHeight, `class="pixel bright" font-size="${titleSize}" font-weight="500" letter-spacing="-2.4"`)}
543
+ ${renderTextLines(descriptionLines, 71, descriptionY, 29, 'class="sans" fill="#a3a3a3" font-size="20" font-weight="430" letter-spacing="-.3"')}
544
+ <rect x="71" y="${routeY}" width="${Math.min(390, 56 + route.length * 8)}" height="36" fill="#050505" stroke="#3c3c3c"/>
545
+ <text x="85" y="${routeY + 23}" class="mono bright" font-size="11" font-weight="600">GET</text>
546
+ <text x="119" y="${routeY + 23}" class="mono" fill="#898989" font-size="11">${escapeXml(route)}</text>
547
+
548
+ ${renderIllustration(descriptor.illustration)}
549
+
550
+ <text x="71" y="570" class="mono bright" font-size="13" font-weight="550">${escapeXml(footerUrl)}</text>
551
+ <text x="1134" y="570" class="mono" fill="#9b9b9b" font-size="12" text-anchor="end">FARM.JS DOCUMENTATION</text>
552
+ <path d="M20 20h10M20 20v10M1180 20h-10M1180 20v10M20 610h10M20 610v-10M1180 610h-10M1180 610v-10" fill="none" stroke="#9b9b9b"/>
553
+ </svg>`;
554
+ }
555
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsSocialImageSvg, "renderFarmDocsSocialImageSvg");
556
+ function renderFarmDocsSocialMetadata(descriptor, customImage) {
557
+ const imageUrl = customImage ? new URL(customImage, descriptor.pageUrl).href : descriptor.imageUrl;
558
+ const customExtension = _optionalChain([customImage, 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23(), 'access', _24 => _24.split, 'call', _25 => _25(/[?#]/, 1), 'access', _26 => _26[0]]);
559
+ const imageType = _optionalChain([customExtension, 'optionalAccess', _27 => _27.endsWith, 'call', _28 => _28(".webp")]) ? "image/webp" : _optionalChain([customExtension, 'optionalAccess', _29 => _29.endsWith, 'call', _30 => _30(".png")]) ? "image/png" : _optionalChain([customExtension, 'optionalAccess', _31 => _31.match, 'call', _32 => _32(/\.jpe?g$/)]) ? "image/jpeg" : "image/svg+xml";
560
+ const tag = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (property, content, name = false) => `<meta ${name ? "name" : "property"}="${property}" content="${escapeXml(content)}">`, "tag");
561
+ return [
562
+ tag("og:type", "article"),
563
+ tag("og:site_name", descriptor.siteName),
564
+ tag("og:title", descriptor.title),
565
+ tag("og:description", descriptor.description),
566
+ tag("og:url", descriptor.pageUrl),
567
+ tag("og:image", imageUrl),
568
+ tag("og:image:type", imageType),
569
+ ...customImage ? [] : [
570
+ tag("og:image:width", String(FARM_DOCS_SOCIAL_IMAGE_WIDTH)),
571
+ tag("og:image:height", String(FARM_DOCS_SOCIAL_IMAGE_HEIGHT))
572
+ ],
573
+ tag("og:image:alt", descriptor.imageAlt),
574
+ tag("twitter:card", "summary_large_image", true),
575
+ tag("twitter:title", descriptor.title, true),
576
+ tag("twitter:description", descriptor.description, true),
577
+ tag("twitter:image", imageUrl, true),
578
+ tag("twitter:image:alt", descriptor.imageAlt, true)
579
+ ].join("\n ");
580
+ }
581
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsSocialMetadata, "renderFarmDocsSocialMetadata");
582
+
583
+ // src/docs/handler.ts
584
+ var DOCS_FILE_NAMES = ["page.mdx", "page.md", "index.mdx", "index.md"];
585
+ var DOCS_FILE_EXTENSIONS2 = [".mdx", ".md"];
586
+ var FARM_DOCS_FALLBACK_FAVICON = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='black'/%3E%3Cpath d='M7 8h18v3H10v5h12v3H10v5H7z' fill='white'/%3E%3C/svg%3E";
587
+ var FARM_DOCS_FAVICON_FILES = ["favicon.svg", "favicon.ico", "favicon.png"];
588
+ function trimSlashes(value) {
589
+ return value.replace(/^\/+|\/+$/g, "");
590
+ }
591
+ _chunkS3JO3N4Hcjs.__name.call(void 0, trimSlashes, "trimSlashes");
592
+ function normalizeEntry2(entry) {
593
+ if (!entry || entry === "/") return "/";
594
+ return `/${trimSlashes(entry)}`;
595
+ }
596
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeEntry2, "normalizeEntry");
597
+ function decodeDocsPath(value) {
598
+ try {
599
+ return decodeURIComponent(value);
600
+ } catch (e5) {
601
+ return value;
602
+ }
603
+ }
604
+ _chunkS3JO3N4Hcjs.__name.call(void 0, decodeDocsPath, "decodeDocsPath");
605
+ function normalizeSlug(value) {
606
+ return trimSlashes(decodeDocsPath(value)).replace(/\.(mdx?|markdown)$/i, "");
607
+ }
608
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeSlug, "normalizeSlug");
609
+ function resolveFarmDocsFavicon(docs, options) {
610
+ const configuredFavicon = _optionalChain([docs, 'optionalAccess', _33 => _33.config, 'access', _34 => _34.favicon]);
611
+ if (typeof configuredFavicon === "string" && configuredFavicon.trim()) {
612
+ return configuredFavicon.trim();
613
+ }
614
+ const publicDir = _path2.default.join(_path2.default.resolve(options.root), "public");
615
+ for (const fileName of FARM_DOCS_FAVICON_FILES) {
616
+ const faviconPath = _path2.default.join(publicDir, fileName);
617
+ if (_fs.existsSync.call(void 0, faviconPath) && _fs.statSync.call(void 0, faviconPath).isFile()) {
618
+ return `/${fileName}`;
619
+ }
620
+ }
621
+ return FARM_DOCS_FALLBACK_FAVICON;
622
+ }
623
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmDocsFavicon, "resolveFarmDocsFavicon");
624
+ function renderFarmDocsFaviconLink(faviconHref) {
625
+ const normalizedHref = _optionalChain([faviconHref, 'access', _35 => _35.split, 'call', _36 => _36(/[?#]/, 1), 'access', _37 => _37[0], 'optionalAccess', _38 => _38.toLowerCase, 'call', _39 => _39()]) || "";
626
+ const type = normalizedHref.endsWith(".svg") || faviconHref.startsWith("data:image/svg+xml") ? "image/svg+xml" : normalizedHref.endsWith(".png") ? "image/png" : normalizedHref.endsWith(".ico") ? "image/x-icon" : void 0;
627
+ const metadata = type === "image/svg+xml" ? ' sizes="any" type="image/svg+xml"' : type ? ` type="${type}"` : "";
628
+ return `<link rel="icon" href="${escapeAttribute(faviconHref)}"${metadata}>`;
629
+ }
630
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsFaviconLink, "renderFarmDocsFaviconLink");
631
+ function renderFarmDocsBrandMark() {
632
+ return `<svg class="sidebar-brand-logo" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
633
+ <rect x="2" y="2" width="5" height="5" rx="0.75" fill="currentColor"></rect>
634
+ <path d="M9.75 2h11.5c.41 0 .75.34.75.75v3.5c0 .41-.34.75-.75.75H9.75A.75.75 0 0 1 9 6.25v-3.5c0-.41.34-.75.75-.75Zm9.75 1.62a.38.38 0 0 0-.38.38v1c0 .21.17.38.38.38h.75c.21 0 .38-.17.38-.38V4a.38.38 0 0 0-.38-.38h-.75Z" fill="currentColor"></path>
635
+ <rect x="2" y="9.5" width="5" height="5" rx="0.75" fill="currentColor" opacity="0.64"></rect>
636
+ <rect x="9" y="9.5" width="13" height="5" rx="0.75" fill="currentColor" opacity="0.64"></rect>
637
+ <rect x="2" y="17" width="5" height="5" rx="0.75" fill="currentColor" opacity="0.34"></rect>
638
+ <rect x="9" y="17" width="7.5" height="5" rx="0.75" fill="currentColor" opacity="0.34"></rect>
639
+ </svg>`;
640
+ }
641
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsBrandMark, "renderFarmDocsBrandMark");
642
+ function renderFarmDocsBrandTitle(navTitle) {
643
+ const suffix = _optionalChain([navTitle, 'access', _40 => _40.match, 'call', _41 => _41(/\.js$/i), 'optionalAccess', _42 => _42[0]]);
644
+ if (!suffix) {
645
+ return `<span class="sidebar-brand-title">${escapeHtml(navTitle)}</span>`;
646
+ }
647
+ const productName = navTitle.slice(0, -suffix.length);
648
+ return `<span class="sidebar-brand-title">${escapeHtml(productName)}<span class="sidebar-brand-suffix">${escapeHtml(suffix)}</span></span>`;
649
+ }
650
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsBrandTitle, "renderFarmDocsBrandTitle");
651
+ function isSafeSegment(segment) {
652
+ return segment !== ".." && !segment.includes("/") && !segment.includes("\\");
653
+ }
654
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isSafeSegment, "isSafeSegment");
655
+ function resolveInside(root, target) {
656
+ const resolvedRoot = _path2.default.resolve(root);
657
+ const resolvedTarget = _path2.default.resolve(target);
658
+ const relative = _path2.default.relative(resolvedRoot, resolvedTarget);
659
+ if (relative === "" || !relative.startsWith("..") && !_path2.default.isAbsolute(relative)) {
660
+ return resolvedTarget;
661
+ }
662
+ return null;
663
+ }
664
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveInside, "resolveInside");
665
+ function resolveExistingFileInside(root, target) {
666
+ const safePath = resolveInside(root, target);
667
+ if (!safePath) return null;
668
+ try {
669
+ const realRoot = _fs.realpathSync.call(void 0, root);
670
+ const realTarget = _fs.realpathSync.call(void 0, safePath);
671
+ const containedTarget = resolveInside(realRoot, realTarget);
672
+ return containedTarget && _fs.statSync.call(void 0, containedTarget).isFile() ? containedTarget : null;
673
+ } catch (e6) {
674
+ return null;
675
+ }
676
+ }
677
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveExistingFileInside, "resolveExistingFileInside");
678
+ function isFarmDocsRequest(docs, request) {
679
+ if (!_optionalChain([docs, 'optionalAccess', _43 => _43.enabled])) return false;
680
+ if (request.method !== "GET" && request.method !== "HEAD") return false;
681
+ const pathname = new URL(request.url).pathname;
682
+ const entry = normalizeEntry2(docs.entry);
683
+ if (entry === "/") return true;
684
+ return pathname === entry || pathname === `${entry}.md` || pathname.startsWith(`${entry}/`);
685
+ }
686
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isFarmDocsRequest, "isFarmDocsRequest");
687
+ function resolveFarmDocsContentDir(docs, options) {
688
+ const root = _path2.default.resolve(options.root);
689
+ const srcDir = options.srcDir || "src";
690
+ const configuredContentDir = docs.contentDir || docs.config.contentDir;
691
+ if (configuredContentDir) {
692
+ return _path2.default.isAbsolute(configuredContentDir) ? configuredContentDir : _path2.default.join(root, configuredContentDir);
693
+ }
694
+ const entryDir = docs.config.entry || trimSlashes(docs.entry) || "docs";
695
+ const appDocsDir = _path2.default.join(root, srcDir, "app", entryDir);
696
+ if (_fs.existsSync.call(void 0, appDocsDir)) return appDocsDir;
697
+ return _path2.default.join(root, entryDir);
698
+ }
699
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmDocsContentDir, "resolveFarmDocsContentDir");
700
+ function getFarmDocsRouteTypeEntries(docs) {
701
+ if (!_optionalChain([docs, 'optionalAccess', _44 => _44.enabled])) return [];
702
+ const entry = normalizeEntry2(docs.entry);
703
+ if (entry === "/") return ["/", "/[...docs]"];
704
+ return [entry, `${entry}/[...docs]`];
705
+ }
706
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmDocsRouteTypeEntries, "getFarmDocsRouteTypeEntries");
707
+ function getFarmDocsDocumentNavigationMatchers(docs) {
708
+ if (!_optionalChain([docs, 'optionalAccess', _45 => _45.enabled])) return [];
709
+ const entry = normalizeEntry2(docs.entry);
710
+ return [entry === "/" ? "/(.*)" : `${entry}(.*)`];
711
+ }
712
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmDocsDocumentNavigationMatchers, "getFarmDocsDocumentNavigationMatchers");
713
+ function getRequestSlug(docs, request) {
714
+ const pathname = new URL(request.url).pathname;
715
+ const entry = normalizeEntry2(docs.entry);
716
+ if (entry === "/") return normalizeSlug(pathname);
717
+ if (pathname === entry || pathname === `${entry}.md`) return "";
718
+ return normalizeSlug(pathname.slice(entry.length));
719
+ }
720
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getRequestSlug, "getRequestSlug");
721
+ function findDocsPageFile(contentDir, slug) {
722
+ const segments = slug ? slug.split("/").filter(Boolean) : [];
723
+ if (!segments.every(isSafeSegment)) return null;
724
+ const slugDir = _path2.default.join(contentDir, ...segments);
725
+ const candidates = segments.length === 0 ? DOCS_FILE_NAMES.map((filename) => _path2.default.join(contentDir, filename)) : [
726
+ ...DOCS_FILE_NAMES.map((filename) => _path2.default.join(slugDir, filename)),
727
+ ...DOCS_FILE_EXTENSIONS2.map((extension) => _path2.default.join(contentDir, `${slug}${extension}`))
728
+ ];
729
+ for (const candidate of candidates) {
730
+ const safePath = resolveExistingFileInside(contentDir, candidate);
731
+ if (safePath) {
732
+ return safePath;
733
+ }
734
+ }
735
+ return null;
736
+ }
737
+ _chunkS3JO3N4Hcjs.__name.call(void 0, findDocsPageFile, "findDocsPageFile");
738
+ function parseFrontmatter(source) {
739
+ if (!source.startsWith("---")) {
740
+ return { frontmatter: {}, body: source };
741
+ }
742
+ const endIndex = source.indexOf("\n---", 3);
743
+ if (endIndex === -1) return { frontmatter: {}, body: source };
744
+ const frontmatterSource = source.slice(3, endIndex).trim();
745
+ const body = source.slice(source.indexOf("\n", endIndex + 1) + 1);
746
+ const frontmatter = {};
747
+ for (const line of frontmatterSource.split(/\r?\n/)) {
748
+ const separator = line.indexOf(":");
749
+ if (separator === -1) continue;
750
+ const key = line.slice(0, separator).trim();
751
+ const value = line.slice(separator + 1).trim().replace(/^["']|["']$/g, "");
752
+ if (key && value) frontmatter[key] = value;
753
+ }
754
+ return { frontmatter, body };
755
+ }
756
+ _chunkS3JO3N4Hcjs.__name.call(void 0, parseFrontmatter, "parseFrontmatter");
757
+ function titleFromSlug(slug) {
758
+ const lastSegment = slug.split("/").filter(Boolean).pop() || "Docs";
759
+ return lastSegment.split(/[-_]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
760
+ }
761
+ _chunkS3JO3N4Hcjs.__name.call(void 0, titleFromSlug, "titleFromSlug");
762
+ function titleFromMarkdown(body, fallback) {
763
+ const heading = _optionalChain([body, 'access', _46 => _46.match, 'call', _47 => _47(/^#\s+(.+)$/m), 'optionalAccess', _48 => _48[1], 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()]);
764
+ return heading || fallback;
765
+ }
766
+ _chunkS3JO3N4Hcjs.__name.call(void 0, titleFromMarkdown, "titleFromMarkdown");
767
+ function loadFarmDocsPage(contentDir, docs, slug) {
768
+ const sourcePath = findDocsPageFile(contentDir, slug);
769
+ if (!sourcePath) return null;
770
+ const source = _fs.readFileSync.call(void 0, sourcePath, "utf8");
771
+ const { frontmatter, body } = parseFrontmatter(source);
772
+ const title = frontmatter.title || titleFromMarkdown(body, titleFromSlug(slug));
773
+ const href = createDocsHref(docs.entry, slug);
774
+ return {
775
+ slug,
776
+ title,
777
+ description: frontmatter.description,
778
+ section: frontmatter.section,
779
+ href,
780
+ sourcePath,
781
+ lastModified: resolveFarmDocsPageLastModified(contentDir, sourcePath, frontmatter),
782
+ frontmatter,
783
+ body
784
+ };
785
+ }
786
+ _chunkS3JO3N4Hcjs.__name.call(void 0, loadFarmDocsPage, "loadFarmDocsPage");
787
+ function createDocsHref(entry, slug) {
788
+ const normalizedEntry = normalizeEntry2(entry);
789
+ const normalizedSlug = trimSlashes(slug);
790
+ if (normalizedEntry === "/") return normalizedSlug ? `/${normalizedSlug}` : "/";
791
+ return normalizedSlug ? `${normalizedEntry}/${normalizedSlug}` : normalizedEntry;
792
+ }
793
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createDocsHref, "createDocsHref");
794
+ function pathToSlug(contentDir, filePath) {
795
+ const relative = _path2.default.relative(contentDir, filePath).replace(/\\/g, "/");
796
+ if (relative.startsWith("..")) return null;
797
+ const extension = _path2.default.extname(relative);
798
+ if (!DOCS_FILE_EXTENSIONS2.includes(extension)) return null;
799
+ const withoutExtension = relative.slice(0, -extension.length);
800
+ if (withoutExtension === "page" || withoutExtension === "index") return "";
801
+ if (withoutExtension.endsWith("/page") || withoutExtension.endsWith("/index")) {
802
+ return withoutExtension.replace(/\/(page|index)$/, "");
803
+ }
804
+ return withoutExtension;
805
+ }
806
+ _chunkS3JO3N4Hcjs.__name.call(void 0, pathToSlug, "pathToSlug");
807
+ function loadPage(contentDir, docs, request) {
808
+ return loadFarmDocsPage(contentDir, docs, getRequestSlug(docs, request));
809
+ }
810
+ _chunkS3JO3N4Hcjs.__name.call(void 0, loadPage, "loadPage");
811
+ function discoverFarmDocsPages(contentDir, docs) {
812
+ if (!_fs.existsSync.call(void 0, contentDir)) return [];
813
+ const pages = [];
814
+ const visit = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (dir) => {
815
+ for (const entry of _fs.readdirSync.call(void 0, dir, { withFileTypes: true })) {
816
+ if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
817
+ const absolutePath = _path2.default.join(dir, entry.name);
818
+ if (entry.isDirectory()) {
819
+ visit(absolutePath);
820
+ continue;
821
+ }
822
+ if (!entry.isFile()) continue;
823
+ const slug = pathToSlug(contentDir, absolutePath);
824
+ if (slug === null) continue;
825
+ const source = _fs.readFileSync.call(void 0, absolutePath, "utf8");
826
+ const { frontmatter, body } = parseFrontmatter(source);
827
+ pages.push({
828
+ slug,
829
+ title: frontmatter.title || titleFromMarkdown(body, titleFromSlug(slug)),
830
+ description: frontmatter.description,
831
+ section: frontmatter.section,
832
+ href: createDocsHref(docs.entry, slug),
833
+ sourcePath: absolutePath,
834
+ lastModified: resolveFarmDocsPageLastModified(contentDir, absolutePath, frontmatter)
835
+ });
836
+ }
837
+ }, "visit");
838
+ visit(contentDir);
839
+ return pages.sort((a, b) => a.href.localeCompare(b.href));
840
+ }
841
+ _chunkS3JO3N4Hcjs.__name.call(void 0, discoverFarmDocsPages, "discoverFarmDocsPages");
842
+ function toFarmDocsMarkdownPage(page) {
843
+ const lastModified = page.lastModified || page.frontmatter.lastModified || page.frontmatter.lastmod;
844
+ return {
845
+ slug: page.slug,
846
+ url: page.href,
847
+ title: page.title,
848
+ description: page.description,
849
+ lastModified,
850
+ lastmod: lastModified,
851
+ content: page.body,
852
+ rawContent: page.body
853
+ };
854
+ }
855
+ _chunkS3JO3N4Hcjs.__name.call(void 0, toFarmDocsMarkdownPage, "toFarmDocsMarkdownPage");
856
+ function getDocsTitle(docs) {
857
+ return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
858
+ }
859
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getDocsTitle, "getDocsTitle");
860
+ function getDocsDescription(docs) {
861
+ return _optionalChain([docs, 'access', _51 => _51.config, 'access', _52 => _52.metadata, 'optionalAccess', _53 => _53.description]);
862
+ }
863
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getDocsDescription, "getDocsDescription");
864
+ function getLoadedDocsPages(contentDir, docs) {
865
+ return discoverFarmDocsPages(contentDir, docs).map((page) => loadFarmDocsPage(contentDir, docs, page.slug)).filter((page) => Boolean(page));
866
+ }
867
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getLoadedDocsPages, "getLoadedDocsPages");
868
+ function toDocsLlmsPage(page) {
869
+ return toFarmDocsMarkdownPage(page);
870
+ }
871
+ _chunkS3JO3N4Hcjs.__name.call(void 0, toDocsLlmsPage, "toDocsLlmsPage");
872
+ function toDocsSitemapPage(page) {
873
+ return {
874
+ ...toFarmDocsMarkdownPage(page),
875
+ sourcePath: page.sourcePath
876
+ };
877
+ }
878
+ _chunkS3JO3N4Hcjs.__name.call(void 0, toDocsSitemapPage, "toDocsSitemapPage");
879
+ function resolvePageActionsConfig(docs) {
880
+ return isObjectRecord(docs.config.pageActions) ? docs.config.pageActions : {};
881
+ }
882
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolvePageActionsConfig, "resolvePageActionsConfig");
883
+ function resolvePageActionsAlignment(docs) {
884
+ return resolvePageActionsConfig(docs).alignment === "right" ? "right" : "left";
885
+ }
886
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolvePageActionsAlignment, "resolvePageActionsAlignment");
887
+ function resolveCopyMarkdownActionConfig(docs) {
888
+ const raw = resolvePageActionsConfig(docs).copyMarkdown;
889
+ if (raw === void 0 || raw === false) return null;
890
+ const options = isObjectRecord(raw) ? raw : {};
891
+ if (isObjectRecord(raw) && raw.enabled === false) return null;
892
+ return {
893
+ format: options.format === "text" ? "text" : "markdown",
894
+ includeTitle: options.includeTitle === true,
895
+ label: _nullishCoalesce(readString(options.label), () => ( "Copy page")),
896
+ copiedLabel: _nullishCoalesce(readString(options.copiedLabel), () => ( "Copied!"))
897
+ };
898
+ }
899
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveCopyMarkdownActionConfig, "resolveCopyMarkdownActionConfig");
900
+ function resolveLastUpdatedDisplayConfig(docs) {
901
+ const raw = docs.config.lastUpdated;
902
+ const options = isObjectRecord(raw) ? raw : {};
903
+ return {
904
+ enabled: raw !== false && (!isObjectRecord(raw) || raw.enabled !== false),
905
+ label: typeof options.label === "string" ? options.label : "Last updated",
906
+ position: options.position === "below-title" ? "below-title" : "footer"
907
+ };
908
+ }
909
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveLastUpdatedDisplayConfig, "resolveLastUpdatedDisplayConfig");
910
+ function formatLastModifiedDate(value) {
911
+ if (!value) return void 0;
912
+ const date = new Date(value);
913
+ if (Number.isNaN(date.getTime())) return value;
914
+ return new Intl.DateTimeFormat("en", {
915
+ day: "numeric",
916
+ month: "long",
917
+ year: "numeric"
918
+ }).format(date);
919
+ }
920
+ _chunkS3JO3N4Hcjs.__name.call(void 0, formatLastModifiedDate, "formatLastModifiedDate");
921
+ function renderLastUpdatedText(page, docs, position) {
922
+ const config = resolveLastUpdatedDisplayConfig(docs);
923
+ const formatted = formatLastModifiedDate(page.lastModified);
924
+ if (!config.enabled || config.position !== position || !formatted) return "";
925
+ const time = `<time datetime="${escapeAttribute(page.lastModified || "")}">${escapeHtml(formatted)}</time>`;
926
+ const label = config.label.trim();
927
+ return label ? `${escapeHtml(label)} ${time}` : time;
928
+ }
929
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderLastUpdatedText, "renderLastUpdatedText");
930
+ function resolveReadingTimeDisplayConfig(docs) {
931
+ const raw = docs.config.readingTime;
932
+ if (raw === void 0 || raw === false) return null;
933
+ const options = isObjectRecord(raw) ? raw : {};
934
+ if (isObjectRecord(raw) && options.enabled === false) return null;
935
+ const wordsPerMinute = typeof options.wordsPerMinute === "number" && options.wordsPerMinute > 0 ? options.wordsPerMinute : 220;
936
+ return {
937
+ wordsPerMinute,
938
+ format: options.format === "short" ? "short" : "long",
939
+ includeCode: options.includeCode === true
940
+ };
941
+ }
942
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveReadingTimeDisplayConfig, "resolveReadingTimeDisplayConfig");
943
+ function countMarkdownWords(body, includeCode) {
944
+ const readable = (includeCode ? body : body.replace(/```[\s\S]*?```/g, " ").replace(/`[^`]*`/g, " ")).replace(/!\[[^\]]*]\([^)]*\)/g, " ").replace(/\[([^\]]+)]\([^)]*\)/g, "$1").replace(/<[^>]+>/g, " ").replace(/[#>*_~`|:-]/g, " ");
945
+ return _nullishCoalesce(_optionalChain([readable, 'access', _54 => _54.match, 'call', _55 => _55(/[A-Za-z0-9]+(?:[-'][A-Za-z0-9]+)*/g), 'optionalAccess', _56 => _56.length]), () => ( 0));
946
+ }
947
+ _chunkS3JO3N4Hcjs.__name.call(void 0, countMarkdownWords, "countMarkdownWords");
948
+ function renderReadingTimeMeta(page, docs) {
949
+ const config = resolveReadingTimeDisplayConfig(docs);
950
+ if (!config) return "";
951
+ const words = countMarkdownWords(page.body, config.includeCode);
952
+ const minutes = Math.max(1, Math.ceil(words / config.wordsPerMinute));
953
+ const label = config.format === "short" ? `${minutes} min` : `${minutes} min read`;
954
+ return `<div class="fd-page-meta not-prose" data-page-reading-time>
955
+ <span class="fd-page-meta-dot" aria-hidden="true">\xB7</span>
956
+ <span class="fd-page-meta-item">${escapeHtml(label)}</span>
957
+ </div>`;
958
+ }
959
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderReadingTimeMeta, "renderReadingTimeMeta");
960
+ function renderPixelPageActions(page, docs) {
961
+ const copyMarkdown = resolveCopyMarkdownActionConfig(docs);
962
+ if (!copyMarkdown) return "";
963
+ const markdownUrl = `${page.href}.md`;
964
+ const includeTitle = copyMarkdown.includeTitle ? "true" : "false";
965
+ return `<div class="fd-page-actions" data-page-actions data-actions-alignment="${resolvePageActionsAlignment(docs)}">
966
+ <button
967
+ type="button"
968
+ class="fd-page-action-btn"
969
+ data-page-action="copy-markdown"
970
+ data-copied="false"
971
+ data-markdown-url="${escapeAttribute(markdownUrl)}"
972
+ data-copy-markdown-format="${copyMarkdown.format}"
973
+ data-copy-markdown-include-title="${includeTitle}"
974
+ data-copy-label="${escapeAttribute(copyMarkdown.label)}"
975
+ data-copied-label="${escapeAttribute(copyMarkdown.copiedLabel)}"
976
+ aria-label="${escapeAttribute(copyMarkdown.label)}"
977
+ title="${escapeAttribute(copyMarkdown.label)}"
978
+ >
979
+ <svg class="fd-page-action-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
980
+ <svg class="fd-page-action-check-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg>
981
+ <span data-page-action-label>${escapeHtml(copyMarkdown.label)}</span>
982
+ </button>
983
+ </div>`;
984
+ }
985
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelPageActions, "renderPixelPageActions");
986
+ function renderBelowTitleMeta(page, docs) {
987
+ const lastUpdated = renderLastUpdatedText(page, docs, "below-title");
988
+ const actions = renderPixelPageActions(page, docs);
989
+ const readingTime = renderReadingTimeMeta(page, docs);
990
+ if (!lastUpdated && !actions && !readingTime) return "";
991
+ return `<div class="fd-below-title-block not-prose">
992
+ ${lastUpdated ? `<p class="fd-last-updated-inline">${lastUpdated}</p>` : ""}
993
+ ${actions}
994
+ ${readingTime}
995
+ </div>`;
996
+ }
997
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderBelowTitleMeta, "renderBelowTitleMeta");
998
+ function renderMarkdownHtmlWithTitleMeta(page, docs, html) {
999
+ const meta = renderBelowTitleMeta(page, docs);
1000
+ if (!meta) return html;
1001
+ const withTitleMeta = html.replace(/(<h1\b[\s\S]*?<\/h1>)/, `$1
1002
+ ${meta}`);
1003
+ return withTitleMeta === html ? `${meta}
1004
+ ${html}` : withTitleMeta;
1005
+ }
1006
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderMarkdownHtmlWithTitleMeta, "renderMarkdownHtmlWithTitleMeta");
1007
+ function renderPixelPageFooter(page, docs) {
1008
+ const lastUpdated = renderLastUpdatedText(page, docs, "footer");
1009
+ if (!lastUpdated) return "";
1010
+ return `<div class="not-prose fd-page-footer">
1011
+ <span class="fd-last-updated-footer">${lastUpdated}</span>
1012
+ </div>`;
1013
+ }
1014
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelPageFooter, "renderPixelPageFooter");
1015
+ function getDocsLlmsOptions(docs, request) {
1016
+ const configured = typeof docs.config.llmsTxt === "object" && docs.config.llmsTxt !== null ? docs.config.llmsTxt : {};
1017
+ return {
1018
+ enabled: true,
1019
+ baseUrl: new URL(request.url).origin,
1020
+ siteTitle: getDocsTitle(docs),
1021
+ siteDescription: getDocsDescription(docs),
1022
+ ...configured
1023
+ };
1024
+ }
1025
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getDocsLlmsOptions, "getDocsLlmsOptions");
1026
+ function getDocsDiscoveryOptions(docs, request) {
1027
+ return {
1028
+ origin: new URL(request.url).origin,
1029
+ entry: docs.entry,
1030
+ i18n: null,
1031
+ search: _nullishCoalesce(docs.config.search, () => ( true)),
1032
+ mcp: {
1033
+ enabled: false,
1034
+ route: "/api/docs/mcp",
1035
+ name: `${getDocsTitle(docs)} MCP`,
1036
+ version: "1",
1037
+ tools: {
1038
+ listDocs: false,
1039
+ listPages: false,
1040
+ readPage: false,
1041
+ searchDocs: false,
1042
+ getNavigation: false,
1043
+ getCodeExamples: false,
1044
+ getConfigSchema: false,
1045
+ getContext: false
1046
+ }
1047
+ },
1048
+ feedback: void 0,
1049
+ llms: getDocsLlmsOptions(docs, request),
1050
+ sitemap: _nullishCoalesce(docs.config.sitemap, () => ( true)),
1051
+ robots: _nullishCoalesce(docs.config.robots, () => ( true)),
1052
+ openapi: void 0,
1053
+ markdown: {
1054
+ acceptHeader: true,
1055
+ signatureAgentHeader: true
1056
+ }
1057
+ };
1058
+ }
1059
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getDocsDiscoveryOptions, "getDocsDiscoveryOptions");
1060
+ function createFarmDocsPublicResponse(contentDir, docs, request) {
1061
+ const url = new URL(request.url);
1062
+ let loadedPages;
1063
+ const getPages = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => _nullishCoalesce(loadedPages, () => ( (loadedPages = getLoadedDocsPages(contentDir, docs)))), "getPages");
1064
+ const sitemapManifest = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).buildDocsSitemapManifest({
1065
+ pages: getPages().map(toDocsSitemapPage),
1066
+ entry: docs.entry,
1067
+ siteTitle: getDocsTitle(docs),
1068
+ baseUrl: url.origin
1069
+ }), "sitemapManifest");
1070
+ const textHeaders = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (contentType) => ({
1071
+ "Content-Type": contentType,
1072
+ "Cache-Control": "public, max-age=60"
1073
+ }), "textHeaders");
1074
+ const llmsFormat = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).resolveDocsLlmsTxtFormat(url);
1075
+ if (llmsFormat) {
1076
+ const generated = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsLlmsTxt(
1077
+ getPages().map(toDocsLlmsPage),
1078
+ getDocsLlmsOptions(docs, request)
1079
+ );
1080
+ return new Response(llmsFormat === "llms-full" ? generated.llmsFullTxt : generated.llmsTxt, {
1081
+ status: 200,
1082
+ headers: textHeaders("text/plain; charset=utf-8")
1083
+ });
1084
+ }
1085
+ const sitemapFormat = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).resolveDocsSitemapRequest(url, _nullishCoalesce(docs.config.sitemap, () => ( true)));
1086
+ if (sitemapFormat === "xml") {
1087
+ return new Response(
1088
+ _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsSitemapXml(sitemapManifest(), {
1089
+ baseUrl: url.origin,
1090
+ includeLastmod: true
1091
+ }),
1092
+ {
1093
+ status: 200,
1094
+ headers: textHeaders("application/xml; charset=utf-8")
1095
+ }
1096
+ );
1097
+ }
1098
+ if (sitemapFormat === "markdown") {
1099
+ return new Response(
1100
+ _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsSitemapMarkdown(sitemapManifest(), {
1101
+ includeDescriptions: true
1102
+ }),
1103
+ {
1104
+ status: 200,
1105
+ headers: textHeaders("text/markdown; charset=utf-8")
1106
+ }
1107
+ );
1108
+ }
1109
+ if (_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).resolveDocsRobotsRequest(url, _nullishCoalesce(docs.config.robots, () => ( true)))) {
1110
+ return new Response(
1111
+ _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsRobotsTxt({
1112
+ entry: docs.entry,
1113
+ sitemap: _nullishCoalesce(docs.config.sitemap, () => ( true)),
1114
+ robots: _nullishCoalesce(docs.config.robots, () => ( true)),
1115
+ baseUrl: url.origin
1116
+ }),
1117
+ {
1118
+ status: 200,
1119
+ headers: textHeaders("text/plain; charset=utf-8")
1120
+ }
1121
+ );
1122
+ }
1123
+ if (_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).isDocsAgentDiscoveryRequest(url)) {
1124
+ const spec = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(docs, request));
1125
+ const title = getDocsTitle(docs);
1126
+ return new Response(
1127
+ JSON.stringify({
1128
+ ...spec,
1129
+ name: title,
1130
+ site: {
1131
+ ...spec.site,
1132
+ title,
1133
+ description: getDocsDescription(docs),
1134
+ entry: docs.entry
1135
+ }
1136
+ }),
1137
+ {
1138
+ status: 200,
1139
+ headers: textHeaders("application/json; charset=utf-8")
1140
+ }
1141
+ );
1142
+ }
1143
+ if (_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).isDocsAgentsRequest(url)) {
1144
+ return new Response(
1145
+ `${_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsAgentsDocument(getDocsDiscoveryOptions(docs, request)).trim()}
1146
+ `,
1147
+ {
1148
+ status: 200,
1149
+ headers: textHeaders("text/markdown; charset=utf-8")
1150
+ }
1151
+ );
1152
+ }
1153
+ if (_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).isDocsSkillRequest(url)) {
1154
+ return new Response(
1155
+ `${_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsSkillDocument(getDocsDiscoveryOptions(docs, request)).trim()}
1156
+ `,
1157
+ {
1158
+ status: 200,
1159
+ headers: textHeaders("text/markdown; charset=utf-8")
1160
+ }
1161
+ );
1162
+ }
1163
+ return null;
1164
+ }
1165
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDocsPublicResponse, "createFarmDocsPublicResponse");
1166
+ function omitFarmDocsHeadBody(request, response) {
1167
+ if (request.method !== "HEAD") return response;
1168
+ return new Response(null, {
1169
+ status: response.status,
1170
+ statusText: response.statusText,
1171
+ headers: response.headers
1172
+ });
1173
+ }
1174
+ _chunkS3JO3N4Hcjs.__name.call(void 0, omitFarmDocsHeadBody, "omitFarmDocsHeadBody");
1175
+ function escapeHtml(value) {
1176
+ return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1177
+ }
1178
+ _chunkS3JO3N4Hcjs.__name.call(void 0, escapeHtml, "escapeHtml");
1179
+ function shouldReturnMarkdown(request) {
1180
+ const url = new URL(request.url);
1181
+ if (url.pathname.endsWith(".md")) return true;
1182
+ const accept = request.headers.get("accept");
1183
+ const markdown = Math.max(
1184
+ _chunkEUV4YR3Vcjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
1185
+ _chunkEUV4YR3Vcjs.farmAcceptQuality.call(void 0, accept, "text/plain")
1186
+ );
1187
+ if (markdown <= 0) return false;
1188
+ return markdown >= _chunkEUV4YR3Vcjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
1189
+ }
1190
+ _chunkS3JO3N4Hcjs.__name.call(void 0, shouldReturnMarkdown, "shouldReturnMarkdown");
1191
+ function escapeAttribute(value) {
1192
+ return escapeHtml(value).replace(/'/g, "&#39;");
1193
+ }
1194
+ _chunkS3JO3N4Hcjs.__name.call(void 0, escapeAttribute, "escapeAttribute");
1195
+ function slugify(value) {
1196
+ return value.toLowerCase().replace(/<[^>]+>/g, "").replace(/`([^`]+)`/g, "$1").replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
1197
+ }
1198
+ _chunkS3JO3N4Hcjs.__name.call(void 0, slugify, "slugify");
1199
+ function createSlugger() {
1200
+ const seen = /* @__PURE__ */ new Map();
1201
+ return (value) => {
1202
+ const base = slugify(value) || "section";
1203
+ const count = seen.get(base) || 0;
1204
+ seen.set(base, count + 1);
1205
+ return count === 0 ? base : `${base}-${count + 1}`;
1206
+ };
1207
+ }
1208
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createSlugger, "createSlugger");
1209
+ function stripHtml(value) {
1210
+ return value.replace(/<[^>]+>/g, "");
1211
+ }
1212
+ _chunkS3JO3N4Hcjs.__name.call(void 0, stripHtml, "stripHtml");
1213
+ function getCodeFence(line) {
1214
+ const match = /^(?: {0,3})(`{3,}|~{3,})/.exec(line);
1215
+ const value = _optionalChain([match, 'optionalAccess', _57 => _57[1]]);
1216
+ if (!value) return null;
1217
+ return { marker: value[0], length: value.length };
1218
+ }
1219
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getCodeFence, "getCodeFence");
1220
+ function isClosingCodeFence(line, fence) {
1221
+ const trimmed = line.trim();
1222
+ return trimmed.length >= fence.length && Array.from(trimmed).every((char) => char === fence.marker);
1223
+ }
1224
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isClosingCodeFence, "isClosingCodeFence");
1225
+ function stripMdxRuntimeSyntax(body) {
1226
+ const output = [];
1227
+ let fence = null;
1228
+ for (const line of body.split("\n")) {
1229
+ const nextFence = getCodeFence(line);
1230
+ if (fence) {
1231
+ output.push(line);
1232
+ if (nextFence && nextFence.marker === fence.marker && isClosingCodeFence(line, fence)) {
1233
+ fence = null;
1234
+ }
1235
+ continue;
1236
+ }
1237
+ if (nextFence) {
1238
+ fence = nextFence;
1239
+ output.push(line);
1240
+ continue;
1241
+ }
1242
+ if (/^\s*import\s.+$/.test(line) || /^\s*export\s+(const|default)\s.+$/.test(line)) {
1243
+ continue;
1244
+ }
1245
+ output.push(line);
1246
+ }
1247
+ return output.join("\n");
1248
+ }
1249
+ _chunkS3JO3N4Hcjs.__name.call(void 0, stripMdxRuntimeSyntax, "stripMdxRuntimeSyntax");
1250
+ function unescapeHtml(value) {
1251
+ return value.replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
1252
+ }
1253
+ _chunkS3JO3N4Hcjs.__name.call(void 0, unescapeHtml, "unescapeHtml");
1254
+ var CODE_LANGUAGE_LABELS = /* @__PURE__ */ new Set([
1255
+ "bash",
1256
+ "cjs",
1257
+ "cmd",
1258
+ "console",
1259
+ "css",
1260
+ "html",
1261
+ "javascript",
1262
+ "js",
1263
+ "json",
1264
+ "jsx",
1265
+ "md",
1266
+ "mdx",
1267
+ "shell",
1268
+ "sh",
1269
+ "terminal",
1270
+ "text",
1271
+ "ts",
1272
+ "tsx",
1273
+ "txt",
1274
+ "typescript",
1275
+ "yaml",
1276
+ "yml",
1277
+ "zsh"
1278
+ ]);
1279
+ var EXTENSIONLESS_CODE_FILENAMES = /* @__PURE__ */ new Set([
1280
+ "dockerfile",
1281
+ "makefile",
1282
+ "procfile",
1283
+ "readme",
1284
+ "license"
1285
+ ]);
1286
+ function isCodePathLabel(label) {
1287
+ const trimmed = label.trim();
1288
+ if (!trimmed || /\s/.test(trimmed)) return false;
1289
+ const lower = trimmed.toLowerCase();
1290
+ if (CODE_LANGUAGE_LABELS.has(lower)) return false;
1291
+ const fileName = trimmed.split(/[\\/]/).filter(Boolean).pop() || trimmed;
1292
+ const lowerFileName = fileName.toLowerCase();
1293
+ if (EXTENSIONLESS_CODE_FILENAMES.has(lowerFileName)) return true;
1294
+ if (fileName.startsWith(".") && fileName.length > 1) return true;
1295
+ return /\.[a-z0-9][a-z0-9-]*$/i.test(fileName);
1296
+ }
1297
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isCodePathLabel, "isCodePathLabel");
1298
+ function parseCodeInfo(info) {
1299
+ const source = (info || "").trim();
1300
+ const language = _optionalChain([source, 'access', _58 => _58.match, 'call', _59 => _59(/^\S+/), 'optionalAccess', _60 => _60[0]]) || "text";
1301
+ const explicitLabel = _optionalChain([source, 'access', _61 => _61.match, 'call', _62 => _62(/\b(?:title|filename|file|label|name)=["']([^"']+)["']/), 'optionalAccess', _63 => _63[1], 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]);
1302
+ return { language, label: explicitLabel || language, hasExplicitLabel: Boolean(explicitLabel) };
1303
+ }
1304
+ _chunkS3JO3N4Hcjs.__name.call(void 0, parseCodeInfo, "parseCodeInfo");
1305
+ function getStandaloneCodeLabel(line) {
1306
+ const trimmed = line.trim();
1307
+ const match = /^(?:\*\*([^*]+)\*\*|__([^_]+)__|`([^`]+)`)$/u.exec(trimmed);
1308
+ const label = _optionalChain([match, 'optionalAccess', _66 => _66[1]]) || _optionalChain([match, 'optionalAccess', _67 => _67[2]]) || _optionalChain([match, 'optionalAccess', _68 => _68[3]]);
1309
+ return _optionalChain([label, 'optionalAccess', _69 => _69.trim, 'call', _70 => _70()]) || null;
1310
+ }
1311
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getStandaloneCodeLabel, "getStandaloneCodeLabel");
1312
+ function hasCodeFenceTitle(info) {
1313
+ return /\b(?:title|filename|file|label|name)=["'][^"']+["']/.test(info);
1314
+ }
1315
+ _chunkS3JO3N4Hcjs.__name.call(void 0, hasCodeFenceTitle, "hasCodeFenceTitle");
1316
+ function escapeCodeFenceTitle(value) {
1317
+ return value.replace(/"/g, "&quot;");
1318
+ }
1319
+ _chunkS3JO3N4Hcjs.__name.call(void 0, escapeCodeFenceTitle, "escapeCodeFenceTitle");
1320
+ function addTitleToCodeFence(line, title) {
1321
+ const match = /^(\s{0,3})(`{3,}|~{3,})(.*)$/u.exec(line);
1322
+ if (!match) return line;
1323
+ const [, indent, marker, infoSource] = match;
1324
+ const info = infoSource.trim();
1325
+ if (hasCodeFenceTitle(info)) return line;
1326
+ const suffix = `title="${escapeCodeFenceTitle(title)}"`;
1327
+ return `${indent}${marker}${info ? `${info} ${suffix}` : `text ${suffix}`}`;
1328
+ }
1329
+ _chunkS3JO3N4Hcjs.__name.call(void 0, addTitleToCodeFence, "addTitleToCodeFence");
1330
+ function attachCodeBlockLabels(body) {
1331
+ const lines = body.split("\n");
1332
+ const output = [];
1333
+ let fence = null;
1334
+ for (let index = 0; index < lines.length; index += 1) {
1335
+ const line = lines[index] || "";
1336
+ const nextFence = getCodeFence(line);
1337
+ if (fence) {
1338
+ output.push(line);
1339
+ if (nextFence && nextFence.marker === fence.marker && isClosingCodeFence(line, fence)) {
1340
+ fence = null;
1341
+ }
1342
+ continue;
1343
+ }
1344
+ if (nextFence) {
1345
+ fence = nextFence;
1346
+ output.push(line);
1347
+ continue;
1348
+ }
1349
+ const label = getStandaloneCodeLabel(line);
1350
+ if (!label) {
1351
+ output.push(line);
1352
+ continue;
1353
+ }
1354
+ let fenceIndex = index + 1;
1355
+ while (fenceIndex < lines.length && (lines[fenceIndex] || "").trim() === "") {
1356
+ fenceIndex += 1;
1357
+ }
1358
+ const labeledFence = getCodeFence(lines[fenceIndex] || "");
1359
+ if (!labeledFence) {
1360
+ output.push(line);
1361
+ continue;
1362
+ }
1363
+ output.push(addTitleToCodeFence(lines[fenceIndex] || "", label));
1364
+ fence = labeledFence;
1365
+ index = fenceIndex;
1366
+ }
1367
+ return output.join("\n");
1368
+ }
1369
+ _chunkS3JO3N4Hcjs.__name.call(void 0, attachCodeBlockLabels, "attachCodeBlockLabels");
1370
+ function highlightCodeBlock(code) {
1371
+ return _sugarhigh.highlight.call(void 0, code.replace(/\n$/, "")).replace(/<\/span>\n<span/g, "</span><span");
1372
+ }
1373
+ _chunkS3JO3N4Hcjs.__name.call(void 0, highlightCodeBlock, "highlightCodeBlock");
1374
+ function renderCodeCopyButton(className = "code-copy") {
1375
+ return `<button class="${className}" type="button" data-code-copy data-copied="false" aria-label="Copy code" title="Copy code"><svg class="code-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><svg class="code-copy-check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg></button>`;
1376
+ }
1377
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderCodeCopyButton, "renderCodeCopyButton");
1378
+ function renderMarkdownDocument(body, depth) {
1379
+ const slug = createSlugger();
1380
+ const renderer = new (0, _marked.Renderer)();
1381
+ const maxLevel = Math.max(2, Math.min(depth, 6));
1382
+ const tocItems = [];
1383
+ renderer.heading = (text, level, raw) => {
1384
+ const title = raw || stripHtml(text);
1385
+ const id = slug(title);
1386
+ if (level >= 2 && level <= maxLevel) {
1387
+ tocItems.push({ id, title, level });
1388
+ }
1389
+ return `<h${level} id="${escapeAttribute(id)}"><a class="heading-anchor" href="#${escapeAttribute(id)}">${text}</a></h${level}>
1390
+ `;
1391
+ };
1392
+ renderer.code = (code, infostring, escaped) => {
1393
+ const { language, label, hasExplicitLabel } = parseCodeInfo(infostring);
1394
+ const rawCode = escaped ? unescapeHtml(code) : code;
1395
+ const highlighted = highlightCodeBlock(rawCode);
1396
+ const shouldRenderHeader = hasExplicitLabel && isCodePathLabel(label);
1397
+ const header = shouldRenderHeader ? `<div class="code-block-header">
1398
+ <span class="code-block-title">${escapeHtml(label)}</span>
1399
+ ${renderCodeCopyButton()}
1400
+ </div>` : renderCodeCopyButton("code-copy code-copy-floating");
1401
+ return `<figure class="shiki code-block ${shouldRenderHeader ? "code-block-framed" : "code-block-plain"}" data-language="${escapeAttribute(language)}">
1402
+ ${header}
1403
+ <pre><code class="sh-code language-${escapeAttribute(language)}">${highlighted}</code></pre>
1404
+ </figure>
1405
+ `;
1406
+ };
1407
+ renderer.table = (header, body2) => `<div class="fd-table-wrapper table-wrap relative overflow-auto prose-no-margin my-6"><table><thead>${header}</thead><tbody>${body2}</tbody></table></div>
1408
+ `;
1409
+ renderer.blockquote = (quote) => `<blockquote>${quote}</blockquote>
1410
+ `;
1411
+ renderer.codespan = (code) => `<code>${escapeHtml(code)}</code>`;
1412
+ renderer.link = (href, title, text) => {
1413
+ const safeHref = href || "";
1414
+ const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
1415
+ return `<a href="${escapeAttribute(safeHref)}"${titleAttribute}>${text}</a>`;
1416
+ };
1417
+ renderer.image = (href, title, text) => {
1418
+ const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
1419
+ return `<img src="${escapeAttribute(href)}" alt="${escapeAttribute(text)}"${titleAttribute}>`;
1420
+ };
1421
+ const html = _marked.marked.call(void 0, attachCodeBlockLabels(stripMdxRuntimeSyntax(body)), {
1422
+ async: false,
1423
+ breaks: false,
1424
+ gfm: true,
1425
+ renderer
1426
+ });
1427
+ return { html: html.trim(), tocItems };
1428
+ }
1429
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderMarkdownDocument, "renderMarkdownDocument");
1430
+ function getThemeUI(docs) {
1431
+ const theme = docs.config.theme;
1432
+ return theme && typeof theme === "object" && "ui" in theme && typeof theme.ui === "object" ? theme.ui : {};
1433
+ }
1434
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getThemeUI, "getThemeUI");
1435
+ function getThemeName(docs) {
1436
+ const theme = docs.config.theme;
1437
+ return theme && typeof theme === "object" && "name" in theme ? String(theme.name || "farm-docs") : "farm-docs";
1438
+ }
1439
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getThemeName, "getThemeName");
1440
+ function getThemeTocDepth(docs) {
1441
+ const toc = _optionalChain([getThemeUI, 'call', _71 => _71(docs), 'access', _72 => _72.layout, 'optionalAccess', _73 => _73.toc]);
1442
+ return toc && typeof toc === "object" && typeof toc.depth === "number" ? toc.depth : 3;
1443
+ }
1444
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getThemeTocDepth, "getThemeTocDepth");
1445
+ var SIDEBAR_SECTION_ORDER = [
1446
+ "Start",
1447
+ "Core",
1448
+ "Data and APIs",
1449
+ "Integrations",
1450
+ "Runtime",
1451
+ "Content",
1452
+ "Extending",
1453
+ "Reference"
1454
+ ];
1455
+ var SIDEBAR_PAGE_ORDER = new Map(
1456
+ [
1457
+ "",
1458
+ "getting-started",
1459
+ "project-structure",
1460
+ "configuration",
1461
+ "routing",
1462
+ "layouts",
1463
+ "server-rendering",
1464
+ "middleware",
1465
+ "query",
1466
+ "api-routes",
1467
+ "api-client",
1468
+ "storage",
1469
+ "integrations",
1470
+ "integrations/stripe",
1471
+ "integrations/autumn",
1472
+ "integrations/polar",
1473
+ "integrations/auth",
1474
+ "integrations/email",
1475
+ "integrations/jobs",
1476
+ "integrations/unkey",
1477
+ "integrations/ui-registry",
1478
+ "integrations/orm-storage",
1479
+ "cache-ppr",
1480
+ "observability",
1481
+ "deployment",
1482
+ "docs-engine",
1483
+ "markdown",
1484
+ "openapi",
1485
+ "plugins",
1486
+ "plugins/create-plugin",
1487
+ "cli",
1488
+ "examples",
1489
+ "reference"
1490
+ ].map((slug, index) => [slug, index])
1491
+ );
1492
+ function isSidebarNavigationItem(value) {
1493
+ return value !== null;
1494
+ }
1495
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isSidebarNavigationItem, "isSidebarNavigationItem");
1496
+ function compareSidebarPages(a, b) {
1497
+ const aOrder = _nullishCoalesce(SIDEBAR_PAGE_ORDER.get(a.slug), () => ( 1e3));
1498
+ const bOrder = _nullishCoalesce(SIDEBAR_PAGE_ORDER.get(b.slug), () => ( 1e3));
1499
+ return aOrder - bOrder || a.title.localeCompare(b.title);
1500
+ }
1501
+ _chunkS3JO3N4Hcjs.__name.call(void 0, compareSidebarPages, "compareSidebarPages");
1502
+ function getSidebarSection(page) {
1503
+ if (page.section) return page.section;
1504
+ if (page.slug.startsWith("integrations/")) return "Integrations";
1505
+ if (page.slug.startsWith("plugins/")) return "Extending";
1506
+ return "Reference";
1507
+ }
1508
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getSidebarSection, "getSidebarSection");
1509
+ function sidebarIdFor(section) {
1510
+ return `sidebar-${slugify(section)}`;
1511
+ }
1512
+ _chunkS3JO3N4Hcjs.__name.call(void 0, sidebarIdFor, "sidebarIdFor");
1513
+ function isObjectRecord(value) {
1514
+ return !!value && typeof value === "object" && !Array.isArray(value);
1515
+ }
1516
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isObjectRecord, "isObjectRecord");
1517
+ function readString(value) {
1518
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
1519
+ }
1520
+ _chunkS3JO3N4Hcjs.__name.call(void 0, readString, "readString");
1521
+ function readOptionalString(value) {
1522
+ return typeof value === "string" ? value.trim() : void 0;
1523
+ }
1524
+ _chunkS3JO3N4Hcjs.__name.call(void 0, readOptionalString, "readOptionalString");
1525
+ function normalizeSidebarSlug(value) {
1526
+ if (value === "/" || value === ".") return "";
1527
+ return trimSlashes(value);
1528
+ }
1529
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeSidebarSlug, "normalizeSidebarSlug");
1530
+ function getSidebarNavigation(docs) {
1531
+ const navigation = docs.config.navigation;
1532
+ if (!isObjectRecord(navigation) || !Array.isArray(navigation.sidebar)) return [];
1533
+ return navigation.sidebar.map(normalizeSidebarNavigationItem).filter(isSidebarNavigationItem);
1534
+ }
1535
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getSidebarNavigation, "getSidebarNavigation");
1536
+ function normalizeSidebarNavigationItem(value) {
1537
+ if (!isObjectRecord(value)) return null;
1538
+ const label = _nullishCoalesce(readString(value.label), () => ( readString(value.title)));
1539
+ const icon = readString(value.icon);
1540
+ const slug = _nullishCoalesce(readOptionalString(value.slug), () => ( readOptionalString(value.path)));
1541
+ const href = _nullishCoalesce(readString(value.href), () => ( readString(value.url)));
1542
+ const rawChildren = Array.isArray(value.children) ? value.children : Array.isArray(value.items) ? value.items : [];
1543
+ const children = rawChildren.map(normalizeSidebarNavigationItem).filter(isSidebarNavigationItem);
1544
+ if (!label && !slug && !href && children.length === 0) return null;
1545
+ return {
1546
+ ...label ? { label } : {},
1547
+ ...icon ? { icon } : {},
1548
+ ...slug !== void 0 ? { slug: normalizeSidebarSlug(slug) } : {},
1549
+ ...href ? { href } : {},
1550
+ children
1551
+ };
1552
+ }
1553
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeSidebarNavigationItem, "normalizeSidebarNavigationItem");
1554
+ function createSidebarPageMaps(pages) {
1555
+ return {
1556
+ bySlug: new Map(pages.map((page) => [page.slug, page])),
1557
+ byHref: new Map(pages.map((page) => [page.href, page]))
1558
+ };
1559
+ }
1560
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createSidebarPageMaps, "createSidebarPageMaps");
1561
+ function resolveConfiguredSidebarPage(item, maps) {
1562
+ if (item.slug !== void 0) return maps.bySlug.get(item.slug);
1563
+ if (item.href) return maps.byHref.get(item.href);
1564
+ return void 0;
1565
+ }
1566
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveConfiguredSidebarPage, "resolveConfiguredSidebarPage");
1567
+ function getSidebarIconRegistry(docs) {
1568
+ return isObjectRecord(docs.config.icons) ? docs.config.icons : {};
1569
+ }
1570
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getSidebarIconRegistry, "getSidebarIconRegistry");
1571
+ function renderConfiguredIconSvg(value) {
1572
+ if (typeof value !== "string") return "";
1573
+ const icon = value.trim();
1574
+ if (!icon) return "";
1575
+ if (/^<svg[\s>]/i.test(icon)) return icon;
1576
+ if (/^<(path|circle|rect|line|polyline|polygon|ellipse|g)\b/i.test(icon)) {
1577
+ return `<svg viewBox="0 0 24 24" focusable="false">${icon}</svg>`;
1578
+ }
1579
+ return "";
1580
+ }
1581
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderConfiguredIconSvg, "renderConfiguredIconSvg");
1582
+ function renderSidebarIcon(docs, icon, className = "sidebar-icon fd-sidebar-icon") {
1583
+ if (!icon) return "";
1584
+ const iconRegistry = getSidebarIconRegistry(docs);
1585
+ const configuredIcon = _nullishCoalesce(iconRegistry[icon], () => ( icon));
1586
+ const svg = renderConfiguredIconSvg(configuredIcon);
1587
+ if (!svg) return "";
1588
+ return `<span class="${className}" data-sidebar-icon="${escapeAttribute(icon)}" aria-hidden="true">${svg}</span>`;
1589
+ }
1590
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderSidebarIcon, "renderSidebarIcon");
1591
+ function renderSidebarLabel(docs, icon, label, className) {
1592
+ return `<span class="${className}">${renderSidebarIcon(docs, icon)}<span class="sidebar-label-text">${escapeHtml(label)}</span></span>`;
1593
+ }
1594
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderSidebarLabel, "renderSidebarLabel");
1595
+ function getSidebarPageLabel(item, configured) {
1596
+ if (_optionalChain([configured, 'optionalAccess', _74 => _74.label])) return configured.label;
1597
+ if (item.slug === "") return "Why?";
1598
+ if (item.slug === "integrations") return "Overview";
1599
+ if (item.slug === "integrations/ui-registry") return "UI Registry";
1600
+ if (item.slug === "integrations/orm-storage") return "ORM Storage";
1601
+ if (item.slug.startsWith("integrations/")) {
1602
+ return item.title.replace(/\s+Integrations?$/i, "");
1603
+ }
1604
+ return item.title;
1605
+ }
1606
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getSidebarPageLabel, "getSidebarPageLabel");
1607
+ function renderSidebarLink(item, activeHref, docs, configured) {
1608
+ const active = item.href === activeHref;
1609
+ return `<a class="fd-sidebar-link${active ? " fd-sidebar-link-active" : ""}" data-active="${active ? "true" : "false"}" href="${escapeAttribute(item.href)}">${renderSidebarLabel(docs, _optionalChain([configured, 'optionalAccess', _75 => _75.icon]), getSidebarPageLabel(item, configured), "sidebar-link-label fd-sidebar-link-label")}</a>`;
1610
+ }
1611
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderSidebarLink, "renderSidebarLink");
1612
+ function collectConfiguredSidebarPages(items, maps, seen = /* @__PURE__ */ new Set()) {
1613
+ const ordered = [];
1614
+ for (const item of items) {
1615
+ const page = resolveConfiguredSidebarPage(item, maps);
1616
+ if (page && !seen.has(page.slug)) {
1617
+ seen.add(page.slug);
1618
+ ordered.push(page);
1619
+ }
1620
+ ordered.push(...collectConfiguredSidebarPages(item.children, maps, seen));
1621
+ }
1622
+ return ordered;
1623
+ }
1624
+ _chunkS3JO3N4Hcjs.__name.call(void 0, collectConfiguredSidebarPages, "collectConfiguredSidebarPages");
1625
+ function getOrderedSidebarPages(pages, docs) {
1626
+ if (!docs) return [...pages].sort(compareSidebarPages);
1627
+ const maps = createSidebarPageMaps(pages);
1628
+ const configuredPages = collectConfiguredSidebarPages(getSidebarNavigation(docs), maps);
1629
+ if (configuredPages.length === 0) return [...pages].sort(compareSidebarPages);
1630
+ const configuredSlugs = new Set(configuredPages.map((page) => page.slug));
1631
+ const remainingPages = pages.filter((page) => !configuredSlugs.has(page.slug)).sort(compareSidebarPages);
1632
+ return [...configuredPages, ...remainingPages];
1633
+ }
1634
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getOrderedSidebarPages, "getOrderedSidebarPages");
1635
+ function renderExternalSidebarLink(item, activeHref, docs) {
1636
+ if (!item.href || !item.label) return "";
1637
+ const active = item.href === activeHref;
1638
+ return `<a class="fd-sidebar-link${active ? " fd-sidebar-link-active" : ""}" data-active="${active ? "true" : "false"}" href="${escapeAttribute(item.href)}">${renderSidebarLabel(docs, item.icon, item.label, "sidebar-link-label fd-sidebar-link-label")}</a>`;
1639
+ }
1640
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderExternalSidebarLink, "renderExternalSidebarLink");
1641
+ function renderConfiguredSidebarSubgroup(item, childHtml, docs) {
1642
+ const label = item.label;
1643
+ if (!label) return childHtml;
1644
+ return `<div class="sidebar-subgroup fd-sidebar-folder" data-sidebar-subgroup="${escapeAttribute(slugify(label))}">
1645
+ <div class="sidebar-subgroup-title fd-sidebar-folder-trigger">${renderSidebarLabel(docs, item.icon, label, "sidebar-subgroup-label")}</div>
1646
+ <div class="sidebar-subgroup-content fd-sidebar-folder-content">
1647
+ ${childHtml}
1648
+ </div>
1649
+ </div>`;
1650
+ }
1651
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderConfiguredSidebarSubgroup, "renderConfiguredSidebarSubgroup");
1652
+ function renderConfiguredSidebarItems(items, maps, activeHref, docs) {
1653
+ const renderedItems = [];
1654
+ for (const item of items) {
1655
+ const page = resolveConfiguredSidebarPage(item, maps);
1656
+ const childHtml = renderConfiguredSidebarItems(item.children, maps, activeHref, docs);
1657
+ if (item.children.length > 0) {
1658
+ renderedItems.push(renderConfiguredSidebarSubgroup(item, childHtml, docs));
1659
+ continue;
1660
+ }
1661
+ const linkHtml = page ? renderSidebarLink(page, activeHref, docs, item) : renderExternalSidebarLink(item, activeHref, docs);
1662
+ if (linkHtml) renderedItems.push(linkHtml);
1663
+ }
1664
+ return renderedItems.join("\n");
1665
+ }
1666
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderConfiguredSidebarItems, "renderConfiguredSidebarItems");
1667
+ function renderConfiguredSidebarSection(section, maps, activeHref, docs) {
1668
+ const label = section.label || "Docs";
1669
+ const id = sidebarIdFor(label);
1670
+ const links = renderConfiguredSidebarItems(section.children, maps, activeHref, docs);
1671
+ return `<div class="sidebar-folder fd-sidebar-folder" data-state="open">
1672
+ <button class="text-fd-muted-foreground sidebar-folder-trigger fd-sidebar-folder-trigger" type="button" aria-controls="${escapeAttribute(id)}" aria-expanded="true">${renderSidebarLabel(docs, section.icon, label, "sidebar-folder-label")}</button>
1673
+ <div id="${escapeAttribute(id)}" class="overflow-hidden sidebar-folder-content fd-sidebar-folder-content" data-state="open">
1674
+ ${links}
1675
+ </div>
1676
+ </div>`;
1677
+ }
1678
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderConfiguredSidebarSection, "renderConfiguredSidebarSection");
1679
+ function renderAutoSidebarSectionItems(items, activeHref, docs) {
1680
+ return [...items].sort(compareSidebarPages).map((item) => renderSidebarLink(item, activeHref, docs)).join("\n");
1681
+ }
1682
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderAutoSidebarSectionItems, "renderAutoSidebarSectionItems");
1683
+ function renderPixelNavItems(pages, activeHref, docs) {
1684
+ const configuredSidebar = getSidebarNavigation(docs);
1685
+ if (configuredSidebar.length > 0) {
1686
+ const maps = createSidebarPageMaps(pages);
1687
+ const renderedSections2 = configuredSidebar.map((section) => {
1688
+ if (section.children.length > 0) {
1689
+ return renderConfiguredSidebarSection(section, maps, activeHref, docs);
1690
+ }
1691
+ const page = resolveConfiguredSidebarPage(section, maps);
1692
+ return page ? renderSidebarLink(page, activeHref, docs, section) : renderExternalSidebarLink(section, activeHref, docs);
1693
+ }).filter(Boolean).join("\n");
1694
+ return `<div class="sidebar-scroll overscroll-contain fd-sidebar-nav">
1695
+ <div class="sidebar-tree">
1696
+ ${renderedSections2}
1697
+ </div>
1698
+ </div>`;
1699
+ }
1700
+ const groups = /* @__PURE__ */ new Map();
1701
+ for (const item of pages) {
1702
+ const group = item.slug === "" ? "Start" : getSidebarSection(item);
1703
+ const entries = _nullishCoalesce(groups.get(group), () => ( []));
1704
+ entries.push(item);
1705
+ groups.set(group, entries);
1706
+ }
1707
+ const renderedSections = Array.from(groups.entries()).sort(([a], [b]) => {
1708
+ const aOrder = SIDEBAR_SECTION_ORDER.indexOf(a);
1709
+ const bOrder = SIDEBAR_SECTION_ORDER.indexOf(b);
1710
+ return (aOrder === -1 ? 100 : aOrder) - (bOrder === -1 ? 100 : bOrder) || a.localeCompare(b);
1711
+ }).map(([section, items]) => {
1712
+ const id = sidebarIdFor(section);
1713
+ const links = renderAutoSidebarSectionItems(items, activeHref, docs);
1714
+ return `<div class="sidebar-folder fd-sidebar-folder" data-state="open">
1715
+ <button class="text-fd-muted-foreground sidebar-folder-trigger fd-sidebar-folder-trigger" type="button" aria-controls="${escapeAttribute(id)}" aria-expanded="true">${renderSidebarLabel(docs, void 0, section, "sidebar-folder-label")}</button>
1716
+ <div id="${escapeAttribute(id)}" class="overflow-hidden sidebar-folder-content fd-sidebar-folder-content" data-state="open">
1717
+ ${links}
1718
+ </div>
1719
+ </div>`;
1720
+ }).join("\n");
1721
+ return `<div class="sidebar-scroll overscroll-contain fd-sidebar-nav">
1722
+ <div class="sidebar-tree">
1723
+ ${renderedSections}
1724
+ </div>
1725
+ </div>`;
1726
+ }
1727
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelNavItems, "renderPixelNavItems");
1728
+ function renderPixelPageNav(pages, activeHref, docs) {
1729
+ const orderedPages = getOrderedSidebarPages(pages, docs);
1730
+ const activeIndex = orderedPages.findIndex((item) => item.href === activeHref);
1731
+ if (activeIndex === -1) return "";
1732
+ const previous = orderedPages[activeIndex - 1];
1733
+ const next = orderedPages[activeIndex + 1];
1734
+ if (!previous && !next) return "";
1735
+ const renderChevron = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (direction) => `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="${direction === "prev" ? "15 18 9 12 15 6" : "9 18 15 12 9 6"}" /></svg>`, "renderChevron");
1736
+ const renderCard = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (item, direction) => `<a class="fd-page-nav-card fd-page-nav-${direction}" href="${escapeAttribute(item.href)}">
1737
+ <span class="fd-page-nav-title fd-page-nav-title-${direction}">${direction === "prev" ? `${renderChevron(direction)}${escapeHtml(item.title)}` : `${escapeHtml(item.title)}${renderChevron(direction)}`}</span>
1738
+ <span class="fd-page-nav-description">${direction === "prev" ? "Previous Page" : "Next Page"}</span>
1739
+ </a>`, "renderCard");
1740
+ return `<nav class="not-prose fd-page-nav" aria-label="Page navigation">
1741
+ ${previous ? renderCard(previous, "prev") : ""}
1742
+ ${next ? renderCard(next, "next") : ""}
1743
+ </nav>`;
1744
+ }
1745
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelPageNav, "renderPixelPageNav");
1746
+ function titleizePathSegment(value) {
1747
+ return value.replace(/[-_]+/g, " ").replace(/\b\w/g, (character) => character.toUpperCase());
1748
+ }
1749
+ _chunkS3JO3N4Hcjs.__name.call(void 0, titleizePathSegment, "titleizePathSegment");
1750
+ function isBreadcrumbEnabled(docs) {
1751
+ const breadcrumb = docs.config.breadcrumb;
1752
+ if (breadcrumb === false) return false;
1753
+ if (breadcrumb && typeof breadcrumb === "object" && "enabled" in breadcrumb) {
1754
+ return breadcrumb.enabled !== false;
1755
+ }
1756
+ return true;
1757
+ }
1758
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isBreadcrumbEnabled, "isBreadcrumbEnabled");
1759
+ function renderPixelBreadcrumb(page, docs) {
1760
+ if (!isBreadcrumbEnabled(docs)) return "";
1761
+ const segments = trimSlashes(page.slug).split("/").filter(Boolean);
1762
+ if (segments.length < 2) return "";
1763
+ const parentSegments = segments.slice(0, -1);
1764
+ const parentSegment = parentSegments[parentSegments.length - 1];
1765
+ const currentSegment = segments[segments.length - 1];
1766
+ const entry = normalizeEntry2(docs.entry);
1767
+ const parentPath = parentSegments.join("/");
1768
+ const parentHref = entry === "/" ? `/${parentPath}` : `${entry}/${parentPath}`;
1769
+ return `<nav class="fd-breadcrumb" aria-label="Breadcrumb">
1770
+ <span class="fd-breadcrumb-item">
1771
+ <a class="fd-breadcrumb-parent fd-breadcrumb-link" href="${escapeAttribute(parentHref)}">${escapeHtml(titleizePathSegment(parentSegment))}</a>
1772
+ </span>
1773
+ <span class="fd-breadcrumb-item">
1774
+ <span class="fd-breadcrumb-sep">/</span>
1775
+ <span class="fd-breadcrumb-current">${escapeHtml(titleizePathSegment(currentSegment))}</span>
1776
+ </span>
1777
+ </nav>`;
1778
+ }
1779
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelBreadcrumb, "renderPixelBreadcrumb");
1780
+ function renderDocsSearchTrigger(showIcon = true, className = "") {
1781
+ return `<button class="fd-docs-search-trigger ${className}" type="button" data-search-full="" aria-label="Search documentation" aria-haspopup="dialog" aria-keyshortcuts="Meta+K Control+K">
1782
+ ${showIcon ? '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-4-4"></path></svg>' : ""}
1783
+ <kbd><span>\u2318</span><span>K</span></kbd>
1784
+ </button>`;
1785
+ }
1786
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsSearchTrigger, "renderDocsSearchTrigger");
1787
+ function renderDocsSearchMount(clientEntry) {
1788
+ return `<div id="farm-docs-search-root" data-farm-docs-search-root data-api="/api/docs"></div>
1789
+ <script type="module" src="${escapeAttribute(clientEntry)}"></script>`;
1790
+ }
1791
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsSearchMount, "renderDocsSearchMount");
1792
+ function renderDocsSearchBootstrapScript() {
1793
+ return `<script>${_chunkMWWVKDW3cjs.generateFarmDocsSearchBootstrapRuntime.call(void 0, )}</script>`;
1794
+ }
1795
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsSearchBootstrapScript, "renderDocsSearchBootstrapScript");
1796
+ function renderPixelToc(items) {
1797
+ if (items.length === 0) return '<p class="toc-empty">No sections</p>';
1798
+ return `<div class="toc-track fd-toc-list">
1799
+ <div class="toc-thumb" data-toc-thumb style="clip-path: polygon(0 0px, 100% 0px, 100% 32px, 0 32px);"></div>
1800
+ <div class="toc-links">
1801
+ ${items.map(
1802
+ (item) => `<a class="toc-link fd-toc-link${items[0] === item ? " fd-toc-link-active" : ""}" data-active="${items[0] === item ? "true" : "false"}" data-toc-item data-depth="${item.level}" href="#${escapeAttribute(item.id)}">${escapeHtml(item.title)}</a>`
1803
+ ).join("\n")}
1804
+ </div>
1805
+ </div>`;
1806
+ }
1807
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelToc, "renderPixelToc");
1808
+ function renderDocsRuntimeScript(docs) {
1809
+ const docsEntry = JSON.stringify(normalizeEntry2(docs.entry));
1810
+ const reconcileHeadRuntime = `const farmNavigationHeadSelector=${JSON.stringify(_chunkKGZIORNLcjs.FARM_NAVIGATION_HEAD_SELECTOR)};const reconcileDocsHead=(nextDoc)=>{const nextTitle=nextDoc.querySelector("title");document.title=nextTitle?.textContent||"";document.head.querySelectorAll(farmNavigationHeadSelector).forEach((node)=>node.remove());nextDoc.head.querySelectorAll(farmNavigationHeadSelector).forEach((node)=>document.head.appendChild(document.importNode(node,true)))}`;
1811
+ return `<script>(()=>{if(window.__farmDocsRuntime)return;window.__farmDocsRuntime=true;document.documentElement.dataset.farmDocsRuntime="true";document.documentElement.dataset.farmDocsRuntimeId=Math.random().toString(36).slice(2);${reconcileHeadRuntime};const docsEntry=${docsEntry};let cleanupToc=()=>{};let closeMobileSidebar=()=>{};const normalizePath=(path)=>path.length>1?path.replace(/\\/+$/,""):path;const isDocsPath=(path)=>{const next=normalizePath(path);const entry=normalizePath(docsEntry);if(next.endsWith(".md"))return false;if(entry==="/")return true;return next===entry||next.startsWith(entry+"/")};const initToc=()=>{cleanupToc();const toc=document.getElementById("nd-toc");if(!toc){cleanupToc=()=>{};return}const links=Array.from(toc.querySelectorAll("[data-toc-item]"));const thumb=toc.querySelector("[data-toc-thumb]");const pairs=links.map((link)=>{let id=link.hash.slice(1);try{id=decodeURIComponent(id)}catch{}return{link,heading:document.getElementById(id)}}).filter((item)=>item.heading);const setActive=(active)=>{for(const {link} of pairs){const selected=link===active.link;link.dataset.active=selected?"true":"false";link.classList.toggle("fd-toc-link-active",selected)}if(!thumb)return;const styles=getComputedStyle(active.link);const top=active.link.offsetTop+parseFloat(styles.paddingTop||"0");const bottom=active.link.offsetTop+active.link.clientHeight-parseFloat(styles.paddingBottom||"0");thumb.style.clipPath="polygon(0 "+top+"px,100% "+top+"px,100% "+bottom+"px,0 "+bottom+"px)"};const update=()=>{if(pairs.length===0)return;const offset=Math.min(window.innerHeight*0.3,160);let active=pairs[0];for(const pair of pairs){if(pair.heading.getBoundingClientRect().top<=offset)active=pair;else break}setActive(active)};let frame=0;const schedule=()=>{if(frame)return;frame=requestAnimationFrame(()=>{frame=0;update()})};const onHashChange=()=>setTimeout(schedule,0);window.addEventListener("scroll",schedule,{passive:true});window.addEventListener("resize",schedule);window.addEventListener("hashchange",onHashChange);cleanupToc=()=>{window.removeEventListener("scroll",schedule);window.removeEventListener("resize",schedule);window.removeEventListener("hashchange",onHashChange);if(frame)cancelAnimationFrame(frame);frame=0};update()};const getSidebar=()=>document.getElementById("nd-sidebar");const ensureActiveVisible=()=>{const sidebar=getSidebar();if(!sidebar)return;const active=sidebar.querySelector('a[data-active="true"]');if(!(active instanceof HTMLElement))return;const activeRect=active.getBoundingClientRect();const sidebarRect=sidebar.getBoundingClientRect();if(activeRect.top<sidebarRect.top||activeRect.bottom>sidebarRect.bottom)sidebar.scrollTop+=activeRect.top-sidebarRect.top-(sidebar.clientHeight-activeRect.height)/2};const setSidebarActive=(path)=>{const sidebar=getSidebar();if(!sidebar)return;const current=normalizePath(path);for(const link of Array.from(sidebar.querySelectorAll("a[href]"))){try{link.dataset.active=normalizePath(new URL(link.href,location.href).pathname)===current?"true":"false"}catch{}}ensureActiveVisible()};const initMobileSidebar=()=>{const layout=document.getElementById("nd-docs-layout");const sidebar=getSidebar();const toggle=document.querySelector("[data-sidebar-toggle]");const backdrop=document.querySelector("[data-sidebar-backdrop]");if(!layout||!sidebar||!(toggle instanceof HTMLButtonElement))return;const setOpen=(open)=>{layout.dataset.sidebarOpen=open?"true":"false";sidebar.classList.toggle("fd-sidebar-open",open);document.documentElement.dataset.farmDocsSidebar=open?"open":"closed";toggle.setAttribute("aria-expanded",open?"true":"false");toggle.setAttribute("aria-label",open?"Close menu":"Open menu")};const toggleOpen=()=>setOpen(layout.dataset.sidebarOpen!=="true");closeMobileSidebar=()=>setOpen(false);toggle.addEventListener("click",(event)=>{event.preventDefault();toggleOpen()});backdrop?.addEventListener("click",()=>closeMobileSidebar());document.addEventListener("keydown",(event)=>{if(event.key==="Escape")closeMobileSidebar()});sidebar.addEventListener("click",(event)=>{const target=event.target instanceof Element?event.target.closest("a[href]"):null;if(target)closeMobileSidebar()});closeMobileSidebar()};const initSidebarScroll=()=>{const sidebar=getSidebar();if(!sidebar)return;const key="farmdocs:sidebar-scroll:"+location.origin;const getStorage=()=>{try{return window.sessionStorage}catch{return null}};const readSaved=()=>{try{const raw=getStorage()?.getItem(key);if(!raw)return null;const parsed=JSON.parse(raw);return parsed&&typeof parsed==="object"?parsed:null}catch{return null}};const save=(path=location.pathname)=>{try{getStorage()?.setItem(key,JSON.stringify({path,scrollTop:sidebar.scrollTop}))}catch{}};const saved=readSaved();if(saved?.path===location.pathname&&Number.isFinite(Number(saved.scrollTop)))sidebar.scrollTop=Number(saved.scrollTop);ensureActiveVisible();save();sidebar.addEventListener("scroll",()=>save(),{passive:true});sidebar.addEventListener("click",(event)=>{const target=event.target instanceof Element?event.target.closest("a[href]"):null;if(!target)return;try{save(new URL(target.href,location.href).pathname)}catch{save()}});window.addEventListener("beforeunload",()=>save())};let navigateController=null;const getPageKey=(root)=>{const article=root.getElementById("nd-page");if(!article)return"";return article.querySelector("h1")?.textContent?.trim()||article.textContent?.replace(/\\s+/g," ").trim().slice(0,160)||""};const swapDocsPage=(html,url)=>{const nextDoc=new DOMParser().parseFromString(html,"text/html");const nextArticle=nextDoc.getElementById("nd-page");const currentArticle=document.getElementById("nd-page");if(!nextArticle||!currentArticle)return false;const nextKey=getPageKey(nextDoc);const importedArticle=document.importNode(nextArticle,true);currentArticle.replaceWith(importedArticle);const renderedArticle=document.getElementById("nd-page");if(!renderedArticle||renderedArticle===currentArticle||(nextKey&&getPageKey(document)!==nextKey))return false;const nextToc=nextDoc.getElementById("nd-toc");const currentToc=document.getElementById("nd-toc");if(nextToc&&currentToc)currentToc.replaceWith(document.importNode(nextToc,true));reconcileDocsHead(nextDoc);setSidebarActive(url.pathname);initToc();closeMobileSidebar();return true};const navigateDocs=async(url,{replace=false,scroll=true}={})=>{if(!isDocsPath(url.pathname))return false;if(navigateController)navigateController.abort();const controller=new AbortController();navigateController=controller;document.documentElement.dataset.farmDocsNavigating="true";try{const response=await fetch(url.href,{cache:"no-store",headers:{accept:"text/html","x-farm-docs-navigate":"1"},signal:controller.signal});if(!response.ok||!((response.headers.get("content-type")||"").includes("text/html")))return false;const html=await response.text();if(!swapDocsPage(html,url))return false;if(replace)history.replaceState({farmDocs:true},"",url.href);else history.pushState({farmDocs:true},"",url.href);if(scroll){if(url.hash){let id=url.hash.slice(1);try{id=decodeURIComponent(id)}catch{}document.getElementById(id)?.scrollIntoView({block:"start"})}else window.scrollTo({top:0,left:0})}return true}catch(error){if(error?.name==="AbortError")return true;return false}finally{if(navigateController===controller){delete document.documentElement.dataset.farmDocsNavigating;navigateController=null}}};const initClientNavigation=()=>{document.addEventListener("click",(event)=>{if(event.defaultPrevented||event.button!==0||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey)return;const target=event.target instanceof Element?event.target.closest("a[href]"):null;if(!target||target.target||target.hasAttribute("download"))return;let url;try{url=new URL(target.href,location.href)}catch{return}if(url.origin!==location.origin||!isDocsPath(url.pathname))return;if(normalizePath(url.pathname)===normalizePath(location.pathname)&&url.hash)return;event.preventDefault();navigateDocs(url).then((handled)=>{if(!handled)location.href=url.href})});window.addEventListener("popstate",()=>{navigateDocs(new URL(location.href),{replace:true,scroll:false}).then((handled)=>{if(!handled)location.reload()})})};const init=()=>{initToc();initMobileSidebar();initSidebarScroll();initClientNavigation()};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",init,{once:true});else init()})();</script>`;
1812
+ }
1813
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsRuntimeScript, "renderDocsRuntimeScript");
1814
+ function renderDocsPageActionsRuntimeScript() {
1815
+ return `<script>(()=>{if(window.__farmDocsPageActionsRuntime)return;window.__farmDocsPageActionsRuntime=true;const readArticleText=()=>{const article=document.getElementById("nd-page");if(!article)return"";const clone=article.cloneNode(true);if(!(clone instanceof HTMLElement))return article.innerText||"";clone.querySelectorAll("[data-page-actions],.fd-page-footer,.fd-page-nav").forEach((node)=>node.remove());return clone.innerText||""};const withTitle=(content,format,includeTitle)=>{if(!includeTitle)return content;const title=document.querySelector("#nd-page h1")?.textContent?.trim()||document.title.trim();if(!title)return content;const trimmed=content.trimStart();if(trimmed.startsWith(title)||trimmed.startsWith("# "+title))return content;return format==="markdown"?"# "+title+"\\n\\n"+content:title+"\\n\\n"+content};const writeClipboard=async(text)=>{if(navigator.clipboard?.writeText){try{await navigator.clipboard.writeText(text);return}catch{}}const textarea=document.createElement("textarea");textarea.value=text;textarea.setAttribute("readonly","");textarea.style.position="fixed";textarea.style.opacity="0";textarea.style.pointerEvents="none";document.body.appendChild(textarea);textarea.select();document.execCommand("copy");textarea.remove()};const markCopied=(button)=>{const label=button.querySelector("[data-page-action-label]");button.dataset.copied="true";button.setAttribute("aria-label",button.dataset.copiedLabel||"Copied!");button.title=button.dataset.copiedLabel||"Copied!";if(label)label.textContent=button.dataset.copiedLabel||"Copied!";const previous=Number(button.dataset.copyTimeout||0);if(previous)clearTimeout(previous);button.dataset.copyTimeout=String(setTimeout(()=>{button.dataset.copied="false";button.setAttribute("aria-label",button.dataset.copyLabel||"Copy page");button.title=button.dataset.copyLabel||"Copy page";if(label)label.textContent=button.dataset.copyLabel||"Copy page";button.dataset.copyTimeout="0"},4500))};const markCodeCopied=(button)=>{button.dataset.copied="true";button.setAttribute("aria-label","Copied");button.title="Copied";const previous=Number(button.dataset.copyTimeout||0);if(previous)clearTimeout(previous);button.dataset.copyTimeout=String(setTimeout(()=>{button.dataset.copied="false";button.setAttribute("aria-label","Copy code");button.title="Copy code";button.dataset.copyTimeout="0"},4500))};document.addEventListener("click",async(event)=>{const source=event.target instanceof Element?event.target:null;const codeButton=source?.closest("[data-code-copy]");if(codeButton instanceof HTMLButtonElement){event.preventDefault();const code=codeButton.closest("figure")?.querySelector("code");if(!(code instanceof HTMLElement))return;const content=code.innerText||code.textContent||"";if(!content)return;await writeClipboard(content);markCodeCopied(codeButton);return}const target=source?.closest('[data-page-action="copy-markdown"]');if(!(target instanceof HTMLButtonElement))return;event.preventDefault();const format=target.dataset.copyMarkdownFormat==="text"?"text":"markdown";const includeTitle=target.dataset.copyMarkdownIncludeTitle==="true";let content="";target.disabled=true;try{if(format==="markdown"&&target.dataset.markdownUrl){try{const response=await fetch(target.dataset.markdownUrl,{headers:{Accept:"text/markdown"}});if(response.ok)content=await response.text()}catch{}}if(!content)content=readArticleText();content=withTitle(content,format,includeTitle);if(content.trim()){await writeClipboard(content);markCopied(target)}}finally{target.disabled=false}})})();</script>`;
1816
+ }
1817
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsPageActionsRuntimeScript, "renderDocsPageActionsRuntimeScript");
1818
+ function renderDocsHashRuntimeScript() {
1819
+ return `<script>(()=>{if(window.__farmDocsHashRuntime)return;window.__farmDocsHashRuntime=true;const scrollToHash=()=>{if(!location.hash)return;let id=location.hash.slice(1);try{id=decodeURIComponent(id)}catch{}document.getElementById(id)?.scrollIntoView({block:"start"})};const schedule=()=>requestAnimationFrame(()=>requestAnimationFrame(scrollToHash));if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",schedule,{once:true});else schedule();window.addEventListener("load",schedule,{once:true});window.addEventListener("hashchange",schedule)})();</script>`;
1820
+ }
1821
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsHashRuntimeScript, "renderDocsHashRuntimeScript");
1822
+ function renderDocsRuntimeScripts(docs) {
1823
+ return `${renderDocsRuntimeScript(docs)}
1824
+ ${renderDocsHashRuntimeScript()}
1825
+ ${renderDocsPageActionsRuntimeScript()}`;
1826
+ }
1827
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderDocsRuntimeScripts, "renderDocsRuntimeScripts");
1828
+ function renderFarmDocsFontPreloads(fontAssets) {
1829
+ return fontAssets.map(
1830
+ ({ url }) => `<link rel="preload" href="${escapeAttribute(url)}" as="font" type="font/woff2" crossorigin>`
1831
+ ).join("\n ");
1832
+ }
1833
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsFontPreloads, "renderFarmDocsFontPreloads");
1834
+ function renderFarmDocsFontPreloadHeader(fontAssets) {
1835
+ return fontAssets.map(({ url }) => `<${url}>; rel=preload; as=font; type=font/woff2; crossorigin`).join(", ");
1836
+ }
1837
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmDocsFontPreloadHeader, "renderFarmDocsFontPreloadHeader");
1838
+ function getFarmLayoutFontPreloads(layoutFonts) {
1839
+ const seen = /* @__PURE__ */ new Set();
1840
+ return [_optionalChain([layoutFonts, 'optionalAccess', _76 => _76.body]), _optionalChain([layoutFonts, 'optionalAccess', _77 => _77.code])].flatMap(
1841
+ (font) => (_optionalChain([font, 'optionalAccess', _78 => _78.preloads]) || []).filter(({ href }) => {
1842
+ if (seen.has(href)) return false;
1843
+ seen.add(href);
1844
+ return true;
1845
+ })
1846
+ );
1847
+ }
1848
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmLayoutFontPreloads, "getFarmLayoutFontPreloads");
1849
+ function renderFarmLayoutFontPreloadHeader(layoutFonts) {
1850
+ return getFarmLayoutFontPreloads(layoutFonts).map(({ href, type }) => `<${href}>; rel=preload; as=font; type=${type}; crossorigin`).join(", ");
1851
+ }
1852
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderFarmLayoutFontPreloadHeader, "renderFarmLayoutFontPreloadHeader");
1853
+ function renderPixelDocsHtml(page, pages, docs, clientEntry, faviconHref, requestUrl, fontAssets, fontStylesheetHref, globalStylesheetHref) {
1854
+ const navTitle = typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Docs") : "Docs";
1855
+ const description = page.description || _optionalChain([docs, 'access', _79 => _79.config, 'access', _80 => _80.metadata, 'optionalAccess', _81 => _81.description]) || "";
1856
+ const renderedMarkdown = renderMarkdownDocument(page.body, getThemeTocDepth(docs));
1857
+ const tocItems = renderedMarkdown.tocItems;
1858
+ const themeName = getThemeName(docs);
1859
+ const searchEnabled = _chunkMWWVKDW3cjs.isFarmDocsSearchEnabled.call(void 0, docs);
1860
+ const socialMetadata = isFarmDocsSocialImageEnabled(page, docs) ? renderFarmDocsSocialMetadata(
1861
+ createFarmDocsSocialImageDescriptor(page, docs, requestUrl),
1862
+ getFarmDocsCustomSocialImage(page)
1863
+ ) : "";
1864
+ return `<!DOCTYPE html>
1865
+ <html class="dark" lang="en" data-docs-theme="${escapeAttribute(themeName)}">
1866
+ <head>
1867
+ <meta charset="utf-8">
1868
+ <meta name="viewport" content="width=device-width, initial-scale=1">
1869
+ <meta name="generator" content="@farming-labs/docs via Farm.js">
1870
+ <title>${escapeHtml(page.title)}</title>
1871
+ ${renderFarmDocsFaviconLink(faviconHref)}
1872
+ ${renderFarmDocsFontPreloads(fontAssets)}
1873
+ ${fontStylesheetHref ? `<link rel="stylesheet" href="${escapeAttribute(fontStylesheetHref)}">` : ""}
1874
+ ${globalStylesheetHref ? `<link rel="stylesheet" href="${escapeAttribute(globalStylesheetHref)}">` : ""}
1875
+ ${description ? `<meta name="description" content="${escapeHtml(description)}">` : ""}
1876
+ ${socialMetadata}
1877
+ ${searchEnabled ? renderDocsSearchBootstrapScript() : ""}
1878
+ </head>
1879
+ <body>
1880
+ <div id="nd-docs-layout" class="fd-layout" data-fd-framework="farmjs">
1881
+ <header class="mobile-topbar fd-header" aria-label="Mobile docs navigation">
1882
+ <button class="fd-mobile-nav-btn fd-menu-btn" type="button" data-sidebar-toggle aria-controls="nd-sidebar" aria-expanded="false" aria-label="Open menu">
1883
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
1884
+ </button>
1885
+ <a class="fd-header-title" href="/">${escapeHtml(navTitle)}</a>
1886
+ <div class="mobile-topbar-actions">
1887
+ ${searchEnabled ? renderDocsSearchTrigger(true, "fd-search-trigger-mobile") : ""}
1888
+ <a class="mobile-topbar-link" href="/llms.txt">llms.txt</a>
1889
+ </div>
1890
+ </header>
1891
+ <aside id="nd-sidebar" class="fd-sidebar">
1892
+ <div class="sidebar-brand fd-sidebar-header">
1893
+ <a class="fd-sidebar-title" href="/">${renderFarmDocsBrandMark()}${renderFarmDocsBrandTitle(navTitle)}</a>
1894
+ <span>/ docs</span>
1895
+ </div>
1896
+ ${searchEnabled ? `<div class="fd-sidebar-search">${renderDocsSearchTrigger(true, "fd-sidebar-search-btn")}</div>` : ""}
1897
+ ${renderPixelNavItems(pages, page.href, docs)}
1898
+ </aside>
1899
+ <div class="sidebar-backdrop fd-sidebar-overlay" data-sidebar-backdrop></div>
1900
+ <main class="fd-main">
1901
+ <div class="fd-page">
1902
+ <article id="nd-page" class="prose fd-page-article fd-page-body fd-docs-content">
1903
+ ${renderPixelBreadcrumb(page, docs)}
1904
+ ${renderMarkdownHtmlWithTitleMeta(page, docs, renderedMarkdown.html)}
1905
+ ${renderPixelPageFooter(page, docs)}
1906
+ ${renderPixelPageNav(pages, page.href, docs)}
1907
+ </article>
1908
+ <nav id="nd-toc" class="fd-toc sticky top-(--fd-docs-row-1) h-[calc(var(--fd-docs-height)-var(--fd-docs-row-1))] flex flex-col [grid-area:toc] w-(--fd-toc-width) pt-12 pe-4 pb-2 max-xl:hidden" data-toc aria-labelledby="toc-title">
1909
+ <div class="fd-toc-inner">
1910
+ <h3 id="toc-title" class="fd-toc-title inline-flex items-center gap-1.5 text-sm text-fd-muted-foreground"><svg class="size-4" viewBox="0 0 24 24" aria-hidden="true" focusable="false" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"></path><path d="M4 12h16"></path><path d="M4 17h16"></path></svg>On this page</h3>
1911
+ <div class="toc-scroll">
1912
+ ${renderPixelToc(tocItems)}
1913
+ </div>
1914
+ </div>
1915
+ </nav>
1916
+ </div>
1917
+ </main>
1918
+ </div>
1919
+ ${searchEnabled ? renderDocsSearchMount(clientEntry) : ""}
1920
+ ${renderDocsRuntimeScripts(docs)}
1921
+ </body>
1922
+ </html>`;
1923
+ }
1924
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderPixelDocsHtml, "renderPixelDocsHtml");
1925
+ function createFarmDocsHandler(docs, options) {
1926
+ const faviconHref = resolveFarmDocsFavicon(docs, options);
1927
+ const fontAssets = _nullishCoalesce(options.fontAssets, () => ( _chunkHREOKQWTcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkHREOKQWTcjs.resolveFarmDocsFontAssets.call(void 0, options.root))));
1928
+ const fallbackFontPreloadHeader = renderFarmDocsFontPreloadHeader(fontAssets);
1929
+ return /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async function handleFarmDocsRequest(request) {
1930
+ if (!_optionalChain([docs, 'optionalAccess', _82 => _82.enabled]) || request.method !== "GET" && request.method !== "HEAD") return null;
1931
+ await _chunkIK6LVLKCcjs.loadFarmDocsEngine.call(void 0, );
1932
+ const contentDir = resolveFarmDocsContentDir(docs, options);
1933
+ const requestUrl = new URL(request.url);
1934
+ const socialImageSlug = getFarmDocsSocialImageSlug(docs, requestUrl);
1935
+ if (socialImageSlug !== null) {
1936
+ const socialImagePage = loadFarmDocsPage(contentDir, docs, socialImageSlug);
1937
+ if (!socialImagePage || !isFarmDocsSocialImageEnabled(socialImagePage, docs) || getFarmDocsCustomSocialImage(socialImagePage)) {
1938
+ return null;
1939
+ }
1940
+ const descriptor = createFarmDocsSocialImageDescriptor(socialImagePage, docs, requestUrl);
1941
+ if (requestUrl.pathname !== descriptor.imagePath) return null;
1942
+ const etag = `"${descriptor.hash}"`;
1943
+ const immutable = requestUrl.searchParams.get("v") === descriptor.hash;
1944
+ const headers = new Headers({
1945
+ "Content-Type": "image/svg+xml; charset=utf-8",
1946
+ "Cache-Control": immutable ? "public, max-age=31536000, immutable" : "public, max-age=0, must-revalidate",
1947
+ ETag: etag,
1948
+ "X-Content-Type-Options": "nosniff"
1949
+ });
1950
+ if (_chunkKIIMAWOJcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), etag)) {
1951
+ return new Response(null, { status: 304, headers });
1952
+ }
1953
+ if (request.method === "HEAD") return new Response(null, { status: 200, headers });
1954
+ return new Response(renderFarmDocsSocialImageSvg(descriptor), { status: 200, headers });
1955
+ }
1956
+ const publicResponse = createFarmDocsPublicResponse(contentDir, docs, request);
1957
+ if (publicResponse) return omitFarmDocsHeadBody(request, publicResponse);
1958
+ if (!isFarmDocsRequest(docs, request)) return null;
1959
+ const page = loadPage(contentDir, docs, request);
1960
+ if (!page) return null;
1961
+ const negotiatesAccept = !requestUrl.pathname.endsWith(".md");
1962
+ if (shouldReturnMarkdown(request)) {
1963
+ const origin = new URL(request.url).origin;
1964
+ return omitFarmDocsHeadBody(
1965
+ request,
1966
+ new Response(
1967
+ _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(toFarmDocsMarkdownPage(page), {
1968
+ origin,
1969
+ llms: _nullishCoalesce(docs.config.llmsTxt, () => ( true)),
1970
+ sitemap: docs.config.sitemap
1971
+ }),
1972
+ {
1973
+ status: 200,
1974
+ headers: {
1975
+ "Content-Type": "text/markdown; charset=utf-8",
1976
+ "Cache-Control": "public, max-age=60",
1977
+ ...negotiatesAccept ? { Vary: "Accept" } : {}
1978
+ }
1979
+ }
1980
+ )
1981
+ );
1982
+ }
1983
+ const pathname = new URL(request.url).pathname;
1984
+ const layoutFonts = await _optionalChain([options, 'access', _83 => _83.resolveLayoutFonts, 'optionalCall', _84 => _84(pathname)]);
1985
+ const usesLayoutFonts = Boolean(_optionalChain([layoutFonts, 'optionalAccess', _85 => _85.body]) || _optionalChain([layoutFonts, 'optionalAccess', _86 => _86.code]));
1986
+ const activeFontAssets = usesLayoutFonts ? [] : fontAssets;
1987
+ const fontPreloadHeader = usesLayoutFonts ? renderFarmLayoutFontPreloadHeader(layoutFonts) : fallbackFontPreloadHeader;
1988
+ return omitFarmDocsHeadBody(
1989
+ request,
1990
+ new Response(
1991
+ renderPixelDocsHtml(
1992
+ page,
1993
+ discoverFarmDocsPages(contentDir, docs),
1994
+ docs,
1995
+ options.clientEntry || "/farm-client.js",
1996
+ faviconHref,
1997
+ requestUrl,
1998
+ activeFontAssets,
1999
+ usesLayoutFonts ? options.fontStylesheetHref : void 0,
2000
+ options.globalStylesheetHref
2001
+ ),
2002
+ {
2003
+ status: 200,
2004
+ headers: {
2005
+ "Content-Type": "text/html; charset=utf-8",
2006
+ "Cache-Control": "public, s-maxage=60, stale-while-revalidate=300",
2007
+ Vary: "Accept",
2008
+ ...fontPreloadHeader ? { Link: fontPreloadHeader } : {}
2009
+ }
2010
+ }
2011
+ )
2012
+ );
2013
+ }, "handleFarmDocsRequest");
2014
+ }
2015
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDocsHandler, "createFarmDocsHandler");
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+
2027
+
2028
+ exports.FARM_DOCS_LAST_MODIFIED_MANIFEST = FARM_DOCS_LAST_MODIFIED_MANIFEST; exports.createFarmDocsLastModifiedManifest = createFarmDocsLastModifiedManifest; exports.isFarmDocsRequest = isFarmDocsRequest; exports.resolveFarmDocsContentDir = resolveFarmDocsContentDir; exports.getFarmDocsRouteTypeEntries = getFarmDocsRouteTypeEntries; exports.getFarmDocsDocumentNavigationMatchers = getFarmDocsDocumentNavigationMatchers; exports.loadFarmDocsPage = loadFarmDocsPage; exports.discoverFarmDocsPages = discoverFarmDocsPages; exports.toFarmDocsMarkdownPage = toFarmDocsMarkdownPage; exports.createFarmDocsHandler = createFarmDocsHandler;