@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
@@ -1,675 +1,23 @@
1
- "use strict";
2
- "use client";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
-
22
- // src/client/runtime-error-overlay.ts
23
- var runtime_error_overlay_exports = {};
24
- __export(runtime_error_overlay_exports, {
25
- createFarmRuntimeErrorOverlay: () => createFarmRuntimeErrorOverlay
26
- });
27
- module.exports = __toCommonJS(runtime_error_overlay_exports);
28
- var import_trace_mapping = require("@jridgewell/trace-mapping");
29
-
30
- // src/components/error-styles.ts
31
- var DEFAULT_ERROR_STYLES = `
32
- body {
33
- margin: 0;
34
- background: #080808;
35
- }
36
-
37
- .farm-default-error {
38
- --farm-error-bg: #080808;
39
- --farm-error-panel: #0d0d0d;
40
- --farm-error-fg: #f3f3f3;
41
- --farm-error-muted: #9a9a9a;
42
- --farm-error-subtle: #6f6f6f;
43
- --farm-error-line: rgba(255, 255, 255, 0.1);
44
- --farm-error-line-strong: rgba(255, 255, 255, 0.2);
45
- --farm-error-button-bg: #f1f1f1;
46
- --farm-error-button-fg: #0a0a0a;
47
- --farm-error-source-line: rgba(255, 255, 255, 0.055);
48
- --farm-error-source-marker: #f3f3f3;
49
- --farm-error-font-sans: "Geist Variable", "Geist Sans", Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
50
- --farm-error-font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
51
- min-height: 100vh;
52
- min-height: 100svh;
53
- display: grid;
54
- color: var(--farm-error-fg);
55
- background: var(--farm-error-bg);
56
- font-family: var(--farm-error-font-sans);
57
- font-synthesis: none;
58
- color-scheme: dark;
59
- text-rendering: optimizeLegibility;
60
- }
61
-
62
- .farm-default-error,
63
- .farm-default-error * {
64
- box-sizing: border-box;
65
- }
66
-
67
- .farm-default-error__frame {
68
- width: min(100%, 1180px);
69
- height: 100vh;
70
- height: 100svh;
71
- display: grid;
72
- grid-template-rows: auto minmax(0, 1fr) auto;
73
- margin: 0 auto;
74
- padding: clamp(24px, 4vw, 52px);
75
- }
76
-
77
- .farm-default-error__brand {
78
- display: flex;
79
- align-items: center;
80
- gap: 10px;
81
- color: var(--farm-error-muted);
82
- font-family: var(--farm-error-font-mono);
83
- font-size: 11px;
84
- font-weight: 520;
85
- line-height: 1;
86
- letter-spacing: 0.08em;
87
- }
88
-
89
- .farm-default-error__brand > span:first-child {
90
- color: var(--farm-error-fg);
91
- }
92
-
93
- .farm-default-error__brand-divider,
94
- .farm-default-error__status-divider,
95
- .farm-default-error__footer-divider {
96
- color: var(--farm-error-subtle);
97
- }
98
-
99
- .farm-default-error__content {
100
- width: min(100%, 680px);
101
- min-width: 0;
102
- align-self: center;
103
- margin: 0 auto;
104
- padding: clamp(64px, 10vh, 112px) 0;
105
- }
106
-
107
- /* The full page fits the screen: the frame is one screen tall and its content
108
- scrolls inside it when the details run long. The dev overlay reuses these
109
- classes without the frame and keeps its own scrolling. */
110
- .farm-default-error__frame > .farm-default-error__content {
111
- max-height: 100%;
112
- align-self: safe center;
113
- padding-top: clamp(24px, 8vh, 112px);
114
- padding-bottom: clamp(24px, 8vh, 112px);
115
- overflow-y: auto;
116
- }
117
-
118
- .farm-default-error--development .farm-default-error__content {
119
- width: min(100%, 900px);
120
- }
121
-
122
- .farm-default-error > .farm-default-error__content {
123
- align-self: center;
124
- padding-right: 24px;
125
- padding-left: 24px;
126
- }
127
-
128
- .farm-default-error__status,
129
- .farm-default-error__eyebrow {
130
- display: flex;
131
- align-items: center;
132
- gap: 10px;
133
- margin: 0 0 24px;
134
- color: var(--farm-error-muted);
135
- font-family: var(--farm-error-font-mono);
136
- font-size: 12px;
137
- font-weight: 520;
138
- line-height: 1.4;
139
- letter-spacing: 0.055em;
140
- text-transform: uppercase;
141
- }
142
-
143
- .farm-default-error__status-mark {
144
- width: 6px;
145
- height: 6px;
146
- flex: 0 0 auto;
147
- background: var(--farm-error-fg);
148
- }
149
-
150
- .farm-default-error__code {
151
- margin: 0 0 18px;
152
- color: var(--farm-error-fg);
153
- font-family: var(--farm-error-font-mono);
154
- font-size: clamp(48px, 8vw, 72px);
155
- font-weight: 540;
156
- line-height: 0.95;
157
- letter-spacing: -0.055em;
158
- }
159
-
160
- .farm-default-error__summary {
161
- margin: 0;
162
- }
163
-
164
- .farm-default-error__title {
165
- max-width: 680px;
166
- margin: 0;
167
- color: var(--farm-error-fg);
168
- font-family: var(--farm-error-font-sans);
169
- font-size: clamp(36px, 5.2vw, 56px);
170
- font-weight: 560;
171
- line-height: 1.04;
172
- letter-spacing: -0.052em;
173
- text-wrap: balance;
174
- }
175
-
176
- .farm-default-error__message {
177
- max-width: 590px;
178
- margin: 18px 0 0;
179
- color: var(--farm-error-muted);
180
- font-family: var(--farm-error-font-sans);
181
- font-size: clamp(16px, 2vw, 19px);
182
- line-height: 1.55;
183
- letter-spacing: -0.012em;
184
- overflow-wrap: anywhere;
185
- }
186
-
187
- .farm-default-error__actions {
188
- display: flex;
189
- flex-wrap: wrap;
190
- gap: 10px;
191
- margin-top: 30px;
192
- }
193
-
194
- .farm-default-error__action {
195
- min-height: 44px;
196
- display: inline-flex;
197
- align-items: center;
198
- justify-content: center;
199
- padding: 0 17px;
200
- border: 1px solid var(--farm-error-line-strong);
201
- border-radius: 7px;
202
- color: var(--farm-error-fg);
203
- background: transparent;
204
- font: inherit;
205
- font-family: var(--farm-error-font-mono);
206
- font-size: 13px;
207
- font-weight: 560;
208
- line-height: 1;
209
- letter-spacing: 0.015em;
210
- text-decoration: none;
211
- cursor: pointer;
212
- transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 100ms ease-out;
213
- }
214
-
215
- .farm-default-error__action--primary {
216
- border-color: var(--farm-error-button-bg);
217
- color: var(--farm-error-button-fg);
218
- background: var(--farm-error-button-bg);
219
- }
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; }"use client";
220
2
 
221
- .farm-default-error__panel {
222
- margin-top: 42px;
223
- border-top: 1px solid var(--farm-error-line-strong);
224
- }
225
3
 
226
- .farm-default-error__row {
227
- min-height: 45px;
228
- display: grid;
229
- grid-template-columns: 92px minmax(0, 1fr);
230
- align-items: center;
231
- border-bottom: 1px solid var(--farm-error-line);
232
- }
233
-
234
- .farm-default-error__label,
235
- .farm-default-error__value,
236
- .farm-default-error__details-title,
237
- .farm-default-error__source-path,
238
- .farm-default-error__meta,
239
- .farm-default-error__footer-action {
240
- font-family: var(--farm-error-font-mono);
241
- }
4
+ var _chunkKROWKCUHcjs = require('../chunk-KROWKCUH.cjs');
242
5
 
243
- .farm-default-error__label {
244
- color: var(--farm-error-subtle);
245
- font-size: 10px;
246
- font-weight: 560;
247
- letter-spacing: 0.09em;
248
- text-transform: uppercase;
249
- }
250
6
 
251
- .farm-default-error__value {
252
- min-width: 0;
253
- padding: 11px 0;
254
- color: var(--farm-error-muted);
255
- font-size: 12px;
256
- line-height: 1.55;
257
- overflow-wrap: anywhere;
258
- }
7
+ var _chunkOWOUTKIJcjs = require('../chunk-OWOUTKIJ.cjs');
259
8
 
260
- .farm-default-error__details {
261
- padding: 24px 0 0;
262
- border-bottom: 1px solid var(--farm-error-line);
263
- }
264
9
 
265
- .farm-default-error__details-header {
266
- display: flex;
267
- align-items: center;
268
- justify-content: space-between;
269
- gap: 16px;
270
- margin-bottom: 12px;
271
- }
10
+ var _chunkRFYO7QUDcjs = require('../chunk-RFYO7QUD.cjs');
272
11
 
273
- .farm-default-error__details-title {
274
- margin: 0;
275
- color: var(--farm-error-muted);
276
- font-size: 10px;
277
- font-weight: 560;
278
- line-height: 1;
279
- letter-spacing: 0.09em;
280
- text-transform: uppercase;
281
- }
282
12
 
283
- .farm-default-error__copy {
284
- min-height: 32px;
285
- display: inline-flex;
286
- align-items: center;
287
- justify-content: center;
288
- padding: 0 10px;
289
- border: 1px solid var(--farm-error-line);
290
- border-radius: 6px;
291
- color: var(--farm-error-muted);
292
- background: transparent;
293
- font: inherit;
294
- font-size: 11px;
295
- cursor: pointer;
296
- transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
297
- }
298
-
299
- .farm-default-error__source {
300
- overflow: hidden;
301
- border: 1px solid var(--farm-error-line);
302
- border-radius: 7px;
303
- background: var(--farm-error-panel);
304
- }
305
-
306
- .farm-default-error__source-path {
307
- margin: 0;
308
- padding: 10px 13px;
309
- border-bottom: 1px solid var(--farm-error-line);
310
- color: var(--farm-error-muted);
311
- font-size: 11px;
312
- line-height: 1.45;
313
- overflow-wrap: anywhere;
314
- }
315
-
316
- .farm-default-error__source-code {
317
- margin: 0;
318
- padding: 8px 0;
319
- overflow-x: auto;
320
- color: var(--farm-error-fg);
321
- font-family: var(--farm-error-font-mono);
322
- font-size: 12px;
323
- line-height: 1.75;
324
- tab-size: 2;
325
- }
326
-
327
- .farm-default-error__source-code > code {
328
- display: block;
329
- white-space: normal;
330
- }
331
-
332
- .farm-default-error__source-line {
333
- min-width: max-content;
334
- display: grid;
335
- grid-template-columns: 68px minmax(0, 1fr);
336
- padding: 0 14px 0 0;
337
- border-left: 1px solid transparent;
338
- }
339
-
340
- .farm-default-error__source-line--active {
341
- border-left-color: var(--farm-error-source-marker);
342
- background: var(--farm-error-source-line);
343
- }
344
-
345
- .farm-default-error__source-gutter {
346
- padding-right: 14px;
347
- color: var(--farm-error-subtle);
348
- text-align: right;
349
- user-select: none;
350
- }
351
-
352
- .farm-default-error__source-line--active .farm-default-error__source-gutter {
353
- color: var(--farm-error-source-marker);
354
- }
355
-
356
- .farm-default-error__source-text {
357
- white-space: pre;
358
- }
13
+ var _chunkS3JO3N4Hcjs = require('../chunk-S3JO3N4H.cjs');
359
14
 
360
- .farm-default-error__details-empty {
361
- margin: 0;
362
- padding: 14px;
363
- border: 1px solid var(--farm-error-line);
364
- border-radius: 7px;
365
- color: var(--farm-error-muted);
366
- background: var(--farm-error-panel);
367
- font-family: var(--farm-error-font-mono);
368
- font-size: 12px;
369
- line-height: 1.5;
370
- }
371
-
372
- .farm-default-error__meta {
373
- margin: 12px 0 20px;
374
- color: var(--farm-error-subtle);
375
- font-size: 10px;
376
- line-height: 1.5;
377
- letter-spacing: 0.035em;
378
- }
379
-
380
- .farm-default-error__footer {
381
- display: flex;
382
- flex-wrap: wrap;
383
- align-items: center;
384
- gap: 12px;
385
- padding-top: 24px;
386
- }
387
-
388
- .farm-default-error__footer-action {
389
- display: inline-flex;
390
- align-items: center;
391
- gap: 8px;
392
- padding: 0;
393
- border: 0;
394
- color: var(--farm-error-muted);
395
- background: transparent;
396
- font-size: 10px;
397
- font-weight: 540;
398
- line-height: 1.4;
399
- letter-spacing: 0.065em;
400
- text-decoration: none;
401
- cursor: pointer;
402
- transition: color 150ms ease-out;
403
- }
404
-
405
- .farm-default-error__docs-icon {
406
- width: 14px;
407
- height: 14px;
408
- flex: 0 0 auto;
409
- stroke: currentColor;
410
- stroke-width: 1.25;
411
- stroke-linecap: round;
412
- stroke-linejoin: round;
413
- }
414
-
415
- .farm-default-error__sr-only {
416
- position: absolute;
417
- width: 1px;
418
- height: 1px;
419
- padding: 0;
420
- margin: -1px;
421
- overflow: hidden;
422
- clip: rect(0, 0, 0, 0);
423
- white-space: nowrap;
424
- border: 0;
425
- }
426
-
427
- @media (hover: hover) and (pointer: fine) {
428
- .farm-default-error__action:hover {
429
- border-color: var(--farm-error-fg);
430
- background: var(--farm-error-source-line);
431
- }
432
-
433
- .farm-default-error__action--primary:hover {
434
- border-color: var(--farm-error-muted);
435
- background: var(--farm-error-muted);
436
- }
437
-
438
- .farm-default-error__copy:hover {
439
- border-color: var(--farm-error-line-strong);
440
- color: var(--farm-error-fg);
441
- background: var(--farm-error-source-line);
442
- }
443
-
444
- .farm-default-error__footer-action:hover {
445
- color: var(--farm-error-fg);
446
- }
447
- }
448
-
449
- .farm-default-error__copy:active,
450
- .farm-default-error__action:active {
451
- transform: translateY(1px);
452
- }
453
-
454
- .farm-default-error__copy:focus-visible,
455
- .farm-default-error__action:focus-visible,
456
- .farm-default-error__footer-action:focus-visible {
457
- outline: 2px solid var(--farm-error-fg);
458
- outline-offset: 3px;
459
- }
460
-
461
- @media (max-width: 620px) {
462
- .farm-default-error__frame {
463
- padding: 22px 18px 26px;
464
- }
465
-
466
- .farm-default-error__content {
467
- padding: 56px 0 68px;
468
- }
469
-
470
- .farm-default-error__frame > .farm-default-error__content {
471
- padding-top: 32px;
472
- padding-bottom: 36px;
473
- }
474
-
475
- .farm-default-error > .farm-default-error__content {
476
- padding: 48px 18px;
477
- }
478
-
479
- .farm-default-error__title {
480
- font-size: clamp(34px, 11vw, 44px);
481
- }
482
-
483
- .farm-default-error__message {
484
- margin-top: 15px;
485
- }
486
-
487
- .farm-default-error__actions {
488
- display: grid;
489
- grid-template-columns: 1fr;
490
- }
491
-
492
- .farm-default-error__action {
493
- width: 100%;
494
- }
495
-
496
- .farm-default-error__row {
497
- grid-template-columns: 1fr;
498
- gap: 2px;
499
- padding: 11px 0;
500
- }
501
-
502
- .farm-default-error__value {
503
- padding: 0;
504
- }
505
-
506
- .farm-default-error__details-header {
507
- align-items: flex-start;
508
- flex-direction: column;
509
- }
510
-
511
- .farm-default-error__copy {
512
- width: 100%;
513
- }
514
-
515
- .farm-default-error__source-line {
516
- grid-template-columns: 54px minmax(0, 1fr);
517
- }
518
- }
519
-
520
- @media (prefers-color-scheme: light) {
521
- .farm-default-error {
522
- --farm-error-bg: #f7f7f5;
523
- --farm-error-panel: #ffffff;
524
- --farm-error-fg: #141414;
525
- --farm-error-muted: #666666;
526
- --farm-error-subtle: #8a8a8a;
527
- --farm-error-line: rgba(0, 0, 0, 0.1);
528
- --farm-error-line-strong: rgba(0, 0, 0, 0.19);
529
- --farm-error-button-bg: #141414;
530
- --farm-error-button-fg: #ffffff;
531
- --farm-error-source-line: rgba(0, 0, 0, 0.045);
532
- --farm-error-source-marker: #141414;
533
- color-scheme: light;
534
- }
535
- }
536
-
537
- .dark .farm-default-error,
538
- [data-theme="dark"] .farm-default-error,
539
- [data-color-scheme="dark"] .farm-default-error {
540
- --farm-error-bg: #080808;
541
- --farm-error-panel: #0d0d0d;
542
- --farm-error-fg: #f3f3f3;
543
- --farm-error-muted: #9a9a9a;
544
- --farm-error-subtle: #6f6f6f;
545
- --farm-error-line: rgba(255, 255, 255, 0.1);
546
- --farm-error-line-strong: rgba(255, 255, 255, 0.2);
547
- --farm-error-button-bg: #f1f1f1;
548
- --farm-error-button-fg: #0a0a0a;
549
- --farm-error-source-line: rgba(255, 255, 255, 0.055);
550
- --farm-error-source-marker: #f3f3f3;
551
- color-scheme: dark;
552
- }
553
-
554
- .light .farm-default-error,
555
- [data-theme="light"] .farm-default-error,
556
- [data-color-scheme="light"] .farm-default-error {
557
- --farm-error-bg: #f7f7f5;
558
- --farm-error-panel: #ffffff;
559
- --farm-error-fg: #141414;
560
- --farm-error-muted: #666666;
561
- --farm-error-subtle: #8a8a8a;
562
- --farm-error-line: rgba(0, 0, 0, 0.1);
563
- --farm-error-line-strong: rgba(0, 0, 0, 0.19);
564
- --farm-error-button-bg: #141414;
565
- --farm-error-button-fg: #ffffff;
566
- --farm-error-source-line: rgba(0, 0, 0, 0.045);
567
- --farm-error-source-marker: #141414;
568
- color-scheme: light;
569
- }
570
-
571
- @media (prefers-reduced-motion: reduce) {
572
- .farm-default-error__copy,
573
- .farm-default-error__action,
574
- .farm-default-error__footer-action {
575
- transition: none;
576
- }
577
-
578
- .farm-default-error__copy:active,
579
- .farm-default-error__action:active {
580
- transform: none;
581
- }
582
- }
583
- `;
15
+ // src/client/runtime-error-overlay.ts
584
16
 
