@farm.js/core 0.1.17 → 0.1.19

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 (269) hide show
  1. package/dist/after.cjs +12 -225
  2. package/dist/agent-runtime.cjs +83 -2800
  3. package/dist/api/client.cjs +17 -4060
  4. package/dist/api/route-manager.cjs +34 -4354
  5. package/dist/api/runtime.cjs +29 -2696
  6. package/dist/api.cjs +88 -8434
  7. package/dist/app-markdown.cjs +39 -280
  8. package/dist/app-markdown.mjs +3 -3
  9. package/dist/cache.cjs +38 -1560
  10. package/dist/chunk-22GUSVNJ.cjs +351 -0
  11. package/dist/{chunk-EN7WTEAY.mjs → chunk-2ANEVVF7.mjs} +1 -1
  12. package/dist/chunk-2CQ74SP6.cjs +13 -0
  13. package/dist/{chunk-YD4J4XCI.mjs → chunk-2GNATDDE.mjs} +1 -1
  14. package/dist/chunk-2SJ4RQ6P.cjs +57 -0
  15. package/dist/chunk-3376ZTRC.cjs +1 -0
  16. package/dist/chunk-4PNUXIVU.cjs +472 -0
  17. package/dist/chunk-4PPEPOZZ.cjs +21 -0
  18. package/dist/chunk-4ZFL5GFN.cjs +520 -0
  19. package/dist/chunk-5OVTOKGH.cjs +65 -0
  20. package/dist/chunk-5QIKR7RR.cjs +224 -0
  21. package/dist/chunk-5ZSWG4UX.cjs +127 -0
  22. package/dist/chunk-62YJ2IEB.cjs +238 -0
  23. package/dist/chunk-6EODJYCX.cjs +183 -0
  24. package/dist/chunk-6EXBPJ24.cjs +434 -0
  25. package/dist/chunk-6QQDAAAZ.cjs +38 -0
  26. package/dist/chunk-6V4TDWEC.cjs +455 -0
  27. package/dist/chunk-72ADZ6GQ.cjs +19 -0
  28. package/dist/chunk-75BRBIFP.cjs +172 -0
  29. package/dist/{chunk-ZCNJKLA2.mjs → chunk-7BC6GAL7.mjs} +1 -1
  30. package/dist/chunk-7W3CPVXS.cjs +24 -0
  31. package/dist/chunk-A6WIQH5Z.cjs +31 -0
  32. package/dist/chunk-A777V5WU.cjs +725 -0
  33. package/dist/chunk-AFOD3LYZ.cjs +377 -0
  34. package/dist/chunk-AH7HOAQ3.cjs +151 -0
  35. package/dist/chunk-AMDMVWMI.cjs +39 -0
  36. package/dist/chunk-AORPIPNB.cjs +552 -0
  37. package/dist/chunk-ARJWXNQL.cjs +256 -0
  38. package/dist/chunk-AYJR42WX.cjs +711 -0
  39. package/dist/chunk-BBVSJVBZ.cjs +600 -0
  40. package/dist/chunk-BIDYX3SL.cjs +91 -0
  41. package/dist/chunk-BYODCJD6.cjs +663 -0
  42. package/dist/chunk-C3VRMB6H.cjs +85 -0
  43. package/dist/chunk-C5GUTBZK.cjs +173 -0
  44. package/dist/chunk-CIAGU2X4.cjs +337 -0
  45. package/dist/chunk-CMGMGHUZ.cjs +27 -0
  46. package/dist/chunk-CXP5U3RW.cjs +54 -0
  47. package/dist/chunk-D2ULAULS.cjs +166 -0
  48. package/dist/chunk-D7JTOLFK.cjs +285 -0
  49. package/dist/chunk-DVM4FKZL.cjs +169 -0
  50. package/dist/chunk-DYEJQTDN.cjs +49 -0
  51. package/dist/chunk-E2ROOWQC.cjs +2225 -0
  52. package/dist/chunk-E3UK5IIB.cjs +593 -0
  53. package/dist/chunk-EM6SBQKM.cjs +470 -0
  54. package/dist/chunk-FJSWYIR7.cjs +482 -0
  55. package/dist/chunk-FK6GO24V.cjs +54 -0
  56. package/dist/{chunk-MVIWBEJF.mjs → chunk-FVZGEVTO.mjs} +7 -7
  57. package/dist/chunk-FXUUWYAX.cjs +654 -0
  58. package/dist/chunk-G3HRIVEY.cjs +395 -0
  59. package/dist/chunk-G643DQCH.cjs +13 -0
  60. package/dist/chunk-G7HXGLEC.cjs +175 -0
  61. package/dist/chunk-GDSHDTJ4.cjs +152 -0
  62. package/dist/chunk-GPVTX3HT.cjs +1415 -0
  63. package/dist/chunk-H6G5INWM.cjs +1094 -0
  64. package/dist/{chunk-DHDVMXYK.mjs → chunk-HALDNTIV.mjs} +30 -4
  65. package/dist/chunk-HBTUGXHS.cjs +180 -0
  66. package/dist/chunk-HREOKQWT.cjs +45 -0
  67. package/dist/{chunk-5QOEPUYE.mjs → chunk-HSDL2AUR.mjs} +1 -1
  68. package/dist/chunk-I4J452B7.cjs +435 -0
  69. package/dist/chunk-I57LW5VZ.cjs +94 -0
  70. package/dist/chunk-I5YBCWQ6.cjs +40 -0
  71. package/dist/chunk-I7PUUDGY.cjs +389 -0
  72. package/dist/chunk-IAMRBF3Z.cjs +86 -0
  73. package/dist/chunk-IQXFRNY2.cjs +169 -0
  74. package/dist/chunk-ISTFC3MZ.cjs +1357 -0
  75. package/dist/chunk-IXTFU4PL.cjs +2355 -0
  76. package/dist/chunk-J3LOGE4T.cjs +42 -0
  77. package/dist/chunk-J7FSKED3.cjs +93 -0
  78. package/dist/chunk-JDNHKPTD.cjs +22 -0
  79. package/dist/chunk-JSROZYYO.cjs +164 -0
  80. package/dist/chunk-K6FNHVDR.cjs +696 -0
  81. package/dist/chunk-KGZIORNL.cjs +43 -0
  82. package/dist/chunk-KR6CKSXT.cjs +15 -0
  83. package/dist/chunk-KROWKCUH.cjs +185 -0
  84. package/dist/chunk-KVFPGF2M.cjs +46 -0
  85. package/dist/{chunk-TNBAYAWO.mjs → chunk-L4DVIHOC.mjs} +1 -1
  86. package/dist/chunk-LCCBO7PJ.cjs +46 -0
  87. package/dist/chunk-LIUGYUX3.cjs +22 -0
  88. package/dist/chunk-LTNGXMQ6.cjs +55 -0
  89. package/dist/chunk-M2L4MYDQ.cjs +14 -0
  90. package/dist/chunk-MCJLA63J.cjs +1 -0
  91. package/dist/chunk-MKB2EGIR.cjs +148 -0
  92. package/dist/chunk-MQ3H6LT5.cjs +202 -0
  93. package/dist/chunk-MT763TDW.cjs +43 -0
  94. package/dist/{chunk-XWAYMDLB.mjs → chunk-MVUREHPN.mjs} +1 -1
  95. package/dist/chunk-MWSK6C4J.cjs +18 -0
  96. package/dist/chunk-MWWVKDW3.cjs +169 -0
  97. package/dist/{chunk-6VQIKZZO.mjs → chunk-N255VYFP.mjs} +1 -1
  98. package/dist/chunk-NBAHDVOJ.cjs +2040 -0
  99. package/dist/chunk-NO3WWW3N.cjs +192 -0
  100. package/dist/chunk-NSFC3LHB.cjs +10244 -0
  101. package/dist/chunk-NZKJGRB3.cjs +230 -0
  102. package/dist/chunk-OAVTUMJP.cjs +1496 -0
  103. package/dist/{chunk-SXHV42UQ.mjs → chunk-OFEY6KHO.mjs} +88 -13
  104. package/dist/chunk-OHY2ZWUG.cjs +25 -0
  105. package/dist/chunk-OI6CMLWX.cjs +47 -0
  106. package/dist/chunk-OWOUTKIJ.cjs +558 -0
  107. package/dist/chunk-OX6O6WVA.cjs +74 -0
  108. package/dist/chunk-OXSIH4D6.cjs +476 -0
  109. package/dist/chunk-OYDRPBBV.cjs +453 -0
  110. package/dist/chunk-OYEUREB6.cjs +35 -0
  111. package/dist/chunk-PCOTGFSM.cjs +139 -0
  112. package/dist/{chunk-76DG3LF3.mjs → chunk-PGQBL5DN.mjs} +1 -1
  113. package/dist/chunk-PZYCPSCC.cjs +35 -0
  114. package/dist/chunk-QBK2AA4U.cjs +445 -0
  115. package/dist/{chunk-UTBVHYS3.mjs → chunk-QBPKKQTD.mjs} +2 -2
  116. package/dist/chunk-QBPXNZGV.cjs +487 -0
  117. package/dist/chunk-QNPEUFHQ.cjs +27 -0
  118. package/dist/chunk-QZRVZSPN.cjs +236 -0
  119. package/dist/chunk-R5A5KNVX.cjs +20 -0
  120. package/dist/chunk-R5JIFR6B.cjs +42 -0
  121. package/dist/chunk-R6AIILII.cjs +193 -0
  122. package/dist/chunk-RFYO7QUD.cjs +9 -0
  123. package/dist/chunk-RG3ZOTG5.cjs +34 -0
  124. package/dist/chunk-ROUTX2E5.cjs +390 -0
  125. package/dist/chunk-RTHIVJ2G.cjs +54 -0
  126. package/dist/chunk-S27FMYAM.cjs +644 -0
  127. package/dist/chunk-S3A45T7F.cjs +166 -0
  128. package/dist/chunk-S3JO3N4H.cjs +17 -0
  129. package/dist/chunk-SK35NQKK.cjs +27 -0
  130. package/dist/chunk-SU7MH53P.cjs +180 -0
  131. package/dist/chunk-SVRTJOUF.cjs +113 -0
  132. package/dist/chunk-SWN467MP.cjs +18 -0
  133. package/dist/chunk-SYQ3MOWW.cjs +73 -0
  134. package/dist/chunk-T5CERMEH.cjs +417 -0
  135. package/dist/chunk-TFAXUHWX.cjs +206 -0
  136. package/dist/chunk-TIWHTW3Q.cjs +24 -0
  137. package/dist/chunk-TKJZFIML.cjs +20 -0
  138. package/dist/chunk-TKNSDBBN.cjs +193 -0
  139. package/dist/chunk-U4KT7QP3.cjs +23 -0
  140. package/dist/chunk-U5BMPGS3.cjs +862 -0
  141. package/dist/chunk-UJ2C4ICS.cjs +277 -0
  142. package/dist/chunk-UQZ4AYTH.cjs +168 -0
  143. package/dist/chunk-US2QVW3E.cjs +36 -0
  144. package/dist/{chunk-QGVJVSNX.mjs → chunk-V4AICMQA.mjs} +2 -2
  145. package/dist/chunk-VB6UCX3V.cjs +421 -0
  146. package/dist/chunk-VEKFLAQM.cjs +300 -0
  147. package/dist/chunk-VQDBNVOO.cjs +14 -0
  148. package/dist/chunk-W4E7WMXE.cjs +71 -0
  149. package/dist/chunk-WJ3HK3LJ.cjs +1102 -0
  150. package/dist/chunk-WMAPPDMM.cjs +28 -0
  151. package/dist/chunk-WMOGFOUJ.cjs +223 -0
  152. package/dist/chunk-WPYFSQKK.cjs +37 -0
  153. package/dist/{chunk-56DAX2BE.mjs → chunk-WZXN4R5Y.mjs} +24 -13
  154. package/dist/chunk-XDGMADQM.cjs +14225 -0
  155. package/dist/chunk-XGC343EY.cjs +443 -0
  156. package/dist/chunk-XSKZORAS.cjs +727 -0
  157. package/dist/chunk-XWAWFQFS.cjs +82 -0
  158. package/dist/chunk-Y4YMF2NQ.cjs +460 -0
  159. package/dist/chunk-Y4YWHNKU.cjs +250 -0
  160. package/dist/chunk-Y53ZSFN6.cjs +504 -0
  161. package/dist/chunk-YA6LLTIJ.cjs +411 -0
  162. package/dist/chunk-YFPGHF5F.cjs +202 -0
  163. package/dist/chunk-YJRZR7VU.cjs +28 -0
  164. package/dist/chunk-YTAABQEV.cjs +1 -0
  165. package/dist/chunk-YX3DBN4M.cjs +18 -0
  166. package/dist/chunk-YZTASLPQ.cjs +64 -0
  167. package/dist/chunk-Z5HIWVDP.cjs +2173 -0
  168. package/dist/chunk-ZEG3OPIB.cjs +93 -0
  169. package/dist/chunk-ZMN3H73H.cjs +155 -0
  170. package/dist/client/lifecycle.cjs +6 -35
  171. package/dist/client-plugins.cjs +7 -448
  172. package/dist/client.cjs +171 -9808
  173. package/dist/config.cjs +8 -36
  174. package/dist/cron.cjs +24 -491
  175. package/dist/deferred.cjs +26 -475
  176. package/dist/deployment.cjs +39 -210
  177. package/dist/devtools-5KGPDVKL.cjs +388 -0
  178. package/dist/{devtools-UFVTMQX5.mjs → devtools-FY5R7TQ4.mjs} +3 -3
  179. package/dist/devtools-client-4WAPJY5L.cjs +254 -0
  180. package/dist/devtools-ui-5GBDIGMK.cjs +1296 -0
  181. package/dist/docs.cjs +46 -5657
  182. package/dist/docs.mjs +5 -5
  183. package/dist/env-types.cjs +5 -226
  184. package/dist/env.cjs +21 -338
  185. package/dist/environment/vite.cjs +8 -372
  186. package/dist/environment.cjs +12 -94
  187. package/dist/font.cjs +13 -63
  188. package/dist/headers.cjs +7 -123
  189. package/dist/i18n/client.cjs +55 -294
  190. package/dist/i18n/index.cjs +22 -209
  191. package/dist/i18n/server.cjs +22 -745
  192. package/dist/image/server.cjs +13 -729
  193. package/dist/image/sharp.cjs +33 -171
  194. package/dist/image.cjs +41 -85
  195. package/dist/index.cjs +1151 -68080
  196. package/dist/index.mjs +14 -14
  197. package/dist/instrumentation.cjs +12 -138
  198. package/dist/integration-orm-55F7CII5.cjs +13 -0
  199. package/dist/integrations.cjs +55 -4090
  200. package/dist/internal/app-markdown-runtime.cjs +27 -224
  201. package/dist/internal/app-markdown-runtime.mjs +2 -2
  202. package/dist/internal/build-runtime.cjs +120 -52259
  203. package/dist/internal/build-runtime.mjs +13 -13
  204. package/dist/internal/cli-runtime.cjs +67 -13811
  205. package/dist/internal/cli-runtime.mjs +7 -7
  206. package/dist/internal/client-error-overlay.cjs +80 -733
  207. package/dist/internal/client-error-overlay.mjs +1 -1
  208. package/dist/internal/client-runtime.cjs +81 -913
  209. package/dist/internal/compression-runtime.cjs +8 -214
  210. package/dist/internal/config-runtime.cjs +42 -6547
  211. package/dist/internal/config-runtime.mjs +3 -3
  212. package/dist/internal/docs-precompiled-runtime.cjs +26 -46
  213. package/dist/internal/infra-analytics-runtime.cjs +10 -536
  214. package/dist/internal/isolated-boundary.cjs +14 -414
  215. package/dist/internal/metadata-image-runtime.cjs +7 -285
  216. package/dist/internal/product-telemetry-runtime.cjs +42 -97
  217. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  218. package/dist/internal/production-node-env.cjs +6 -63
  219. package/dist/internal/production-runtime.cjs +418 -7133
  220. package/dist/internal/production-runtime.mjs +3 -3
  221. package/dist/internal/request-cookies.cjs +6 -54
  222. package/dist/json-ld.cjs +24 -50
  223. package/dist/layers-E4WPJNY5.cjs +17 -0
  224. package/dist/manager-G4B2IPYE.cjs +14 -0
  225. package/dist/markdown.cjs +21 -547
  226. package/dist/markdown.mjs +1 -1
  227. package/dist/middleware.cjs +36 -2995
  228. package/dist/navigation.cjs +22 -2588
  229. package/dist/nitro-4I2MYLY2.cjs +652 -0
  230. package/dist/observability.cjs +22 -614
  231. package/dist/og.cjs +5 -28
  232. package/dist/plugin.cjs +106 -37442
  233. package/dist/plugin.mjs +9 -9
  234. package/dist/query/client.cjs +113 -449
  235. package/dist/query/index.cjs +26 -288
  236. package/dist/query/parsers.cjs +23 -247
  237. package/dist/query/server.cjs +36 -298
  238. package/dist/renderer/react/client.cjs +9 -43
  239. package/dist/renderer/react/server.cjs +40 -103
  240. package/dist/renderer/react/vite.cjs +7 -29
  241. package/dist/renderer-client.cjs +126 -4295
  242. package/dist/renderer.cjs +31 -249
  243. package/dist/request.cjs +5 -68
  244. package/dist/router.cjs +11 -474
  245. package/dist/routes.cjs +42 -2461
  246. package/dist/{schema-dev-notice-2IE2F2XI.mjs → schema-dev-notice-O67CPXJ6.mjs} +1 -1
  247. package/dist/schema-dev-notice-Y7MQEFGN.cjs +56 -0
  248. package/dist/schema.cjs +6 -33
  249. package/dist/search-client-G3RICOFU.cjs +13 -0
  250. package/dist/server-action-security.cjs +25 -541
  251. package/dist/server-fn-client.cjs +6 -337
  252. package/dist/server-fn.cjs +32 -1841
  253. package/dist/server-plugins.cjs +15 -884
  254. package/dist/server-query-client.cjs +15 -1883
  255. package/dist/server-query.cjs +16 -1838
  256. package/dist/server.cjs +296 -44681
  257. package/dist/server.mjs +11 -11
  258. package/dist/storage.cjs +57 -576
  259. package/dist/testing.cjs +89 -3186
  260. package/dist/theme/client.cjs +13 -108
  261. package/dist/theme/index.cjs +6 -68
  262. package/dist/theme/runtime.cjs +13 -78
  263. package/dist/theme/server.cjs +10 -179
  264. package/dist/version.cjs +4 -32
  265. package/dist/version.mjs +1 -1
  266. package/dist/vite.cjs +119 -37773
  267. package/dist/vite.mjs +9 -9
  268. package/dist/workflows.cjs +19 -1040
  269. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/client/document-head.ts