585
- // package.json
586
- var version = "0.1.17";
587
17
 
588
- // src/version.ts
589
- var FARM_VERSION = version;
590
18
 
591
- // src/client/chunk-recovery.ts
592
- var CHUNK_ERROR_PATTERNS = [
593
- /ChunkLoadError/i,
594
- /Loading chunk [\w-]+ failed/i,
595
- /Loading CSS chunk [\w-]+ failed/i,
596
- /CSS_CHUNK_LOAD_FAILED/i,
597
- /failed to fetch dynamically imported module/i,
598
- /error loading dynamically imported module/i,
599
- /importing a module script failed/i,
600
- /unable to preload CSS/i,
601
- /module script failed/i
602
- ];
603
- function isChunkLoadError(errorLike) {
604
- const values = collectErrorText(errorLike);
605
- if (values.some((value) => CHUNK_ERROR_PATTERNS.some((pattern) => pattern.test(value)))) {
606
- return true;
607
- }
608
- const targetUrl = getEventTargetAssetUrl(errorLike);
609
- return Boolean(
610
- targetUrl && /\.(?:m?js|css)(?:[?#].*)?$/i.test(targetUrl) && isSameOriginAssetUrl(targetUrl)
611
- );
612
- }
613
- __name(isChunkLoadError, "isChunkLoadError");
614
- function isSameOriginAssetUrl(url) {
615
- if (typeof window === "undefined" || !window.location) {
616
- return false;
617
- }
618
- try {
619
- return new URL(url, window.location.href).origin === window.location.origin;
620
- } catch {
621
- return false;
622
- }
623
- }
624
- __name(isSameOriginAssetUrl, "isSameOriginAssetUrl");
625
- function collectErrorText(value, seen = /* @__PURE__ */ new Set()) {
626
- if (value == null || seen.has(value)) {
627
- return [];
628
- }
629
- seen.add(value);
630
- if (typeof value === "string") {
631
- return [value];
632
- }
633
- if (typeof value === "number" || typeof value === "boolean") {
634
- return [String(value)];
635
- }
636
- if (typeof value !== "object") {
637
- return [];
638
- }
639
- const record = value;
640
- const output = [];
641
- for (const key of ["name", "message", "code", "type", "request", "src", "href"]) {
642
- const candidate = record[key];
643
- if (typeof candidate === "string") {
644
- output.push(candidate);
645
- }
646
- }
647
- if ("reason" in record) {
648
- output.push(...collectErrorText(record.reason, seen));
649
- }
650
- if ("error" in record) {
651
- output.push(...collectErrorText(record.error, seen));
652
- }
653
- return output;
654
- }
655
- __name(collectErrorText, "collectErrorText");
656
- function getEventTargetAssetUrl(value) {
657
- if (!value || typeof value !== "object") {
658
- return void 0;
659
- }
660
- const target = value.target;
661
- if (!target || typeof target !== "object") {
662
- return void 0;
663
- }
664
- const tagName = typeof target.tagName === "string" ? target.tagName.toLowerCase() : "";
665
- if (tagName !== "script" && tagName !== "link") {
666
- return void 0;
667
- }
668
- return typeof target.src === "string" && target.src ? target.src : typeof target.href === "string" && target.href ? target.href : void 0;
669
- }
670
- __name(getEventTargetAssetUrl, "getEventTargetAssetUrl");
671
19
 
672
- // src/client/runtime-error-overlay.ts
20
+ var _tracemapping = require('@jridgewell/trace-mapping');
673
21
  var OVERLAY_STYLES = `
674
22
  :host {
675
23
  position: fixed;
@@ -938,18 +286,18 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
938
286
  this.dismissedFingerprints = /* @__PURE__ */ new Set();
939
287
  this.renderSequence = 0;
940
288
  this.destroyed = false;
941
- this.handleReload = /* @__PURE__ */ __name(() => {
289
+ this.handleReload = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
942
290
  (this.options.reload || (() => this.options.window.location.reload()))();
943
291
  }, "handleReload");
944
- this.handleDismiss = /* @__PURE__ */ __name(() => {
292
+ this.handleDismiss = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
945
293
  this.dismiss();
946
294
  }, "handleDismiss");
947
- this.handleCopy = /* @__PURE__ */ __name(async () => {
295
+ this.handleCopy = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async () => {
948
296
  if (!this.current) return;
949
297
  const report = createFarmRuntimeErrorDebugReport(
950
298
  this.current,
951
299
  this.options.window,
952
- this.options.farmVersion || FARM_VERSION
300
+ this.options.farmVersion || _chunkRFYO7QUDcjs.FARM_VERSION
953
301
  );
954
302
  const label = this.getElement("[data-farm-runtime-error-copy-label]");
955
303
  const status = this.getElement("[data-farm-runtime-error-copy-status]");
@@ -961,11 +309,11 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
961
309
  this.options.window.clearTimeout(this.copyResetTimer);
962
310
  }
963
311
  this.copyResetTimer = this.options.window.setTimeout(() => this.resetCopyStatus(), 1800);
964
- } catch {
312
+ } catch (e) {
965
313
  status.textContent = "Unable to copy the debug report";
966
314
  }
967
315
  }, "handleCopy");
968
- this.handleKeyDown = /* @__PURE__ */ __name((event) => {
316
+ this.handleKeyDown = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (event) => {
969
317
  const keyboardEvent = event;
970
318
  if (keyboardEvent.key === "Escape") {
971
319
  keyboardEvent.preventDefault();
@@ -988,7 +336,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
988
336
  first.focus();
989
337
  }
990
338
  }, "handleKeyDown");
991
- this.updateTheme = /* @__PURE__ */ __name(() => {
339
+ this.updateTheme = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
992
340
  this.getElement("[data-farm-runtime-error-viewport]").dataset.theme = resolveDocumentTheme(this.document, this.options.window);
993
341
  }, "updateTheme");
994
342
  this.options = options;
@@ -997,7 +345,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
997
345
  this.host.dataset.farmRuntimeErrorOverlay = "";
998
346
  this.host.hidden = true;
999
347
  this.shadow = this.host.attachShadow({ mode: "open" });
1000
- this.shadow.innerHTML = `<style>${DEFAULT_ERROR_STYLES}${OVERLAY_STYLES}</style>${OVERLAY_MARKUP}`;
348
+ this.shadow.innerHTML = `<style>${_chunkOWOUTKIJcjs.DEFAULT_ERROR_STYLES}${OVERLAY_STYLES}</style>${OVERLAY_MARKUP}`;
1001
349
  this.getElement("[data-farm-runtime-error-reload]").addEventListener(
1002
350
  "click",
1003
351
  this.handleReload
@@ -1022,12 +370,12 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1022
370
  attributeFilter: ["class", "data-theme", "data-color-scheme", "style"]
1023
371
  });
1024
372
  }
1025
- this.colorSchemeQuery = options.window.matchMedia?.("(prefers-color-scheme: dark)");
1026
- this.colorSchemeQuery?.addEventListener?.("change", this.updateTheme);
373
+ this.colorSchemeQuery = _optionalChain([options, 'access', _ => _.window, 'access', _2 => _2.matchMedia, 'optionalCall', _3 => _3("(prefers-color-scheme: dark)")]);
374
+ _optionalChain([this, 'access', _4 => _4.colorSchemeQuery, 'optionalAccess', _5 => _5.addEventListener, 'optionalCall', _6 => _6("change", this.updateTheme)]);
1027
375
  this.updateTheme();
1028
376
  }
1029
377
  show(errorLike, context) {
1030
- if (this.destroyed || isChunkLoadError(errorLike) || isChunkLoadError(context.sourceEvent) || isResizeObserverLoopNotice(context.sourceEvent)) {
378
+ if (this.destroyed || _chunkKROWKCUHcjs.isChunkLoadError.call(void 0, errorLike) || _chunkKROWKCUHcjs.isChunkLoadError.call(void 0, context.sourceEvent) || isResizeObserverLoopNotice(context.sourceEvent)) {
1031
379
  return;
1032
380
  }
1033
381
  const error = normalizeRuntimeError(errorLike);
@@ -1040,7 +388,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1040
388
  if (isRecoverableReactHydrationError(error, context, sourceLocation)) return;
1041
389
  const fingerprint = createErrorFingerprint(error, context, sourceLocation);
1042
390
  if (this.dismissedFingerprints.has(fingerprint)) return;
1043
- if (this.current?.fingerprint === fingerprint) {
391
+ if (_optionalChain([this, 'access', _7 => _7.current, 'optionalAccess', _8 => _8.fingerprint]) === fingerprint) {
1044
392
  this.current.occurrences += 1;
1045
393
  this.renderOccurrences(this.current.occurrences);
1046
394
  return;
@@ -1084,7 +432,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1084
432
  this.destroyed = true;
1085
433
  this.renderSequence += 1;
1086
434
  this.themeObserver.disconnect();
1087
- this.colorSchemeQuery?.removeEventListener?.("change", this.updateTheme);
435
+ _optionalChain([this, 'access', _9 => _9.colorSchemeQuery, 'optionalAccess', _10 => _10.removeEventListener, 'optionalCall', _11 => _11("change", this.updateTheme)]);
1088
436
  this.shadow.removeEventListener("keydown", this.handleKeyDown);
1089
437
  if (this.copyResetTimer !== void 0) {
1090
438
  this.options.window.clearTimeout(this.copyResetTimer);
@@ -1120,7 +468,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1120
468
  this.document
1121
469
  );
1122
470
  this.getElement("[data-farm-runtime-error-location]").textContent = `${record.context.location.pathname}${record.context.location.search}` || "/";
1123
- this.getElement("[data-farm-runtime-error-meta]").textContent = `Farm.js v${this.options.farmVersion || FARM_VERSION} \xB7 development \xB7 browser`;
471
+ this.getElement("[data-farm-runtime-error-meta]").textContent = `Farm.js v${this.options.farmVersion || _chunkRFYO7QUDcjs.FARM_VERSION} \xB7 development \xB7 browser`;
1124
472
  this.renderIssueLink(record);
1125
473
  this.renderOccurrences(record.occurrences);
1126
474
  this.renderSourceFrame(record.sourceFrame);
@@ -1132,7 +480,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1132
480
  badge.textContent = occurrences < 2 ? "" : `Repeated \xD7${occurrences}`;
1133
481
  }
1134
482
  renderIssueLink(record) {
1135
- this.getElement("[data-farm-runtime-error-issue]").href = createGithubIssueUrl(record, this.options.window, this.options.farmVersion || FARM_VERSION);
483
+ this.getElement("[data-farm-runtime-error-issue]").href = createGithubIssueUrl(record, this.options.window, this.options.farmVersion || _chunkRFYO7QUDcjs.FARM_VERSION);
1136
484
  }
1137
485
  renderSourceFrame(sourceFrame) {
1138
486
  const container = this.getElement("[data-farm-runtime-error-source]");
@@ -1152,7 +500,7 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1152
500
  row.className = `farm-default-error__source-line${line.highlight ? " farm-default-error__source-line--active" : ""}`;
1153
501
  const gutter = this.document.createElement("span");
1154
502
  gutter.className = "farm-default-error__source-gutter";
1155
- gutter.textContent = `${line.highlight ? ">" : " "} ${line.number ?? ""}`;
503
+ gutter.textContent = `${line.highlight ? ">" : " "} ${_nullishCoalesce(line.number, () => ( ""))}`;
1156
504
  const text = this.document.createElement("span");
1157
505
  text.className = "farm-default-error__source-text";
1158
506
  text.textContent = line.content || " ";
@@ -1173,12 +521,12 @@ var _DefaultFarmRuntimeErrorOverlay = class _DefaultFarmRuntimeErrorOverlay {
1173
521
  return element;
1174
522
  }
1175
523
  };
1176
- __name(_DefaultFarmRuntimeErrorOverlay, "DefaultFarmRuntimeErrorOverlay");
524
+ _chunkS3JO3N4Hcjs.__name.call(void 0, _DefaultFarmRuntimeErrorOverlay, "DefaultFarmRuntimeErrorOverlay");
1177
525
  var DefaultFarmRuntimeErrorOverlay = _DefaultFarmRuntimeErrorOverlay;
1178
526
  function createFarmRuntimeErrorOverlay(options) {
1179
527
  return new DefaultFarmRuntimeErrorOverlay(options);
1180
528
  }
1181
- __name(createFarmRuntimeErrorOverlay, "createFarmRuntimeErrorOverlay");
529
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmRuntimeErrorOverlay, "createFarmRuntimeErrorOverlay");
1182
530
  function normalizeRuntimeError(errorLike) {
1183
531
  if (errorLike instanceof Error) {
1184
532
  return {
@@ -1202,17 +550,17 @@ function normalizeRuntimeError(errorLike) {
1202
550
  message: stringifyUnknown(errorLike) || "An unknown browser error occurred."
1203
551
  };
1204
552
  }
1205
- __name(normalizeRuntimeError, "normalizeRuntimeError");
553
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeRuntimeError, "normalizeRuntimeError");
1206
554
  function stringifyUnknown(value) {
1207
555
  if (typeof value === "string") return value;
1208
556
  if (value == null) return "";
1209
557
  try {
1210
558
  return JSON.stringify(value);
1211
- } catch {
559
+ } catch (e2) {
1212
560
  return String(value);
1213
561
  }
1214
562
  }
1215
- __name(stringifyUnknown, "stringifyUnknown");
563
+ _chunkS3JO3N4Hcjs.__name.call(void 0, stringifyUnknown, "stringifyUnknown");
1216
564
  function resolveBrowserSourceLocation(error, sourceEvent, clientWindow) {
1217
565
  if (sourceEvent && "filename" in sourceEvent) {
1218
566
  const event = sourceEvent;
@@ -1231,41 +579,41 @@ function resolveBrowserSourceLocation(error, sourceEvent, clientWindow) {
1231
579
  }
1232
580
  return void 0;
1233
581
  }
1234
- __name(resolveBrowserSourceLocation, "resolveBrowserSourceLocation");
582
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveBrowserSourceLocation, "resolveBrowserSourceLocation");
1235
583
  function createSourceLocation(url, line, column, clientWindow) {
1236
584
  let displayPath = url;
1237
585
  try {
1238
586
  const parsed = new URL(url, clientWindow.location.href);
1239
587
  displayPath = parsed.origin === clientWindow.location.origin ? parsed.pathname : parsed.href;
1240
- } catch {
588
+ } catch (e3) {
1241
589
  }
1242
590
  return { url, displayPath, line, column };
1243
591
  }
1244
- __name(createSourceLocation, "createSourceLocation");
592
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createSourceLocation, "createSourceLocation");
1245
593
  function createFallbackSourceFrame(error, location) {
1246
- const firstStackLine = location?.stackLine || error.stack?.split("\n").find((line) => line.trim().startsWith("at "));
594
+ const firstStackLine = _optionalChain([location, 'optionalAccess', _12 => _12.stackLine]) || _optionalChain([error, 'access', _13 => _13.stack, 'optionalAccess', _14 => _14.split, 'call', _15 => _15("\n"), 'access', _16 => _16.find, 'call', _17 => _17((line) => line.trim().startsWith("at "))]);
1247
595
  return {
1248
- path: location?.displayPath || "Browser stack",
1249
- line: location?.line,
1250
- column: location?.column,
596
+ path: _optionalChain([location, 'optionalAccess', _18 => _18.displayPath]) || "Browser stack",
597
+ line: _optionalChain([location, 'optionalAccess', _19 => _19.line]),
598
+ column: _optionalChain([location, 'optionalAccess', _20 => _20.column]),
1251
599
  unavailable: true,
1252
600
  lines: [
1253
601
  {
1254
- number: location?.line,
1255
- content: firstStackLine?.trim() || error.message,
602
+ number: _optionalChain([location, 'optionalAccess', _21 => _21.line]),
603
+ content: _optionalChain([firstStackLine, 'optionalAccess', _22 => _22.trim, 'call', _23 => _23()]) || error.message,
1256
604
  highlight: true
1257
605
  }
1258
606
  ]
1259
607
  };
1260
608
  }
1261
- __name(createFallbackSourceFrame, "createFallbackSourceFrame");
609
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFallbackSourceFrame, "createFallbackSourceFrame");
1262
610
  async function loadBrowserSourceFrame(location, options) {
1263
- const request = options.fetch || options.window.fetch?.bind(options.window);
611
+ const request = options.fetch || _optionalChain([options, 'access', _24 => _24.window, 'access', _25 => _25.fetch, 'optionalAccess', _26 => _26.bind, 'call', _27 => _27(options.window)]);
1264
612
  if (!request) return void 0;
1265
613
  let sourceUrl;
1266
614
  try {
1267
615
  sourceUrl = new URL(location.url, options.window.location.href);
1268
- } catch {
616
+ } catch (e4) {
1269
617
  return void 0;
1270
618
  }
1271
619
  if (sourceUrl.origin !== options.window.location.origin || sourceUrl.protocol !== "http:" && sourceUrl.protocol !== "https:") {
@@ -1287,27 +635,27 @@ async function loadBrowserSourceFrame(location, options) {
1287
635
  );
1288
636
  if (mappedFrame) return mappedFrame;
1289
637
  return createSourceFrame(source, location.displayPath, location.line, location.column);
1290
- } catch {
638
+ } catch (e5) {
1291
639
  return void 0;
1292
640
  }
1293
641
  }
1294
- __name(loadBrowserSourceFrame, "loadBrowserSourceFrame");
642
+ _chunkS3JO3N4Hcjs.__name.call(void 0, loadBrowserSourceFrame, "loadBrowserSourceFrame");
1295
643
  async function createMappedSourceFrame(generatedSource, generatedUrl, location, request, clientWindow) {
1296
644
  const traceMap = await loadTraceMap(generatedSource, generatedUrl, request, clientWindow);
1297
645
  if (!traceMap) return void 0;
1298
- const original = (0, import_trace_mapping.originalPositionFor)(traceMap, {
646
+ const original = _tracemapping.originalPositionFor.call(void 0, traceMap, {
1299
647
  line: location.line,
1300
648
  column: Math.max(0, location.column - 1)
1301
649
  });
1302
650
  if (!original.source || original.line == null) return void 0;
1303
- const originalSource = (0, import_trace_mapping.sourceContentFor)(traceMap, original.source);
651
+ const originalSource = _tracemapping.sourceContentFor.call(void 0, traceMap, original.source);
1304
652
  if (originalSource == null) return void 0;
1305
653
  const originalLines = originalSource.split(/\r?\n/);
1306
654
  const generatedLine = generatedSource.split(/\r?\n/)[location.line - 1] || "";
1307
655
  const line = refineOriginalLine(generatedLine, originalLines, original.line);
1308
656
  const lineContent = originalLines[line - 1] || "";
1309
657
  const trimmedGeneratedLine = generatedLine.trim();
1310
- const column = line !== original.line && trimmedGeneratedLine && lineContent.includes(trimmedGeneratedLine) ? lineContent.indexOf(trimmedGeneratedLine) + 1 : (original.column ?? 0) + 1;
658
+ const column = line !== original.line && trimmedGeneratedLine && lineContent.includes(trimmedGeneratedLine) ? lineContent.indexOf(trimmedGeneratedLine) + 1 : (_nullishCoalesce(original.column, () => ( 0))) + 1;
1311
659
  return createSourceFrame(
1312
660
  originalSource,
1313
661
  formatDisplaySourceUrl(original.source, clientWindow),
@@ -1315,10 +663,10 @@ async function createMappedSourceFrame(generatedSource, generatedUrl, location,
1315
663
  column
1316
664
  );
1317
665
  }
1318
- __name(createMappedSourceFrame, "createMappedSourceFrame");
666
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createMappedSourceFrame, "createMappedSourceFrame");
1319
667
  async function loadTraceMap(generatedSource, generatedUrl, request, clientWindow) {
1320
668
  const matches = Array.from(generatedSource.matchAll(/\/\/[#@]\s*sourceMappingURL=([^\s]+)/g));
1321
- const reference = matches[matches.length - 1]?.[1];
669
+ const reference = _optionalChain([matches, 'access', _28 => _28[matches.length - 1], 'optionalAccess', _29 => _29[1]]);
1322
670
  if (!reference) return void 0;
1323
671
  let sourceMapJson;
1324
672
  if (reference.startsWith("data:")) {
@@ -1333,9 +681,9 @@ async function loadTraceMap(generatedSource, generatedUrl, request, clientWindow
1333
681
  sourceMapJson = await response.text();
1334
682
  if (sourceMapJson.length > 2e6) return void 0;
1335
683
  }
1336
- return new import_trace_mapping.TraceMap(JSON.parse(sourceMapJson), generatedUrl.href);
684
+ return new (0, _tracemapping.TraceMap)(JSON.parse(sourceMapJson), generatedUrl.href);
1337
685
  }
1338
- __name(loadTraceMap, "loadTraceMap");
686
+ _chunkS3JO3N4Hcjs.__name.call(void 0, loadTraceMap, "loadTraceMap");
1339
687
  function decodeSourceMapDataUrl(value, clientWindow) {
1340
688
  const separator = value.indexOf(",");
1341
689
  if (separator < 0) throw new Error("Invalid inline source map");
@@ -1349,7 +697,7 @@ function decodeSourceMapDataUrl(value, clientWindow) {
1349
697
  }
1350
698
  return new TextDecoder().decode(bytes);
1351
699
  }
1352
- __name(decodeSourceMapDataUrl, "decodeSourceMapDataUrl");
700
+ _chunkS3JO3N4Hcjs.__name.call(void 0, decodeSourceMapDataUrl, "decodeSourceMapDataUrl");
1353
701
  function refineOriginalLine(generatedLine, originalLines, mappedLine) {
1354
702
  const normalizedGeneratedLine = normalizeSourceLine(generatedLine);
1355
703
  if (normalizedGeneratedLine.length < 8) return mappedLine;
@@ -1366,11 +714,11 @@ function refineOriginalLine(generatedLine, originalLines, mappedLine) {
1366
714
  }
1367
715
  return bestMatch;
1368
716
  }
1369
- __name(refineOriginalLine, "refineOriginalLine");
717
+ _chunkS3JO3N4Hcjs.__name.call(void 0, refineOriginalLine, "refineOriginalLine");
1370
718
  function normalizeSourceLine(value) {
1371
719
  return value.trim().replace(/\s+/g, " ");
1372
720
  }
1373
- __name(normalizeSourceLine, "normalizeSourceLine");
721
+ _chunkS3JO3N4Hcjs.__name.call(void 0, normalizeSourceLine, "normalizeSourceLine");
1374
722
  function createSourceFrame(source, path, line, column) {
1375
723
  const lines = source.split(/\r?\n/);
1376
724
  if (line < 1 || line > lines.length) return void 0;
@@ -1386,23 +734,23 @@ function createSourceFrame(source, path, line, column) {
1386
734
  }
1387
735
  return { path, line, column, lines: frameLines };
1388
736
  }
1389
- __name(createSourceFrame, "createSourceFrame");
737
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createSourceFrame, "createSourceFrame");
1390
738
  function formatDisplaySourceUrl(url, clientWindow) {
1391
739
  try {
1392
740
  const parsed = new URL(url, clientWindow.location.href);
1393
741
  return parsed.origin === clientWindow.location.origin ? parsed.pathname : parsed.href;
1394
- } catch {
742
+ } catch (e6) {
1395
743
  return url.replace(/[?#].*$/, "");
1396
744
  }
1397
745
  }
1398
- __name(formatDisplaySourceUrl, "formatDisplaySourceUrl");
746
+ _chunkS3JO3N4Hcjs.__name.call(void 0, formatDisplaySourceUrl, "formatDisplaySourceUrl");
1399
747
  function isResizeObserverLoopNotice(event) {
1400
748
  if (!event || !("message" in event) || event.error != null) return false;
1401
749
  return /^ResizeObserver loop (?:completed with undelivered notifications|limit exceeded)/.test(
1402
750
  String(event.message)
1403
751
  );
1404
752
  }
1405
- __name(isResizeObserverLoopNotice, "isResizeObserverLoopNotice");
753
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isResizeObserverLoopNotice, "isResizeObserverLoopNotice");
1406
754
  function isBrowserExtensionUrl(url) {
1407
755
  try {
1408
756
  return [
@@ -1411,11 +759,11 @@ function isBrowserExtensionUrl(url) {
1411
759
  "safari-web-extension:",
1412
760
  "ms-browser-extension:"
1413
761
  ].includes(new URL(url).protocol);
1414
- } catch {
762
+ } catch (e7) {
1415
763
  return /^(?:chrome|moz|safari-web|ms-browser)-extension:\/\//i.test(url);
1416
764
  }
1417
765
  }
1418
- __name(isBrowserExtensionUrl, "isBrowserExtensionUrl");
766
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isBrowserExtensionUrl, "isBrowserExtensionUrl");
1419
767
  function isRecoverableReactHydrationError(error, context, location) {
1420
768
  if (context.phase !== "window") return false;
1421
769
  const isKnownRecoverableMessage = [
@@ -1425,17 +773,17 @@ function isRecoverableReactHydrationError(error, context, location) {
1425
773
  ].some((pattern) => pattern.test(error.message));
1426
774
  if (!isKnownRecoverableMessage) return false;
1427
775
  return /(?:react-dom(?:_client)?(?:\.development)?\.js|react-dom\/|throwOnHydrationMismatch|onRecoverableError)/i.test(
1428
- `${location?.url || ""}
776
+ `${_optionalChain([location, 'optionalAccess', _30 => _30.url]) || ""}
1429
777
  ${error.stack || ""}`
1430
778
  );
1431
779
  }