6
+ var FARM_NAVIGATION_HEAD_SELECTOR = [
7
+ "meta[name]",
8
+ "meta[property]",
9
+ "meta[http-equiv]",
10
+ "meta[charset]",
11
+ "meta[itemprop]",
12
+ 'link[rel~="author"]',
13
+ 'link[rel~="canonical"]',
14
+ 'link[rel~="alternate"]',
15
+ 'link[rel~="icon"]',
16
+ 'link[rel~="apple-touch-icon"]',
17
+ 'link[rel~="manifest"]',
18
+ 'link[rel~="search"]',
19
+ 'link[rel~="next"]',
20
+ 'link[rel~="prev"]',
21
+ 'link[rel~="publisher"]',
22
+ 'link[rel~="license"]',
23
+ 'link[rel~="help"]',
24
+ 'link[rel~="me"]',
25
+ 'link[rel~="pingback"]',
26
+ 'link[rel~="privacy-policy"]',
27
+ 'link[rel~="terms-of-service"]',
28
+ // Page and layout `metadata.jsonLd` (FARM_METADATA_ATTRIBUTE). The site-level
29
+ // agent JSON-LD and app-authored scripts carry no marker and stay in place.
30
+ 'script[type="application/ld+json"][data-farm-metadata]'
31
+ ].join(",");
32
+ function reconcileFarmDocumentHead(nextDocument) {
33
+ const nextTitle = nextDocument.querySelector("title");
34
+ document.title = _optionalChain([nextTitle, 'optionalAccess', _ => _.textContent]) || "";
35
+ document.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => node.remove());
36
+ nextDocument.head.querySelectorAll(FARM_NAVIGATION_HEAD_SELECTOR).forEach((node) => document.head.appendChild(document.importNode(node, true)));
37
+ }
38
+ _chunkS3JO3N4Hcjs.__name.call(void 0, reconcileFarmDocumentHead, "reconcileFarmDocumentHead");
39
+
40
+
41
+
42
+
43
+ exports.FARM_NAVIGATION_HEAD_SELECTOR = FARM_NAVIGATION_HEAD_SELECTOR; exports.reconcileFarmDocumentHead = reconcileFarmDocumentHead;
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/config-entry.ts
6
+ function defineConfig(config) {
7
+ return config;
8
+ }
9
+ _chunkS3JO3N4Hcjs.__name.call(void 0, defineConfig, "defineConfig");
10
+ var defineFarmConfig = defineConfig;
11
+
12
+
13
+
14
+
15
+ exports.defineConfig = defineConfig; exports.defineFarmConfig = defineFarmConfig;
@@ -0,0 +1,185 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/client/chunk-recovery.ts
6
+ var DEFAULT_MAX_AGE_MS = 3e4;
7
+ var STORAGE_KEY_PREFIX = "farm:chunk-recovery:";
8
+ var CHUNK_ERROR_PATTERNS = [
9
+ /ChunkLoadError/i,
10
+ /Loading chunk [\w-]+ failed/i,
11
+ /Loading CSS chunk [\w-]+ failed/i,
12
+ /CSS_CHUNK_LOAD_FAILED/i,
13
+ /failed to fetch dynamically imported module/i,
14
+ /error loading dynamically imported module/i,
15
+ /importing a module script failed/i,
16
+ /unable to preload CSS/i,
17
+ /module script failed/i
18
+ ];
19
+ function isChunkLoadError(errorLike) {
20
+ const values = collectErrorText(errorLike);
21
+ if (values.some((value) => CHUNK_ERROR_PATTERNS.some((pattern) => pattern.test(value)))) {
22
+ return true;
23
+ }
24
+ const targetUrl = getEventTargetAssetUrl(errorLike);
25
+ return Boolean(
26
+ targetUrl && /\.(?:m?js|css)(?:[?#].*)?$/i.test(targetUrl) && isSameOriginAssetUrl(targetUrl)
27
+ );
28
+ }
29
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isChunkLoadError, "isChunkLoadError");
30
+ function isSameOriginAssetUrl(url) {
31
+ if (typeof window === "undefined" || !window.location) {
32
+ return false;
33
+ }
34
+ try {
35
+ return new URL(url, window.location.href).origin === window.location.origin;
36
+ } catch (e) {
37
+ return false;
38
+ }
39
+ }
40
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isSameOriginAssetUrl, "isSameOriginAssetUrl");
41
+ function installChunkErrorRecovery(options = {}) {
42
+ if (typeof window === "undefined") {
43
+ return () => {
44
+ };
45
+ }
46
+ const recover = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (errorLike) => {
47
+ if (!isChunkLoadError(errorLike)) {
48
+ return;
49
+ }
50
+ if (!markRecovered(options)) {
51
+ return;
52
+ }
53
+ _optionalChain([options, 'access', _ => _.onRecover, 'optionalCall', _2 => _2(errorLike)]);
54
+ getReload(options)();
55
+ }, "recover");
56
+ const onError = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (event) => {
57
+ recover(getErrorEventPayload(event));
58
+ }, "onError");
59
+ const onUnhandledRejection = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (event) => {
60
+ recover(event.reason);
61
+ }, "onUnhandledRejection");
62
+ window.addEventListener("error", onError, true);
63
+ window.addEventListener("unhandledrejection", onUnhandledRejection);
64
+ return () => {
65
+ window.removeEventListener("error", onError, true);
66
+ window.removeEventListener("unhandledrejection", onUnhandledRejection);
67
+ };
68
+ }
69
+ _chunkS3JO3N4Hcjs.__name.call(void 0, installChunkErrorRecovery, "installChunkErrorRecovery");
70
+ function markRecovered(options) {
71
+ const now = getNow(options);
72
+ const maxAgeMs = _nullishCoalesce(options.maxAgeMs, () => ( DEFAULT_MAX_AGE_MS));
73
+ const storage = getStorage(options);
74
+ const key = getStorageKey(options);
75
+ if (!storage) {
76
+ return false;
77
+ }
78
+ try {
79
+ const previous = Number(storage.getItem(key));
80
+ if (Number.isFinite(previous) && previous > 0 && now - previous < maxAgeMs) {
81
+ return false;
82
+ }
83
+ storage.setItem(key, String(now));
84
+ return true;
85
+ } catch (e2) {
86
+ return false;
87
+ }
88
+ }
89
+ _chunkS3JO3N4Hcjs.__name.call(void 0, markRecovered, "markRecovered");
90
+ function getErrorEventPayload(event) {
91
+ if ("error" in event && event.error) {
92
+ return event.error;
93
+ }
94
+ if ("message" in event && event.message) {
95
+ return event.message;
96
+ }
97
+ return event;
98
+ }
99
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getErrorEventPayload, "getErrorEventPayload");
100
+ function collectErrorText(value, seen = /* @__PURE__ */ new Set()) {
101
+ if (value == null || seen.has(value)) {
102
+ return [];
103
+ }
104
+ seen.add(value);
105
+ if (typeof value === "string") {
106
+ return [value];
107
+ }
108
+ if (typeof value === "number" || typeof value === "boolean") {
109
+ return [String(value)];
110
+ }
111
+ if (typeof value !== "object") {
112
+ return [];
113
+ }
114
+ const record = value;
115
+ const output = [];
116
+ for (const key of ["name", "message", "code", "type", "request", "src", "href"]) {
117
+ const candidate = record[key];
118
+ if (typeof candidate === "string") {
119
+ output.push(candidate);
120
+ }
121
+ }
122
+ if ("reason" in record) {
123
+ output.push(...collectErrorText(record.reason, seen));
124
+ }
125
+ if ("error" in record) {
126
+ output.push(...collectErrorText(record.error, seen));
127
+ }
128
+ return output;
129
+ }
130
+ _chunkS3JO3N4Hcjs.__name.call(void 0, collectErrorText, "collectErrorText");
131
+ function getEventTargetAssetUrl(value) {
132
+ if (!value || typeof value !== "object") {
133
+ return void 0;
134
+ }
135
+ const target = value.target;
136
+ if (!target || typeof target !== "object") {
137
+ return void 0;
138
+ }
139
+ const tagName = typeof target.tagName === "string" ? target.tagName.toLowerCase() : "";
140
+ if (tagName !== "script" && tagName !== "link") {
141
+ return void 0;
142
+ }
143
+ return typeof target.src === "string" && target.src ? target.src : typeof target.href === "string" && target.href ? target.href : void 0;
144
+ }
145
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getEventTargetAssetUrl, "getEventTargetAssetUrl");
146
+ function getStorage(options) {
147
+ if ("storage" in options) {
148
+ return options.storage;
149
+ }
150
+ try {
151
+ return window.sessionStorage;
152
+ } catch (e3) {
153
+ return null;
154
+ }
155
+ }
156
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getStorage, "getStorage");
157
+ function getStorageKey(options) {
158
+ if (options.storageKey) {
159
+ return options.storageKey;
160
+ }
161
+ const location = getLocation(options);
162
+ return `${STORAGE_KEY_PREFIX}${location.pathname}${location.search}`;
163
+ }
164
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getStorageKey, "getStorageKey");
165
+ function getLocation(options) {
166
+ return _nullishCoalesce(options.location, () => ( window.location));
167
+ }
168
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getLocation, "getLocation");
169
+ function getReload(options) {
170
+ if (options.reload) {
171
+ return options.reload;
172
+ }
173
+ const location = getLocation(options);
174
+ return () => location.reload();
175
+ }
176
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getReload, "getReload");
177
+ function getNow(options) {
178
+ return options.now ? options.now() : Date.now();
179
+ }
180
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getNow, "getNow");
181
+
182
+
183
+
184
+
185
+ exports.isChunkLoadError = isChunkLoadError; exports.installChunkErrorRecovery = installChunkErrorRecovery;
@@ -0,0 +1,46 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk62YJ2IEBcjs = require('./chunk-62YJ2IEB.cjs');
4
+
5
+
6
+ var _chunkWJ3HK3LJcjs = require('./chunk-WJ3HK3LJ.cjs');
7
+
8
+
9
+ var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
10
+
11
+
12
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
13
+
14
+ // src/navigation.ts
15
+ function useRouter2() {
16
+ const router = _chunk62YJ2IEBcjs.useRouter.call(void 0, );
17
+ return {
18
+ push: router.push,
19
+ replace: router.replace,
20
+ back: router.back,
21
+ forward: router.forward,
22
+ refresh() {
23
+ if (typeof window === "undefined") return Promise.resolve();
24
+ return _chunkWJ3HK3LJcjs.getRouter.call(void 0, ).refresh();
25
+ },
26
+ prefetch(href) {
27
+ if (typeof window === "undefined") return Promise.resolve();
28
+ return _chunkWJ3HK3LJcjs.getRouter.call(void 0, ).prefetch(_chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href));
29
+ }
30
+ };
31
+ }
32
+ _chunkS3JO3N4Hcjs.__name.call(void 0, useRouter2, "useRouter");
33
+ function usePathname() {
34
+ return _chunk62YJ2IEBcjs.useRouter.call(void 0, ).pathname;
35
+ }
36
+ _chunkS3JO3N4Hcjs.__name.call(void 0, usePathname, "usePathname");
37
+ function useSearchParams() {
38
+ return _chunk62YJ2IEBcjs.useRouter.call(void 0, ).searchParams;
39
+ }
40
+ _chunkS3JO3N4Hcjs.__name.call(void 0, useSearchParams, "useSearchParams");
41
+
42
+
43
+
44
+
45
+
46
+ exports.useRouter = useRouter2; exports.usePathname = usePathname; exports.useSearchParams = useSearchParams;
@@ -21,7 +21,7 @@ import {
21
21
  readSchemaState,
22
22
  readSchemaTables,
23
23
  withoutRenameTargets
24
- } from "./chunk-DHDVMXYK.mjs";
24
+ } from "./chunk-HALDNTIV.mjs";
25
25
  import {
26
26
  resolveSchemaModels
27
27
  } from "./chunk-ZMSZZXOR.mjs";
@@ -0,0 +1,46 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkWMOGFOUJcjs = require('./chunk-WMOGFOUJ.cjs');
4
+
5
+
6
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
7
+
8
+ // src/query/params.ts
9
+ function parseParam(input, key, parser) {
10
+ const values = input instanceof URLSearchParams ? input.getAll(key) : [_nullishCoalesce(input[key], () => ( ""))];
11
+ return {
12
+ raw: values.length > 1 ? values.join(",") : _nullishCoalesce(values[0], () => ( "")),
13
+ parsed: _chunkWMOGFOUJcjs.parseQueryParameter.call(void 0, parser, values)
14
+ };
15
+ }
16
+ _chunkS3JO3N4Hcjs.__name.call(void 0, parseParam, "parseParam");
17
+ async function loadRouteParams(input, parsers, options = {}) {
18
+ const resolved = await Promise.resolve(input);
19
+ const result = {};
20
+ for (const [key, parser] of Object.entries(parsers)) {
21
+ const { raw, parsed } = parseParam(resolved, key, parser);
22
+ if (parsed === null && options.strict) {
23
+ throw new Error(`Failed to parse route param "${key}" with value "${raw}"`);
24
+ }
25
+ result[key] = parsed;
26
+ }
27
+ return result;
28
+ }
29
+ _chunkS3JO3N4Hcjs.__name.call(void 0, loadRouteParams, "loadRouteParams");
30
+ function parseRouteParams(input, parsers, options = {}) {
31
+ const result = {};
32
+ for (const [key, parser] of Object.entries(parsers)) {
33
+ const { raw, parsed } = parseParam(input, key, parser);
34
+ if (parsed === null && options.strict) {
35
+ throw new Error(`Failed to parse route param "${key}" with value "${raw}"`);
36
+ }
37
+ result[key] = parsed;
38
+ }
39
+ return result;
40
+ }
41
+ _chunkS3JO3N4Hcjs.__name.call(void 0, parseRouteParams, "parseRouteParams");
42
+
43
+
44
+
45
+
46
+ exports.loadRouteParams = loadRouteParams; exports.parseRouteParams = parseRouteParams;
@@ -0,0 +1,22 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/i18n/bridge.ts
6
+ var FARM_I18N_SNAPSHOT_RESOLVER = /* @__PURE__ */ Symbol.for("farm.i18n.snapshotResolver");
7
+ function _setFarmI18nSnapshotResolver(resolver) {
8
+ globalThis[FARM_I18N_SNAPSHOT_RESOLVER] = resolver;
9
+ }
10
+ _chunkS3JO3N4Hcjs.__name.call(void 0, _setFarmI18nSnapshotResolver, "_setFarmI18nSnapshotResolver");
11
+ function getActiveFarmI18nSnapshot() {
12
+ if (typeof window !== "undefined" && window.__FARM_I18N__) {
13
+ return window.__FARM_I18N__;
14
+ }
15
+ return _optionalChain([globalThis, 'access', _ => _[FARM_I18N_SNAPSHOT_RESOLVER], 'optionalCall', _2 => _2()]);
16
+ }
17
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getActiveFarmI18nSnapshot, "getActiveFarmI18nSnapshot");
18
+
19
+
20
+
21
+
22
+ exports._setFarmI18nSnapshotResolver = _setFarmI18nSnapshotResolver; exports.getActiveFarmI18nSnapshot = getActiveFarmI18nSnapshot;
@@ -0,0 +1,55 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/client-observers.ts
6
+ function notifyClientObserver(observer, args, label = "Client lifecycle") {
7
+ if (!observer) return;
8
+ const report = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (error) => {
9
+ const reportError = globalThis.reportError;
10
+ if (typeof reportError === "function") {
11
+ try {
12
+ reportError.call(globalThis, error);
13
+ return;
14
+ } catch (e) {
15
+ }
16
+ }
17
+ try {
18
+ console.error(`[Farm.js] ${label} callback failed:`, error);
19
+ } catch (e2) {
20
+ }
21
+ }, "report");
22
+ try {
23
+ const result = observer(...args);
24
+ if (result && typeof result.then === "function")
25
+ void Promise.resolve(result).catch(report);
26
+ } catch (error) {
27
+ report(error);
28
+ }
29
+ }
30
+ _chunkS3JO3N4Hcjs.__name.call(void 0, notifyClientObserver, "notifyClientObserver");
31
+
32
+ // src/client-retry.ts
33
+ var MAX_TIMER_DELAY = 2147483647;
34
+ function resolveClientRetryCount(value) {
35
+ const count = _nullishCoalesce(value, () => ( 0));
36
+ if (!Number.isSafeInteger(count) || count < 0) {
37
+ throw new RangeError("retry.count must be a non-negative safe integer");
38
+ }
39
+ return count;
40
+ }
41
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveClientRetryCount, "resolveClientRetryCount");
42
+ function resolveClientRetryDelay(value) {
43
+ const delay = _nullishCoalesce(value, () => ( 0));
44
+ if (!Number.isFinite(delay) || delay < 0 || delay > MAX_TIMER_DELAY) {
45
+ throw new RangeError(`retry.delay must be between 0 and ${MAX_TIMER_DELAY} milliseconds`);
46
+ }
47
+ return delay;
48
+ }
49
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveClientRetryDelay, "resolveClientRetryDelay");
50
+
51
+
52
+
53
+
54
+
55
+ exports.notifyClientObserver = notifyClientObserver; exports.resolveClientRetryCount = resolveClientRetryCount; exports.resolveClientRetryDelay = resolveClientRetryDelay;
@@ -0,0 +1,14 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/cli-colors.ts
6
+ var _picocolors = require('picocolors'); var _picocolors2 = _interopRequireDefault(_picocolors);
7
+ function createCliColors(interactive = process.stdout.isTTY === true) {
8
+ return _picocolors2.default.createColors(interactive);
9
+ }
10
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createCliColors, "createCliColors");
11
+
12
+
13
+
14
+ exports.createCliColors = createCliColors;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,148 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
+
3
+ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
4
+
5
+ // src/route-runtime.ts
6
+ function normalizeFarmRouteRuntimeConfig(value, source = "Route configuration") {
7
+ if (!value) return {};
8
+ const normalized = {};
9
+ if (value.runtime !== void 0) {
10
+ if (value.runtime !== "auto" && value.runtime !== "node" && value.runtime !== "edge") {
11
+ throw new TypeError(`${source} runtime must be "auto", "node", or "edge"`);
12
+ }
13
+ normalized.runtime = value.runtime;
14
+ }
15
+ if (value.regions !== void 0) {
16
+ if (value.regions === "auto") {
17
+ normalized.regions = "auto";
18
+ } else {
19
+ if (!Array.isArray(value.regions) || value.regions.length === 0) {
20
+ throw new TypeError(`${source} regions must be "auto" or a non-empty string array`);
21
+ }
22
+ const regions = Array.from(
23
+ new Set(
24
+ value.regions.map((region) => {
25
+ if (typeof region !== "string" || !region.trim() || /[\u0000-\u001f\u007f]/.test(region)) {
26
+ throw new TypeError(`${source} regions must contain non-empty region identifiers`);
27
+ }
28
+ return region.trim();
29
+ })
30
+ )
31
+ );
32
+ normalized.regions = regions;
33
+ }
34
+ }
35
+ if (value.maxDuration !== void 0) {
36
+ if (value.maxDuration === "auto") {
37
+ normalized.maxDuration = "auto";
38
+ } else if (typeof value.maxDuration !== "number" || !Number.isInteger(value.maxDuration) || value.maxDuration <= 0) {
39
+ throw new TypeError(`${source} maxDuration must be "auto" or a positive integer in seconds`);
40
+ } else {
41
+ normalized.maxDuration = value.maxDuration;
42
+ }
43
+ }
44
+ return normalized;
45
+ }
46
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeFarmRouteRuntimeConfig, "normalizeFarmRouteRuntimeConfig");
47
+ function mergeFarmRouteRuntimeConfigs(...configs) {
48
+ const merged = {};
49
+ for (const config of configs) {
50
+ if (!config) continue;
51
+ if (config.runtime !== void 0) merged.runtime = config.runtime;
52
+ if (config.regions !== void 0) merged.regions = config.regions;
53
+ if (config.maxDuration !== void 0) merged.maxDuration = config.maxDuration;
54
+ }
55
+ return merged;
56
+ }
57
+ _chunkS3JO3N4Hcjs.__name.call(void 0, mergeFarmRouteRuntimeConfigs, "mergeFarmRouteRuntimeConfigs");
58
+ function resolveFarmRouteRuntimeConfig(config, source) {
59
+ const normalized = normalizeFarmRouteRuntimeConfig(config, source);
60
+ return {
61
+ runtime: _nullishCoalesce(normalized.runtime, () => ( "auto")),
62
+ ...normalized.regions && normalized.regions !== "auto" ? { regions: [...normalized.regions] } : {},
63
+ ...typeof normalized.maxDuration === "number" ? { maxDuration: normalized.maxDuration } : {}
64
+ };
65
+ }
66
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmRouteRuntimeConfig, "resolveFarmRouteRuntimeConfig");
67
+ function hasFarmRouteRuntimeControls(config) {
68
+ return Boolean(
69
+ config && (config.runtime !== void 0 || config.regions !== void 0 || config.maxDuration !== void 0)
70
+ );
71
+ }
72
+ _chunkS3JO3N4Hcjs.__name.call(void 0, hasFarmRouteRuntimeControls, "hasFarmRouteRuntimeControls");
73
+ function getFarmRouteRuntimeConfig(value) {
74
+ if (!value || typeof value !== "object") return {};
75
+ const route = value;
76
+ return {
77
+ ...route.runtime !== void 0 ? { runtime: route.runtime } : {},
78
+ ...route.regions !== void 0 ? { regions: route.regions } : {},
79
+ ...route.maxDuration !== void 0 ? { maxDuration: route.maxDuration } : {}
80
+ };
81
+ }
82
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmRouteRuntimeConfig, "getFarmRouteRuntimeConfig");
83
+ function createFarmRouteRuntimeKey(config) {
84
+ return JSON.stringify({
85
+ runtime: config.runtime,
86
+ regions: config.regions || null,
87
+ maxDuration: config.maxDuration || null
88
+ });
89
+ }
90
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmRouteRuntimeKey, "createFarmRouteRuntimeKey");
91
+ function resolveFarmRouteRuleRuntimeConfig(pathname, routeRules) {
92
+ if (!routeRules) return {};
93
+ const matches = Object.entries(routeRules).filter(
94
+ ([pattern, rule]) => hasFarmRouteRuntimeControls(rule) && farmRouteRuleMatches(pattern, pathname)
95
+ ).sort(([left], [right]) => compareFarmRouteRuleSpecificity(left, right));
96
+ return mergeFarmRouteRuntimeConfigs(...matches.map(([, rule]) => rule));
97
+ }
98
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmRouteRuleRuntimeConfig, "resolveFarmRouteRuleRuntimeConfig");
99
+ function farmRouteRuleMatches(pattern, pathname) {
100
+ const normalizedPattern = normalizeRoutePattern(pattern);
101
+ const normalizedPathname = normalizeRoutePattern(pathname);
102
+ if (normalizedPattern === normalizedPathname) return true;
103
+ const expression = normalizedPattern.split("/").filter(Boolean).map((segment) => {
104
+ if (segment === "**") return ".*";
105
+ if (segment === "*") return "[^/]+";
106
+ if (/^\[\[\.\.\..+\]\]$/.test(segment)) return ".*";
107
+ if (/^\[\.\.\..+\]$/.test(segment)) return ".+";
108
+ if (/^\[.+\]$/.test(segment) || /^:.+$/.test(segment)) return "[^/]+";
109
+ return escapeRegExp(segment);
110
+ }).join("/");
111
+ return new RegExp(`^/${expression}/?$`).test(normalizedPathname);
112
+ }
113
+ _chunkS3JO3N4Hcjs.__name.call(void 0, farmRouteRuleMatches, "farmRouteRuleMatches");
114
+ function compareFarmRouteRuleSpecificity(left, right) {
115
+ const leftScore = getFarmRouteRuleSpecificity(left);
116
+ const rightScore = getFarmRouteRuleSpecificity(right);
117
+ return leftScore - rightScore || left.localeCompare(right);
118
+ }
119
+ _chunkS3JO3N4Hcjs.__name.call(void 0, compareFarmRouteRuleSpecificity, "compareFarmRouteRuleSpecificity");
120
+ function getFarmRouteRuleSpecificity(pattern) {
121
+ return normalizeRoutePattern(pattern).split("/").filter(Boolean).reduce((score, segment) => {
122
+ if (segment === "**" || segment.startsWith("[[...")) return score + 1;
123
+ if (segment === "*" || segment.startsWith("[...")) return score + 10;
124
+ if (/^\[.+\]$/.test(segment) || /^:.+$/.test(segment)) return score + 50;
125
+ return score + 100;
126
+ }, 0);
127
+ }
128
+ _chunkS3JO3N4Hcjs.__name.call(void 0, getFarmRouteRuleSpecificity, "getFarmRouteRuleSpecificity");
129
+ function normalizeRoutePattern(value) {
130
+ const withSlash = value.trim().startsWith("/") ? value.trim() : `/${value.trim()}`;
131
+ return withSlash.length > 1 ? withSlash.replace(/\/+$/, "") : withSlash;
132
+ }
133
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRoutePattern, "normalizeRoutePattern");
134
+ function escapeRegExp(value) {
135
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
136
+ }
137
+ _chunkS3JO3N4Hcjs.__name.call(void 0, escapeRegExp, "escapeRegExp");
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ exports.normalizeFarmRouteRuntimeConfig = normalizeFarmRouteRuntimeConfig; exports.mergeFarmRouteRuntimeConfigs = mergeFarmRouteRuntimeConfigs; exports.resolveFarmRouteRuntimeConfig = resolveFarmRouteRuntimeConfig; exports.hasFarmRouteRuntimeControls = hasFarmRouteRuntimeControls; exports.getFarmRouteRuntimeConfig = getFarmRouteRuntimeConfig; exports.createFarmRouteRuntimeKey = createFarmRouteRuntimeKey; exports.resolveFarmRouteRuleRuntimeConfig = resolveFarmRouteRuleRuntimeConfig; exports.farmRouteRuleMatches = farmRouteRuleMatches;