1432
- __name(isRecoverableReactHydrationError, "isRecoverableReactHydrationError");
780
+ _chunkS3JO3N4Hcjs.__name.call(void 0, isRecoverableReactHydrationError, "isRecoverableReactHydrationError");
1433
781
  function renderErrorMessage(container, message, document) {
1434
782
  const fragments = [];
1435
783
  const codePattern = /`([^`\n]+)`|\b[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*){2,}\b/g;
1436
784
  let offset = 0;
1437
785
  for (const match of message.matchAll(codePattern)) {
1438
- const index = match.index ?? 0;
786
+ const index = _nullishCoalesce(match.index, () => ( 0));
1439
787
  if (index > offset) fragments.push(document.createTextNode(message.slice(offset, index)));
1440
788
  const code = document.createElement("code");
1441
789
  code.className = "farm-runtime-error__inline-code";
@@ -1446,34 +794,34 @@ function renderErrorMessage(container, message, document) {
1446
794
  if (offset < message.length) fragments.push(document.createTextNode(message.slice(offset)));
1447
795
  container.replaceChildren(...fragments);
1448
796
  }
1449
- __name(renderErrorMessage, "renderErrorMessage");
797
+ _chunkS3JO3N4Hcjs.__name.call(void 0, renderErrorMessage, "renderErrorMessage");
1450
798
  function createErrorFingerprint(error, context, location) {
1451
799
  return [
1452
800
  context.phase,
1453
801
  context.location.pathname,
1454
802
  error.name,
1455
803
  error.message,
1456
- location?.displayPath || "",
1457
- location?.line || "",
1458
- error.stack?.split("\n")[1]?.trim() || ""
804
+ _optionalChain([location, 'optionalAccess', _31 => _31.displayPath]) || "",
805
+ _optionalChain([location, 'optionalAccess', _32 => _32.line]) || "",
806
+ _optionalChain([error, 'access', _33 => _33.stack, 'optionalAccess', _34 => _34.split, 'call', _35 => _35("\n"), 'access', _36 => _36[1], 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()]) || ""
1459
807
  ].join("\0");
1460
808
  }
1461
- __name(createErrorFingerprint, "createErrorFingerprint");
809
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createErrorFingerprint, "createErrorFingerprint");
1462
810
  function formatPhase(phase) {
1463
811
  return phase.replace(/^plugin:/, "Plugin \xB7 ").replace(/-/g, " ").replace(/\b\w/g, (character) => character.toUpperCase());
1464
812
  }
1465
- __name(formatPhase, "formatPhase");
813
+ _chunkS3JO3N4Hcjs.__name.call(void 0, formatPhase, "formatPhase");
1466
814
  function formatErrorType(error, phase) {
1467
815
  const category = phase === "hydration" ? "Hydration" : phase === "navigation" ? "Navigation" : phase === "setup" || phase.startsWith("plugin:") ? "Plugin" : phase === "performance" ? "Performance" : "Runtime";
1468
816
  const name = error.name.trim() || "Error";
1469
817
  return `${category} ${name}`;
1470
818
  }
1471
- __name(formatErrorType, "formatErrorType");
819
+ _chunkS3JO3N4Hcjs.__name.call(void 0, formatErrorType, "formatErrorType");
1472
820
  function formatSourcePath(sourceFrame) {
1473
821
  if (!sourceFrame.line) return sourceFrame.path;
1474
822
  return `${sourceFrame.path}:${sourceFrame.line}:${sourceFrame.column || 1}${sourceFrame.unavailable ? " \xB7 source preview unavailable" : ""}`;
1475
823
  }
1476
- __name(formatSourcePath, "formatSourcePath");
824
+ _chunkS3JO3N4Hcjs.__name.call(void 0, formatSourcePath, "formatSourcePath");
1477
825
  function resolveDocumentTheme(document, clientWindow) {
1478
826
  for (const element of [document.documentElement, document.body]) {
1479
827
  if (!element) continue;
@@ -1481,11 +829,11 @@ function resolveDocumentTheme(document, clientWindow) {
1481
829
  if (explicit === "dark" || element.classList.contains("dark")) return "dark";
1482
830
  if (explicit === "light" || element.classList.contains("light")) return "light";
1483
831
  }
1484
- const colorScheme = clientWindow.getComputedStyle?.(document.documentElement).colorScheme;
1485
- if (colorScheme?.includes("dark") && !colorScheme.includes("light")) return "dark";
1486
- return clientWindow.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
832
+ const colorScheme = _optionalChain([clientWindow, 'access', _39 => _39.getComputedStyle, 'optionalCall', _40 => _40(document.documentElement), 'access', _41 => _41.colorScheme]);
833
+ if (_optionalChain([colorScheme, 'optionalAccess', _42 => _42.includes, 'call', _43 => _43("dark")]) && !colorScheme.includes("light")) return "dark";
834
+ return _optionalChain([clientWindow, 'access', _44 => _44.matchMedia, 'optionalCall', _45 => _45("(prefers-color-scheme: dark)"), 'access', _46 => _46.matches]) ? "dark" : "light";
1487
835
  }
1488
- __name(resolveDocumentTheme, "resolveDocumentTheme");
836
+ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveDocumentTheme, "resolveDocumentTheme");
1489
837
  function createFarmRuntimeErrorDebugReport(record, clientWindow, farmVersion) {
1490
838
  const source = record.sourceFrame.lines.map(
1491
839
  (line) => `${line.highlight ? ">" : " "} ${line.number ? String(line.number).padStart(4, " ") : " "} | ${line.content}`
@@ -1523,7 +871,7 @@ function createFarmRuntimeErrorDebugReport(record, clientWindow, farmVersion) {
1523
871
  "Identify the most likely root cause from the message, source frame, and stack trace. Explain the smallest safe fix and how to verify it."
1524
872
  ].join("\n");
1525
873
  }
1526
- __name(createFarmRuntimeErrorDebugReport, "createFarmRuntimeErrorDebugReport");
874
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmRuntimeErrorDebugReport, "createFarmRuntimeErrorDebugReport");
1527
875
  function createGithubIssueUrl(record, clientWindow, farmVersion) {
1528
876
  const source = record.sourceFrame.lines.map(
1529
877
  (line) => `${line.highlight ? ">" : " "} ${line.number ? String(line.number).padStart(4, " ") : " "} | ${line.content}`
@@ -1570,14 +918,14 @@ function createGithubIssueUrl(record, clientWindow, farmVersion) {
1570
918
  issueUrl.searchParams.set("body", body);
1571
919
  return issueUrl.href;
1572
920
  }
1573
- __name(createGithubIssueUrl, "createGithubIssueUrl");
921
+ _chunkS3JO3N4Hcjs.__name.call(void 0, createGithubIssueUrl, "createGithubIssueUrl");
1574
922
  function truncateText(value, maxLength) {
1575
923
  if (value.length <= maxLength) return value;
1576
924
  return `${value.slice(0, maxLength - 24)}
1577
925
 
1578
926
  [report truncated]`;
1579
927
  }
1580
- __name(truncateText, "truncateText");
928
+ _chunkS3JO3N4Hcjs.__name.call(void 0, truncateText, "truncateText");
1581
929
  async function copyText(value, clientWindow, document) {
1582
930
  if (clientWindow.navigator.clipboard && clientWindow.isSecureContext) {
1583
931
  await clientWindow.navigator.clipboard.writeText(value);
@@ -1594,8 +942,7 @@ async function copyText(value, clientWindow, document) {
1594
942
  area.remove();
1595
943
  if (!copied) throw new Error("Copy command was rejected");
1596
944
  }
1597
- __name(copyText, "copyText");
1598
- // Annotate the CommonJS export names for ESM import in node:
1599
- 0 && (module.exports = {
1600
- createFarmRuntimeErrorOverlay
1601
- });
945
+ _chunkS3JO3N4Hcjs.__name.call(void 0, copyText, "copyText");
946
+
947
+
948
+ exports.createFarmRuntimeErrorOverlay = createFarmRuntimeErrorOverlay;