@preventive/triage 1.0.0-alpha.9 → 1.0.0-alpha.90

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 (448) hide show
  1. package/LICENSE-APACHE +202 -0
  2. package/README.md +16 -0
  3. package/api/reap.ts +16 -78
  4. package/cli.js +6 -0
  5. package/client/dependency-paths.d.ts +3 -0
  6. package/client/dependency-paths.js +36 -0
  7. package/client/finding-link.js +305 -0
  8. package/client/linked-findings.d.ts +1 -0
  9. package/client/linked-findings.js +115 -0
  10. package/common/bundle-commit.d.ts +1 -0
  11. package/common/bundle-commit.js +4 -0
  12. package/common/bundle-compare-diff.d.ts +6 -0
  13. package/common/bundle-compare-diff.js +378 -0
  14. package/common/bundle-compare-inputs.d.ts +3 -0
  15. package/common/bundle-compare-inputs.js +141 -0
  16. package/common/bundle-compare-versions.js +172 -0
  17. package/common/bundle-comparison.d.ts +8 -0
  18. package/common/bundle-comparison.js +69 -0
  19. package/common/bundle-imports.js +20 -0
  20. package/common/bundle-metadata.d.ts +15 -0
  21. package/common/bundle-metadata.js +226 -0
  22. package/common/bundle-pkg-of.d.ts +1 -0
  23. package/common/bundle-pkg-of.js +90 -0
  24. package/common/bundle-reasons.d.ts +6 -0
  25. package/common/bundle-reasons.js +58 -0
  26. package/common/bundle-source-links.d.ts +6 -0
  27. package/common/bundle-source-links.js +216 -0
  28. package/common/bundle-sourcemap.d.ts +10 -0
  29. package/common/bundle-sourcemap.js +100 -0
  30. package/common/bundle-sources.d.ts +10 -0
  31. package/common/bundle-sources.js +374 -0
  32. package/common/bundle-stats.js +41 -0
  33. package/common/bundle-tabs.js +1 -0
  34. package/common/code-language.js +80 -0
  35. package/common/default-scan-models.ts +37 -0
  36. package/common/dependency-reviews.d.ts +19 -0
  37. package/common/dependency-reviews.js +67 -0
  38. package/common/finding-duplicates.js +63 -0
  39. package/common/finding-filters.js +313 -0
  40. package/common/finding-id.js +47 -0
  41. package/common/finding-repo.d.ts +5 -0
  42. package/common/finding-repo.js +67 -0
  43. package/common/github-issue-labels.d.ts +3 -0
  44. package/common/github-issue-labels.js +42 -0
  45. package/common/github-pr.ts +56 -0
  46. package/common/gzip.js +59 -0
  47. package/common/line-diff.d.ts +15 -0
  48. package/common/line-diff.js +188 -0
  49. package/common/linked-workspace-groups.js +63 -0
  50. package/common/managed/agent-tasks.ts +292 -0
  51. package/common/managed/comments.ts +43 -0
  52. package/common/managed/dependency-routes.js +25 -0
  53. package/common/managed/directory-packages.ts +28 -0
  54. package/common/managed/finding-detail.d.ts +5 -0
  55. package/common/managed/finding-detail.js +75 -0
  56. package/common/managed/finding-values.d.ts +2 -0
  57. package/common/managed/finding-values.js +138 -0
  58. package/common/managed/github-agents.ts +114 -0
  59. package/common/managed/github-logins.ts +49 -0
  60. package/common/managed/lite-name.d.ts +2 -0
  61. package/common/managed/lite-name.js +20 -0
  62. package/common/managed/npm-packages.d.ts +9 -0
  63. package/common/managed/npm-packages.js +63 -0
  64. package/common/managed/permissions.ts +31 -0
  65. package/common/managed/report-content.ts +72 -0
  66. package/common/managed/report-filter.ts +120 -0
  67. package/common/managed/repository-alias.ts +65 -0
  68. package/common/managed/review-view-routes.js +23 -0
  69. package/common/managed/risk-routes.js +30 -0
  70. package/common/managed/roles.ts +48 -0
  71. package/common/managed/routes.d.ts +2 -0
  72. package/common/managed/routes.js +386 -0
  73. package/common/managed/scan-models.ts +6 -0
  74. package/common/managed/stasis-config.ts +7 -0
  75. package/common/managed/team-app.d.ts +19 -0
  76. package/common/managed/team-app.js +129 -0
  77. package/common/managed/team-filters.js +26 -0
  78. package/common/managed/triage.ts +83 -0
  79. package/common/managed/upload-seal.ts +126 -0
  80. package/common/npm-token.d.ts +2 -0
  81. package/common/npm-token.js +14 -0
  82. package/common/pretty-json.js +123 -0
  83. package/common/pretty-kinds.js +20 -0
  84. package/common/pretty-print.d.ts +7 -0
  85. package/common/pretty-print.js +41 -0
  86. package/common/pretty-sourcemap.js +70 -0
  87. package/common/repo-commit.d.ts +4 -0
  88. package/common/repo-commit.js +30 -0
  89. package/common/revalidation-conflicts.js +48 -0
  90. package/common/revalidation-input-groups.js +56 -0
  91. package/common/scan-server.ts +13 -0
  92. package/common/security-links.d.ts +5 -0
  93. package/common/security-links.js +33 -0
  94. package/common/server-info.ts +46 -0
  95. package/common/sourcemap-listing.js +78 -0
  96. package/common/sourcemap-mappings.js +136 -0
  97. package/common/sourcemap-unlist.js +85 -0
  98. package/common/stasis-files.d.ts +5 -0
  99. package/common/stasis-files.js +20 -0
  100. package/common/stasis-tgz.d.ts +6 -0
  101. package/common/stasis-tgz.js +27 -0
  102. package/common/utf8.d.ts +3 -0
  103. package/common/utf8.js +45 -0
  104. package/common/whitespace-insensitive.js +19 -0
  105. package/common/workspace-app.js +91 -0
  106. package/common/workspace-groups.js +176 -0
  107. package/out/activity.js +2 -0
  108. package/out/brotli-fallback.js +3 -3
  109. package/out/chunk-2XUEZHIP.js +28 -0
  110. package/out/chunk-3DOSBILK.js +4 -0
  111. package/out/chunk-55YIWY3H.js +5 -0
  112. package/out/chunk-5AVGKFMR.js +1 -0
  113. package/out/chunk-5PWEAEA5.js +1 -0
  114. package/out/chunk-6VOB5WXX.js +2 -0
  115. package/out/chunk-6Y6PZ2BU.js +9 -0
  116. package/out/chunk-74JZTGTO.js +11 -0
  117. package/out/chunk-7BKKYVWR.js +7 -0
  118. package/out/chunk-7C7DWL7I.js +1 -0
  119. package/out/chunk-7HP2VYIC.js +2 -0
  120. package/out/chunk-7YFJUT2P.js +1 -0
  121. package/out/chunk-A4BBBHQU.js +1 -0
  122. package/out/chunk-B64CTMVU.js +4 -0
  123. package/out/chunk-BEKYZCPX.js +14 -0
  124. package/out/chunk-BZJU5EEV.js +1 -0
  125. package/out/chunk-C4Z6ZBXV.js +10 -0
  126. package/out/chunk-CJVMNJDZ.js +3 -0
  127. package/out/chunk-CU3FPB3P.js +1 -0
  128. package/out/chunk-DEVAORP2.js +1 -0
  129. package/out/chunk-DUASGS2O.js +8 -0
  130. package/out/chunk-EEJA7JBI.js +13 -0
  131. package/out/chunk-ESXA7KID.js +1 -0
  132. package/out/chunk-FSU2PLJL.js +1 -0
  133. package/out/chunk-GO7FT4OD.js +1 -0
  134. package/out/chunk-GX5UXWT4.js +1 -0
  135. package/out/chunk-HGWFRZNC.js +267 -0
  136. package/out/chunk-IYPY47MC.js +1 -0
  137. package/out/chunk-JZAROLQT.js +40 -0
  138. package/out/chunk-K4XJHM2T.js +1 -0
  139. package/out/chunk-KP2XM324.js +6 -0
  140. package/out/chunk-LRWB6QVO.js +1 -0
  141. package/out/chunk-LVSLM7HB.js +1 -0
  142. package/out/chunk-LVW7WWV4.js +1 -0
  143. package/out/chunk-N57OWFKY.js +15 -0
  144. package/out/chunk-NRPC74AM.js +1 -0
  145. package/out/chunk-OOJM4CTU.js +1 -0
  146. package/out/chunk-PKLVXUEI.js +11 -0
  147. package/out/chunk-PLGH63UC.js +2 -0
  148. package/out/chunk-PNHBZGDD.js +1 -0
  149. package/out/chunk-PWFUOLZK.js +17 -0
  150. package/out/chunk-PXK7EU4V.js +1 -0
  151. package/out/chunk-QD3IBSF4.js +7 -0
  152. package/out/chunk-QI66YA4F.js +1 -0
  153. package/out/chunk-QRKFPLA4.js +80 -0
  154. package/out/chunk-R3NZFXVR.js +1 -0
  155. package/out/chunk-R5O6FAW4.js +2 -0
  156. package/out/chunk-RAM3GDAD.js +1 -0
  157. package/out/chunk-RPNO56H2.js +1 -0
  158. package/out/chunk-SMNFBOLO.js +10 -0
  159. package/out/chunk-SSPDMA6D.js +1 -0
  160. package/out/chunk-SZTCJVZJ.js +55 -0
  161. package/out/chunk-SZWPYLPC.js +1 -0
  162. package/out/chunk-TKPNRQNN.js +3 -0
  163. package/out/chunk-TUII34K2.js +1 -0
  164. package/out/chunk-UJP4PQJA.js +1 -0
  165. package/out/chunk-UJSJMXEG.js +1 -0
  166. package/out/chunk-UR4WYMIP.js +1 -0
  167. package/out/chunk-UTYWTUTC.js +1 -0
  168. package/out/chunk-VHEXSGGP.js +1 -0
  169. package/out/chunk-VYYUMYVW.js +9 -0
  170. package/out/chunk-WBK5ZN4K.js +3 -0
  171. package/out/chunk-WCDYSIKG.js +1 -0
  172. package/out/chunk-XM4RLC4A.js +2 -0
  173. package/out/chunk-XRAAYXPR.js +1 -0
  174. package/out/chunk-ZQHLECTI.js +1 -0
  175. package/out/client-managed-import.js +4 -0
  176. package/out/client-managed.js +35 -0
  177. package/out/client-sync.js +11 -17
  178. package/out/compare.js +26 -0
  179. package/out/dialogs.js +40 -0
  180. package/out/github-issue-authorized.html +3 -0
  181. package/out/github-issue-authorized.js +1 -0
  182. package/out/graph.js +19 -5
  183. package/out/index.html +105 -25
  184. package/out/prism.js +14 -10
  185. package/out/scan.js +2 -0
  186. package/out/stasis.svg +20 -0
  187. package/out/terminal.js +367 -39
  188. package/out/view.css +1 -1
  189. package/out/view.js +19 -148
  190. package/package.json +416 -64
  191. package/risk/actions/findings.js +161 -0
  192. package/risk/actions/resolve.js +287 -0
  193. package/risk/actions/scripts/commands.js +182 -0
  194. package/risk/actions/scripts/grade.js +113 -0
  195. package/risk/actions/scripts/packages.js +123 -0
  196. package/risk/actions/scripts/shell.js +169 -0
  197. package/risk/actions/uses.js +94 -0
  198. package/risk/actions/workflow.js +183 -0
  199. package/risk/files/characters.js +354 -0
  200. package/risk/files/hosts.js +206 -0
  201. package/risk/files/readability.js +185 -0
  202. package/risk/files/runs-code.js +568 -0
  203. package/risk/files/script.js +420 -0
  204. package/risk/files/source-map-link.js +43 -0
  205. package/risk/files/stamps.js +47 -0
  206. package/risk/index.d.ts +309 -0
  207. package/risk/index.js +12 -0
  208. package/risk/npm/assess.js +303 -0
  209. package/risk/npm/combined.js +68 -0
  210. package/risk/npm/compare.js +236 -0
  211. package/risk/npm/dependencies.js +172 -0
  212. package/risk/npm/diff.js +79 -0
  213. package/risk/npm/downloads.js +84 -0
  214. package/risk/npm/files.js +445 -0
  215. package/risk/npm/held.js +67 -0
  216. package/risk/npm/install-scripts.js +34 -0
  217. package/risk/npm/malware.js +38 -0
  218. package/risk/npm/manifest.js +65 -0
  219. package/risk/npm/new-dependency.js +60 -0
  220. package/risk/npm/old-version.js +108 -0
  221. package/risk/npm/registry.js +401 -0
  222. package/risk/npm/release.js +85 -0
  223. package/risk/npm/score.js +59 -0
  224. package/risk/npm/specs.js +124 -0
  225. package/risk/npm/tarball.js +169 -0
  226. package/server-common/database-config.ts +16 -0
  227. package/server-common/initialize.ts +18 -0
  228. package/server-common/npm-advisories.ts +101 -0
  229. package/{server → server-common}/origin.ts +5 -5
  230. package/server-common/reap.ts +48 -0
  231. package/server-common/scan-config.ts +19 -0
  232. package/server-common/standalone.ts +29 -0
  233. package/server-common/storage-crypto.ts +182 -0
  234. package/server-common/storage-log.ts +38 -0
  235. package/server-common/vercel-blob.ts +103 -0
  236. package/server-e2e/app.ts +487 -0
  237. package/{server → server-e2e}/bus-receiver.ts +2 -1
  238. package/{server → server-e2e}/cli.js +9 -4
  239. package/{server → server-e2e}/config.ts +52 -42
  240. package/{server → server-e2e}/db-neon.ts +2 -2
  241. package/{server → server-e2e}/db-revision-sql.ts +1 -1
  242. package/{server → server-e2e}/db-stmt.ts +2 -2
  243. package/{server → server-e2e}/db.ts +7 -7
  244. package/{server → server-e2e}/http.ts +44 -13
  245. package/{server → server-e2e}/hub.ts +40 -9
  246. package/server-e2e/index.ts +17 -0
  247. package/server-e2e/lifecycle.ts +95 -0
  248. package/{server → server-e2e}/neon-driver.ts +2 -2
  249. package/{server → server-e2e}/npm-proxy.ts +12 -145
  250. package/{server → server-e2e}/objstore/blob-vercel.ts +10 -114
  251. package/{server → server-e2e}/objstore/blob.ts +1 -1
  252. package/{server → server-e2e}/objstore/fetch-mint-guard.ts +2 -2
  253. package/{server → server-e2e}/objstore/handlers.ts +9 -8
  254. package/{server → server-e2e}/objstore/init.ts +19 -27
  255. package/{server → server-e2e}/objstore/reaper.ts +1 -1
  256. package/{server → server-e2e}/objstore/rest-deny.ts +1 -1
  257. package/{server → server-e2e}/objstore/rest-mint.ts +3 -3
  258. package/{server → server-e2e}/objstore/rest.ts +3 -3
  259. package/{server → server-e2e}/objstore/store-neon.ts +6 -10
  260. package/{server → server-e2e}/objstore/store.ts +7 -7
  261. package/{server → server-e2e}/objstore/tokens.ts +2 -2
  262. package/{server → server-e2e}/pubsub.ts +12 -9
  263. package/{server → server-e2e}/sign.ts +4 -4
  264. package/{server → server-e2e}/sse-server.ts +3 -3
  265. package/{server → server-e2e}/static.ts +18 -17
  266. package/{server → server-e2e}/sync-handlers.ts +56 -30
  267. package/{server → server-e2e}/ws-server.ts +20 -9
  268. package/server-managed/activity.ts +269 -0
  269. package/server-managed/agent-merges.ts +109 -0
  270. package/server-managed/app-agents.ts +23 -0
  271. package/server-managed/avatar-store.ts +21 -0
  272. package/server-managed/blob-store.ts +26 -0
  273. package/server-managed/brotli.ts +10 -0
  274. package/server-managed/bundle-advisories.ts +176 -0
  275. package/server-managed/bundle-advisory-inventory.ts +85 -0
  276. package/server-managed/bundle-build-diagnostics.d.ts +10 -0
  277. package/server-managed/bundle-build-diagnostics.js +23 -0
  278. package/server-managed/bundle-build-leases.ts +41 -0
  279. package/server-managed/bundle-build-worker.js +387 -0
  280. package/server-managed/bundle-build.ts +328 -0
  281. package/server-managed/bundle-cache.ts +261 -0
  282. package/server-managed/bundle-catalog.ts +29 -0
  283. package/server-managed/bundle-commits.ts +133 -0
  284. package/server-managed/bundle-dependency-reviews.ts +91 -0
  285. package/server-managed/bundle-store.ts +24 -0
  286. package/server-managed/bundle-summary-cache.ts +139 -0
  287. package/server-managed/bundle-validation.ts +33 -0
  288. package/server-managed/bundle.ts +151 -0
  289. package/server-managed/cache-storage.ts +20 -0
  290. package/server-managed/cli.js +21 -0
  291. package/server-managed/combined.ts +43 -0
  292. package/server-managed/comments.ts +138 -0
  293. package/server-managed/commit-coauthors.ts +105 -0
  294. package/server-managed/commit-lockfiles.ts +78 -0
  295. package/server-managed/comparison.ts +51 -0
  296. package/server-managed/config.ts +163 -0
  297. package/server-managed/content-access.ts +15 -0
  298. package/server-managed/crypto.ts +25 -0
  299. package/server-managed/db-methods.ts +1950 -0
  300. package/server-managed/db-neon.ts +401 -0
  301. package/server-managed/db-schema.ts +271 -0
  302. package/server-managed/db-table-names.ts +22 -0
  303. package/server-managed/db.ts +150 -0
  304. package/server-managed/dependabot-access.ts +85 -0
  305. package/server-managed/dependabot-alerts.ts +197 -0
  306. package/server-managed/dependency-review-comments.ts +158 -0
  307. package/server-managed/dependency-reviews.ts +369 -0
  308. package/server-managed/github-accounts.ts +59 -0
  309. package/server-managed/github-actions.ts +71 -0
  310. package/server-managed/github-app.ts +347 -0
  311. package/server-managed/github-errors.ts +92 -0
  312. package/server-managed/github-graphql.ts +42 -0
  313. package/server-managed/github-issue-links.ts +264 -0
  314. package/server-managed/github-issue-oauth.ts +30 -0
  315. package/server-managed/github-issues.ts +169 -0
  316. package/server-managed/github-link-oauth.ts +56 -0
  317. package/server-managed/github-links.ts +204 -0
  318. package/server-managed/github-metadata.ts +218 -0
  319. package/server-managed/github-oauth.ts +264 -0
  320. package/server-managed/github-pulls.ts +290 -0
  321. package/server-managed/github-requests.ts +181 -0
  322. package/server-managed/github-users.ts +53 -0
  323. package/server-managed/github-values.ts +26 -0
  324. package/server-managed/history-windows.ts +172 -0
  325. package/server-managed/http-response.ts +76 -0
  326. package/server-managed/http.ts +6722 -0
  327. package/server-managed/import-triage.ts +51 -0
  328. package/server-managed/index.ts +204 -0
  329. package/server-managed/kept-briefly.ts +37 -0
  330. package/server-managed/kept.ts +28 -0
  331. package/server-managed/known-listings.ts +112 -0
  332. package/server-managed/link-reports.ts +149 -0
  333. package/server-managed/listed-activity.ts +39 -0
  334. package/server-managed/locked-packages.ts +234 -0
  335. package/server-managed/lockfile-scope.ts +58 -0
  336. package/server-managed/lru.ts +30 -0
  337. package/server-managed/managed-issues.ts +92 -0
  338. package/server-managed/management-catalog.ts +45 -0
  339. package/server-managed/management.ts +116 -0
  340. package/server-managed/npm-delta-worker.js +203 -0
  341. package/server-managed/npm-delta.ts +277 -0
  342. package/server-managed/npm-insights.ts +455 -0
  343. package/server-managed/npm-kept.ts +274 -0
  344. package/server-managed/npm-loads.ts +259 -0
  345. package/server-managed/npm-manifest.ts +117 -0
  346. package/server-managed/npm-packages.ts +477 -0
  347. package/server-managed/npm-patch-paths.ts +86 -0
  348. package/server-managed/npm-patch.ts +457 -0
  349. package/server-managed/npm-provenance.ts +127 -0
  350. package/server-managed/npm-risk.ts +310 -0
  351. package/server-managed/object-storage-disk.ts +147 -0
  352. package/server-managed/object-storage-vercel.ts +71 -0
  353. package/server-managed/object-storage.ts +82 -0
  354. package/server-managed/package-entry-points.ts +127 -0
  355. package/server-managed/pretty-copies.ts +22 -0
  356. package/server-managed/pretty-format.d.ts +4 -0
  357. package/server-managed/pretty-format.js +27 -0
  358. package/server-managed/pretty-print.ts +444 -0
  359. package/server-managed/public-workspace.ts +242 -0
  360. package/server-managed/pull-comment-reviews.ts +161 -0
  361. package/server-managed/pull-dependencies.ts +370 -0
  362. package/server-managed/pull-dependency-reviews.ts +458 -0
  363. package/server-managed/pull-reviews.ts +202 -0
  364. package/server-managed/pulse-walk.ts +164 -0
  365. package/server-managed/queue.ts +54 -0
  366. package/server-managed/release-commits.ts +85 -0
  367. package/server-managed/rename-diff-worker.js +30 -0
  368. package/server-managed/rename-diff.ts +237 -0
  369. package/server-managed/repo-path.ts +21 -0
  370. package/server-managed/report-migration.ts +32 -0
  371. package/server-managed/report-opening.ts +77 -0
  372. package/server-managed/report-query.ts +10 -0
  373. package/server-managed/report-response.ts +16 -0
  374. package/server-managed/report-sources.ts +185 -0
  375. package/server-managed/report-store.ts +77 -0
  376. package/server-managed/repository-actions.ts +220 -0
  377. package/server-managed/repository-agents.ts +422 -0
  378. package/server-managed/repository-aliases.ts +119 -0
  379. package/server-managed/repository-browser.ts +362 -0
  380. package/server-managed/repository-changes.ts +280 -0
  381. package/server-managed/repository-code.ts +222 -0
  382. package/server-managed/repository-dependency-reviews.ts +220 -0
  383. package/server-managed/repository-discovery.ts +83 -0
  384. package/server-managed/repository-history.ts +444 -0
  385. package/server-managed/repository-issues.ts +293 -0
  386. package/server-managed/repository-policy.ts +27 -0
  387. package/server-managed/repository-pulls.ts +207 -0
  388. package/server-managed/repository-pulse.ts +409 -0
  389. package/server-managed/repository-risk-assess.ts +179 -0
  390. package/server-managed/repository-risk-audit.ts +145 -0
  391. package/server-managed/repository-risk-caches.ts +56 -0
  392. package/server-managed/repository-risk-kept.ts +86 -0
  393. package/server-managed/repository-risk-read.ts +296 -0
  394. package/server-managed/repository-risk-stasis.ts +61 -0
  395. package/server-managed/repository-risk-turn.ts +97 -0
  396. package/server-managed/repository-risk.ts +528 -0
  397. package/server-managed/repository-squashes.ts +160 -0
  398. package/server-managed/repository-stamp.ts +41 -0
  399. package/server-managed/request-timing.ts +63 -0
  400. package/server-managed/reviewed-dependencies.ts +170 -0
  401. package/server-managed/revisions.ts +35 -0
  402. package/server-managed/scan-downloads.ts +121 -0
  403. package/server-managed/session.ts +132 -0
  404. package/server-managed/slugs.ts +38 -0
  405. package/server-managed/solidity-entry-points.ts +71 -0
  406. package/server-managed/sql-postgres.ts +34 -0
  407. package/server-managed/sql.ts +107 -0
  408. package/server-managed/stasis-config.ts +147 -0
  409. package/server-managed/stasis-dependencies.ts +280 -0
  410. package/server-managed/static.ts +28 -0
  411. package/server-managed/storage-command.ts +16 -0
  412. package/server-managed/storage-db.ts +183 -0
  413. package/server-managed/storage-encryption.ts +288 -0
  414. package/server-managed/storage-maintenance.ts +259 -0
  415. package/server-managed/storage-payload.ts +121 -0
  416. package/server-managed/storage-stores.ts +91 -0
  417. package/server-managed/storage.ts +82 -0
  418. package/server-managed/team-app-summaries.ts +57 -0
  419. package/server-managed/team-app.ts +162 -0
  420. package/server-managed/team-catalog.ts +7 -0
  421. package/server-managed/team-feed.ts +180 -0
  422. package/server-managed/team-icons.ts +50 -0
  423. package/server-managed/team-npm-scopes.ts +103 -0
  424. package/server-managed/team-progress.ts +77 -0
  425. package/server-managed/team-reports.ts +369 -0
  426. package/server-managed/triage-response.ts +16 -0
  427. package/server-managed/type-only-proof.js +181 -0
  428. package/server-managed/type-only-worker.js +31 -0
  429. package/server-managed/type-only.ts +135 -0
  430. package/server-managed/uploads.ts +106 -0
  431. package/server-managed/upstream-cache.ts +275 -0
  432. package/server-managed/view-as.ts +58 -0
  433. package/server-managed/worker-turns.ts +76 -0
  434. package/server-managed/workspace-shares.ts +170 -0
  435. package/server.ts +70 -0
  436. package/strip-types-loader.js +13 -10
  437. package/server/index.ts +0 -480
  438. package/server/lifecycle.ts +0 -208
  439. /package/{LICENSE → LICENSE-MIT} +0 -0
  440. /package/{server → server-e2e}/auth.ts +0 -0
  441. /package/{server → server-e2e}/config.example.json +0 -0
  442. /package/{server → server-e2e}/objstore/blob-fs.ts +0 -0
  443. /package/{server → server-e2e}/objstore/fs.ts +0 -0
  444. /package/{server → server-e2e}/objstore/sign.ts +0 -0
  445. /package/{server → server-e2e}/peer.ts +0 -0
  446. /package/{server → server-e2e}/sse-session.ts +0 -0
  447. /package/{server → server-e2e}/util.ts +0 -0
  448. /package/{server → server-e2e}/validation.ts +0 -0
@@ -0,0 +1,7 @@
1
+ import{a as e}from"./chunk-QI66YA4F.js";import{C as t,H as n,J as r,K as i,L as a,R as o,a as s,c,d as l,e as u,g as d,h as f,i as p,m,p as h,u as ee}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import{d as g,f as te,h as _,i as v,j as ne,m as re,n as ie}from"./chunk-7HP2VYIC.js";import"./chunk-PXK7EU4V.js";import"./chunk-OOJM4CTU.js";var y=e=>e.replace(/^[ \t\n\r\0\v]+|[ \t\n\r\0\v]+$/gu,``),b=e=>e.replace(/[A-Z]+/gu,e=>e.toLowerCase()),x=e=>e===void 0||e===``||e===`0`,S=e=>e!==void 0&&e>=`0`&&e<=`9`,ae=e=>S(e)||/^[A-Za-z]$/u.test(e??``);function oe(e){let t=e[0];for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1],a=t.at(-1)===`.`?``:`.`;r===`-`||r===`_`||r===`+`?t+=a:!S(i)&&i!==`.`&&S(r)||S(i)&&!S(r)&&r!==`.`?t+=`${a}${r}`:ae(r)?t+=r:t+=a}return t.endsWith(`.`)?t.slice(0,-1):t}var se=[[`dev`,0],[`alpha`,1],[`a`,1],[`beta`,2],[`b`,2],[`RC`,3],[`rc`,3],[`#`,4],[`pl`,5],[`p`,5]],C=e=>se.find(([t])=>e.startsWith(t))?.[1]??-1,w=e=>e>0?1:e<0?-1:0,T=2n**63n-1n,ce=e=>e<=T&&e>=-T-1n,le=e=>{let t=BigInt(/^\d+/u.exec(e)[0]);return t>T?T:t};function ue(e,t){return S(e[0])&&S(t[0])?w(Number(le(e)-le(t))):!S(e[0])&&!S(t[0])?w(C(e)-C(t)):S(e[0])?w(C(`#N#`)-C(t)):w(C(e)-C(`#N#`))}var de=new TextEncoder,fe=e=>/^[\0-\u007F]*$/u.test(e)?e:String.fromCodePoint(...de.encode(e));function pe(e,t){if(e===``||t===``)return e===t?0:e===``?-1:1;let n=e[0]===`#`?e:oe(e),r=t[0]===`#`?t:oe(t),[i,a,o,s,c]=[0,0,0,0,0];for(;i<n.length&&a<r.length&&o!==-1&&s!==-1&&(o=n.indexOf(`.`,i),s=r.indexOf(`.`,a),c=ue(n.slice(i,o===-1?void 0:o),r.slice(a,s===-1?void 0:s)),c===0);)o!==-1&&(i=o+1),s!==-1&&(a=s+1);return c===0?o===-1?s===-1?0:S(r[a])?-1:pe(`#N#`,r.slice(a)):S(n[i])?1:pe(n.slice(i),`#N#`):c}var me=(e,t)=>pe(fe(e),fe(t)),he={"==":e=>e===0,"!=":e=>e!==0,"<":e=>e<0,"<=":e=>e<=0,">":e=>e>0,">=":e=>e>=0},ge=(e,t,n)=>he[n](me(e,t)),E=(t,n)=>w(e(t,n)),_e=/^[ \t\n\r\v\f]*[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[ \t\n\r\v\f]*$/u;function ve(e){if(!_e.test(e))return;let t=e.trim();if(!/[.eE]/u.test(t)){let e=BigInt(t);return ce(e)?{long:e}:{double:Number(t),overflow:e>0n?1:-1}}return{double:Number(t),overflow:0}}function ye(e,t){let n=ve(e),r=ve(t);return n===void 0||r===void 0||n.overflow!==void 0&&n.overflow!==0&&n.overflow===r.overflow&&n.double-r.double===0?E(e,t):n.double!==void 0||r.double!==void 0?n.double===void 0?r.overflow===0?w(Number(n.long)-r.double):-r.overflow:r.double===void 0?n.overflow===0?w(n.double-Number(r.long)):n.overflow:n.double===r.double&&!Number.isFinite(n.double)?E(e,t):w(n.double-r.double):w(Number(n.long-r.long))}var be=/^(?:0|-?[1-9]\d*)$/u;function xe(e){if(!be.test(e))return e;let t=BigInt(e);return ce(t)?t:e}function Se(e,t){let n=xe(e),r=xe(t);if(typeof n==`bigint`&&typeof r==`bigint`)return n>r?1:-1;if(typeof n==`string`&&typeof r==`string`)return ye(n,r);let[i,a,o]=typeof n==`bigint`?[n,r,1]:[r,n,-1],s=ve(a);return s?.long===void 0?s?.double===void 0?o*E(String(i),a):o*w(Number(i)-s.double):o*w(Number(i-s.long))}var D=511,Ce=new WeakMap,O=e=>Ce.get(e)??Object.keys(e),we=e=>c(e)&&O(e).length===0,Te=e=>e.every((e,t)=>e===String(t)),k=(e,t)=>{let n=1;for(let r=e.indexOf(`
2
+ `);r!==-1&&r<t;r=e.indexOf(`
3
+ `,r+1))n++;return n},A=(e,t,n=e.pos)=>ne(t,k(e.text,n)-1);function j(e){let{text:t,pos:n}=e;if(n>=t.length)return`the end of the file`;if(t[n]===`
4
+ `)return`an LF line end`;if(t.startsWith(`\r
5
+ `,n))return`a CRLF line end`;let r=t.indexOf(`
6
+ `,n);return _(t.slice(n,r===-1?t.length:t[r-1]===`\r`?r-1:r))}function Ee(e,t,n){if(!e.text.startsWith(t,e.pos))throw A(e,`expected ${n()}, as Composer writes it, found ${j(e)}`);e.pos+=t.length}function M(e,t){e.lines[t]??=`${e.eol}${e.indent.repeat(t)}`,Ee(e,e.lines[t],()=>t===0?`a line end`:`a line end and ${t===1?``:`${t} times `}${_(e.indent)} of indentation`)}var De=e=>JSON.stringify(e).replaceAll(`\u2028`,`\\u2028`).replaceAll(`\u2029`,`\\u2029`);function Oe(e){let{text:t,pos:n}=e;if(t[n]!==`"`)throw A(e,`expected a string, found ${j(e)}`);let r=n+1;for(;r<t.length&&t[r]!==`"`&&t[r]!==`
7
+ `;)r+=t[r]===`\\`?2:1;if(t[r]!==`"`)throw A(e,`a string with no closing quote`);let i=t.slice(n,r+1);if(e.pos=r+1,!ke.test(i))return i.slice(1,-1);let a=te(()=>JSON.parse(i),()=>{throw A(e,`${_(i)} is not a string as JSON writes it`,n)});if(!a.isWellFormed())throw A(e,`${_(i)} escapes a lone surrogate, which PHP does not read`,n);if(De(a)!==i)throw A(e,`${_(i)} is not written as Composer writes it, ${_(De(a))}`,n);return a}var ke=/[\\\p{Cc}\u2028\u2029\p{Cs}]/u;function Ae(e){if(e===0)return Object.is(e,-0)?`-0`:`0`;let t=e<0?`-`:``,[n,r]=Math.abs(e).toExponential().split(`e`),i=n.replace(`.`,``),a=Number(r)+1;return a<-3||a>17?`${t}${i[0]}.${i.slice(1)||`0`}e${a>0?`+`:`-`}${Math.abs(a-1)}`:a<=0?`${t}0.${`0`.repeat(-a)}${i}`:i.length<=a?`${t}${i}${`0`.repeat(a-i.length)}`:`${t}${i.slice(0,a)}.${i.slice(a)}`}var je=/-?(?:0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/uy,Me=([e,t,n])=>t===void 0&&n===void 0&&ce(BigInt(e));function Ne(e){let t=ie(e,je);if(t===null)throw A(e,`expected a value, found ${j(e)}`);let[n]=t,r=Me(t),i=Number(n);if(!Number.isFinite(i))throw A(e,`${n} is past what PHP reads as a number`);let a=r?BigInt(n).toString():Ae(i);if(a!==n)throw A(e,`${n} is not written as Composer writes it, ${a}`);return r&&!Number.isSafeInteger(i)?BigInt(n):i}var Pe=[[`true`,!0],[`false`,!1],[`null`,null]];function Fe(e){let t=Pe.find(([t])=>e.text.startsWith(t,e.pos));return t!==void 0&&(e.pos+=t[0].length),t}function Ie(e,t){let n=e.text[e.pos];if(n===`{`)return Re(e,t);if(n===`[`)return ze(e,t);if(n===`"`)return Oe(e);let r=Fe(e);return r===void 0?Ne(e):r[1]}function Le(e,t){if(t===D)throw A(e,`nested more than ${D} deep, which PHP does not read`);e.pos++}function Re(e,t){let n=e.pos;Le(e,t);let r=Object.create(null);if(e.text[e.pos]===`}`){if(t!==1)throw A(e,`an empty object, which Composer writes as "[]"`,n);return e.pos++,r}let i=new Map;for(let n=!0;n;){M(e,t+1);let a=e.pos,o=Oe(e);if(i.has(o))throw A(e,`${_(o)} is a key at line ${k(e.text,i.get(o))} too`,a);i.set(o,a),Ee(e,`: `,()=>`": " after ${_(o)}`),r[o]=Ie(e,t+1),n=e.text[e.pos]===`,`,n&&e.pos++}M(e,t),Ee(e,`}`,()=>`"}"`);let a=[...i.keys()];if(Te(a))throw A(e,`an object of the keys 0 to ${a.length-1}, which Composer writes as a list`,n);return Ce.set(r,a),r}function ze(e,t){Le(e,t);let n=[];if(e.text[e.pos]===`]`)return e.pos++,n;for(let r=!0;r;)M(e,t+1),n.push(Ie(e,t+1)),r=e.text[e.pos]===`,`,r&&e.pos++;return M(e,t),Ee(e,`]`,()=>`"]"`),n}var Be=/^<<<<<<< /mu;function Ve(e){let t=Be.exec(e);if(t!==null)throw new g(`a merge conflict at line ${k(e,t.index)}, which Composer reads as a lockfile of no content-hash where its sides differ in that alone`);let[n,r]=re(e,`Composer`),i={text:e,pos:0,eol:n,indent:r,lines:[]},a=Re(i,0);if(M(i,0),i.pos!==e.length)throw A(i,`expected the end of the file after the last "}", found ${j(i)}`);return a}var He=/[ \t\n\r]*/uy,N=e=>ie(e,He),P=(e,t)=>new g(`not JSON as PHP reads it: ${t} at line ${k(e.text,e.pos)}`,e.where);function Ue(e){let{text:t,pos:n}=e,r=n+1;for(;r<t.length&&t[r]!==`"`;)r+=t[r]===`\\`?2:1;if(r>=t.length)throw P(e,`a string with no closing quote`);let i=te(()=>JSON.parse(t.slice(n,r+1)),()=>{throw P(e,`${_(t.slice(n,r+1))} is not a string`)});if(!i.isWellFormed())throw P(e,`a lone surrogate, which is not UTF-8`);return e.pos=r+1,i}function We(e,t){N(e);let n=e.text[e.pos];if(n===`{`||n===`[`){if(t===D)throw P(e,`nested more than ${D} deep`);let r=n===`{`,i=r?`}`:`]`,a=r?new Map:[];if(e.pos++,N(e),e.text[e.pos]===i)return e.pos++,a;for(;;){if(r){if(N(e),e.text[e.pos]!==`"`)throw P(e,`expected a key, found ${j(e)}`);let n=Ue(e);if(N(e),e.text[e.pos]!==`:`)throw P(e,`expected ":", found ${j(e)}`);e.pos++,a.set(n,We(e,t+1))}else a.push(We(e,t+1));N(e);let n=e.text[e.pos];if(n!==i&&n!==`,`)throw P(e,`expected "," or ${_(i)}, found ${j(e)}`);if(e.pos++,n===i)return a}}if(n===`"`)return Ue(e);let r=Fe(e);if(r!==void 0)return r[1];let i=ie(e,je);if(i===null)throw P(e,`expected a value, found ${j(e)}`);return Me(i)?BigInt(i[0]):Number(i[0])}function Ge(e,t){if(typeof e==`number`)return Number.isFinite(e)?void 0:t;if(e instanceof Map||Array.isArray(e))for(let[n,r]of e.entries()){let i=Ge(r,Array.isArray(e)?`${t}[${n}]`:v(t,n));if(i!==void 0)return i}}function Ke(e,t){let n={text:e,pos:0,where:t},r=We(n,0);if(N(n),n.pos!==e.length)throw P(n,`expected the end of the file, found ${j(n)}`);let i=Ge(r,t);if(i!==void 0)throw new g(`a number past what a double holds, which Composer refuses of the file`,i);return r}var qe=e=>`\\u${e.toString(16).padStart(4,`0`)}`;function Je(e){let t=``;for(let n of e){let e=n.codePointAt(0);t+=e<128?n:e<65536?qe(e):qe(55296+(e-65536>>10))+qe(56320+(e-65536&1023))}return t}function F(e){if(e===null||typeof e==`boolean`)return String(e);if(typeof e==`bigint`)return e.toString();if(typeof e==`number`)return Ae(e);if(typeof e==`string`)return Je(JSON.stringify(e).replaceAll(`/`,`\\/`));if(Array.isArray(e))return`[${e.map(F).join(`,`)}]`;let t=[...e.keys()];return Te(t)?`[${[...e.values()].map(F).join(`,`)}]`:`{${t.map(t=>`${F(t)}:${F(e.get(t))}`).join(`,`)}}`}var I=`[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\\d+)*)?)?([.-]?dev)?`,Ye=`stable|RC|beta|alpha|dev`,Xe=`[\\t\\n\\v\\f\\r ]`,Ze=`[^\\t\\n\\v\\f\\r ]`,Qe=`[^,\\t\\n\\v\\f\\r ]`,$e=`9999999-dev`,L=(e,t=``)=>new RegExp(e,t||`u`),et=L(`^(${Qe}+) +as +(${Qe}+)$`),tt=L(`@(?:${Ye})$`,`i`),nt=L(`^([^,\\t\\n\\v\\f\\r +]+)\\+${Ze}+$`),rt=L(`^v?(\\d{1,5})(\\.\\d+)?(\\.\\d+)?(\\.\\d+)?${I}$`,`i`),it=L(`^v?(\\d{4}(?:[.:-]?\\d{2}){1,6}(?:[.:-]?\\d{1,3}){0,2})${I}$`,`i`),at=/^([^\n]*?)[.-]?dev$/iu,ot=/^v?(\d+)(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?$/iu,st=/^((?:\d+\.)*\d+)(?:\.x)?-dev$/iu,ct=L(`${I}(?:\\+[^\\n]*)?$`,`i`);function lt(e){let t=b(e);return{a:`alpha`,b:`beta`,p:`patch`,pl:`patch`,rc:`RC`}[t]??t}function ut(e){let t=e.replace(/#[^\n]+$/u,``);if(t.startsWith(`dev-`)||t.endsWith(`-dev`))return`dev`;let n=ct.exec(b(t));return x(n[3])?{beta:`beta`,b:`beta`,alpha:`alpha`,a:`alpha`,rc:`RC`}[n[1]]??`stable`:`dev`}function dt(e){let t=y(e),n=ot.exec(t);if(n===null)return`dev-${t}`;let r=``;for(let e=1;e<5;e++)r+=n[e]===void 0?`.x`:n[e].replaceAll(`*`,`x`).replaceAll(`X`,`x`);return`${r.replaceAll(`x`,`9999999`)}-dev`}function ft(e){let t=st.exec(e);return t===null?void 0:`${t[1]}.`}function R(e){let t=y(e),n=et.exec(t);if(n!==null&&(t=n[1]),n=tt.exec(t),n!==null&&(t=t.slice(0,t.length-n[0].length)),(t===`master`||t===`trunk`||t==="default")&&(t=`dev-${t}`),/^dev-/iu.test(t))return`dev-${t.slice(4)}`;n=nt.exec(t),n!==null&&(t=n[1]);let r;if((n=rt.exec(t))===null?(n=it.exec(t))!==null&&(t=n[1].replaceAll(/\D/gu,`.`),r=2):(t=`${n[1]}${x(n[2])?`.0`:n[2]}${x(n[3])?`.0`:n[3]}${x(n[4])?`.0`:n[4]}`,r=5),r!==void 0){if(!x(n[r])){if(n[r]===`stable`)return t;let e=n[r+1];t+=`-${lt(n[r])}${(e??``).replace(/^[.-]+/u,``)}`}return x(n[r+2])||(t+=`-dev`),t}if(n=at.exec(t),n!==null){let e=dt(n[1]);if(!e.includes(`dev-`))return e}}var pt={"=":`==`,"==":`==`,"<":`<`,"<=":`<=`,">":`>`,">=":`>=`,"<>":`!=`,"!=":`!=`},z=(e,t)=>({operator:pt[e],version:t}),mt=Object.freeze({all:!0}),ht=e=>e.all?`*`:e.multi===void 0?`${e.operator} ${e.version}`:`[${e.multi.map(ht).join(e.conjunctive?` `:` || `)}]`;function gt(e,t,n=0){let r=[...e];for(let e=4;e>0;e--)if(e>t)r[e]=`0`;else if(e===t&&n!==0){let t=BigInt(r[e])+BigInt(n);if(t>T)return;r[e]=String(t)}return`${r[1]??``}.${r[2]??``}.${r[3]??``}.${r[4]??``}`}var _t=`v?(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:\\.(\\d+))?(?:${I}|\\.([xX*][.-]?dev))(?:\\+${Ze}+)?`,vt=L(`^(${Qe}*?)@(${Ye})$`,`i`),yt=/^(dev-[^,\t\n\v\f\r @]+?|[^,\t\n\v\f\r @]+?\.x-dev)#[^\n]+$/iu,bt=/^(v)?[xX*](\.[xX*])*$/iu,xt=L(`^~>?${_t}$`,`i`),St=L(`^\\^${_t}($)`,`i`),Ct=/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.[xX*])+$/u,wt=L(`^(${_t}) +- +(${_t})($)`,`i`),Tt=L(`^(<>|!=|>=?|<=?|==?)?${Xe}*([^\\n]*)`),Et=L(`-${I}$`,`i`),B=e=>e!==void 0&&e!==``;function Dt(e,t,n){let r=R(`${e}${x(t[5])&&x(t[7])&&x(t[8])?`-dev`:``}`.slice(1)),i=gt(t,n,1);return r===void 0||i===void 0?void 0:[z(`>=`,r),z(`<`,`${i}-dev`)]}function Ot(e){let t=e,n=et.exec(t);n!==null&&(t=n[1]);let r;if(n=vt.exec(t),n!==null&&(t=n[1]===``?`*`:n[1],n[2]!==`stable`&&(r=n[2])),n=yt.exec(t),n!==null&&(t=n[1]),n=bt.exec(t),n!==null)return!x(n[1])||!x(n[2])?[z(`>=`,`0.0.0.0-dev`)]:[mt];if((n=xt.exec(t))!==null){if(t.startsWith(`~>`))return;let e=B(n[4])?4:B(n[3])?3:B(n[2])?2:1;return x(n[8])||e++,Dt(t,n,Math.max(1,e-1))}if((n=St.exec(t))!==null)return Dt(t,n,n[1]!==`0`||!B(n[2])?1:n[2]!==`0`||!B(n[3])?2:3);if((n=Ct.exec(t))!==null){let e=B(n[3])?3:B(n[2])?2:1,t=`${gt(n,e)}-dev`,r=gt(n,e,1);return r===void 0?void 0:t===`0.0.0.0-dev`?[z(`<`,`${r}-dev`)]:[z(`>=`,t),z(`<`,`${r}-dev`)]}if((n=wt.exec(t))!==null){let e=x(n[6])&&x(n[8])&&x(n[9])?`-dev`:``,t=R(n[1]),r=R(n[10]);if(t===void 0||r===void 0)return;let i=z(`>=`,`${t}${e}`);if(B(n[12])&&B(n[13])||!x(n[15])||!x(n[17])||!x(n[18]))return[i,z(`<=`,r)];let a=gt([``,n[11],n[12],n[13],n[14]],B(n[12])?2:1,1);return a===void 0?void 0:[i,z(`<`,`${a}-dev`)]}n=Tt.exec(t);let i=R(n[2]);if(i===void 0&&n[2].endsWith(`-dev`)&&/^[0-9a-zA-Z\-./]+$/u.test(n[2])&&(i=R(`dev-${n[2].slice(0,-4)}`)),i===void 0)return;let a=n[1]||`=`;return a!==`==`&&a!==`=`&&!x(r)&&ut(i)===`stable`?i+=`-${r}`:a!==`<`&&a!==`>=`||Et.test(n[2])||n[2].startsWith(`dev-`)||(i+=`-dev`),[z(a,i)]}var kt=L(`${Xe}*\\|\\|?${Xe}*`),At=/(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)/u;function jt(e){let t=e[0],n=[],r=!1,i=e=>e.multi!==void 0&&e.conjunctive&&e.multi.length===2;for(let a of e.slice(1)){let[e,o,s,c]=i(t)&&i(a)?[...t.multi,...a.multi].map(ht):[];e?.startsWith(`>=`)&&o.startsWith(`<`)&&s.startsWith(`>=`)&&c.startsWith(`<`)&&o.slice(2)===s.slice(3)?(r=!0,t={multi:[t.multi[0],a.multi[1]],conjunctive:!0}):(n.push(t),t=a)}if(r)return n.push(t),n}function Mt(e){if(e.length===1)return e[0];let t=jt(e);return t?.length===1?t[0]:{multi:t??e,conjunctive:!1}}function Nt(e){let t=y(e).split(kt).map(e=>e.split(At).map(Ot));if(!t.some(e=>e.includes(void 0)))return Mt(t.map(e=>e.flat()).map(e=>e.length===1?e[0]:{multi:e,conjunctive:!0}))}function Pt(e,t,n){let r=e.startsWith(`dev-`),i=t.startsWith(`dev-`);return n===`!=`&&(r||i)?e!==t:r&&i?n===`==`&&e===t:r||i?!1:ge(e,t,n)}var Ft=e=>e.replaceAll(`=`,``);function It(e,t){let n=e.operator===`==`,r=e.operator===`!=`,i=t.operator===`==`,a=t.operator===`!=`;if(r||a)return r&&!a&&!i&&t.version.startsWith(`dev-`)||a&&!r&&!n&&e.version.startsWith(`dev-`)?!1:!n&&!i||Pt(t.version,e.version,`!=`);if(e.operator!==`==`&&Ft(e.operator)===Ft(t.operator))return!(e.version.startsWith(`dev-`)||t.version.startsWith(`dev-`));let[o,s,c]=n?[e.version,t.version,t.operator]:[t.version,e.version,e.operator];return Pt(o,s,c)?t.operator!==Ft(t.operator)||e.operator===Ft(e.operator)||me(t.version,e.version)!==0:!1}function V(e,t){return e.all||t.all?!0:e.multi===void 0?t.multi===void 0?It(e,t):V(t,e):e.conjunctive?t.multi!==void 0&&!t.conjunctive?V(t,e):e.multi.every(e=>V(t,e)):e.multi.some(e=>V(t,e))}var Lt=e=>z(`==`,e),H=(e,t)=>O(e).map(n=>[n,e[n],v(t,n)]);function U(e,t,n,r={}){u(e,t);let i=e=>t===void 0?e:v(t,e),a=-1;for(let o of O(e)){if(Object.hasOwn(r,o))throw new g(r[o],i(o));let e=n.indexOf(o);if(e===-1)throw new g(`unsupported field ${_(o)}`,t);if(e<a)throw new g(`out of the order Composer writes, before ${_(n[a])}`,i(o));a=e}return e}function W(e,t){if(x(f(e,t)))throw new g(`${_(e)}, which Composer reads as no value and does not write`,t);return e}var Rt=/[\p{Cc}]/u;function G(e,t){if(Rt.test(f(e,t)))throw new g(`${_(e)} has a control character in it`,t);return e}var zt=(e,t)=>{if(Array.isArray(e)?e.length===0:!c(e))throw l(`a non-empty mapping or sequence`,e,t);return e},Bt=(e,t)=>{if(d(e,t).length===0)throw new g(`an empty sequence, which Composer does not write`,t);return e},K=(e,t,n=f)=>Bt(e,t).map((e,r)=>n(e,`${t}[${r}]`));function Vt(e,t,n=`Composer sorts the keys in`){let r=O(e);for(let e=1;e<r.length;e++)if(Se(r[e-1],r[e])>0)throw new g(`out of the order ${n}, after ${_(r[e-1])}`,v(t,r[e]));return r}function Ht(e,t){let n=G(e,t),r=/\s|@(?:stable|rc|beta|alpha|dev)$/u.test(b(n))||n===`0`?void 0:R(n);if(r===void 0)throw new g(`${_(n)} is not a version Composer locks a package at`,t);return r}function Ut(e,t){let n=R(G(e,t));if(n===void 0)throw new g(`${_(e)} is not a version Composer reads`,t);return n}function Wt(e,t,n){let r=G(e,t)===`self.version`,i=Nt(r?n:e);if(i!==void 0)return i;throw new g(r?`"self.version", which is ${_(n)}, and not a version constraint Composer reads`:`${_(e)} is not a version constraint Composer reads`,t)}var Gt=/^[a-z0-9](?:[_.-]?[a-z0-9]+)*\/[a-z0-9](?:(?:[_.]|-{1,2})?[a-z0-9]+)*$/u,Kt=new Set([`nul`,`con`,`prn`,`aux`,...[`com`,`lpt`].flatMap(e=>Array.from({length:9},(t,n)=>`${e}${n+1}`))]);function qt(e,t){let n=f(e,t);if(!Gt.test(b(n)))throw new g(`${_(n)} is not a package name, a vendor and a package as Composer takes them`,t);if(b(n).split(`/`).some(e=>Kt.has(e)))throw new g(`${_(n)} has a name Windows reserves in it, which Composer refuses`,t);if(n.endsWith(`.json`))throw new g(`${_(n)} ends in .json, which Composer refuses`,t);return n}var Jt=/^[a-z0-9_./-]+$/u,Yt=/^(?:php(?:-64bit|-ipv6|-zts|-debug)?|hhvm|(?:ext|lib)-[a-z0-9](?:[_.-]?[a-z0-9]+)*|composer(?:-(?:plugin|runtime)-api)?)$/u,q=e=>Yt.test(b(e));function Xt(e,t,n){let r=Object.create(null);return Vt(u(e,t),t),{written:r,links:H(e,t).map(([e,t,i])=>{if(!Jt.test(e))throw new g(`${_(e)} is not a package name in lowercase, as Composer writes a link's`,i);let a=Wt(t,i,n);return r[e]=t,{target:e,pretty:t,constraint:a}})}}function Zt(e,n){let r=G(e,n);if(r.startsWith(`/`)||/^[A-Za-z]:/u.test(r))throw new g(`${_(r)} is an absolute path, of the machine the lockfile was written on`,n);let i=/^[A-Za-z][\d+.A-Za-z-]*:/u.exec(r);if(i!==null)throw new g(`${_(r)} is a URL, of ${i[0]}, and not a path`,n);return t(r.startsWith(`./`)?r.slice(2):r,n),r}function Qt(e,t){if(/^\s*-/u.test(G(e,t)))throw new g(`${_(e)} starts with "-", which a tool would read as an option and Composer refuses`,t);if(e===``)throw new g(`an empty string, of which Composer fetches nothing`,t);return e}var $t={git:[`https:`,`http:`,`ssh:`,`git:`,`git+ssh:`],hg:[`https:`,`http:`,`ssh:`],svn:[`https:`,`http:`,`svn:`,`svn+ssh:`],fossil:[`https:`,`http:`,`ssh:`]},en=/^(?:(?:tcp|ssl)(?:4|6|46|64)?:)?(?:\[[0-9a-f:.]+\]|[a-z0-9._][a-z0-9._-]*)(?::[a-z0-9._][a-z0-9._-]*)?$/u,tn=/^([\w.-]+@)?([\w.-]+):[^\s]/u;function nn(e,t,n){let r=Qt(e,t);if(n===`perforce`){let e=b(r);if(!en.test(e)||/^\s*(?:rsh|jsh)\s*:/u.test(e))throw new g(`${_(r)} is not a Perforce port, [tcp|ssl:][host:]port, as Composer takes one`,t);return r}a(r,t);let i=n===`git`&&!r.includes(`://`)&&!/^[A-Za-z]:/u.test(r)?tn.exec(r):null;if(i!==null){if(i[1]===void 0&&/^(?:file|https?|ssh|git|ftps?)$/u.test(b(i[2])))throw new g(`${_(r)} is of the host ${i[2]} to git, and a URL of ${b(i[2])}: to a URL parser`,t);return r}if(/^[A-Za-z][\d+.A-Za-z-]*:/u.test(r)){let e=URL.parse(r);if(e===null||!$t[n].includes(e.protocol)||/\s/u.test(r))throw new g(`${_(r)} is not a URL ${n} fetches from, ${$t[n].join(` `)}`,t);return r}return Zt(r,t)}function rn(e,t,r){let a=Qt(e,t);return r===`git`&&!n(a)&&i(a,t),a}function an(e,t,n){return Bt(e,t).map((e,r)=>{let i=`${t}[${r}]`;U(e,i,[`url`,`preferred`]);let a=p(e.preferred,v(i,`preferred`));return{url:n(e.url,v(i,`url`)),preferred:a}})}var on=[`git`,`hg`,`svn`,`fossil`,`perforce`];function sn(e,t){U(e,t,[`type`,`url`,`reference`,`mirrors`]);let n=f(e.type,v(t,`type`));if(!on.includes(n))throw new g(`expected one of ${on.join(`, `)}, which Composer clones from`,v(t,`type`));if(e.reference===void 0)throw new g(`expected a reference, without which Composer does not read a source`,t);let r=(e,t)=>nn(e,t,n);return{type:n,url:r(e.url,v(t,`url`)),reference:rn(e.reference,v(t,`reference`),n),mirrors:m(e,`mirrors`,t,(e,t)=>an(e,t,r))??[]}}var cn=[`zip`,`tar`,`gzip`,`xz`,`rar`,`phar`,`file`];function ln(e,t,n){let r=Qt(e,t);return n!==`path`&&o(r)||Zt(r,t),r}function un(e,t){U(e,t,[`type`,`url`,`reference`,`shasum`,`mirrors`]);let n=f(e.type,v(t,`type`));if(n!==`path`&&!cn.includes(n))throw new g(`expected path or one of ${cn.join(`, `)}, which Composer installs from`,v(t,`type`));let i=(e,t)=>ln(e,t,n),a=m(e,`shasum`,t,f);if(a!==void 0&&a!==``&&!r(a))throw new g(`${_(a)} is not a sha1 in lowercase hex, which Composer compares the download's with`,v(t,`shasum`));return{type:n,url:i(e.url,v(t,`url`)),reference:m(e,`reference`,t,Qt),shasum:a||void 0,mirrors:m(e,`mirrors`,t,(e,t)=>an(e,t,i))??[]}}function dn(e,t){let n=G(e,t);if(n===``||/^(?:[\\/]|[A-Za-z]:)/u.test(n)||/(?:^|[\\/])\.\.(?:[\\/]|$)/u.test(n))throw new g(`${_(n)} is not a path in the package, as Composer installs a bin from`,t);return n}var fn=e=>e.replace(/(?:^|[\\/]+)\.\.?(?:[\\/]+|$)(?:\.\.?(?:[\\/]+|$))*/gu,`/`).replace(/^\/+/u,``);function pn(e,t){let n=G(e,t);if(fn(n)!==n)throw new g(`${_(n)} is not written as Composer writes a target-dir, ${_(fn(n))}`,t);if(n.startsWith(`\\`))throw new g(`${_(n)} is of the drive's root on Windows, and not under the package's directory`,t);return n!==``&&Zt(n.replaceAll(`\\`,`/`),t),n}function mn(e,t){return Vt(u(e,t),t),h(e,t,(e,t)=>{if(y(f(e,t))===`self.version`)throw new g(`"self.version", which Composer writes as the package's version`,t);return e},H)}var hn=(e,t)=>h(u(e,t),t,(e,t)=>{if(!Array.isArray(e))throw l(`a sequence, as Composer writes even one listener`,e,t);return e.map((e,n)=>f(e,`${t}[${n}]`))},H);function gn(e,t){let n=K(e,t);for(let e=1;e<n.length;e++)if(ye(n[e-1],n[e])>0)throw new g(`out of the order Composer sorts keywords in, after ${_(n[e-1])}`,`${t}[${e}]`);return n}function _n(e,t){return U(e,t,[`name`,`exclude`]),{name:m(e,`name`,t,W),exclude:m(e,`exclude`,t,K)??[]}}function vn(e,t){if(e===!0)return!0;if(typeof e!=`string`)throw l(`true or the name of a replacement`,e,t);return W(e,t)}var yn=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})[+-](\d{2}):(\d{2})$/u;function bn(e,t){let n=yn.exec(f(e,t)),[r,i,a,o,s,c,l,u]=n===null?[]:n.slice(1).map(Number),d=new Date(Date.UTC(2e3,i,0)).getUTCDate()-+(i===2&&(r%4!=0||r%100==0&&r%400!=0));if(n===null||i<1||i>12||a<1||a>d||o>23||s>59||c>59||u>59||l>24)throw new g(`${_(e)} is not a time as Composer writes one, as 2026-10-02T00:00:00+00:00`,t);return e}var xn={require:`require`,conflict:`conflict`,provide:`provide`,replace:`replace`,requireDev:`require-dev`},Sn=`name.version.target-dir.source.dist.require.conflict.provide.replace.require-dev.suggest.default-branch.bin.type.extra.autoload.autoload-dev.notification-url.include-path.php-ext.archive.scripts.license.authors.description.homepage.keywords.support.funding.abandoned.transport-options.time`.split(`.`),Cn={version_normalized:"`version_normalized`, which Composer leaves out of a lockfile","installation-source":"`installation-source`, which Composer leaves out of a lockfile",repositories:"`repositories`, which Composer reads of the project's composer.json alone","minimum-stability":"`minimum-stability`, which Composer reads of the project's composer.json alone"};function wn(e,t,n){if(U(e,t,Sn,Cn),e.name===void 0)throw new g(`expected a name`,t);if(e.version===void 0)throw new g(`expected a version`,t);let r=qt(e.name,v(t,`name`)),i=Ht(e.version,v(t,`version`));if(e.type===void 0)throw new g(`expected a type, which Composer always writes`,t);let a=W(G(e.type,v(t,`type`)),v(t,`type`));if(b(a)!==a)throw new g(`${_(a)}, which Composer writes in lowercase`,v(t,`type`));if(e[`default-branch`]!==void 0&&e[`default-branch`]!==!0)throw l(`true, as Composer writes it of the default branch alone`,e[`default-branch`],v(t,`default-branch`));let s=Object.create(null),c={};for(let[n,r]of Object.entries(xn)){let i=m(e,r,t,(t,n)=>Xt(t,n,e.version));s[n]=i?.written??Object.create(null),c[n]=i?.links??[]}let u=n=>m(e,n,t,zt);return{pkg:{name:r,version:e.version,normalized:i,stability:ut(i),dev:n,source:m(e,`source`,t,sn),dist:m(e,`dist`,t,un),...s,suggest:m(e,`suggest`,t,mn)??Object.create(null),defaultBranch:e[`default-branch`]===!0,bin:m(e,`bin`,t,(e,t)=>K(e,t,dn))??[],type:a,targetDir:m(e,`target-dir`,t,pn),extra:u(`extra`),autoload:u(`autoload`),autoloadDev:u(`autoload-dev`),notificationUrl:m(e,`notification-url`,t,(e,t)=>{if(!o(f(e,t)))throw new g(`${_(e)} is not an http(s) URL, which Composer posts installs to`,t);return e}),includePath:m(e,`include-path`,t,K)??[],phpExt:u(`php-ext`),archive:m(e,`archive`,t,_n)??{name:void 0,exclude:[]},scripts:m(e,`scripts`,t,hn)??Object.create(null),license:m(e,`license`,t,K)??[],authors:u(`authors`),description:m(e,`description`,t,W),homepage:m(e,`homepage`,t,W),keywords:m(e,`keywords`,t,gn)??[],support:u(`support`),funding:u(`funding`),abandoned:m(e,`abandoned`,t,vn),transportOptions:u(`transport-options`),time:m(e,`time`,t,bn)},links:c}}var Tn=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21],En=Array.from({length:64},(e,t)=>Math.floor(Math.abs(Math.sin(t+1))*2**32)>>>0);function Dn(e){let t=e.length,n=Math.ceil((t+9)/64),r=new Uint8Array(n*64);for(let n=0;n<t;n++)r[n]=e.codePointAt(n);r[t]=128;let i=new DataView(r.buffer);return i.setUint32(r.length-8,t*8>>>0,!0),i.setUint32(r.length-4,Math.floor(t*8/2**32),!0),Array.from({length:r.length/4},(e,t)=>i.getUint32(t*4,!0))}var On=(e,t)=>(e<<t|e>>>32-t)>>>0;function kn(e){if(/[^\0-\u007F]/u.test(e))throw TypeError(`expected ASCII`);let t=[0x67452301,0xefcdab89,0x98badcfe,271733878],n=Dn(e);for(let e=0;e<n.length;e+=16){let[r,i,a,o]=t;for(let t=0;t<64;t++){let s=t>>4,c=[i&a|~i&o,o&i|~o&a,i^a^o,a^(i|~o)][s],l=[t,5*t+1,3*t+5,7*t][s]%16,u=i+On(r+c+En[t]+n[e+l]>>>0,Tn[s*4+t%4])>>>0;[r,i,a,o]=[o,u,i,a]}for(let[e,n]of[r,i,a,o].entries())t[e]=t[e]+n>>>0}return t.map(e=>[0,8,16,24].map(t=>(e>>>t&255).toString(16).padStart(2,`0`)).join(``)).join(``)}var An={string:[e=>typeof e==`string`,`a string`],boolean:[e=>typeof e==`boolean`,`true or false`],object:[e=>e instanceof Map,`a mapping`],array:[Array.isArray,`a sequence`],null:[e=>e===null,`null`]};function J(e,t,n){let r=[t.type].flat();if(!r.some(t=>An[t][0](e)))throw l(r.map(e=>An[e][1]).join(` or `),e,n);if(t.enum!==void 0&&!t.enum.includes(e))throw l(`one of ${t.enum.map(_).join(`, `)}`,e,n);if(t.pattern!==void 0&&!t.pattern.test(e))throw new g(`${_(e)} is not as Composer's schema has it`,n);if(e instanceof Map){for(let r of t.required??[])if(!e.has(r))throw new g(`no ${_(r)}, which Composer's schema requires`,n);for(let[r,i]of e){let e=Object.hasOwn(t.properties??{},r)?t.properties[r]:t.additionalProperties;e!==void 0&&J(i,e,v(n,r))}}Array.isArray(e)&&t.items!==void 0&&e.forEach((e,r)=>J(e,t.items,`${n}[${r}]`))}var Y={type:`string`},X={type:`boolean`},jn={type:`array`,items:Y},Mn={type:[`string`,`boolean`]},Nn={type:`object`,required:[`name`,`version`],properties:{name:Y,version:Y}},Pn={name:Y,canonical:X,only:jn,exclude:jn},Fn={url:Y,"no-api":X,"secure-http":X,"svn-cache-credentials":X,"trunk-path":Mn,"branches-path":Mn,"tags-path":Mn,"package-path":Y,depot:Y,branch:Y,unique_perforce_client_name:Y,p4user:Y,p4password:Y},In={composer:{url:Y,options:{type:`object`},allow_ssl_downgrade:X,"force-lazy-providers":X,filter:{type:[`boolean`,`object`],additionalProperties:X}},...Object.fromEntries([`vcs`,`github`,`git`,`gitlab`,`bitbucket`,`git-bitbucket`,`hg`,`fossil`,`perforce`,`svn`,`forgejo`].map(e=>[e,Fn])),path:{url:Y,options:{type:`object`,properties:{reference:{type:`string`,enum:[`none`,`config`,`auto`]},symlink:{type:[`boolean`,`null`]},relative:X,versions:{type:`object`,additionalProperties:Y}}}},artifact:{url:Y},pear:{url:Y,"vendor-alias":Y},package:{package:{...Nn,type:[`object`,`array`],items:Nn}}};function Ln(e,t,n){J(e,{type:`object`},t);let r=e.get(`type`);if(typeof r!=`string`||!Object.hasOwn(In,r))throw l(`a type of repository Composer knows`,r,v(t,`type`));if(J(e,{type:`object`,required:[r===`package`?`package`:`url`],properties:{...Pn,...In[r]}},t),n&&e.has(`name`))throw new g(`a name, where the key names a repository, which Composer's schema refuses`,v(t,`name`))}function Rn(e,t){if(J(e,{type:[`object`,`array`]},t),Array.isArray(e))e.forEach((e,n)=>{e instanceof Map&&e.size===1&&[...e.values()][0]===!1||Ln(e,`${t}[${n}]`,!1)});else for(let[n,r]of e)r!==!1&&Ln(r,v(t,n),!0)}var zn={version:{type:`string`,pattern:/^[vV]?\d+(?:[.-]\d+){0,3}[._-]?(?:(?:[sS][tT][aA][bB][lL][eE]|[bB][eE][tT][aA]|[bB]|[rR][cC]|[aA][lL][pP][hH][aA]|[aA]|[pP][aA][tT][cC][hH]|[pP][lL]|[pP])(?:[.-]?\d+)*)?(?:[.-]?[dD][eE][vV]|\.x-dev)?(?:\+.*)?$|^dev-.*$/su},"minimum-stability":{type:`string`,enum:[`dev`,`alpha`,`beta`,`rc`,`RC`,`stable`]},"prefer-stable":X,extra:{type:[`object`,`array`]},config:{type:`object`,properties:{platform:{type:`object`,additionalProperties:Mn}}}};function Bn(e,t){for(let[n,r]of Object.entries(zn))e.has(n)&&J(e.get(n),r,v(t,n));e.has(`repositories`)&&Rn(e.get(`repositories`),v(t,`repositories`))}var Z=`composerJson`,Vn=[`name`,`version`,`require`,`require-dev`,`conflict`,`replace`,`provide`,`minimum-stability`,`prefer-stable`,`repositories`,`extra`];function Hn(e){let t=new Map(Vn.filter(t=>e.has(t)).map(t=>[t,e.get(t)])),n=e.get(`config`),r=n instanceof Map?n.get(`platform`):void 0;return r!=null&&t.set(`config`,new Map([[`platform`,r]])),kn(F(new Map([...t].sort(([e],[t])=>Se(e,t)))))}function Un(e,t){let n=qt(e,t);if(/[A-Z]/u.test(n))throw new g(`${_(n)} has capitals, which Composer refuses in composer.json`,t);return n}var Wn=/(?:^|\| *|, *)([^,\t\n\v\f\r #|]+)(?:#[^ ]+)? +as +([^,\t\n\v\f\r |]+)(?:$| *\|| *,)/u;function Gn(e,t,n,r){let i=e.get(t);if(i===void 0)return[];if(!(i instanceof Map))throw l(`a mapping`,i,v(Z,t));let a=new Map;for(let[e,o]of i){let i=b(e),s=v(v(Z,t),e);q(e)||Un(e,s),G(f(o,s),s);let c=o===`self.version`?r===void 0?{all:!0}:Nt(r.pretty):Nt(o);if(c===void 0)throw new g(`${_(o)} is not a version constraint Composer reads`,s);if(t===`require`||t===`require-dev`){let e=Wn.exec(o);if(e===null?o.includes(` as `):R(e[1])===void 0||R(e[2])===void 0)throw new g(`${_(o)} is not an alias of one version as another, which Composer refuses`,s);if(i===n)throw new g(`the root itself, which Composer refuses`,s)}a.set(i,{target:i,pretty:o,constraint:c})}return[...a.values()]}function Kn(e){if(typeof e!=`string`)throw TypeError(`composerJson: expected the text of composer.json`);let t=Ke(e,Z);if(!(t instanceof Map))throw new g(`expected an object`,Z);return t}function qn(e){let t=Kn(e);Bn(t,Z);let n=t.has(`name`)?Un(t.get(`name`),v(Z,`name`)):`__root__`,r=t.get(`version`),i=r===void 0?void 0:{pretty:r,normalized:Ut(r,v(Z,`version`))},a=Object.create(null);for(let[e,r]of Object.entries(xn))a[e]=Gn(t,r,n,i);return{contentHash:Hn(t),name:n,version:i?.normalized,links:a}}var Q={stable:0,RC:5,beta:10,alpha:15,dev:20};function Jn(e,t,n,r){let i=Object.create(null),a=e=>e.pretty===`self.version`,o=e=>({...e,constraint:Lt(t)});for(let t of Object.keys(xn))i[t]=t===`conflict`||t===`provide`||t===`replace`?[...e.links[t],...e.links[t].filter(a).map(o)]:e.links[t].map(e=>a(e)?o(e):e);let s=e.links.require.some(a);return{name:e.name,version:t,exact:Lt(t),pretty:n,stability:ut(t),links:i,alias:r?`root`:`branch`,base:e,selfVersionRequires:s,where:e.where}}function Yn(e,t){let{version:n}=e;if(!n.startsWith(`dev-`)&&!n.endsWith(`-dev`))return;let r=e.extra?.[`branch-alias`];if(typeof r==`object`&&r)for(let e of O(r)){let i=r[e];if(typeof i!=`string`)throw new g(`expected a string, as Composer reads a branch alias of a dev version`,v(v(v(t,`extra`),`branch-alias`),e));if(!i.endsWith(`-dev`))continue;let a=i===$e?i:dt(i.slice(0,-4));if(!a.endsWith(`-dev`)||b(n)!==b(e))continue;let o=ft(e),s=ft(i);if(o===void 0||s===void 0||b(s).startsWith(b(o)))return a}if(e.defaultBranch&&ft(n.replace(/^v/u,``))===void 0)return $e}function Xn(e,t){let n=new Set([e.name]);if(t)for(let t of e.links.provide)n.add(t.target);for(let t of e.links.replace)n.add(t.target);return n}function Zn(e,t,n){if(e.name===t)return e.exact===void 0||V(n,e.exact);let r=e=>e.target===t&&V(n,e.constraint);return e.links.provide.some(r)||e.links.replace.some(r)}function Qn(e){let t=new Map;for(let n of e)for(let e of Xn(n,!0))(t.get(e)??t.set(e,[]).get(e)).push(n);return{entries:e,byName:t,provided:new Map}}var $n=(e,t)=>e.byName.get(t)??[];function $(e,t){return e.provided.has(t)||e.provided.set(t,$n(e,t.target).filter(e=>Zn(e,t.target,t.constraint))),e.provided.get(t)}function er(e){return e.root?`the root`:`${e.base?.pkg.name??e.pkg.name} ${e.alias===void 0?e.pkg.version:`${e.pretty}, an alias of ${e.base.pkg.version}`}`}function tr(e,t,n){let r=Q[e.stability];return[...Xn(e,!0)].some(e=>r<=Q[Object.hasOwn(n,e)?n[e]:t])}function nr(e){let t=new Map;for(let n of e)for(let e of Xn(n,!1)){let r=t.get(e);if(r!==void 0){let t=r.root?`the root`:r.where,i=e===n.name&&e===r.name?`listed twice, first as ${t}`:`${_(e)} is ${e===r.name?`the name`:`replaced by`} of ${t}, and ${e===n.name?`its name`:`replaced by it`} too, which Composer installs neither of`;throw new g(i,n.where)}t.set(e,n)}}function rr(e,t,n,r){for(let i of e)if(i.alias===void 0||i.selfVersionRequires)for(let e of i.links.require){if(q(e.target)||$(t,e).length>0)continue;let a=$n(r,e.target).filter(e=>!e.root),o=i.alias===void 0?``:`, as its alias ${i.pretty} asks for ${e.target} at it`,s=a.length===0?``:`, of ${a.map(er).join(`, `)}, which the lockfile has`;throw new g(`nothing ${n} meets it${o}${s}`,v(v(i.where,`require`),e.target))}}function ir(e){let t=new Set(e.entries.filter(e=>e.alias===void 0).flatMap(e=>[...Xn(e,!1)]));for(let n of e.entries)for(let r of n.links.conflict){if(q(r.target)||!t.has(r.target))continue;let i=$(e,r).find(e=>e!==n&&(e.alias===void 0||e.name===r.target));if(i!==void 0)throw new g(`conflicts with ${er(i)}, which ${i.root?`composer.json is`:`the lockfile has`}`,v(v(n.where,`conflict`),r.target))}}function ar(e,t,n){for(let r of e.links[n])if(!(q(r.target)||r.pretty===`self.version`||$(t,r).length>0))throw new g(`nothing in the lockfile${n===`requireDev`?``:` that composer install --no-dev installs`} meets it, which composer install refuses`,v(v(e.where,xn[n]),r.target))}function or(e,t){let n=Object.create(null);for(let r of e.links.require){let e=[...new Set($(t,r).filter(e=>!e.root).map(e=>(e.base??e).name))];n[r.target]={constraint:r.pretty,platform:q(r.target),targets:e}}return n}function sr(e,t,n,r,i){let a=e.map(({pkg:e,links:t,where:n})=>({name:b(e.name),version:e.normalized,exact:Lt(e.normalized),stability:e.stability,links:t,pkg:e,where:n})),o=i===void 0?[]:[{...i,exact:i.version===void 0?void 0:Lt(i.version),where:Z,root:!0}];nr([...o,...a]);let s=new Map(a.map(e=>[e.name,e])),c=[],l=new Map(a.map(e=>[e,[]])),u=e=>{c.push(e),l.get(e.base).push(e)};for(let e of a){c.push(e);let t=Yn(e.pkg,e.where);t!==void 0&&u(Jn(e,t,t.replaceAll(/(?:\.9{7})+/gu,`.x`),!1))}for(let e of t)u(Jn(s.get(e.package),e.aliasNormalized,e.alias,!0));for(let e of c)if(!tr(e,n,r)){let t=e.alias===void 0?``:`its alias ${e.pretty}, `;throw new g(`${t}of stability ${e.stability}, which minimum-stability, ${n}, and stability-flags do not take, and Composer installs nothing against`,e.where)}let d=e=>(e.base??e).pkg.dev,f=c.filter(e=>!d(e)),p=Qn([...o,...f]),m=Qn([...o,...c]);return ir(m),i!==void 0&&(rr(f,p,`that composer install --no-dev installs`,m),rr(c.filter(d),m,`in the lockfile`,m),ar(o[0],p,`require`),ar(o[0],m,`requireDev`)),new Map(a.map(e=>[e,{require:or(e,d(e)?m:p),aliases:l.get(e).map(e=>({version:e.pretty,normalized:e.version,root:e.alias===`root`}))}]))}var cr=[`_readme`,`content-hash`,`packages`,`packages-dev`,`aliases`,`minimum-stability`,`stability-flags`,`prefer-stable`,`prefer-lowest`,`platform`,`platform-dev`,`platform-overrides`,`plugin-api-version`],lr={hash:"`hash`, the md5 of composer.json that Composer 1.2 and older wrote, which is not read here"},ur=cr.filter(e=>e!==`platform-overrides`),dr=[`This file locks the dependencies of your project to a known state`,`Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies`,`This file is @generated automatically`],fr=[`2.0.0`,`2.1.0`,`2.2.0`,`2.3.0`,`2.6.0`,`2.9.0`],pr=[`stability-flags`,`platform`,`platform-dev`];function mr(e){let t=`plugin-api-version`;if(e===void 0)throw new g(`no plugin-api-version: a lockfile of Composer 1.9 or older, which is not read here`);if(typeof e==`string`&&e.startsWith(`1.`))throw new g(`${_(e)} is Composer 1's, which is not read here`,t);if(!fr.includes(e))throw new g(`unsupported plugin-api-version: expected one of ${fr.join(`, `)}, found ${s(e)}`,t);return e}function hr(e){U(e,void 0,cr,lr);let t=mr(e[`plugin-api-version`]),n=ur.find(t=>e[t]===void 0);if(n!==void 0)throw new g(`expected ${_(n)}, which Composer always writes`,n);let r=e._readme;if(!Array.isArray(r)||r.length!==dr.length||r.some((e,t)=>e!==dr[t]))throw new g(`expected the three lines Composer writes`,`_readme`);let i=f(e[`content-hash`],`content-hash`);if(!/^[\da-f]{32}$/u.test(i))throw new g(`${_(i)} is not an md5 in lowercase hex`,`content-hash`);for(let t of[`prefer-stable`,`prefer-lowest`])p(e[t],t);let a=e[`minimum-stability`];if(typeof a!=`string`||!Object.hasOwn(Q,a))throw l(`one of ${Object.keys(Q).join(`, `)}`,a,`minimum-stability`);return{contentHash:i,pluginApiVersion:t,minimumStability:a}}function gr(e,t){let n=pr.find(t=>we(e[t])),r=pr.find(t=>Array.isArray(e[t])&&e[t].length===0),i=t===`2.9.0`?`{}`:t===`2.6.0`?void 0:`[]`,a=i===`{}`?r:i===`[]`?n:void 0;if(a!==void 0)throw new g(`"${i===`{}`?`[]`:`{}`}", which Composer of plugin-api-version ${t} writes as "${i}"`,a);if(n!==void 0&&r!==void 0)throw new g(`"[]", where ${_(n)} is "{}", as no Composer writes them both`,r);return n!==void 0||t===`2.9.0`}var _r=(e,t)=>Array.isArray(e)&&e.length===0?Object.create(null):u(e,t);function vr(e,t){let n=`stability-flags`,r=_r(e,n);t&&Vt(r,n,`Composer 2.8 and later sort it in`);let i=Object.entries(Q);return h(r,n,(e,t,n)=>{if(b(n)!==n)throw new g(`${_(n)}, which Composer writes in lowercase`,t);let r=i.find(([,t])=>t===e);if(r===void 0)throw l(`one of ${Object.values(Q).join(`, `)}`,e,t);return r[0]},H)}var yr=(e,t)=>h(_r(e,t),t,(e,t,n)=>{if(!q(n)||b(n)!==n)throw new g(`${_(n)} is not a platform package's name in lowercase, as Composer writes one`,t);return Wt(e,t,`1.0.0`),e},H);function br(e){let t=`platform-overrides`;if(e===void 0)return Object.create(null);if(!c(e)||we(e))throw l(`a non-empty mapping, as Composer writes it where there are any`,e,t);let n=new Map;return h(e,t,(e,t,r)=>{if(!q(r))throw new g(`${_(r)} is not a platform package's name`,t);let i=b(r),a=n.get(i);if(a!==void 0)throw new g(`${_(a)} too, of which Composer takes the last, as it takes a name in any case`,t);if(n.set(i,r),e!==!1&&(typeof e!=`string`||R(G(e,t))===void 0))throw l(`a version, or false`,e,t);if(i===`php`&&e===!1)throw new g(`false, which Composer refuses of php, as it cannot be missing`,t);return e},H)}function xr(e,t){let n=e[t];if(t===`packages-dev`&&n===null)throw new g(`null, as Composer 1 writes it after update --no-dev, which Composer 2 does not install from`,t);return d(n,t)}function Sr(e){for(let t=1;t<e.length;t++){let n=e[t-1].pkg,r=e[t].pkg;if(n.dev===r.dev&&(E(n.name,r.name)||E(n.version,r.version))>0)throw new g(`out of the order Composer sorts packages in, by name then version, after ${_(n.name)}`,e[t].where)}}var Cr=[`package`,`version`,`alias`,`alias_normalized`];function wr(e,t){let n=`aliases`;return d(e,n).map((r,i)=>{let a=`${n}[${i}]`;U(r,a,Cr);for(let e of Cr)if(r[e]===void 0)throw new g(`expected ${e}`,a);let o=f(r.package,v(a,`package`));if(!t.has(o))throw new g(`${_(o)} is not a package in the lockfile, by its name in lowercase`,v(a,`package`));if(i>0&&E(e[i-1].package,o)>0)throw new g(`out of the order Composer sorts aliases in, by package, after ${_(e[i-1].package)}`,a);let s=f(r.version,v(a,`version`));if(Ut(s,v(a,`version`))!==s)throw new g(`${_(s)} is not a version normalized, as Composer writes it`,v(a,`version`));if([`dev-master`,`dev-trunk`,`dev-default`].includes(s))throw new g(`${_(s)}, which Composer writes as ${$e}`,v(a,`version`));let c=f(r.alias,v(a,`alias`));if(/\s/u.test(c))throw new g(`${_(c)} has a space, which Composer's alias of a requirement cannot`,v(a,`alias`));let l=Ut(c,v(a,`alias`));if(r.alias_normalized!==l)throw new g(`expected ${_(l)}, the alias normalized`,v(a,`alias_normalized`));return{package:o,version:s,alias:c,aliasNormalized:l}})}function Tr(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{composerJson:n}=ee(t,[`composerJson`]),r=n===void 0?void 0:qn(n),i=Ve(e),{contentHash:a,pluginApiVersion:o,minimumStability:s}=hr(i),c=gr(i,o),l=vr(i[`stability-flags`],c),u=[];for(let[e,t]of[[`packages`,!1],[`packages-dev`,!0]])for(let[n,r]of xr(i,e).entries()){let i=`${e}[${n}]`;u.push({...wn(r,i,t),where:i})}Sr(u);let d=new Map(u.map(({pkg:e})=>[b(e.name),e])),f=wr(i.aliases,d),p=sr(u,f,s,l,r),m=Object.create(null);for(let[{pkg:e},{require:t,aliases:n}]of p)m[b(e.name)]={...e,require:t,aliases:n};return{contentHash:a,fresh:r===void 0?void 0:r.contentHash===a,pluginApiVersion:o,minimumStability:s,stabilityFlags:l,preferStable:i[`prefer-stable`],preferLowest:i[`prefer-lowest`],platform:yr(i.platform,`platform`),platformDev:yr(i[`platform-dev`],`platform-dev`),platformOverrides:br(i[`platform-overrides`]),aliases:f,packages:m}}export{g as LockfileError,Tr as parseComposerLock};
@@ -0,0 +1 @@
1
+ function e(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return e.codePointAt(r)-t.codePointAt(r);return e.length-t.length}export{e as a};
@@ -0,0 +1,80 @@
1
+ var e=new TextEncoder;function t(t){if(typeof t!=`string`)throw TypeError(`encodeUtf8 expects a string, got ${typeof t}`);if(!t.isWellFormed())throw TypeError(`encodeUtf8: input contains lone surrogates`);return e.encode(t)}async function n(e){let n=typeof e==`string`?t(e):e,r=new Uint8Array(await crypto.subtle.digest(`SHA-512`,n));return`sha512-${btoa(String.fromCodePoint(...r))}`}async function r(e){let n=t(JSON.stringify(e)),r=await crypto.subtle.digest(`SHA-256`,n),i=new Uint8Array(r,0,16);i[6]=i[6]&15|64,i[8]=i[8]&63|128;let a=Array.from(i,e=>e.toString(16).padStart(2,`0`)).join(``);return`${a.slice(0,8)}-${a.slice(8,12)}-${a.slice(12,16)}-${a.slice(16,20)}-${a.slice(20,32)}`}async function i(e){if(typeof crypto?.subtle?.digest!=`function`)return null;let t=a(e);try{return await r(t)}catch{return null}}function a(e){if(e._idBasis)return e._idBasis;let{severity:t,description:n}=e;return e.fileHash?{severity:t,description:n,fileHash:e.fileHash}:e.location?{severity:t,description:n,location:e.location}:{severity:t,description:n,file:e.file,line:e.line}}var o=new Map([[`CRITICAL`,`critical`],[`HIGH`,`high`],[`MEDIUM`,`medium`],[`LOW`,`low`],[`INFO`,`informational`],[`INFORMATIONAL`,`informational`],[`INFORMATIVE`,`informative`]]);function s(e){return typeof e==`string`&&e.trim().toLowerCase()===`informative`?`informational`:e}function c(e,t=e.severity){let n=s(e.severity);return n!==e.severity&&(!e.id&&!e._idBasis&&(e._idBasis=a({...e,severity:t})),e.severity=n),e.correctedSeverity!==void 0&&(e.correctedSeverity=s(e.correctedSeverity)),e}var l={critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`,high_bug:`High bug`,bug:`Bug`,informational:`Informational`},u={inprogress:`In progress`,fixed:`Fixed`,invalid:`Invalid`,deleted:`Deleted`,ignored:`Ignored`},d={red:`Red`,blue:`Blue`,green:`Green`,gray:`Gray`,none:`Unmarked`},f={"claude-security":`Claude Security`,"codex-security":`Codex Security`,deepsec:`DeepSec`,piolium:`Piolium`,"markdown-generic":`Markdown (generic)`};function p(e){return l[s(e)]??String(e??``)}var m=/^( *)(`{3,}|~{3,})(.*)$/u,h=/^ {0,3}(?:#{1,6}(?:[ \t]|$)|>|([-*_])(?:[ \t]*\1){2,}[ \t]*$)/u,g=/^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/u,_=/^ {0,3}(?:=+|-+)[ \t]*$/u,v=/^( *)(?:[-*+]|\d{1,9}[.)]) +(?=\S)/u,ee=/^ *(?:[-*+]|\d{1,9}[.)])[ \t]*$/u,y=/^\s*$/u,te=[[/^<(script|pre|textarea|style)(?:\s|>|$)/iu,/<\/(?:script|pre|textarea|style)>/iu,e=>`</${e[1].toLowerCase()}>`],[/^<!--/u,/-->/u,`-->`],[/^<\?/u,/\?>/u,`?>`],[/^<![A-Za-z]/u,/>/u,`<!-- -->`],[/^<!\[CDATA\[/u,/\]\]>/u,`]]>`],[/^<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|search|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/iu,y,null]],ne=/^(?:<[A-Za-z][\dA-Za-z-]*(?:\s+[:A-Z_a-z][\w.:-]*(?:\s*=\s*(?:[^\s"'<=>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][\dA-Za-z-]*\s*>)\s*$/u;function b(e,t,n=t){let r=/^ */u.exec(e)[0].length;if(r>3)return null;if(t&&n&&_.test(e))return!0;let i=m.exec(e);if(i&&!(i[2][0]==="`"&&i[3].includes("`")))return{fence:i[2]};let a=e.slice(r);for(let[e,t,n]of te){let r=e.exec(a);if(r)return{html:t,close:typeof n==`function`?n(r):n}}if(!t&&ne.test(a))return{html:y,close:null};let o=g.test(e)?null:v.exec(e);if(o&&!(t&&n&&/^ *(?:\d*[02-9]|\d+\d)[.)]/u.test(o[0]))){let e=/ +$/u.exec(o[0])[0].length;return{item:e>4?o[0].length-e+1:o[0].length}}let s=g.test(e)||t&&n?null:ee.exec(e);return s?{item:s[0].trimEnd().length+1}:h.test(e)||null}function x(e){return ie(e).ranges}function re(e,t){let n=e.replace(/^(?: {0,3}> ?)+/u,``),r=b(n,t);for(;r?.item;)n=n.slice(r.item),r=b(n,!1);return n.trim()!==``&&!r&&/^ */u.exec(n)[0].length<4}function ie(e){let t=[],n=-1,r=``,i=null,a=0,o=[],s=!1,c=!1,l=!1,u=0;for(let d of e.split(`
2
+ `)){let e=u;u+=d.length+1;let f=/^ */u.exec(d)[0].length;if(n!==-1||i){let o=a>0&&d.trim()!==``&&f<a,s=!o&&(i?i.ends.test(d):f<=a+3&&ae(r,d));if((o||s)&&(n!==-1&&t.push([n,o?e-1:e+d.length]),n=-1,i=null),!o)continue}if(!d.trim()){l&&o.pop(),l=!1,s=!1;continue}let p=o.length;for(;p>0&&f<o[p-1];)p--;let m=p>0?o[p-1]:0,h=d.slice(m),g=b(h,s,p===o.length&&!c);if(s&&!g)continue;for(o.length=p;g?.item;)m+=g.item,h=h.slice(g.item),o.push(m),g=b(h,!1);l=h.trim()===``,g?.fence?[n,r,a]=[e,g.fence,m]:g?.html&&([i,a]=[g.html.test(h)?null:{ends:g.html,close:g.close},m]);let _=s&&c;c=/^ {0,3}>/u.test(h),s=c?re(h,_):!g&&!l&&/^ */u.exec(h)[0].length<4}n!==-1&&t.push([n,e.length]);let d=n===-1?i?.close:r;return{ranges:t,closer:d?` `.repeat(a)+d:null}}function ae(e,t){let n=m.exec(t);return n!==null&&n[2][0]===e[0]&&n[2].length>=e.length&&!n[3].trim()}function S(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i][1]<=t?n=i+1:r=i}return n<e.length&&t>=e[n][0]}function C(e){return String(e??``).replaceAll(/\r\n?/gu,`
3
+ `)}var oe=/^## +(.*)$/gmu,se=/^### +(.*)$/gmu,w=/^#### +(.*)$/gmu,ce=/^##### +(.*)$/gmu,le=/^(.+):(\d+(?:-\d+)?)$/u;function T(e){return/^[0-9a-f]{7,64}$/iu.test(e)}function ue(e,t){let n=x(e);return[...e.matchAll(t)].filter(e=>!S(n,e.index))}function de(e,t){let n=ue(e,t);return[e.slice(0,n[0]?.index),...n.map((t,r)=>e.slice(t.index+t[0].length,n[r+1]?.index))]}function E(e,t){let n=ue(e,t);return{head:e.slice(0,n[0]?.index),subs:n.map((t,r)=>({heading:t[1],body:e.slice(t.index+t[0].length+1,n[r+1]?.index)}))}}function D(e,t){return E(e,t).subs}function O(e){let t=e.indexOf(`
4
+ `);return t===-1?{title:e.trim(),body:``}:{title:e.slice(0,t).trim(),body:e.slice(t+1)}}function fe(e){let t=e.split(`
5
+ `).map(e=>e.trim()).filter(e=>e.startsWith(`|`)&&!(/^[\s:|-]+$/u.test(e)&&e.includes(`-`))).map(e=>e.replace(/^\|/u,``).replace(/\|$/u,``).split(`|`).map(e=>e.trim()));if(t.length<2)return[];let n=t[0].map(e=>e.toLowerCase());return t.slice(1).filter(e=>e.length!==n.length||e.some((e,t)=>e.toLowerCase()!==n[t])).map(e=>Object.fromEntries(n.flatMap((t,n)=>t?[[t,e[n]??``]]:[])))}function pe(e){let t=Object.create(null),n=Object.create(null),r=[],i=null,a=``,o=[],s=``,c=(e,r,i)=>{!e||e in t||(t[e]=i.trim(),n[e]=r)},l=()=>{i&&c(i,a,o.join(`
6
+ `)),i=null,a=``,o=[]},u=e=>{(i?o:r).push(e)};for(let t of e.split(`
7
+ `)){let e=/^ {0,3}(```|~~~)/u.exec(t),n=e!==null&&(!s||e[1]===s);if(n&&(s=s?``:e[1]),n||s){u(t);continue}if(!t.trim()){i?l():r.push(t);continue}let d=/^\s*(?:[-*] +)?\*\*([^:*]+):\*\*\s*(.*)$/u.exec(t);if(d){l();let e=d[1].trim(),t=d[2],n;for(;(n=/\s+[\u00B7\u2022]\s+\*\*([^:*]+):\*\*\s*/u.exec(t))!==null;)c(e.toLowerCase(),e,t.slice(0,n.index)),e=n[1].trim(),t=t.slice(n.index+n[0].length);i=e.toLowerCase(),a=e,o=[t]}else/^\s*(?:#{1,6} |\||[-=*_]{3,}\s*$)/u.test(t)?l():u(t)}return l(),{fields:t,labels:n,prose:r.join(`
8
+ `).trim()}}function me(e){let t=(e||``).trim(),n=``,r=k(t);r&&(t=r.label.trim(),n=r.url.trim());let i=/#L(\d+)/u.exec(n)?.[1]??``,a=[...t.matchAll(/`([^`]+)`/gu)].map(e=>e[1].trim()).find(e=>!e.includes(`(`)&&(e.includes(`/`)||/\.\w/u.test(e)))??(t.replaceAll("`",``).trim().split(/[\s,]+/u).find(Boolean)||``),o=/^(.*?)#L(\d+)(?:-L?\d+)?$/u.exec(a);o&&(a=o[1],i||=o[2]);let s=le.exec(a);return s?(i||=s[2],{file:s[1],line:i,locationLink:n}):{file:a,line:i||`?`,locationLink:n}}function he(e){return e.replaceAll(`**`,``)}function k(e){let t=String(e??``),n=ge(t,_e(t)),r=ve(t),i=t.indexOf(`]`);for(let e=t.indexOf(`[`);e!==-1;e=t.indexOf(`[`,e+1)){for(;i!==-1&&i<=e;)i=t.indexOf(`]`,i+1);for(let a of[i,n.get(e)??-1]){if(a===-1||a===e+1||t[a+1]!==`(`)continue;let n=ye(t,a+1,r);if(n!==null)return{label:t.slice(e+1,a),url:n,index:e}}}return null}function ge(e,t){let n=new Map,r=[];for(let i=0;i<e.length;i++){let a=e[i];Ce(e,i)?i++:a==="`"?i=t.get(i)??i:a===`[`?r.push(i):a===`]`&&r.length>0&&n.set(r.pop(),i)}return n}function _e(e){let t=[];for(let n=e.indexOf("`");n!==-1;n=e.indexOf("`",n)){let r=1;for(;e[n+r]==="`";)r++;t.push([n,r]),n+=r}let n=new Map,r=new Map;for(let e=t.length-1;e>=0;e--){let[i,a]=t[e],o=r.get(a);o!==void 0&&n.set(i,o+a-1),r.set(a,i)}return n}function ve(e){let t=e.length,n=new Int32Array(t+1).fill(-1),r=new Int32Array(t+1).fill(-1),i=new Int32Array(t+1).fill(-1),a=new Int32Array(t+1).fill(-1);for(let o=t-1;o>=0;o--)n[o]=e[o]===`)`?o:n[o+1],r[o]=/\s/u.test(e[o])?o:r[o+1],i[o]=e[o]===`>`?o:i[o+1],a[o]=e[o]===`
9
+ `?o:a[o+1];let o=new Map,s=[];for(let n=0;n<t;n++){let t=e[n];Ce(e,n)?n++:r[n]===n?s.length=0:t===`(`?s.push(n):t===`)`&&s.length>0&&o.set(s.pop(),n)}return{balanced:o,nextClose:n,nextSpace:r,nextAngle:i,nextLine:a}}function ye(e,t,n){let r=be(e,t,n);if(r)return r;let i=n.balanced.get(t);if(i!==void 0)return i>t+1?e.slice(t+1,i):null;let a=n.nextClose[t+1],o=n.nextSpace[t+1];return a===-1||a===t+1||o!==-1&&o<a?null:e.slice(t+1,a)}function be(e,t,n){if(e[t+1]!==`<`)return``;let r=n.nextAngle[t+2],i=n.nextLine[t+2];return r===-1||i!==-1&&i<r||e[r+1]!==`)`?``:e.slice(t+2,r)}var xe=/\\([!-/:-@[-`{-~])/gu,Se=/[!-/:-@[-`{-~]/u;function Ce(e,t){return e[t]===`\\`&&Se.test(e[t+1]??``)}function we(e){return typeof e==`string`?e.replace(xe,`$1`):e}function Te(e){let t=/^\[(.+)\]$/u.exec(e.trim());return t?t[1].trim():e.trim()}function A(e){let t=(e||``).trim();return/^[-\u2013\u2014]+$/u.test(t)?``:t}var Ee={critical:6,high:5,medium:4,low:3,high_bug:2,bug:1,informational:0},j=[`critical`,`high`,`medium`,`low`,`high_bug`,`bug`,`informational`];function De(e){return e=s(e),e!=null&&e in Ee?e:null}function Oe(e){return De(e?.correctedSeverity)??s(e?.severity)}function ke(e){let t=De(e?.correctedSeverity);return t!=null&&t!==s(e?.severity)}function Ae(e,t){return t===`original`?s(e?.severity):Oe(e)}function je(e){let t=e?._correctedByReport;return t&&new Set(Object.values(t).map(e=>s(e?.severity))).size>1?t:null}var Me=[`revalidation`,`refuted`,`unreachable`,`confirmed`,`partial`,`unknown`],Ne=new Set(Me);function M(e){return Ne.has(e?.revalidate)?e.revalidate:``}function Pe(e,t=e?.source){return Object.hasOwn(f,t)||M(e)===`revalidation`}function Fe(e,t=e?._source??e?.source){let n=typeof t==`string`&&t!==``&&t!==`deepview`,r=n?t:e?.analyzer??e?.type??e?._analyzer;return e?.security===!0||(r===`security`||r===`dependencies`)&&e?.security!==!1||n&&[`critical`,`high`,`medium`,`low`].includes(e?.severity)}function Ie(e){return e&&e.replace(/^[^/]+\//u,``).replace(/^claude-/u,``).replaceAll(`-`,` `)}function Le(e,t=!0){let n=t&&M(e)===`revalidation`?`revalidate`:``;return[e?.type,n,Ie(e?.model),e?.effort,e?.exportsMode].filter(Boolean).join(` · `)}function N(e,t){if(!e)return e;let n=e;t?.exportsMode===`isolate`&&(n=n.replace(/^\((?:[^()]|\([^()]*\))*\): \[export:\s*\w+\] /u,``),n=n.replace(/^\[export:\s*\w+\] /u,``));let r=[t?.exportName,t?.methodName].filter(Boolean).map(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/gu,`\\$&`));for(let e of r)n=n.replaceAll(RegExp(`\\[export:\\s*${e}\\]\\s*`,`gu`),``);for(let e of r)n=n.replace(RegExp(`^\\(\`?${e}\`?\\): `,`u`),``);return n}function Re(e){let t=e?.exportName,n=e?.methodName;return t&&n&&t!==n?`${t}.${n}`:t||n||``}function P(e){return e?e.split(`
10
+ `).find(e=>e.trim())?.trim()??``:``}function ze(e){return typeof e?.title==`string`?e.title.trim():``}function F(e){return ze(e)||P(N(e?.description,e))}function Be(e){let t=N(e?.description,e)||``,n=ze(e);if(n){let e=t.trim(),r=O(e);return{title:n,body:r.title===n?r.body.replace(/^\s+/u,``):e}}let r=t.indexOf(`
11
+ `);if(r<0||x(t.slice(0,r))[0]?.[0]===0)return{title:``,body:t};let i=t.slice(r+1).replace(/^\s+/u,``);return i?{title:t.slice(0,r).trim(),body:i}:{title:``,body:t}}function Ve(e){let t=ze(e);if(!t)return N(e?.description,e)||``;let{body:n}=Be(e);return n?`${t}
12
+
13
+ ${n}`:t}var He=/^\*\*([^*\n]+):\*\*[ \t]*/u;function Ue(e){let t=[];for(let n of de(e||``,/\n{2,}/gu)){if(!n.trim())continue;let e=He.exec(n);if(e){t.push({label:e[1].trim(),body:n.slice(e[0].length).trim()});continue}let r=t.at(-1);r&&r.label===null?r.body+=`
14
+
15
+ ${n}`:t.push({label:null,body:n})}return t}function I(e){return Number.isFinite(parseInt(e?.line,10))?`${e.file}:${e.line}`:e?.file??``}function We(e){let t=e=>typeof e==`string`?e:``;return`${t(e?.observation)}
16
+ ${t(e?.text)}`.trim()}function L(e){if(typeof e!=`string`||e.length===0)return!1;try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`}catch{return!1}}function Ge(e){return String(e??``).replaceAll(/\s*\n\s*/gu,` `).replaceAll(`|`,`\\|`).trim()}function R(e){let t=String(e??``);if(t===``)return``;let n=Math.max(0,...[...t.matchAll(/`+/gu)].map(e=>e[0].length)),r="`".repeat(n+1),i=t.startsWith("`")||t.endsWith("`")?` `:``;return`${r}${i}${t}${i}${r}`}function Ke(e){return String(e??``).replaceAll(/[[\]]/gu,`\\$&`)}function z(e,t){return`[${e}](${/[\s()<>]/u.test(t)?`<${t.replaceAll(`>`,`%3E`)}>`:t})`}function qe(e){return L(e)?`<${e}>`:String(e??``)}function Je(e,t){let n=String(e??``).toLowerCase().replaceAll(/[^\p{L}\p{N}\p{M}\s_-]/gu,``).replaceAll(/\s/gu,`-`),r=n;for(let e=1;t.has(r);e++)r=`${n}-${e}`;return t.add(r),r}function B(e,t){return`${`#`.repeat(Math.min(6,Math.max(1,e)))} ${t}`}function Ye(e,t,n=[]){return[e,e.map((e,t)=>n[t]===`right`?`---:`:`---`),...t].map(e=>`| ${e.join(` | `)} |`).join(`
17
+ `)}function Xe(e){let t=e instanceof Date?e:new Date(e);if(Number.isNaN(t.getTime()))return``;let n=e=>String(e).padStart(2,`0`);return`${t.getUTCFullYear()}-${n(t.getUTCMonth()+1)}-${n(t.getUTCDate())} ${n(t.getUTCHours())}:${n(t.getUTCMinutes())} UTC`}function V(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}function Ze(e){return e.filter(e=>typeof e==`string`&&e.trim()).map(e=>e.replace(/\s+$/u,``)).join(`
18
+
19
+ `)}var Qe=/^( {0,3})(\\*#)/u;function H(e){let t=C(e).trim();if(!t)return``;let n=$e(t,e=>e.replace(Qe,`$1\\$2`)),{closer:r}=ie(n);return r===null?n:`${n}
20
+ ${r}`}function $e(e,t){let n=x(e),r=0;return e.split(`
21
+ `).map(e=>{let i=r;return r+=e.length+1,S(n,i)?e:t(e)}).join(`
22
+ `)}function U(e){return $e(String(e??``),e=>e.replace(/^( {0,3})\\(\\*#)/u,`$1$2`))}function et(e,t){let n=` `.repeat(e.length);return t.split(`
23
+ `).map(e=>e?n+e:``).join(`
24
+ `)}var tt=[`type`,`model`,`think`,`effort`,`exportsMode`];function nt(e,t){if(!t.source)for(let n of tt)e[n]==null&&t[n]!=null&&(e[n]=t[n])}var rt=/^(?:https?:\/\/)?(?:www\.)?github\.com\/([^/?#]+)\/([^/?#]+?)(?:\.git)?(?:[/?#].*)?$/iu,it=/^[\w.-]+\/[\w.-]+$/u;function at(e){return it.test(e)}function ot(e){let t=e?.repo?.github;if(typeof t!=`string`)return null;let n=t.trim().replace(/\/+$/u,``);if(!n)return null;let r=rt.exec(n),i=(r?`${r[1]}/${r[2]}`:n).replace(/\.git$/u,``);return at(i)?i:null}function st(e){let t=(typeof e?.directory==`string`?e.directory.trim():``).replace(/^(?:\.\/)+/u,``).replaceAll(/^\/+|\/+$/gu,``).replaceAll(/\/{2,}/gu,`/`);return!t||t===`.`||/[?#]/u.test(t)||t.split(`/`).includes(`..`)?``:t}var ct=[`finding_url`,`repository`,`title`,`description`,`severity`,`configured_scan_id`,`relevant_paths`];function lt(e){let t=[],n=[],r=``,i=!1;for(let a=0;a<e.length;a++){let o=e[a];i?o===`"`?e[a+1]===`"`?(r+=`"`,a++):i=!1:r+=o:o===`"`?i=!0:o===`,`?(n.push(r),r=``):o===`
25
+ `||o===`\r`?(n.push(r),t.push(n),n=[],r=``,o===`\r`&&e[a+1]===`
26
+ `&&a++):r+=o}for((r!==``||n.length>0)&&(n.push(r),t.push(n));t.length>0&&t.at(-1).length===1&&t.at(-1)[0]===``;)t.pop();return t}function ut(e,t){return t.map(t=>{let n=Object.create(null);return e.forEach((e,r)=>{n[e]=t[r]??``}),n})}function dt(e){let t=lt(e);if(t.length<2)throw Error(`Codex CSV: empty or missing header row`);let[n,...r]=t;for(let e of ct)if(!n.includes(e))throw Error(`Codex CSV: missing required column "${e}"`);let i=Map.groupBy(ut(n,r).filter(e=>e.configured_scan_id),e=>e.configured_scan_id);if(i.size===0)throw Error(`Codex CSV: no rows with a configured_scan_id`);let a=[];for(let[e,t]of i){let n=new Set(t.map(e=>e.repository).filter(Boolean));if(n.size>1)throw Error(`Codex CSV: scan ${e} contains multiple repositories: ${[...n].join(`, `)}`);let r=`${[...n][0]||`unknown-repo`}:${e.replace(/^[^:]+:/u,``)}`;a.push({displayName:r,data:{type:`security`,source:`codex-security`,findings:t.map(ft)}})}return a}function ft(e){let t=e.relevant_paths.split(` | `).map(e=>e.trim()).find(Boolean)||`unknown`,n=[e.title,e.description].filter(Boolean).join(`
27
+
28
+ `),r={id:e.finding_url,file:t,line:`?`,severity:(e.severity||`medium`).toLowerCase(),description:n,repo:{github:e.repository}};return e.commit_hash&&(r.commitHash=e.commit_hash),e.detected_at&&(r.detectedAt=e.detected_at),e.committed_at&&(r.committedAt=e.committed_at),c(r)}function pt(){let e=[],t=new Map,n=n=>{if(!t.has(n)){let r={security:!1};r.parent=r,t.set(n,r),typeof n==`string`&&e.push(n)}return t.get(n)},r=e=>{let t=e;for(;t.parent!==t;)t=t.parent;for(;e.parent!==e;){let n=e.parent;e.parent=t,e=n}return t};return{nodeFor:n,root:r,join:(e,t)=>{e=r(e),t=r(t),e!==t&&(t.parent=e,e.security||=t.security)},ids:e}}function mt(e,{source:t,linkedIds:n=()=>[],knownRows:r=()=>[]}={}){let{nodeFor:i,root:a,join:o,ids:s}=pt(),c=[],l=(e,n=!1)=>{let r;for(let s of e){if(!s||typeof s!=`object`)continue;let e=i(s.id||s);a(e).security||=n?s.isSecurity===!0:Fe(s,s._source??s.source??t),r?o(r,e):r=e,n||c.push([s,e])}};for(let t of e)l(t);let u=new Set;for(let e=0;e<s.length;e++){let t=s[e],a=i(t);for(let e of n(t))o(a,i(e));for(let e of r([t]))u.has(e)||(u.add(e),l(e.members,!0))}let d=!1;for(let[e,t]of c){let n=a(t).security;e.isSecurity!==n&&(e.isSecurity=n,d=!0)}return d}var ht=/^## ([A-Z][A-Z_]*)\s*\(\d+\)\s*\n/mu,gt=new Map([...o,[`HIGH_BUG`,`high_bug`],[`BUG`,`bug`]]),_t=e=>String(e??``).toLowerCase().replaceAll(/[^a-z]+/gu,``),vt=new Map([[`high`,8],[`medium`,6],[`low`,4]]);function yt(e){if(e!==void 0)return vt.get(_t(e))??vt.get(`medium`)}var bt=new Map([[`confirmed`,`confirmed`],[`falsepositive`,`refuted`],[`uncertain`,`unknown`]]);function xt(e){let t=C(e).trim().split(ht);if(t.length===1)return null;let n=[];for(let e=1;e<t.length;e+=2){let r=gt.get(t[e].toUpperCase())??`medium`;for(let i of de(t[e+1],/^### /gmu).slice(1)){let e=St(i,r);if(!e)continue;let t=i.indexOf(`
29
+ ### `);t!==-1&&(e._idBasis=a(St(i.slice(0,t+1),r))),n.push(e)}}return n.length===0?null:{type:`security`,source:`deepsec`,findings:n}}function St(e,t){let{title:n,body:r}=O(e);if(!n)return null;let i=r.replace(/\n---\s*$/u,``).trim(),a=Object.fromEntries([...i.matchAll(/^- \*\*([^:*]+):\*\*\s*(.+)$/gmu)].map(e=>[e[1].trim().toLowerCase(),e[2].trim()])),o=/^\*\*Recommendation:\*\*\s*/mu.exec(i),s=o?i.slice(0,o.index):i,l=o?i.slice(o.index+o[0].length).trim():``,u=[n,s.split(`
30
+ `).filter(e=>!/^\s*- \*\*/u.test(e)).join(`
31
+ `).replaceAll(`**`,``).trim()].filter(Boolean).join(`
32
+
33
+ `),d={file:(a.file||`unknown`).replace(/^`(.*)`$/u,`$1`),line:(a.lines||``).split(`,`).map(e=>e.trim()).find(Boolean)||`?`,severity:t,description:u};l&&(d.recommendation=l.replaceAll(`**`,``));let f=yt(a.confidence);f!==void 0&&(d.confidence=f);let p=bt.get(_t(a.revalidation));return p&&(d.revalidate=p,d.revalidateSource=`deepsec`,a.reasoning&&(d.revalidateVerdict=a.reasoning.replaceAll(`**`,``))),a.slug&&(d.slug=a.slug),c(d,t===`informative`?`medium`:t)}var W=120;function Ct(e){let t=F(e)||I(e)||`Untitled finding`;return t.length>W?`${t.slice(0,W-1).trimEnd()}\u2026`:t}function wt(e){let t=String(e??``).trim();return L(t)?qe(t):at(t)?z(t,`https://github.com/${t}`):t}function Tt(e,t,n){return t?f[t]??String(t):Le(e,n)}var Et=[[`Impact`,`impact`,!1],[`Reproduction`,`reproduction`,!1],[`Recommendation`,`recommendation`,!1],[`Confidence reasoning`,`confidenceReason`,!1],[`Revalidation verdict`,`revalidateVerdict`,!0],[`Revalidation recommendation`,`revalidateRecommendation`,!0]],Dt=[[`Status`,`status`],[`Branch`,`branch`],[`Date created`,`dateCreated`],[`Detected at`,`detectedAt`],[`Committed at`,`committedAt`],[`PoC status`,`pocStatus`],[`Variant of`,`parent`],[`Slug`,`slug`],[`Priority`,`priority`]],Ot=[[`Detailed report`,`reportPath`],[`Commit audited`,`auditedCommit`],[`ID`,`id`]];function G(e){return typeof e==`number`?Number.isFinite(e)?String(e):``:typeof e==`string`?e.replaceAll(/\s*\n\s*/gu,` `).trim():``}function kt(e){return typeof e==`string`?e.trim():``}function At(e,t){let n=t.severityMode===`original`,r=p(Ae(e,t.severityMode));ke(e)&&(r+=n?` \u2014 corrected to ${p(Oe(e))}`:` \u2014 corrected from ${p(e.severity)}`);let i=je(e);if(i){let e=Object.entries(i).map(([e,t])=>`${e||`this report`}: ${p(t?.severity)}`);r+=` (varies across reports \u2014 ${e.join(`; `)})`}return e.critical===!0&&(r+=` · flagged critical by the analyzer`),r}function jt(e,t){let n=I(e);if(!n)return``;let r=t.hooks.location(e),i=L(r)?z(R(n),r):R(n),a=Re(e);return a?`${i} \xB7 ${R(a)}`:i}function Mt(e){if(!e)return``;let t=[],n=u[e.triage]??(e.ignored?u.ignored:``);return n&&t.push(n),e.color&&t.push(`${d[e.color]??e.color} mark`),e.flagged===!0&&t.push(`Flagged`),t.join(` · `)}function Nt(e,t){let n=G(e.commitHash);if(!n)return``;let r=t.hooks.commit(e);return L(r)?z(R(n.slice(0,7)),r):R(n)}function Pt(e,t,n){let r=[],i=(e,t)=>{t&&r.push(`- **${e}:** ${t}`)};i(`Location`,jt(e,t)),i(`Severity`,At(e,t)),e.confidence!==void 0&&e.confidence!==null&&i(`Confidence`,`${e.confidence}/10`),t.showAnalyzer&&i(`Analyzer`,t.analyzerOf(e)),i(`Category`,G(e.category));let a=t.revalidation?M(e):``;a&&i(`Revalidation`,a===`revalidation`?`the revalidation pass itself`:a);let o=G(e.revalidateSource);a&&i(`Revalidated by`,f[o]??o),i(`Triage`,Mt(n)),n?.fix&&i(`Fix`,qe(String(n.fix).trim())),t.showReport&&i(`Report`,R(t.hooks.report(e)??``));let s=G(e.repo?.github);s&&s!==t.repo&&i(`Repository`,wt(s)),i(`Introduced in`,Nt(e,t));let c=G(e.discoveredIn);c&&c!==String(e.file??``).trim()&&i(`Found while analyzing`,R(c));let l=e.package?.npm,u=G(l?.name);u&&i(`Package`,R(G(l.version)?`${u}@${G(l.version)}`:u));for(let[t,n]of Dt)i(t,G(e[n]));for(let[t,n]of Ot)i(t,R(G(e[n])));return r.join(`
34
+ `)}function K(e,t,n){let r=H(n);return r?`${B(e,t)}
35
+
36
+ ${r}`:B(e,t)}function Ft(e,t){return(Array.isArray(e.evidence)?e.evidence:[]).map((n,r)=>{let i=`${r+1}. `,a=I(n),o=t.hooks.evidence(n,e,r),s=``;a?s=L(o)?z(R(a),o):R(a):L(o)&&(s=qe(o));let c=H(We(n)),l=i+(s||`(no reference)`);return c?`${l}
37
+
38
+ ${et(i,c)}`:l}).join(`
39
+
40
+ `)}function It(e,t,n){let r=Be(e),i=C(r.body),a=F(e),o=a.length>W,s=!o&&!r.title&&i.trim()===a,c=o&&P(i)!==a?`${a}
41
+
42
+ ${i}`:i,l=Ue(s?``:c),u=l.findIndex(e=>e.label!==null),d=u===-1?l:l.slice(0,u),f=u===-1?[]:l.slice(u),p=d.map(e=>H(e.body)),m=Ft(e,t);m&&p.push(`${B(n,`Evidence`)}
43
+
44
+ ${m}`);for(let e of f)p.push(e.label===null?H(e.body):K(n,e.label,e.body));return p}function Lt(e,t,n){let r=t.hooks.annotation(e),i=[Pt(e,t,r),...It(e,t,n)];for(let[r,a,o]of Et){if(o&&!t.revalidation)continue;let s=e[a],c=typeof s==`string`?N(s,e):``;c.trim()&&i.push(K(n,r,c))}ke(e)&&kt(e.correctedSeverityReason)&&i.push(K(n,`Severity correction`,e.correctedSeverityReason));let a=kt(r?.comment);return a&&i.push(K(n,`Comment`,a)),i}function Rt(e,t,{headingText:n,depth:r}){let i=[B(r,n)];if(e.length===1)return Ze([...i,...Lt(e[0],t,r+1)]);let a=[...new Set(e.map(e=>t.hooks.report(e)).filter(Boolean))],o=a.length>1?` \u2014 reported in ${a.map(e=>R(e)).join(`, `)}`:``;i.push(`${V(e.length,`case`)} of this finding${o}.`);let s=F(e[0]);return e.forEach((n,a)=>{let o=I(n);i.push(B(r+1,`Case ${a+1} of ${e.length}${o?` \u2014 ${R(o)}`:``}`));let c=F(n);c&&c!==s&&i.push(H(c)),i.push(...Lt(n,t,r+2))}),Ze(i)}var zt=new Map(Object.entries(l).map(([e,t])=>[t.toLowerCase(),e])),Bt=new Map(Object.entries(f).map(([e,t])=>[t.toLowerCase(),e]));function q(e){let t=/(`+)(.+?)\1(?!`)/u.exec(String(e??``));if(!t)return null;let n=t[2];if(n.length>2&&n.startsWith(` `)&&n.endsWith(` `)){let e=n.slice(1,-1);if(e.startsWith("`")||e.endsWith("`"))return e}return n}function J(e){let t=k(String(e??``));return t?.index===0?{label:t.label,url:t.url}:null}function Vt(e){let t=/^<(https?:[^>\s]*)>$/u.exec(e.trim());return t?t[1]:null}function Ht(e){let t=le.exec(e);return t?{file:t[1],line:t[2]}:{file:e,line:`?`}}function Ut(e){let t=e.indexOf(`.`);return t>0?{exportName:e.slice(0,t),methodName:e.slice(t+1)}:{exportName:e}}function Wt(e){let t=String(e??``).trim();return zt.get(t.toLowerCase())??t}function Gt(e){let t={},n=e.trim(),r=/ \u00B7 (`+)(.+?)\1$/u.exec(n);r&&(Object.assign(t,Ut(q(r[0]))),n=n.slice(0,r.index));let i=J(n),a=q(i?i.label:n);return a!==null&&Object.assign(t,Ht(a)),i&&L(i.url)&&(t.location=i.url),t}var Kt=` · flagged critical by the analyzer`,qt=` (varies across reports — `;function Jt(e){let t={},n=e.trim();n.endsWith(Kt)&&(t.critical=!0,n=n.slice(0,-Kt.length));let r=n.indexOf(qt);r!==-1&&(n=n.slice(0,r));let i=/^(.*?) \u2014 corrected (from|to) (.*)$/u.exec(n);return i?[t.severity,t.correctedSeverity]=(i[2]===`from`?[i[3],i[1]]:[i[1],i[3]]).map(Wt):t.severity=Wt(n),t}var Yt=new Set([`max`,`xhigh`,`high`,`medium`,`low`,`minimal`]),Xt=new Set([`list`,`isolate`]);function Zt(e){return/\d/u.test(e)||/^(?:opus|sonnet|haiku|gpt|gemini|fable|mythos|llama|mistral)\b/iu.test(e)}function Qt(e){let t=e.trim(),n=Bt.get(t.toLowerCase());if(n)return{source:n};let r={},i=[];for(let e of t.split(` · `).map(e=>e.trim()).filter(Boolean))e===`revalidate`&&!r.revalidate?r.revalidate=`revalidation`:Xt.has(e)&&!r.exportsMode?r.exportsMode=e:Yt.has(e)&&!r.effort?r.effort=e:i.push(e);return i.length>1?[r.type,r.model]=i:i.length===1&&(r[Zt(i[0])?`model`:`type`]=i[0]),{run:r}}function $t(e){let t=e.trim(),n=J(t);return n?n.label.trim():Vt(t)??t}function en(e){let t=J(e.trim());if(t){let e=t.url.split(`/`).at(-1)??``;return T(e)?e:q(t.label)??e}return q(e)??e.trim()}function tn(e){let t=q(e)??e.trim(),n=t.lastIndexOf(`@`);return{npm:n>0?{name:t.slice(0,n),version:t.slice(n+1)}:{name:t}}}function nn(e){let t=e.trim().toLowerCase();return t===`the revalidation pass itself`?`revalidation`:Me.includes(t)?t:void 0}var rn=new Map([...[[`Category`,`category`],...Dt].map(([e,t])=>[e.toLowerCase(),(e,n)=>{e[t]=n}]),...[...Ot,[`Found while analyzing`,`discoveredIn`]].map(([e,t])=>[e.toLowerCase(),(e,n)=>{e[t]=q(n)??n}]),[`location`,(e,t)=>Object.assign(e,Gt(t))],[`severity`,(e,t)=>Object.assign(e,Jt(t))],[`confidence`,(e,t)=>{let n=/^(\d+(?:\.\d+)?)\/10$/u.exec(t);n&&(e.confidence=Number(n[1]))}],[`revalidation`,(e,t)=>{let n=nn(t);n&&(e.revalidate=n)}],[`revalidated by`,(e,t)=>{let n=t.trim();n&&(e.revalidateSource=Bt.get(n.toLowerCase())??n)}],[`repository`,(e,t)=>{e.repo={github:$t(t)}}],[`introduced in`,(e,t)=>{e.commitHash=en(t)}],[`package`,(e,t)=>{e.package=tn(t)}],[`priority`,(e,t)=>{e.priority=/^-?\d+(?:\.\d+)?$/u.test(t)?Number(t):t}]]);function an(e,t,n){let r=rn.get(t.trim().toLowerCase());r&&r(e,n.trim())}var on=/^- \*\*([^*\n]+?):\*\* ?(.*)$/u;function sn(e){let t=e.split(`
45
+ `),n=0,r=()=>{for(;n<t.length&&!t[n].trim();)n++},i=()=>{let e=[];for(let r;(r=on.exec(t[n]??``))!==null;n++)e.push([r[1].trim(),r[2].trim()]);return e};r();let a=i();if(a.length>0)return{title:``,facts:a,rest:t.slice(n).join(`
46
+ `)};let o=[];for(;n<t.length&&t[n].trim();)o.push(t[n++]);return r(),a=i(),a.length===0?{title:``,facts:a,rest:e}:{title:U(o.join(`
47
+ `).trim()),facts:a,rest:t.slice(n).join(`
48
+ `)}}var cn=/^(\d+)\. (.*)$/u;function ln(e){let t=[],n=x(e),r=0;for(let i of e.split(`
49
+ `)){let e=S(n,r)?null:cn.exec(i);r+=i.length+1,e?t.push({ref:e[2].trim(),indent:e[1].length+2,note:[]}):t.length>0&&t.at(-1).note.push(i)}return t.map(e=>un(e))}function un({ref:e,indent:t,note:n}){let r={},i=J(e),a=Vt(e),o=a===null?q(i?i.label:e):null;o!==null&&Object.assign(r,Ht(o));let s=i?i.url:a;L(s)&&(r.url=s);let c=U(n.map(e=>e.slice(Math.min(t,/^ */u.exec(e)[0].length))).join(`
50
+ `).trim());return c&&(r.text=c),r}var dn=new Map(Et.map(([e,t])=>[e.toLowerCase(),t])),fn=[...dn.keys()];function pn(e){let t=e.length,n=1/0;for(let r=e.length-1;r>=0;r--){let i=fn.indexOf(e[r].label.toLowerCase());if(i===-1||i>=n)break;n=i,t=r}return{paragraphs:e.slice(0,t),fields:e.slice(t).map(e=>[dn.get(e.label.toLowerCase()),e.body])}}function mn(e,t,n){let r=[],i=P(t),a=e.endsWith(`…`)?e.slice(0,-1).trimEnd():``;!e||i===e||a&&i.startsWith(a)?r.push(t):r.push(e,t);for(let{label:e,body:t}of n)r.push(t?`**${e}:** ${t}`:`**${e}:**`);return r.filter(Boolean).join(`
51
+
52
+ `)}var hn=/^<!--\s*DeepView findings export\b[^>]*-->/u,gn=/^Case \d+ of \d+(?:\s|$)/u,_n=/^- \*\*([^*\n]+?):\*\* ?(.*)$/gmu,vn=new Set([`evidence`,`severity correction`,`comment`]);function yn(e){let t=C(e).trim();if(!hn.test(t))return null;let{head:n,subs:r}=E(t,oe),i=[];for(let{heading:e,body:t}of r){if(e.trim().toLowerCase()===`summary`)continue;let n=bn(e);for(let e of D(t,se))i.push(Sn(e,n))}return Tn(xn(n),i)}function bn(e){let t=/^(.*?)\s*\(\d+\)\s*$/u.exec(e.trim());return Wt(t?t[1]:e)}function xn(e){let t=new Map;for(let n of e.matchAll(_n)){let e=n[1].trim().toLowerCase();t.has(e)||t.set(e,n[2].trim())}return{sources:(t.get(`source`)??``).split(`,`).map(e=>Qt(e).source).filter(Boolean),analyzers:(t.get(`analyzer`)??t.get(`analyzers`)??``).split(`;`).map(e=>e.trim()).filter(Boolean),repo:t.has(`repository`)?$t(t.get(`repository`)):``}}function Sn({heading:e,body:t},n){let r=e.trim().replace(/^\d+\.\s+/u,``),i=D(t,w).filter(e=>gn.test(e.heading.trim()));return i.length===0?[Cn(t,w,r,n)]:i.map(e=>Cn(e.body,ce,r,n))}function Cn(e,t,n,r){let{title:i,facts:a,rest:o}=sn(e),{head:s,subs:l}=E(o,t),u=l.map(e=>({label:e.heading.trim(),body:e.body.trim()})),d={file:`unknown`,line:`?`},f=null;for(let[e,t]of a)e.trim().toLowerCase()===`analyzer`?f=Qt(t):an(d,e,t);d.severity||=r||`medium`;let p=i||n,m=p!==`Untitled finding`&&p!==I(d),{paragraphs:h,fields:g}=pn(u.filter(e=>!vn.has(e.label.toLowerCase())).map(e=>({label:e.label,body:U(e.body)})));d.description=mn(m?p:``,U(s.trim()),h);let _=u.filter(e=>e.label.toLowerCase()===`evidence`).flatMap(e=>ln(e.body));_.length>0&&(d.evidence=_);for(let[e,t]of g)d[e]=t;let v=u.find(e=>e.label.toLowerCase()===`severity correction`);return v?.body&&(d.correctedSeverityReason=U(v.body)),{finding:c(d),analyzer:f}}function wn(e,t){let n={source:null,run:{}};if(t.some(e=>e.analyzer!==null)){let e=new Set(t.map(e=>e.analyzer?.source??null));e.size===1&&!e.has(null)&&([n.source]=e);for(let e of t)e.analyzer?.run?Object.assign(e.finding,e.analyzer.run):e.analyzer?.source&&!n.source&&(e.finding.source=e.analyzer.source);return n}let r=e.analyzers.length===1?Qt(e.analyzers[0]):null;return r?.source?n.source=r.source:r?.run?n.run=r.run:e.analyzers.length===0&&e.sources.length===1&&([n.source]=e.sources),n}function Tn(e,t){let n=t.flat(),{source:r,run:i}=wn(e,n),a={},o=new Set(n.map(e=>e.finding.type).filter(Boolean)),s=i.type??(o.size===1?[...o][0]:null)??(r?`security`:null);s&&(a.type=s),r&&(a.source=r);for(let e of[`model`,`effort`,`exportsMode`])i[e]&&(a[e]=i[e]);e.repo&&(a.repo={github:e.repo});let c=t.map(e=>e.map(e=>e.finding));return c.every(e=>e.length===1)?a.findings=c.flat():a.groups=c,a}var En=`markdown-generic`,Dn=[`#`,`id`,`product`,`priority`,`vulnerability`],On=[`title`,`description`,`root cause`,`code references`,`attack scenario`,`steps to reproduce`,`impact`,`patch`],kn=/^(?:#{3,6}[ \t]+)?(?:\*\*)?(Title|Description|Root Cause|Code references|Attack Scenario|Steps to Reproduce(?:[ \t]+.*?)?|Impact|Patch):?(?:\*\*)?(?:[ \t]+#+)?[ \t]*$/gimu,An={P0:`critical`,P1:`high`,P2:`medium`,P3:`low`,P4:`informational`},Y=e=>e.trim().slice(1,-1).split(`|`).map(e=>e.trim());function X(e,t){if(!e)throw Error(`Markdown (generic): unsupported ${t}`)}function jn(e){return[...new Set(e.split(`
53
+ `).map(e=>e.trim()).filter(Boolean))].map(e=>{X(/^https?:\/\/[^\s()[\]{}"'<>`\\]+$/iu.test(e)&&!/[.,;!?]$/u.test(e),`link syntax; use bare URLs on separate lines`);let t;try{t=new URL(e)}catch{X(!1,`URL`)}let[n,r,i,a,...o]=t.pathname.slice(1).split(`/`);X([`github.com`,`www.github.com`].includes(t.hostname)&&!t.username&&!t.password&&!t.port&&[n,r].every(e=>e&&/^[\w-][\w.-]*$/u.test(e)),`repository URL`),X(o.every(Boolean),`repository path; empty components`);let s=`${n}/${r.replace(/\.git$/iu,``)}`.toLowerCase(),c=/^#L(\d+)(?:-L?(\d+))?$/u.exec(t.hash),l=i===`blob`?o.slice(0,-1):i===`tree`?o:[];try{l=l.map(decodeURIComponent)}catch{X(!1,`repository directory encoding`)}return X(l.every(e=>e===e.trim()&&!/[\\/:?#\p{Cc}]/u.test(e)),`repository directory`),{repo:s,ref:a,directory:l,...i===`blob`&&o.length&&{evidence:{file:o.join(`/`),line:c?c.slice(1).filter(Boolean).join(`-`):`?`,url:e}}}})}function Mn(e,t,n,r){let i=jn(n),a=i[0]?.repo;X(a&&i.every(e=>e.repo===a),`repository set for finding ${e.id}; expected exactly one repository`),X(!e.group.github||e.group.github===a,`repository set for product ${e.product}; expected exactly one repository`);let o=r.get(a);X(o===void 0||o===e.prefix,`repository ID prefixes for ${a}; expected ${o}, got ${e.prefix} (${e.id})`),r.set(a,e.prefix),e.group.github=a,e.group.directories.push(...i.map(e=>e.directory));let s=i.flatMap(e=>e.evidence??[]);if(s.length){Object.assign(t,{file:s[0].file,line:s[0].line,location:s[0].url,evidence:s});let e=i.filter(e=>e.evidence).map(e=>e.ref.toLowerCase()),n=e.reduce((e,t)=>t.length>e.length?t:e);e.every(e=>T(e)&&n.startsWith(e))&&(t.auditedCommit=n)}}function Nn(e){let t=e[0];for(let n of e.slice(1)){let e=0;for(;e<t.length&&t[e]===n[e];)e++;t=t.slice(0,e)}return t.join(`/`)}function Pn(e){let t=C(e).trim(),n=[...t.matchAll(/^## +(.*)$/gmu)];if(!n.some(e=>/^\d+\.\s+\S+/u.test(e[1]))&&(n.length||t.startsWith(`# `)))return null;let r=[...t.matchAll(/^\|[^\n]*\|$/gmu)].find(([e])=>Y(e).map(e=>e.toLowerCase()).join()===Dn.join());if(!r)return null;let i=t.slice(0,r.index).trim();X(!i||/^# [^\n]+$/u.test(i),`summary preamble`),X(r.index<(n[0]?.index??t.length),`summary position`);let a=t.slice(r.index,n[0]?.index).trim().split(`
54
+ `),o=new Set(Y(a[0]).map(e=>e.toLowerCase()));X(a[1]&&Y(a[1]).length===5&&Y(a[1]).every(e=>/^:?-{3,}:?$/u.test(e)),`summary separator`);let s=new Map,c=new Map,l=new Map;for(let e of a.slice(2).filter(e=>e.trim())){X(/^\|.*\|$/u.test(e)&&Y(e).length===5,`summary row`);let[t,n,r,i]=Y(e),a=/^(.+-)\d+$/u.exec(n)?.[1];X(/^\d+$/u.test(t)&&a&&r&&Object.hasOwn(An,i)&&!l.has(n),`summary values for ${n}`);let o=s.get(r)??{directories:[],rows:[]},c={raw:e,id:n,prefix:a,product:r,priority:i,group:o};l.set(n,c),o.rows.push(c),s.set(r,o)}X(l.size,`empty summary`);for(let[e,r]of n.entries()){let i=/^\d+\.\s+(\S+)\s*$/u.exec(r[1])?.[1],a=l.get(i);X(a&&!a.finding,`finding section ${r[1]}`);let s=t.slice(r.index,n[e+1]?.index),u=s.slice(r[0].length+1),d=new Map,f=[...u.matchAll(kn)];for(let[e,t]of f.entries()){let n=t[1],r=n.toLowerCase().replace(/^steps to reproduce\b.*$/u,`steps to reproduce`);X(!d.has(r),`duplicate section ${n}`),d.set(r,{heading:n,body:u.slice(t.index+t[0].length,f[e+1]?.index).trim()})}X(On.every(e=>d.has(e)),`missing required headers for ${i}`),X(!u.slice(0,f[0].index).trim(),`text before field headers for ${i}`);let p=d.get(`title`)?.body;X(p,`missing Title for ${i}`);let m={sourceId:i,_idBasis:{source:En,row:a.raw.trim(),section:s.trim()},product:a.product,priority:a.priority,severity:An[a.priority],file:`unknown`,line:`?`};o.has(`vulnerability`)&&(m.security=!0);let h=[p];for(let[e,t]of d)e===`title`||e===`code references`||(e===`steps to reproduce`?m.reproduction=t.body:e===`patch`?m.recommendation=t.body:h.push(e===`description`?t.body:`**${t.heading}:**
55
+ ${t.body}`));m.description=h.join(`
56
+
57
+ `),Mn(a,m,d.get(`code references`).body,c),a.finding=m}return X([...l.values()].every(e=>e.finding),`missing finding sections`),[...s].map(([e,t])=>({displayName:e,data:{type:`security`,source:En,product:e,repo:{github:t.github,directory:Nn(t.directories)},findings:t.rows.map(({finding:e})=>({...e,repo:{github:t.github}}))}}))}function Fn(e){let t=Pn(e);return t===null?null:t.length===1?t[0].data:{type:`security`,source:En,findings:t.flatMap(({data:e})=>e.findings)}}var In=new Set([`critical`,`high`,`medium`,`low`,`high_bug`,`bug`,`informational`]);function Ln(e){let t=Rn(e);if(!t)return null;let{severity:n,description:r,location:i,file:a,line:o}=t;return i?{severity:n,description:r,location:i}:{severity:n,description:r,file:a,line:o}}function Rn(e){let t=e.indexOf(`
58
+ `),n=(t===-1?e:e.slice(0,t)).trim();if(!n)return null;let{sectionsText:r,metaText:i}=zn(t===-1?``:e.slice(t+1)),a=Bn(r),o=Vn(i),{file:s,line:c,locationLink:l}=Hn(a.location||``),u=(o.severity||``).toLowerCase();return{severity:In.has(u)?u:`medium`,description:Un(n,a),location:l,file:s||`unknown`,line:c}}function zn(e){let t=/^---\s*$/mu,n=t.exec(e);if(!n)return{sectionsText:e,metaText:``};let r=e.slice(0,n.index).trim(),i=e.slice(n.index+n[0].length).replace(/^\n/u,``),a=t.exec(i);return{sectionsText:r,metaText:a?i.slice(0,a.index):i}}function Bn(e){let t={},n=e.split(/^## /mu);for(let e=1;e<n.length;e++){let r=n[e],i=r.indexOf(`
59
+ `),a=(i===-1?r:r.slice(0,i)).trim().toLowerCase(),o=(i===-1?``:r.slice(i+1)).trim();a&&(t[a]=o)}return t}function Vn(e){let t={};for(let n of e.matchAll(/\*\*([^:]+):\*\*\s*(.+)/gu))t[n[1].trim().toLowerCase()]=n[2].trim();return t}function Hn(e){let t=``,n=`?`,r=``,i=e.match(/\[([^\]]+)\]\(([^)]+)\)/u);if(i){t=i[1].trim(),r=i[2];let e=i[2].match(/#L(\d+)/u);e&&(n=e[1])}else t=e.trim(),r=e.trim();let a=t.match(/^(.+):(\d+)$/u);return a&&(t=a[1],n===`?`&&(n=a[2])),{file:t,line:n,locationLink:r}}function Un(e,t){let n=[e];return t.details&&n.push(t.details),t.impact&&n.push(`Impact: ${t.impact}`),t[`reproduction steps`]&&n.push(`Reproduction: ${t[`reproduction steps`]}`),Wn(n.join(`
60
+
61
+ `))}function Wn(e){return e.replaceAll(`**`,``)}var Gn=new Set([...j,`informative`]);function Kn(e){let t=C(e).trim();if(!t.startsWith(`# `))return null;let n=de(t,/^# /gmu).slice(1).filter(e=>e.trim().length>0).map(e=>qn(e)).filter(Boolean);return n.length===0?null:{type:`security`,source:`claude-security`,findings:n}}function qn(e){let{title:t,body:n}=O(e);if(!t)return null;let{sectionsText:r,metaText:i}=Jn(n),a=Yn(r),o=Object.fromEntries([...i.matchAll(/\*\*([^:]+):\*\*\s*(.+)/gu)].map(e=>[e[1].trim().toLowerCase(),e[2].trim()])),s=nr(a.evidence||``),{file:l,line:u,locationLink:d}=Xn(a.location||s[0]?.ref||``),f=(o.severity||``).toLowerCase(),p=Gn.has(f)?f:`medium`,m=ir(t,a,s.length>0),h={file:l||`unknown`,line:u,severity:p,description:m};d&&(h.location=d),s.length>0&&(h.evidence=s.map(rr)),a[`reproduction steps`]&&(h.reproduction=Zn(a[`reproduction steps`])),a[`recommended fix`]&&(h.recommendation=a[`recommended fix`]),o.repository&&(h.repo={github:o.repository}),o.branch&&(h.branch=o.branch),o[`date created`]&&(h.dateCreated=o[`date created`]),o.status&&(h.status=o.status),o.category&&(h.category=o.category);let g=e.indexOf(`
62
+ # `),_=Ln(g===-1?e:e.slice(0,g+1));return _&&(h._idBasis=_),c(h)}function Jn(e){let t=/^---\s*$/mu,n=t.exec(e);if(!n)return{sectionsText:e,metaText:``};let r=e.slice(0,n.index).trim(),i=e.slice(n.index+n[0].length).replace(/^\n/u,``),a=t.exec(i);return{sectionsText:r,metaText:a?i.slice(0,a.index):i}}function Yn(e){let t=e.split(/^## /mu).slice(1).map(e=>O(e));return Object.fromEntries(t.filter(e=>e.title).map(e=>[e.title.toLowerCase(),e.body.trim()]))}function Xn(e){let t=``,n=`?`,r=``,i=k(e);if(i){t=i.label.trim(),r=i.url.trim();let e=r.match(/#L(\d+)(?:-L?(\d+))?/u);e&&(n=e[2]?`${e[1]}-${e[2]}`:e[1])}else t=e.trim(),r=e.trim();t=we(t.replaceAll("`",``)).trim();let a=t.match(/^(.+):(\d+)(?:\s*[-\u2013\u2014]\s*L?(\d+))?$/u);return a&&(t=a[1],n===`?`&&(n=a[3]?`${a[2]}-${a[3]}`:a[2])),{file:t,line:n,locationLink:r,linked:i!==null}}function Zn(e){let t=e.split(`
63
+ `),n=t.findIndex(e=>e.trim());if(n===-1||!v.test(t[n])||t.some((e,t)=>t!==n&&v.test(e)))return e;let r=t[n].replace(/^ */u,``),i=r.replace(v,``);if(!i.trim())return e;let a=er(i)??er(r);if(a===null&&(v.test(i)||$n.test(r)))return e;let o=a===null?[i]:a.length===1?[a[0].step]:a.map(({number:e,step:t})=>`${e}. ${t}`);return t.splice(n,1,...o),t.join(`
64
+ `)}var Qn=/(?:^|[ \t])(\d{1,9})\)(?=[ \t]|$)/gu,$n=/^\d{1,9}\)(?=[ \t]|$)/u;function er(e){let t=[...e.matchAll(Qn)];if(t.length===0||t[0].index!==0)return null;let n=[];for(let[r,i]of t.entries()){let a=Number(i[1]);if(r>0&&a<=n[r-1].number)return null;let o=e.slice(i.index+i[0].length,t[r+1]?.index).trim();if(!o)return null;n.push({number:a,step:o})}return n}var tr=/^[ \t]*(?:\d+[.)]|[-*+])\s+/u;function nr(e){let t=[];for(let n of e.split(`
65
+ `))tr.test(n)?t.push({ref:n.replace(tr,``).trim(),note:[]}):t.length>0&&n.trim()&&t.at(-1).note.push(n.trim());if(t.length===0){let n=e.split(`
66
+ `).map(e=>e.trim()).filter(Boolean),r=n.findIndex(e=>k(e)!==null);if(r===-1&&n.length!==1)return[];let i=r===-1?0:r;t.push({ref:n[i],note:n.filter((e,t)=>t!==i)})}return t.filter(e=>e.ref)}function rr({ref:e,note:t}){let{file:n,line:r,locationLink:i,linked:a}=Xn(e),o={file:n||`unknown`,line:r};i&&a&&(o.url=i);let s=t.join(`
67
+ `);return s&&(o.text=s),o}function ir(e,t,n){let r=[e];return t.details&&r.push(t.details),t.evidence&&!n&&r.push(`**Evidence:**
68
+ ${t.evidence}`),t.impact&&r.push(`**Impact:** ${t.impact}`),r.join(`
69
+
70
+ `)}function ar(e){let t=(e||``).trim(),n=``,r=/\[([^\]]+)\]\(([^)]+)\)/u.exec(t);r&&(t=r[1].trim(),n=r[2].trim());let i=``,a=/#L(\d+)/u.exec(n);a&&(i=a[1]);let o=[...t.matchAll(/`([^`]+)`/gu)].map(e=>e[1].trim()).find(e=>!e.includes(`(`)&&(e.includes(`/`)||/\.\w/u.test(e)))??(t.replaceAll("`",``).trim().split(/[\s,]+/u).find(Boolean)||``),s=/^(.*?)#L(\d+)(?:-L?\d+)?$/u.exec(o);s&&(o=s[1],i||=s[2]);let c=/^(.+):(\d+(?:-\d+)?)$/u.exec(o);return c?(i||=c[2],{file:c[1],line:i,locationLink:n}):{file:o,line:i||`?`,locationLink:n}}function or({severity:e,description:t,ref:n,lineBullet:r=``,id:i=``}){let a=ar(n),o=a.file||`unknown`,s=a.line===`?`&&r?r:a.line,c=a.locationLink||(o===`unknown`&&i?`piolium:${i}`:``);return c?{severity:e,description:t,location:c}:{severity:e,description:t,file:o,line:s}}function Z(e){let t=((e||``).trim().split(/\s+/u)[0]||``).replaceAll(/[`*]+/gu,``);return o.get(t.toUpperCase())??``}function sr(...e){return{severity:e.find(Boolean)||`medium`,identitySeverity:e.find(e=>e&&e!==`informative`)||`medium`}}function cr(e){let t=/^([CHML])-?\d+$/iu.exec((e||``).trim());return t?{C:`critical`,H:`high`,M:`medium`,L:`low`}[t[1].toUpperCase()]:``}function lr(e){return Z(/^(critical|high|medium|low|informational|informative|info)(?:[ -](?:severity|risk))?(?:[ -]findings?)?(?:\s*\(\d+\))?$/iu.exec((e||``).trim())?.[1])}function ur(e){return Z(/^(critical|high|medium|low|informational|informative|info)\b/iu.exec((e||``).trim())?.[1])}function dr(e){return/^variants?\s*(?:\(\d+\))?\s*:?$/iu.test((e||``).trim())}function fr(e){let t=/^([CHML]-?\d{1,4}|(?:p|q|b|r|m|l|x|diff)\d{0,4}-\d{2,4})(?:-([A-Za-z0-9][\w-]*))?$/iu.exec(e||``);return t?{id:t[1].toUpperCase(),slug:t[2]||``}:null}function pr(e){return(e||``).replaceAll(`-`,` `)}function mr(e){let t=(e||``).trim(),n=/^\[([^\]]+)\]\([^)]*\)$/u.exec(t);return Te(n?n[1]:t).toUpperCase()}function hr(e){let t=/^\[([^\]]+)\]\(([^)]+)\)\s*[:\u2014\u2013-]*\s*(.*)$/u.exec(e);return t?{text:t[3]?`${t[1].trim()} ${t[3].trim()}`:t[1].trim(),link:t[2].trim()}:null}function gr(e){let t=e.search(/\s/u),n=fr((t===-1?e:e.slice(0,t)).replace(/[:.,\u2014\u2013-]+$/u,``));if(!n)return null;let r=(t===-1?``:e.slice(t+1)).replace(/^[:\u2014\u2013-]+\s*/u,``).trim();return{id:n.id,slug:n.slug,rest:r}}function _r(e){let{text:t,link:n}=hr(e)??{text:e,link:``},r=/^\[([^\]]+)\] *(.*)$/u.exec(t);if(r){let e=fr(r[1].trim());return e?{id:e.id,title:r[2].trim()||pr(e.slug)||e.id,link:n}:{id:r[1].trim().toUpperCase(),title:r[2].trim(),link:n}}let i=gr(t);return i?{id:i.id,title:i.rest||pr(i.slug)||i.id,link:n}:{id:``,title:t.trim(),link:n}}function vr(e){let t={},n=t=>{let n=t.exec(e||``)?.[1];return n===void 0?``:(/`([^`]+)`/u.exec(n)?.[1]??n.split(/\s+/u)[0]??``).trim()},r=n(/^\s*(?:[-*] +)?\*\*Target:?\*\*\s*(.*)$/imu);at(r)&&(t.repo=r);let i=n(/^\s*(?:[-*] +)?\*\*Commit[^:*]*:?\*\*\s*(.*)$/imu);return T(i)&&(t.commitHash=i),t}var yr=[`key code reference`,`key code`,`code reference`,`location`,`affected file`,`file`,`path`];function br(e){return{id:mr(e.id||``),title:A(e.title),severity:A(e.severity),pocStatus:A(e[`poc status`]||e.poc),status:A(e.status),parent:mr(A(e.parent||``)),location:A(e.location)}}function xr(e,t=``){let{severity:n,identitySeverity:r}=sr(Z(e.severity),t,cr(e.id)),i=Sr({ref:e.location||``,id:e.id,severity:n,identitySeverity:r,description:he(e.title||e.id)});for(let t of[`pocStatus`,`status`,`parent`])e[t]&&(i[t]=e[t]);return c(i)}function Sr({ref:e,lineBullet:t=``,id:n,severity:r,identitySeverity:i,description:a}){let{file:o,line:s,locationLink:c}=me(e),l={file:o||`unknown`,line:s===`?`&&t?t:s,severity:r,description:a};return c?l.location=c:l.file===`unknown`&&n&&(l.location=`piolium:${n}`),l._idBasis=or({severity:i,description:a,ref:e,lineBullet:t,id:n}),l}function Cr(e,t,n){let r=[];for(let i of e.split(`
71
+ `)){let e=/^\s{0,3}(?:[-*+]|\d{1,3}[.)])\s+(.+)$/u.exec(i);if(!e)continue;let a=e[1].trim();if(/^\*\*[^:*]+:\*\*/u.test(a))continue;let o=hr(a),s=o?.link??``;if(o)a=o.text;else{let e=/^\*\*([^*]+)\*\*\s*[:\u2014\u2013-]*\s*(.*)$/u.exec(a);e&&(a=e[2]?`${e[1].trim()} ${e[2].trim()}`:e[1].trim())}if(/^(?:none\b|no |n\/a\b)/iu.test(a))continue;let l=gr(a),u=l?.id??``,d=a;if(l){let e=pr(l.slug);d=e&&l.rest?`${e}
72
+
73
+ ${l.rest}`:l.rest||e||l.id}let f=n.get(u),{severity:p,identitySeverity:m}=sr(Z(f?.severity),t,cr(u)),h={file:`unknown`,line:`?`,severity:p,description:he(d)};u?h.location=`piolium:${u}`:s&&(h.location=s),s.endsWith(`report.md`)&&(h.reportPath=s);for(let e of[`pocStatus`,`status`,`parent`])f?.[e]&&(h[e]=f[e]);r.push({id:u,finding:c(h,m)})}return r}function wr(e,t,n,r=``){let i=[];for(let a of fe(e)){let e=br(a);!e.id&&!e.title||(!e.parent&&n&&(e.parent=n),e.id&&!t.has(e.id)&&t.set(e.id,e),i.push({id:e.id,finding:xr(e,r)}))}if(i.length>0)return i;let a=Cr(e,r,t);for(let e of a)n&&!e.finding.parent&&(e.finding.parent=n);return a}var Tr=new Set([`technical findings detail`,`technical findings`,`detailed findings`,`findings detail`,`findings`]),Er=/^(?:summary of findings\b|deferred|methodolog|executive|conclusion|attack surface|coverage|discoveries|scope\b|table of contents|contents\b|appendix|recommendation|remediation)/u;function Dr(e){let{id:t}=_r(e);return!!(t&&fr(t))}function Or(e){let t=D(e,se);return(t.length>0?t:D(e,w)).some(({heading:e})=>Dr(e))}function kr(e){let t=C(e).trim();if(!/^# +Security Audit Report\b/mu.test(t)&&!/^## +Technical Findings Detail\s*$/imu.test(t)&&!/^## +Findings by Severity\b/imu.test(t))return null;let{head:n,subs:r}=E(t,oe),i=Ir(r),a=new Map(fe(i[`summary of findings`]||``).map(br).filter(e=>e.id).map(e=>[e.id,e])),o=vr(n),s=[],c=new Set,l=[],u=({id:e,finding:t})=>{s.push(t),e&&c.add(e)},d=e=>{for(let t of e)u(t)};for(let[e,t]of Object.entries(i)){let n=lr(e);n||Tr.has(e)||e.startsWith(`findings by severity`)?d(Pr(t,n,a,l)):!Er.test(e)&&Or(t)&&d(Pr(t,ur(e),a,l))}for(let e of l)e.id&&c.has(e.id)||u(e);for(let e of a.values())c.has(e.id)||u({id:e.id,finding:xr(e)});if(s.length===0)return null;for(let e of s)o.repo&&(e.repo={github:o.repo}),o.commitHash&&!e.auditedCommit&&(e.auditedCommit=o.commitHash);return{type:`security`,source:`piolium`,findings:s}}function Ar(e,t,n,r){let i=[],a=``;for(let{heading:o,body:s}of e){let e=lr(o);if(e)i.push(...Pr(s,e,t,n)),a=``;else if(dr(o))i.push(...Mr(s,t,a,n,r));else{let e=jr(o,s,t,n,r);i.push(...e),a=e[0]?.id||a}}return i}function jr(e,t,n,r,i){let{head:a,subs:o}=E(t,w),s=Fr(e,a,n,i),c=s!==null&&!s.id&&o.some(e=>!dr(e.heading)&&Dr(e.heading)),l=s&&!c?[s]:[];return l.push(...Nr(o,n,r,i,s?.id||``)),l}function Mr(e,t,n,r,i){let{head:a,subs:o}=E(e,w);return r.push(...wr(a,t,n,i)),Nr(o,t,r,i,``)}function Nr(e,t,n,r,i){let a=[],o=``;for(let{heading:s,body:c}of e){if(dr(s)){n.push(...wr(c,t,i??o,r));continue}let e=Fr(s,c,t,r);e&&(a.push(e),o=e.id||o)}return a}function Pr(e,t,n,r){let i=D(e,se);if(i.length>0)return Ar(i,n,r,t);let a=Nr(D(e,w),n,r,t,null);if(a.length>0)return a;let o=fe(e).map(br).filter(e=>e.id||e.title);for(let e of o)!e.severity&&t&&(e.severity=t),e.id&&!n.has(e.id)?n.set(e.id,e):e.id||r.push({id:``,finding:xr(e,t)});return o.length===0&&r.push(...Cr(e,t,n)),[]}function Fr(e,t,n,r=``){let i=e.trim();if(!i)return null;let{id:a,title:o,link:s}=_r(i),l=n.get(a);if(!a&&o){let e=o.toLowerCase();l=[...n.values()].find(t=>t.title.toLowerCase()===e),a=l?.id??``}let{fields:u,labels:d,prose:f}=pe(t),{severity:p,identitySeverity:m}=sr(Z(u.severity),Z(l?.severity),r,cr(a)),h=/\d+/u.exec(u.line||u.lines||``)?.[0]??``,g=/\*\*Variant of:?\*\*\s*\[?([^\]\s)]+)/iu.exec(t),_=f.split(`
74
+ `).filter(e=>!/^\s*<a\s[^>]*>\s*<\/a>\s*$/iu.test(e)&&!/\*\*Variant of:?\*\*/iu.test(e)).join(`
75
+ `).trim(),v=Sr({ref:yr.map(e=>u[e]).find(Boolean)??``,lineBullet:h,id:a,severity:p,identitySeverity:m,description:Rr(o||a,u,d,_)}),ee=u[`poc status`]||u.poc||l?.pocStatus;ee&&(v.pocStatus=ee);let y=u[`detailed report`]||(s.endsWith(`report.md`)?s:``);y&&(v.reportPath=y),l?.status&&(v.status=l.status);let te=l?.parent||(g?mr(g[1]):``);return te&&(v.parent=te),{id:a,finding:c(v)}}function Ir(e){let t=Object.create(null);for(let{heading:n,body:r}of e){let e=n.trim().toLowerCase();e&&(t[e]=e in t?`${t[e]}
76
+ ${r}`:r)}return t}var Lr=new Set([...yr,`severity`,`summary`,`files`,`poc`,`poc status`,`line`,`lines`,`detailed report`,`proof of concept`,`evidence`,`variant of`,`pattern`,`status`,`id`,`title`]);function Rr(e,t,n,r){let i=[e];t.summary&&i.push(t.summary),r&&i.push(r);for(let[e,r]of Object.entries(t))!r||Lr.has(e)||i.push(`**${n[e]||e}:** ${r}`);return i.filter(Boolean).join(`
77
+
78
+ `)}var zr=`<!-- DeepView findings export -->`,Br={annotation:()=>null,location:e=>typeof e?.location==`string`?e.location:null,evidence:e=>typeof e?.url==`string`?e.url:null,commit:()=>null,report:()=>null};function Vr(e,t){let n=e=>typeof e?.source==`string`&&e.source?e.source:null;if(e.length===1)return t=>n(t)??e[0].source??null;let r=new Map(e.map(e=>[e.name,e.source??null]));return e=>n(e)??r.get(t.report(e))??null}function Hr(e,t,n){let r=e.view?.revalidation!==!1,i=(Array.isArray(e.reports)?e.reports:[]).filter(e=>e&&typeof e==`object`),a=Vr(i,t),o=e=>Tt(e,a(e),r),s=new Set(n.map(o)),c=new Set(n.map(e=>t.report(e)).filter(Boolean));return{hooks:t,analyzerOf:o,severityMode:e.view?.severityMode===`original`?`original`:`corrected`,revalidation:r,showAnalyzer:s.size>1,showReport:c.size>1||i.length>1,repo:typeof e.repo==`string`&&e.repo?e.repo:null}}function Ur(e){if(!e)return``;let t=[e.bucket?`${e.bucket} findings`:`Live findings`];return e.severityMode===`original`?t.push(`original analyzer severities`):e.severityMode===`corrected`&&t.push(`corrected severities`),e.revalidation===!1?t.push(`code view — the revalidation pass is not applied`):e.revalidation===!0&&(e.revalidationDetail===!0?t.push(`detailed app view — the revalidation pass is applied, with the rows it re-rated`):e.revalidationDetail===!1?t.push(`app view — the revalidation pass is applied, standing in for the rows it re-rated`):t.push(`app view — the revalidation pass is applied`)),t.join(` · `)}function Wr(e){if(!e)return``;let t=Number(e.included)||0,n=Number(e.total)||0;return n===0?`no findings`:t>=n?`all ${V(n,`finding`)}`:`${t} of ${V(n,`finding`)} (${n-t} filtered out)`}function Gr(e,t,n){let r=[],i=(e,t)=>{t&&r.push(`- **${e}:** ${t}`)},a=Array.isArray(e.reports)?e.reports:[],o=[...new Set(a.map(e=>f[e?.source]??``).filter(Boolean))];i(`Source`,o.join(`, `));let s=a.map(e=>e?.name).filter(Boolean);i(s.length===1?`Report`:`Reports`,s.map(e=>R(e)).join(`, `)),i(`Workspace`,typeof e.workspace==`string`?e.workspace.trim():``),t.repo&&i(`Repository`,wt(t.repo));let c=[...new Set(n.map(t.analyzerOf).filter(Boolean))],l=c.length===o.length&&c.every(e=>o.includes(e));return c.length>0&&!l&&i(c.length===1?`Analyzer`:`Analyzers`,c.join(`; `)),e.generatedAt&&i(`Exported`,Xe(e.generatedAt)),i(`View`,Ur(e.view)),Array.isArray(e.filters)&&i(`Filters`,e.filters.length>0?e.filters.map(e=>`${e.label}: ${e.value}`).join(` · `):`none`),i(`Included`,Wr(e.counts)),r.join(`
79
+ `)}function Kr(e,t){let n=Map.groupBy(e,e=>Ae(e[0],t.severityMode)??`informational`),r=[...j,...[...n.keys()].filter(e=>!j.includes(e))],i=new Set,a=[];for(let e of r)for(let t of n.get(e)??[]){let n=a.length+1,r=Ct(t[0]),o=`${n}. ${r}`;a.push({group:t,number:n,severity:e,title:r,headingText:o,slug:Je(o,i)})}return a}function qr(e){let t=new Map;for(let n of e)t.set(n.severity,(t.get(n.severity)??0)+1);return t}var Jr=[[`flagged`,e=>e.flagged===!0],[`colour-marked`,e=>e.color],[`commented`,e=>e.comment],[`with a fix link`,e=>e.fix]];function Yr(e,t){let n=e.flatMap(({group:e})=>e.map(e=>t.hooks.annotation(e))).filter(Boolean),r=Jr.map(([e,t])=>[n.filter(t).length,e]).filter(([e])=>e>0).map(([e,t])=>`${e} ${t}`);return r.length>0?`Annotations: ${r.join(`, `)}.`:``}function Xr(e){let t=e.some(({group:e})=>e.some(e=>e.confidence!==void 0&&e.confidence!==null)),n=[`#`,`Severity`,`Finding`,`Location`];return t&&n.push(`Confidence`),Ye(n,e.map(e=>{let n=e.group[0],r=e.group.length>1?` (${V(e.group.length,`case`)})`:``,i=I(n),a=[String(e.number),p(e.severity),z(Ge(Ke(e.title)),`#${e.slug}`)+r,i?Ge(R(i)):``];return t&&a.push(n.confidence===void 0||n.confidence===null?``:`${n.confidence}/10`),a}),[`right`])}function Zr(e,t){let n=[B(2,`Summary`)];if(e.length===0)return[...n,`No findings are included.`];let r=[...qr(e)].map(([e,t])=>[p(e),String(t)]);r.push([`**Total**`,`**${e.length}**`]),n.push(Ye([`Severity`,`Findings`],r,[`left`,`right`]));let i=Yr(e,t);return i&&n.push(i),n.push(Xr(e)),n}function Qr(e,t){let n=qr(e),r=[],i=null;for(let a of e)a.severity!==i&&(i=a.severity,r.push(B(2,`${p(i)} (${n.get(i)})`))),r.push(Rt(a.group,t,{headingText:a.headingText,depth:3}));return r}function $r(e={},t={}){let n=Object.fromEntries(Object.entries(Br).map(([e,n])=>[e,typeof t?.[e]==`function`?t[e]:n])),r=(Array.isArray(e.groups)?e.groups:[]).map(e=>Array.isArray(e)?e:[e]).map(e=>e.filter(e=>e&&typeof e==`object`)).filter(e=>e.length>0),i=r.flat(),a=Hr(e,n,i),o=Kr(r,a);return`${Ze([zr,B(1,typeof e.title==`string`&&e.title.trim()?e.title.trim():`Findings`),Gr(e,a,i),...Zr(o,a),...Qr(o,a)])}
80
+ `}var ei=[[`deepview-md`,yn],[`markdown-generic`,Fn],[`deepsec`,xt],[`piolium`,kr],[`claude-security`,Kn]];function Q(e){return Array.isArray(e?.findings)?e.findings:Array.isArray(e?.groups)?e.groups:null}function ti(e,t){return typeof t==`string`&&/\.csv$/iu.test(t)?`codex`:$(e).format}function $(e){let t;try{let t=JSON.parse(e);if(Q(t)){for(let e of ri(Q(t)))c(e);return{data:t,format:`json`,reason:null}}return{data:null,format:null,reason:`JSON, but not a report: no findings array`}}catch(e){t=e}for(let[t,n]of ei)try{let r=n(e);if(r)return{data:r,format:t,reason:null}}catch(e){if(t!==`markdown-generic`)throw e;return{data:null,format:t,reason:e.message}}return{data:null,format:null,reason:`Not JSON, and not a recognized markdown format. (JSON error: ${t.message})`}}function ni(e){let{data:t}=$(e);return t?{count:Q(t).length,source:t.source,recognized:!0}:{count:0,recognized:!1}}function ri(e){return e.flat().filter(e=>e&&typeof e==`object`)}async function ii(e){for(let t of e)c(t);let t=e.filter(e=>!e.id);if(t.length===0)return;let n=await Promise.all(t.map(i));t.forEach((e,t)=>{n[t]&&(e.id=n[t])})}async function ai(e){let{data:t,format:n}=$(e);if(!t)return null;let r=ri(Q(t));return await ii(r),{format:n,data:t,findings:r}}export{n as a,x as b,S as c,we as d,l as e,u as f,d as g,f as h,Ee as i,j,Oe as k,ke as l,Ae as m,je as n,Me as o,M as p,Pe as q,Ie as r,Le as s,N as t,Re as u,F as v,Be as w,Ve as x,Ue as y,I as z,We as A,L as B,nt as C,ot as D,st as E,Pn as F,dt as G,mt as H,$r as I,Q as J,ti as K,$ as L,ni as M,ii as N,ai as O};
@@ -0,0 +1 @@
1
+ var e={view:`.bundle-code-view`,pane:`.bundle-code-rail`,property:`--bundle-code-rail-width`,axis:`x`,grow:1,keys:{ArrowLeft:-16,ArrowRight:16},initial:()=>320,bounds:e=>({min:Math.min(180,e*.4),max:e*.6}),preferred:null},t={view:`.bundle-code-main`,pane:`.bundle-code-terminal`,property:`--bundle-code-terminal-height`,axis:`y`,grow:-1,keys:{ArrowUp:16,ArrowDown:-16},initial:e=>e*.4,bounds:e=>({min:Math.min(96,e*.4),max:e*.85}),preferred:null},n=class extends HTMLElement{static split=e;constructor(){super(),this._split=this.constructor.split,this._drag=null,this.addEventListener(`pointerdown`,e=>this._startDrag(e)),this.addEventListener(`pointermove`,e=>{this._drag?.id===e.pointerId&&(this._split.preferred=this._apply(this._drag.size+this._split.grow*(this._client(e)-this._drag.at)))});for(let e of[`pointerup`,`pointercancel`,`lostpointercapture`])this.addEventListener(e,e=>{this._drag?.id===e.pointerId&&this._endDrag()});this.addEventListener(`keydown`,e=>this._onKeyDown(e)),this.addEventListener(`dblclick`,()=>{this._split.preferred=null,this._apply(this._preferred())})}connectedCallback(){this._view=this.closest(this._split.view),this._view&&(this._observer=new ResizeObserver(()=>this._apply(this._preferred())),this._observer.observe(this._view),this._apply(this._preferred()))}disconnectedCallback(){this._observer?.disconnect(),this._endDrag(),this._view=null}_client(e){return this._split.axis===`x`?e.clientX:e.clientY}_measure(e){let t=e.getBoundingClientRect();return this._split.axis===`x`?t.width:t.height}_preferred(){return this._split.preferred??this._split.initial(this._view?this._measure(this._view):0)}_bounds(){return this._split.bounds(this._measure(this._view))}_apply(e){if(!this._view)return e;let{min:t,max:n}=this._bounds();if(n===0)return e;let r=Math.max(t,Math.min(n,e));return this._view.style.setProperty(this._split.property,`${r}px`),this.setAttribute(`aria-valuemin`,String(Math.round(t))),this.setAttribute(`aria-valuemax`,String(Math.round(n))),this.setAttribute(`aria-valuenow`,String(Math.round(r))),this.setAttribute(`aria-valuetext`,`${Math.round(r)} pixels`),r}_paneSize(){return this._measure(this._view.querySelector(this._split.pane))}_startDrag(e){e.button!==0||!e.isPrimary||this._drag||!this._view||(e.preventDefault(),this._drag={id:e.pointerId,at:this._client(e),size:this._paneSize(),view:this.closest(`.bundle-code-view`)},this.setPointerCapture(e.pointerId),this.classList.add(`dragging`),this._drag.view?.classList.add(`splitting`))}_endDrag(){if(!this._drag)return;let{id:e,view:t}=this._drag;this._drag=null,this.classList.remove(`dragging`),t?.classList.remove(`splitting`),this.hasPointerCapture(e)&&this.releasePointerCapture(e)}_onKeyDown(e){if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||!this._view)return;let{min:t,max:n}=this._bounds(),r=this._split.keys[e.key],i=r===void 0?{Home:t,End:n}[e.key]:this._paneSize()+r;i!==void 0&&(e.preventDefault(),e.stopPropagation(),this._split.preferred=this._apply(i))}};customElements.define(`bundle-code-splitter`,n),customElements.define(`bundle-code-terminal-splitter`,class extends n{static split=t});
@@ -0,0 +1,2 @@
1
+ var e=`.detail-action{width:22px;height:22px;display:grid;place-items:center;padding:0;background:transparent;border:0;border-radius:var(--ui-radius, 4px);color:var(--muted);font:500 16px/1 ui-monospace,monospace;cursor:default;&:hover{color:var(--accent);background:var(--surface-active)}&:focus-visible{outline:2px solid var(--accent);outline-offset:1px}}
2
+ `;export{e as a};
@@ -0,0 +1 @@
1
+ import{l as e}from"./chunk-KP2XM324.js";function t(t){let n=e(t),r=new Map;for(let[e,i]of Object.entries(t?.bundle?.reason??{})){let t=new Set(Array.isArray(i)?i.filter(e=>n.has(e)):[]);t.size>0&&r.set(e,t)}return{stasis:t?.kind===`stasis`,files:n,trees:r}}var n=[[`extra`,`add`],[`metro`,`bundle:metro`]];function r(e){if(e.length!==2)return e;let t=(t,n)=>e.find((r,i)=>r.trees.has(n)&&!r.trees.has(t)&&e[1-i].trees.has(t)&&!e[1-i].trees.has(n)),r=e.map(()=>new Map);for(let[i,a]of n){let n=t(i,a);n&&r[e.indexOf(n)].set(a,i)}let i=t(`metro`,`bundle:metro`);return i&&t(`run`,`bundle`)===i&&r[e.indexOf(i)].set(`bundle`,`run`),e.map((e,t)=>r[t].size===0?e:{...e,trees:new Map([...e.trees].map(([e,n])=>[r[t].get(e)??e,n])),actual:new Map([...r[t]].map(([e,t])=>[t,e]))})}function i(e,t){if(!e.stasis||e.trees.size!==1)return null;let[[n,r]]=e.trees;return r.size===e.files.size&&!t.some(t=>t!==e&&t.trees.has(n))?n:null}var a=e=>e.trees.size===0||e.trees.size===1&&[...e.trees.values()][0].size===e.files.size,o=`reasons:`,s=(e,t)=>`${o}${JSON.stringify([e,t].toSorted())}`;function c(e){if(!e.startsWith(o))return null;try{let t=JSON.parse(e.slice(o.length));return Array.isArray(t)&&t.length===2&&t.every(e=>typeof e==`string`)?t:null}catch{return null}}function l(...e){let n=r(e.map(t));if(n.length===2&&!n.some(a)){let[e,t]=n.map(e=>[...e.trees.keys()].toSorted()),r=e.filter(e=>t.includes(e)),[i,a]=[e,t].map(e=>e.filter(e=>!r.includes(e)));if(i.length>0&&a.length>0)return[...r.map(e=>({id:`reason:${e}`,label:e})),...i.flatMap(e=>a.map(t=>({id:s(e,t),label:`${e} \u2192 ${t}`})))]}let o=n.filter(e=>i(e,n)===null),c=new Set(o.flatMap(e=>[...e.trees.keys()])),l=e=>o.some(t=>t.stasis&&(t.trees.get(e)?.size??0)<t.files.size);return[...c].some(l)?[...c].toSorted().map(e=>({id:`reason:${e}`,label:e})):[]}function u(e,n,a=``){if(!a)return[``,``];let o=c(a),s=r([e,n].map(t)),l=a.startsWith(`reason:`)?a.slice(7):null;return s.map(e=>{let t=o?o.find(t=>e.trees.has(t)):i(e,s)??l;return t==null?a:`reason:${e.actual?.get(t)??t}`})}function d(t,n=``){let r=e(t);if(!n||t?.kind!==`stasis`)return r;let i=t?.bundle?.reason?.[n.replace(/^reason:/u,``)],a=new Set(Array.isArray(i)?i:[]);return new Map([...r].filter(([e])=>a.has(e)))}function f(e,t,n,r){return JSON.stringify([e,t,n,r])}function p(t,n=``){let r=new Map;if(t?.kind!==`stasis`||!t.bundle)return r;let i=n?e(t):null,a=n?d(t,n):null;for(let[e,n]of t.bundle.imports)for(let[t,o]of n)for(let[n,s]of o){let o=typeof s==`string`?[[null,s]]:s;for(let[s,c]of o){if(a&&!a.has(t)&&(i.has(t)||!a.has(c)))continue;let o=f(t,n,e,s);r.set(o,{key:o,parent:t,specifier:n,conditions:e,platform:s,target:c})}}return r}export{l as a,u as b,d as c,f as d,p as e};
@@ -0,0 +1 @@
1
+ import{a as e,b as t,c as n,d as r}from"./chunk-K4XJHM2T.js";import{a as i,b as a,c as o,d as s,e as c,f as l,g as u,j as d,l as f,m as p,n as m,p as h}from"./chunk-GX5UXWT4.js";import{A as ee,B as te,H as ne,I as g,M as _,c as re,k as v,l as y,m as b,t as ie,u as ae}from"./chunk-LVW7WWV4.js";import"./chunk-ZQHLECTI.js";import{a as oe,e as x,g as S}from"./chunk-VYYUMYVW.js";import{d as C,e as w,f as se,h as T,i as E}from"./chunk-7HP2VYIC.js";import"./chunk-PXK7EU4V.js";import"./chunk-OOJM4CTU.js";var D=d(e=>/^[A-Z_a-z][\w-]*$/u.test(e),`a package name`),O=d(e=>t(e)!==void 0,`a version`),ce=d(e=>/^\w[\w+.-]*$/u.test(e),`a feature name`),le=[`branch`,`tag`,`rev`];function k(e){let t=e.hostname===`github.com`,n=new URL(t?`https:${e.href.slice(e.protocol.length)}`:e.href),r=n.pathname.replace(/\/$/u,``);return n.pathname=(t?r.toLowerCase():r).replace(/\.git$/u,``),n.href}var ue=e=>e.href.startsWith(`/`,e.protocol.length);function de(e){let t=URL.parse(e);return t!==null&&t.href===e&&ue(t)?t:void 0}var A=(e,t,n=[])=>JSON.stringify([e,k(t),...n]);function j(e,t,n){let r=n=>w(`${T(e)} is not a source: ${n}`,t),[,i,a]=/^(registry|sparse|git)\+(.*)$/su.exec(e)??r(`expected registry+, sparse+ or git+ and a URL`);if(i!==`git`){i===`registry`&&_(a,t);let n=de(i===`sparse`?e:a);return(n===void 0||n.search!==``||n.hash!==``)&&r(`expected a URL in normal form, without a query or a fragment`),{scheme:i,identity:A(i,n)}}let[,o,s,c]=/^([^#?]*)(?:\?([^#]*))?(?:#(.*))?$/su.exec(a);(n?c!==void 0:!ne(c??``))&&r(n?`a dependency names no commit`:`expected "#" and the commit it resolved to`),_(o,t);let l=de(o)??r(`expected a URL in normal form`),u=[...new URLSearchParams(s??``)];return(u.length>1||u.length===1&&!le.includes(u[0][0]))&&r(`expected at most one of branch=, tag= or rev=`),{scheme:i,identity:A(i,l,u[0])}}var M=new URL(`https://github.com/rust-lang/crates.io-index`),fe=e=>e.registry===void 0||e.registry===`crates-io`,N=`any registry`;function P(e,t){if(e.type===`path`)return t;if(e.type===`git`){let t=le.flatMap(t=>e[t]===void 0?[]:[t,e[t]]);return A(`git`,new URL(e.url),t)}return e.index===void 0?fe(e)?A(`registry`,M):N:A(e.index.startsWith(`sparse+`)?`sparse`:`registry`,new URL(e.index))}var pe=e=>e===`crates-io`?M:URL.parse(e);function F(e){let t=pe(e);return t===null?`registry ${e}`:k(t)}function me(e){return pe(e)?.href??`registry ${e}`}function I(e){if(e.type!==`path`)return e.type===`git`?k(new URL(e.url)):e.index===void 0?fe(e)?k(M):`registry ${e.registry}`:k(new URL(e.index))}var he=[`version`,`package`,`patch`],ge=[`name`,`version`,`source`,`checksum`,`dependencies`],_e=[`name`,`version`,`source`,`checksum`],ve={root:`a [root] table is lockfile version 1, which is not read here`,metadata:`a [metadata] table holds checksums in lockfile version 1 and nothing cargo writes after`},ye={replace:`[replace] is not supported`};function be(e,t){if(e===3||e===4)return e;throw e===void 0?new C("no `version`: this is lockfile version 1 or 2, which is not read here, where 3 and 4 are",t):e===5?new C(`lockfile version 5 is only read by a nightly cargo, with -Znext-lockfile-bump`,t):new C(`unsupported version: expected 3 or 4, found ${i(e)}`,t)}var L=(e,t,n)=>n===void 0?`${e} ${t}`:`${e} ${t} (${n})`;function xe(e,t,n=ge){o(e,t,n,ye);let r=D(e.name,E(t,`name`)),i=O(e.version,E(t,`version`)),a=b(e,`source`,t,l),s=a===void 0?void 0:j(a,E(t,`source`),!1),c=b(e,`checksum`,t,l);if(c!==void 0&&(s===void 0||s.scheme===`git`))throw new C(`a ${s===void 0?`path`:`git`} package has no checksum`,E(t,`checksum`));if(c!==void 0&&!g(c))throw new C(`${T(c)} is not a sha256 checksum`,E(t,`checksum`));if(c===void 0&&s!==void 0&&s.scheme!==`git`&&n===ge)throw new C(`expected a checksum, which cargo checks a registry's package with, and refuses the lockfile without`,t);let u=b(e,`dependencies`,t,p)??[];return{key:L(r,i,a),name:r,version:i,source:a,checksum:c,identity:s?.identity,edges:u}}function Se(e,t,n){let r=n=>w(`${T(e)} ${n}`,t),[,i,a,o]=/^([^ ]+)(?: ([^ ]+)(?: \((.+)\))?)?$/su.exec(e)??r("is not `name`, `name version` or `name version (source)`"),s=n.get(i)??r(`names no package in the lockfile`),c=a===void 0?[...new Set(s.map(e=>e.version))]:[a];c.length>1&&r(`could be any of ${c.length} versions`);let l=s.filter(e=>e.version===c[0]);if(l.length===0&&r(`names a version the lockfile does not hold`),o!==void 0){let e=j(o,t,!0).identity,n=l.filter(t=>t.identity===e);return n.length!==1&&r(`names a source the lockfile does not hold`),n[0]}let u=l.filter(e=>e.source===void 0);return u.length>0||l.length===1?u[0]??l[0]:r(`could be any of ${l.length} sources`)}function Ce(e,t){let n=new Set(e.filter(e=>e.source===void 0));for(let e of n)for(let t of e.resolved)n.add(t);let r=e.find(e=>!n.has(e));if(r!==void 0)throw new C(`nothing in the workspace depends on ${T(r.key)}, directly or not`,t)}function we(e){let t=o(S(e),void 0,he,ve),n=be(t.version,`version`),r=c(t.package??[],`package`).map((e,t)=>xe(e,`package[${t}]`));h(r,e=>`${e.name} ${e.version} ${e.identity}`,e=>e.key);let i=Map.groupBy(r,e=>e.name);for(let[e,t]of r.entries()){let n=E(`package[${e}]`,`dependencies`);t.resolved=t.edges.map((e,t)=>Se(e,`${n}[${t}]`,i));let r=ie(t.resolved);if(r!==void 0)throw new C(`${T(r.key)} is listed twice`,n)}Ce(r,`package`);let a=Object.create(null);for(let e of r)a[e.key]={...R(e),dependencies:e.resolved.map(e=>e.key)};return{version:n,packages:a,unusedPatches:Te(t.patch)}}function Te(e){return e===void 0?[]:(o(e,`patch`,[`unused`]),c(e.unused,`patch.unused`).map((e,t)=>R(xe(e,`patch.unused[${t}]`,_e))))}var R=({name:e,version:t,source:n,checksum:r})=>({name:e,version:t,source:n,checksum:r}),Ee=/[\\/]/u;function z(e,t){let n=t?e.indexOf(`\\`):e.search(Ee);return n===-1?[e,``]:[e.slice(0,n),e.slice(n+1)]}function De(e){let t=e.slice(0,8).replaceAll(`/`,`\\`);if(!t.startsWith(`\\\\`))return/^[A-Za-z]:/u.test(e)?{length:2,verbatim:!1}:void 0;if(t.startsWith(`?\\`,2)&&!e.slice(0,4).includes(`/`)){if(t.startsWith(`UNC\\`,4)){let[t,n]=z(e.slice(8),!0),[r]=z(n,!0);return{length:8+t.length+(r===``?0:1+r.length),verbatim:!0}}return/^[A-Za-z]:(?:[\\/]|$)/u.test(e.slice(4))?{length:6,verbatim:!0}:{length:4+z(e.slice(4),!0)[0].length,verbatim:!0}}if(t.startsWith(`.\\`,2))return{length:4+z(e.slice(4),!1)[0].length,verbatim:!1};let[n,r]=z(e.slice(2),!1),[i]=z(r,!1);return n!==``&&i!==``?{length:3+n.length+i.length,verbatim:!1}:void 0}function Oe(e,t){let n=t?De(e):void 0,r=n?.verbatim===!0,i=e.slice(n?.length??0).replace(t?/^[\\/]/u:/^\//u,``).split(r?`\\`:t?Ee:`/`).findLast(e=>e!==``&&(r||e!==`.`));return i===`..`||i===`.`?void 0:i}var ke=/ *(?:([(),=])|"([^"]*)"|(r#)?([A-Z_a-z]\w*)|(.|$))/gsuy,Ae=64,je=class extends Error{},B=()=>{throw new je};function Me(e){let t=[];for(let[,n,r,i,a,o]of e.matchAll(ke)){if(o===``)break;o!==void 0&&B(),t.push(a===void 0?{punct:n,string:r}:{ident:a,raw:i!==void 0})}return t}function Ne(e){let t=Me(e),n=0,r=()=>t[n],i=e=>{r()?.punct!==e&&B(),n++},a=()=>{let e=t[n++];if(e?.ident===void 0&&B(),r()?.punct!==`=`)return{name:e.ident,key:e.ident};n++;let i=t[n++]?.string;return i===void 0&&B(),{name:e.ident,value:i,key:`${e.ident}="${i}"`}},o=(e=0)=>{let t=r();if(t?.raw===!1&&[`all`,`any`,`not`].includes(t.ident)){e>=Ae&&B(),n++,i(`(`);let a=[];for(;r()?.punct!==`)`&&(a.push(o(e+1)),t.ident!==`not`&&r()?.punct===`,`);)n++;return t.ident===`not`&&a.length===0&&B(),i(`)`),{op:t.ident,list:a}}let{name:s,value:c,key:l}=a();return c===void 0&&(s===`true`||s===`false`)?{op:s,list:[]}:{op:`cfg`,name:s,key:l}};return{expr:o,cfg:a,done:()=>r()===void 0}}function Pe(e,t){try{let n=Ne(e),r=t(n);return n.done()?r:void 0}catch(e){if(e instanceof je)return;throw e}}function V(t){let n=/^cfg\((.*)\)$/su.exec(e(t))?.[1];return n===void 0?/^[\w.-]+$/u.test(t)?{name:t,expr:void 0}:void 0:Pe(n,e=>({name:void 0,expr:e.expr()}))}function Fe(t){return Pe(e(t),e=>e.cfg().key)}var Ie={__proto__:null,all:(e,t)=>Le(e.list,t,!1),any:(e,t)=>Le(e.list,t,!0),not:(e,t)=>{let n=H(e.list[0],t);return n===void 0?void 0:!n},true:()=>!0,false:()=>!1,cfg:(e,t)=>t(e)};function H(e,t){return Ie[e.op](e,t)}function Le(e,t,n){let r=!1;for(let i of e){let e=H(i,t);if(e===n)return n;e===void 0&&(r=!0)}return r?void 0:!n}function Re(e,t){if(e.expr===void 0)return t.name===void 0?void 0:e.name===t.name;let n=e=>t.decides===void 0||t.decides.has(e);return H(e.expr,e=>t.cfg.has(e.key)?!0:!n(e.name)&&void 0)}function ze(e){let t=/^[\\/]{2}([^\\/?.][^\\/]*)[\\/]+([^\\/]+)/u.exec(e);if(t!==null)return{prefix:`//${t[1]}/${t[2]}`.toLowerCase(),rest:`/${e.slice(t[0].length)}`};let n=/^([A-Za-z]):(?=[\\/])/u.exec(e);return n===null?/^(?:[\\/]{2}|[A-Za-z]:)/u.test(e)?void 0:{prefix:void 0,rest:e}:{prefix:n[1].toUpperCase(),rest:e.slice(2)}}function Be(e,t){let n=t?ze(e):{prefix:void 0,rest:e};if(n===void 0)return;let r=[],i=0;for(let e of n.rest.split(t?/[\\/]/u:`/`))e===`..`&&r.length>0?r.pop():e===`..`?i++:e!==``&&e!==`.`&&r.push(e);return{prefix:n.prefix,absolute:t?/^[\\/]/u.test(n.rest):n.rest.startsWith(`/`),up:i,parts:r}}function Ve(e,t){if(e.type!==`path`){let t=P(e,`path`);return{key:t===N?`${t} ${e.registry}`:t}}return{key:`path`,readings:[!1,!0].map(t=>Be(e.path,t)),inherited:t}}var U=(e,t)=>t.length<=e.length&&t.every((n,r)=>n===e[e.length-t.length+r]);function He(e,t,n){if(e.absolute&&t.absolute)return e.prefix!==void 0&&t.prefix!==void 0&&e.prefix!==t.prefix||e.parts.join(`/`)!==t.parts.join(`/`);if(e.absolute||t.absolute)return!U((e.absolute?e:t).parts,(e.absolute?t:e).parts);if(n)return!U(e.parts,t.parts)&&!U(t.parts,e.parts);let[r,i]=e.up>=t.up?[e,t]:[t,e],a=r.parts.length-i.parts.length;return a<0||a>r.up-i.up||!U(r.parts,i.parts)}function Ue(e,t){return e.key!==`path`||t.key!==`path`?e.key!==t.key:e.readings.every((n,r)=>{let i=t.readings[r];return n!==void 0&&i!==void 0&&He(n,i,e.inherited!==t.inherited)})}var W=`which only a nightly cargo reads, is not supported`;function G(e,t){let r=n(e);if(r===void 0)throw new C(`${T(e)} is not a version requirement`,t);return r}var We=[`version`,`registry`,`registry-index`,`path`,`git`,`branch`,`tag`,`rev`,`features`,`optional`,`default-features`,`default_features`,`package`,`public`],Ge={base:`a path base, ${W}`,artifact:`an artifact dependency, ${W}`,lib:`an artifact dependency, ${W}`,target:`an artifact dependency, ${W}`},Ke=[`workspace`,`features`,`default-features`,`default_features`,`optional`,`public`],qe=[[`dependencies`,`normal`],[`dev-dependencies`,`dev`],[`build-dependencies`,`build`]];function K(e,t,n,r){let i=n.replaceAll(`-`,`_`);if(i===n||e[i]===void 0)return e[n];let a=E(t??``,i);if(r===`2024`)throw new C(`not supported in the 2024 edition: use ${T(n)}`,a);if(e[n]!==void 0)throw new C(`given beside ${T(n)}`,a);return e[i]}function Je(e,t){let n=URL.parse(l(e,t));if(n===null)throw new C(`${T(e)} is not a URL`,t);if(!ue(n))throw new C(`${T(e)} is a URL with no path, which cargo refuses`,t);return n}function Ye(e,t,n){let r=b(e,`features`,t,p)??[];for(let[e,n]of r.entries()){let r=`${E(t,`features`)}[${e}]`;if(n.includes(`/`))throw new C(`${T(n)}: a dependency's feature cannot name another's`,r);if(n.startsWith(`dep:`))throw new C(`${T(n)}: a dependency's feature cannot be \`dep:\``,r)}return b(e,`public`,t,u),{features:r,defaultFeatures:y(u)(K(e,t,`default-features`,n),E(t,`default-features`))}}function q(e,t,n,r){if(typeof e==`string`)return G(e,t),{package:n,version:e,source:{type:`registry`,registry:void 0,index:void 0},optional:!1,defaultFeatures:!0,features:[]};o(e,t,We,Ge);let i=(n,r)=>b(e,n,t,r),a=i(`version`,l);a!==void 0&&G(a,E(t,`version`));let s=i(`registry`,D),c=i(`registry-index`,l);c!==void 0&&Je(c,E(t,`registry-index`));let d=i(`path`,l),f=i(`git`,l),p=[`branch`,`tag`,`rev`].filter(t=>e[t]!==void 0),m=[f!==void 0&&(s!==void 0||c!==void 0)&&"`git` or a registry",s!==void 0&&c!==void 0&&"`registry` or `registry-index`",f!==void 0&&d!==void 0&&"`git` or `path`",p.length>1&&"`branch`, `tag` or `rev`"].find(Boolean);if(m)throw new C(`ambiguous: only one of ${m} is taken`,t);if(f===void 0&&p.length>0)throw new C(`\`${p[0]}\` is only for a git dependency`,E(t,p[0]));if(a===void 0&&d===void 0&&f===void 0)throw new C(`names no version, path or git repository`,t);let h={type:`registry`,registry:s,index:c};if(d!==void 0&&(h={type:`path`,path:d}),f!==void 0){let e=Je(_(f,E(t,`git`)),E(t,`git`));if(e.search!==``||e.hash!==``)throw new C(`${T(f)} has a query or a fragment, which cargo drops or misreads`,E(t,`git`));h={type:`git`,url:f,branch:i(`branch`,l),tag:i(`tag`,l),rev:i(`rev`,l)}}let{features:ee,defaultFeatures:te=!0}=Ye(e,t,r);return{package:i(`package`,D)??n,version:a,source:h,optional:i(`optional`,u)??!1,defaultFeatures:te,features:ee}}function Xe(e,t,n,r){if(o(e,t,n),e.workspace!==!0)throw a(`true`,e.workspace,E(t,`workspace`));if(r===void 0)throw new C(`inherits from a workspace, and no workspace root is given`,t)}function Ze(e,t,n,r){Xe(e,t,Ke,r.workspace);let i=r.workspace.dependencies[n];if(i===void 0)throw new C(`${T(n)} is not in [workspace.dependencies]`,t);let{features:a,defaultFeatures:o}=Ye(e,t,r.edition);if(o===!1&&i.defaultFeatures&&r.edition===`2024`)throw new C("`default-features = false` cannot turn off the workspace's default features",t);return{...i,features:[...i.features,...a],defaultFeatures:o===!0||i.defaultFeatures,optional:b(e,`optional`,t,u)??!1,inherited:!0}}function Qe(e,t,n,r,i){for(let[a,o,c]of s(e,t)){D(a,c);let e=x(o)&&`workspace`in o?Ze(o,c,a,i):{...q(o,c,a,i.edition),inherited:!1};if(e.optional&&n===`dev`)throw new C(`a dev-dependency cannot be optional`,c);let t=Ve(e.source,e.inherited),s=i.sources.get(a)??[];if(s.some(e=>Ue(e,t)))throw new C(`${T(a)} is given another source elsewhere, which cargo refuses`,c);i.sources.set(a,[...s,t]),i.list.push({name:a,kind:n,target:r,...e})}}function $e(e,t,n){let r={workspace:t,edition:n,list:[],sources:new Map},i=(e,t,n)=>{for(let[i,a]of qe){let o=K(e,t,i,r.edition);o!==void 0&&Qe(o,E(t??``,i),a,n,r)}};i(e,void 0,void 0);for(let[t,n,r]of s(v(e.target),`target`)){if(V(t)===void 0)throw new C(`${T(t)} is neither a target's name nor a cfg(\u2026) cargo reads`,r);o(n,r,qe.flatMap(([e])=>[e,e.replaceAll(`-`,`_`)])),i(n,r,t)}return r.list}function J(e){let t=e.indexOf(`/`);if(t!==-1){let n=e[t-1]===`?`;return{dep:e.slice(0,n?t-1:t),feature:e.slice(t+1),weak:n}}return e.startsWith(`dep:`)?{dep:e.slice(4),feature:void 0,weak:!1}:{dep:void 0,feature:e,weak:!1}}function et(e,t,n){let r=m(e,t,ce,f()),i=new Set(Object.values(r).flat().map(J).filter(e=>e.feature===void 0).map(e=>e.dep)),a=Object.assign(Object.create(null),r),o=new Map;for(let e of n)o.set(e.name,o.get(e.name)||e.optional),e.optional&&!(e.name in r)&&!i.has(e.name)&&(a[e.name]=[`dep:${e.name}`]);let s=new Set;for(let[e,n]of Object.entries(a))for(let i of n){let n=n=>w(`${T(i)} ${n}`,E(t,e)),{dep:c,feature:l,weak:u}=J(i);if(c===void 0){if(l in r)continue;o.has(l)||n(`is neither a feature nor a dependency`),o.get(l)||n(`is a dependency, but not an optional one`),l in a||n(`is an optional dependency with no feature of its name: use "dep:${l}"`)}else s.add(c),l?.includes(`/`)&&n(`has more than one "/"`),c.startsWith(`dep:`)&&n(`has both "dep:" and "/"`),o.has(c)||n(`names ${T(c)}, which is not a dependency`),(l===void 0||u)&&!o.get(c)&&n(`names ${T(c)}, which is not an optional dependency`)}let c=[...o].find(([e,t])=>t&&!s.has(e));if(c!==void 0)throw new C(`optional dependency ${T(c[0])} is in no feature: add "dep:${c[0]}" to one`,t);return a}var tt=[`badges`,`features`,`lib`,`bin`,`example`,`test`,`bench`,`dependencies`,`dev-dependencies`,`dev_dependencies`,`build-dependencies`,`build_dependencies`,`target`,`lints`,`hints`],nt=[...tt,`package`,`project`,`workspace`,`profile`,`patch`],rt={"cargo-features":`cargo-features, ${W}`,replace:`[replace] is not supported`},it={metabuild:`metabuild, ${W}`,"default-target":`a per-package target, ${W}`,"forced-target":`a per-package target, ${W}`,"im-a-teapot":`im-a-teapot, ${W}`,"cargo-features":`cargo-features belong at the top of the manifest, and are not supported`},at=[`members`,`exclude`,`default-members`,`resolver`,`metadata`,`package`,`dependencies`,`lints`],ot=[`2015`,`2018`,`2021`,`2024`],Y={__proto__:null,2018:`1.31.0`,2021:`1.56.0`,2024:`1.85.0`},st={__proto__:null,1:1,2:2,3:3},ct=d(e=>ot.includes(e),`an edition: expected one of ${ot.join(`, `)}`),lt=d(e=>e in st,`a resolver: expected "1", "2" or "3"`),ut=(e,t)=>st[lt(e,t)];function dt(e){let r=t(e);if(r!==void 0)return r.pre===``&&r.build===``?r:void 0;let i=n(e);if(i?.length!==1||i[0].op!==`^`||i[0].pre!==``||e.startsWith(`^`))return;let{major:a,minor:o,patch:s}=i[0];return t(`${a}.${o??0}.${s??0}`)}var ft=d(e=>dt(e)!==void 0,`a Rust version`);function pt(e,t){if(typeof e!=`boolean`&&typeof e!=`string`)throw a(`true, false or a path`,e,t);return e}var mt=e=>[!1,!0].every(t=>Oe(e,t)!==void 0);function ht(e,t){if(Array.isArray(e))throw new C(`several build scripts, ${W}`,t);let n=pt(e,t);if(typeof n==`string`&&!mt(n))throw new C(`${T(n)} names no file, which cargo crashes on`,t);return n}function gt(e,t){let n=l(e,t);if(/^\p{White_Space}*$/u.test(n))throw new C(`a library's name cannot be empty, which cargo refuses`,t);if(n.includes(`-`))throw new C(`${T(n)}: a library's name cannot have a "-", which cargo refuses`,t);return n}function _t(e,t){let n=v(e.lib);return{name:b(n,`name`,`lib`,gt)??t.replaceAll(`-`,`_`),path:b(n,`path`,`lib`,l)}}function vt(e,t){if(typeof e==`boolean`)return e;if(!Array.isArray(e))throw a(`true, false or registry names`,e,t);return p(e,t)}var X={authors:p,categories:p,description:l,documentation:l,edition:ct,exclude:p,homepage:l,include:p,keywords:p,license:l,"license-file":l,publish:vt,readme:pt,repository:l,"rust-version":ft,version:O},yt={...X,name:D,build:ht,links:l,workspace:l,autolib:u,autobins:u,autoexamples:u,autotests:u,autobenches:u,"default-run":l,resolver:ut,metadata:e=>e};function bt(e,t){for(let[,n,r]of s(e,t))for(let[,e,t]of s(n,r))l(e,t);return e}function xt(e,t,n,r){o(e,t);let i=y(u)(K(e,t,`proc-macro`,n),E(t,`proc-macro`)),a=y(p)(K(e,t,`crate-type`,n),E(t,`crate-type`));if(r&&a?.includes(`proc-macro`)&&a.length>1)throw new C(`a proc-macro crate type is taken alone`,E(t,`crate-type`));return i??a?.includes(`proc-macro`)??!1}function St(e,t){let n=e.lib!==void 0&&xt(e.lib,`lib`,t,!0),r=[`example`,`test`,`bench`].flatMap(n=>c(e[n]??[],n).map((e,r)=>xt(e,`${n}[${r}]`,t,!1)));return{procMacro:n,procMacroTarget:n||r.includes(!0)}}function Ct(e){o(e,`workspace`,at);let t=(t,n)=>b(e,t,`workspace`,n),n=t(`package`,(e,t)=>o(e,t,[...Object.keys(X),`badges`]))??Object.create(null);for(let[e,t,r]of s(n,`workspace.package`))(e===`badges`?bt:X[e])(t,r);let r=m(e.dependencies,`workspace.dependencies`,D,(e,t,n)=>{let r=q(e,t,n);if(r.optional)throw new C(`a workspace dependency cannot be optional`,t);if(x(e)&&e.public!==void 0)throw new C(`a workspace dependency cannot be public`,t);return r});return{members:t(`members`,p)??[],exclude:t(`exclude`,p)??[],defaultMembers:t(`default-members`,p),resolver:t(`resolver`,ut),package:n,dependencies:r}}var wt=e=>m(e,`patch`,e=>e,(e,t)=>m(e,t,D,q));function Tt(e,t,n){if(x(e)&&x(t)){let r=Object.assign(Object.create(null),t);for(let[i,a]of Object.entries(e))r[i]=Object.hasOwn(t,i)?Tt(a,t[i],E(n,i)):a;return r}if(Array.isArray(e)&&Array.isArray(t))return[...t,...e];if([e,t].some(e=>x(e)||Array.isArray(e)))throw new C(`${i(e)} in one config and ${i(t)} in one under it, which cargo does not merge`,n);return e}function Et(e){if(!Array.isArray(e)||!e.every(e=>typeof e==`string`))throw TypeError(`expected the texts of the config files`);let t;for(let[n,r]of e.entries()){let e=se(()=>S(r),e=>{throw e instanceof oe&&(e.message=`texts[${n}]: ${e.message}`),e});e.patch!==void 0&&(t=t===void 0?e.patch:Tt(t,e.patch,`patch`))}return{patch:wt(t)}}function Dt(e,t,n,r){if(!x(e))return e;if(Xe(e,t,[`workspace`],r),r.package[n]===void 0)throw new C(`workspace.package.${n} is not given`,t);return r.package[n]}function Ot(e,t){if(e.package!==void 0&&e.project!==void 0)throw new C(`[project] beside [package]`,`project`);let i=e.package===void 0?`project`:`package`,a=o(e[i],i,Object.keys(yt),it),s=Object.create(null);for(let[e,n]of Object.entries(yt)){let r=E(i,e);s[e]=y(n)(e in X?Dt(a[e],r,e,t):a[e],r)}if(a.workspace!==void 0&&e.workspace!==void 0)throw new C(`a workspace root names no other root`,E(i,`workspace`));let c=s.edition??`2015`;if(i===`project`&&c===`2024`)throw new C(`not supported in the 2024 edition: use [package]`,i);let l=s[`rust-version`];if(l!==void 0&&c in Y&&!r(n(`^${Y[c]}`),dt(l)))throw new C(`rust-version ${T(l)} is incompatible with ${Y[c]}, which the ${c} edition requires`,E(i,`rust-version`));let{version:u,publish:d,resolver:f,links:p}=s;if(u===void 0&&d!==void 0&&d!==!1&&!(Array.isArray(d)&&d.length===0))throw new C("`publish` needs a `version`",E(i,`publish`));if(f!==void 0&&e.workspace?.resolver!==void 0)throw new C("`resolver` is given in [workspace] too",E(i,`resolver`));if(p!==void 0&&s.build===!1)throw new C(`links to ${T(p)} with no build script, which cargo refuses`,E(i,`links`));let m=s.build===!0?`build.rs`:s.build;return{name:D(a.name,E(i,`name`)),version:u??`0.0.0`,edition:c,resolver:f,links:p,build:m}}function kt(e,t){let n=o(S(e),void 0,nt,rt),r=n.workspace===void 0?void 0:Ct(n.workspace);if(r!==void 0&&t!==void 0)throw new C(`a workspace root inherits from its own [workspace], not another`,`workspace`);if(t!==void 0&&t.workspace===void 0)throw TypeError(`expected the manifest of a workspace root`);let i=r??t?.workspace,a=wt(n.patch);if(n.package===void 0&&n.project===void 0){if(r===void 0)throw new C(`neither [package] nor [workspace]`);let e=tt.find(e=>n[e]!==void 0);if(e!==void 0)throw new C(`a virtual manifest has no package for it`,e);return{package:void 0,workspace:r,patch:a}}let s=Ot(n,i),c=$e(n,i,s.edition),l=St(n,s.edition);return{package:{...s,features:et(n.features,`features`,c),dependencies:c,lib:_t(n,s.name),...l},workspace:r,patch:a}}function At(e,t){let n=o(S(e),t),r=E(t,n.package===void 0?`project`:`package`),i=o(n.package??n.project,r),a=D(i.name,E(r,`name`));if(x(i.version))throw new C(`a vendored package inherits nothing from a workspace`,E(r,`version`));return{name:a,version:b(i,`version`,r,O)??`0.0.0`}}function jt(e){let t=0;for(let n of e.matchAll(/"(?:[^"\\]|\\.)*"(\s*:)?/gsu))n[1]!==void 0&&t++;return t}function Mt(e,t){let n=se(()=>JSON.parse(e),e=>w(`not JSON: ${e.message}`,t));if(!re(n))throw new C(`expected an object`,t);if(n.$comment!==void 0&&typeof n.$comment!=`string`)throw new C(`expected "$comment" to be a string`,t);if(Object.keys(n).filter(e=>e!==`$comment`).sort().join()!==`files,package`)throw new C(`expected "files" and "package", and nothing else`,t);if(n.package!==null&&!g(n.package))throw new C(`expected "package" to be a sha256 or null`,t);if(!re(n.files))throw new C(`expected "files" to be an object`,t);let r=Object.create(null);for(let[e,i]of Object.entries(n.files)){if(!te(e))throw new C(`${T(e)} is not a path within the package`,t);if(typeof i!=`string`||!g(i))throw new C(`expected a sha256 for ${T(e)}`,t);r[e]=i}if(jt(e)!==Object.keys(n).length+Object.keys(r).length)throw new C(`a key is given twice`,t);return{checksum:n.package??void 0,files:r}}function Nt(e){if(typeof e!=`string`)throw TypeError(`expected the text of a .cargo-checksum.json`);return Mt(e,void 0)}function Pt(e,t){if(typeof t!=`object`||!t)throw TypeError(`expected the vendor directory, by directory`);let n=new Map;for(let[e,r]of Object.entries(t)){if(!ee(e)||e.startsWith(`.`))throw new C(`${T(e)} is not a directory a directory source reads`,e);if(typeof r?.manifest!=`string`||typeof r.checksum!=`string`)throw TypeError(`expected the manifest and checksum texts of ${T(e)}`);let{name:t,version:i}=At(r.manifest,E(e,`Cargo.toml`)),a=`${t} ${i}`;if(n.has(a))throw new C(`${T(n.get(a).directory)} holds ${T(a)} too, and cargo would read either`,e);n.set(a,{directory:e,...Mt(r.checksum,E(e,`.cargo-checksum.json`))})}let r=Object.create(null);for(let[t,i]of Object.entries(e.packages)){if(i.source===void 0)continue;let e=n.get(`${i.name} ${i.version}`);if(e===void 0)throw new C(`no directory holds ${T(`${i.name} ${i.version}`)}`,t);if(e.checksum!==i.checksum)throw new C(`${T(e.directory)} holds it with checksum ${e.checksum??`none`}, where the lockfile has ${i.checksum??`none`}`,t);r[t]={directory:e.directory,files:e.files}}return r}var Z=(e,t)=>e.get(t)??e.set(t,new Set).get(t),Ft=(e,t,n)=>new C(`${T(e)} is asked of ${T(t)}, which has no such feature`,n),It=(e,t)=>new C(`feature ${T(e)} enables itself, which cargo refuses`,t);function Q(e,t){return t.defaultFeatures&&`default`in e[t.resolved].manifest.features?[...t.features,`default`]:t.features}var Lt=()=>({features:new Set,enabled:new Set,asked:new Map}),Rt=class{constructor(e,t){this.packages=e,this.why=t,this.requests=new Map,this.active=new Set,this.dirty=new Set}requestOf(e){return this.requests.has(e)||(this.requests.set(e,Lt()),this.dirty.add(e)),this.requests.get(e)}require(e,t,n,r){let i=this.packages[e].manifest.features;if(!(n in i))throw Ft(n,e,r);if(!t.features.has(n)){if(t.features.add(n),this.dirty.add(e),i[n].includes(n))throw It(n,e);for(let r of i[n])this.requireValue(e,t,J(r),e)}}requireValue(e,t,n,r){if(n.dep===void 0)return this.require(e,t,n.feature,r);let{features:i,dependencies:a}=this.packages[e].manifest,o=a.some(e=>e.name===n.dep&&e.optional);n.feature!==void 0&&!n.weak&&o&&n.dep in i&&this.require(e,t,n.dep,r),t.enabled.add(n.dep),n.feature!==void 0&&Z(t.asked,n.dep).add(n.feature),this.dirty.add(e)}ask(e,t,n){if(e.resolved===void 0)throw new C(this.why(e,n),n);this.active.add(e);let r=this.requestOf(e.resolved);for(let i of[...Q(this.packages,e),...t])this.require(e.resolved,r,i,n)}run(e){for(let[t,n]of e){let[e,r]=[Lt(),this.requestOf(t)];for(let i of n)this.requireValue(t,e,i,`features`),this.requireValue(t,r,i,`features`);for(let n of this.packages[t].dependencies)n.kind===`dev`&&this.ask(n,e.asked.get(n.name)??[],t)}for(;this.dirty.size>0;){let e=this.dirty.values().next().value;this.dirty.delete(e);let t=this.requestOf(e);for(let n of this.packages[e].dependencies)n.kind===`dev`||n.optional&&!t.enabled.has(n.name)||this.ask(n,t.asked.get(n.name)??[],e)}return this.active}};function zt(e,t,n){return new Rt(e,n).run(t)}var Bt=`path`,Vt={__proto__:null,registry:{registry:!1,index:!1},git:{url:!0,branch:!1,tag:!1,rev:!1},path:{path:!0}};function Ht(e){let t=Vt[e?.type];if(!(t!==void 0&&Object.entries(t).every(([t,n])=>typeof e[t]==`string`||!n&&e[t]===void 0)))throw TypeError(`expected a source, as parseCargoManifest gives one`)}function Ut(e,t){if(typeof e!=`string`)throw TypeError(`expected the key of a [patch] table`);return Ht(t),I(t)===F(e)}var Wt=(e,n)=>e===void 0||r(e,t(n)),Gt=(e,t)=>t.identity===e||e===N&&t.source!==void 0&&!t.source.startsWith(`git+`),Kt=(e,t)=>t.name===e.package&&Gt(e.identity,t)&&Wt(e.requirement,t.version),qt=(e,t)=>({...e,key:L(e.name,e.version,e.source),identity:e.source===void 0?Bt:j(e.source,t,!1).identity});function Jt(e,t,n){let r=new Map;for(let i of Object.keys(e).toSorted()){let a=E(t,i),o=Object.entries(e[i]).map(([e,t])=>({key:i,name:e,spec:t,where:E(a,e)}));r.set(me(i),{key:i,where:a,label:`${n}[patch.${i}]`,entries:o})}return r}function Yt(e,t){let n=Jt(v(t?.patch),E(`config`,`patch`),`the config's `);for(let[t,r]of Jt(e.patch,`patch`,``)){let e=n.get(t);e===void 0?n.set(t,r):e.entries.push(...r.entries.filter(t=>!e.entries.some(e=>e.name===t.name)))}let r=new Map;for(let{key:e,where:t,label:i}of n.values()){let n=F(e),a=r.get(n);if(a!==void 0)throw new C(`patches the source ${a} does by another URL, and cargo would take either table`,t);r.set(n,i)}return[...n.values()].flatMap(e=>e.entries)}function Xt(e,t){return Yt(e,t).map(({key:e,spec:t,where:n})=>{let r=F(e);if(I(t.source)===r)throw new C(`patches its source with itself, which cargo refuses`,n);let i=y(G)(t.version,n);return{table:r,target:`${r} ${t.package}`,package:t.package,identity:P(t.source,Bt),requirement:i,where:n}})}function Zt(e,t,n){let r=t.map(()=>{}),i=(e,a)=>t.some((t,o)=>a.has(o)||!n(e,t)||(a.add(o),r[o]!==void 0&&!i(r[o],a))?!1:(r[o]=e,!0));return e.find(e=>!i(e,new Set))}function Qt(e,t,n,r){let i=t.map(e=>qt(e,`patch.unused`)),a=i.find(t=>t.source!==void 0&&e.has(t.key));if(a!==void 0)throw new C(`the lockfile lists ${T(a.key)} unused, and among its packages: is it out of date?`,`patch.unused`);let o=new Map;for(let t of n)for(let n of e.values())Kt(t,n)&&o.set(`${t.table} ${n.key}`,{...n,table:t.table});let s=(e,t)=>(t.table===void 0||t.table===e.table)&&Kt(e,t),c=Zt(n,[...o.values(),...i],s);if(c!==void 0)throw new C(`the lockfile has no package of its own this patch offers, used or unused: is it out of date?`,c.where);let l=Zt([...[...r].map(e=>o.get(e)),...i],n,(e,t)=>s(t,e));if(l?.table!==void 0)throw new C(`a dependency resolves to it by a [patch], and no patch is left that offers it: is the lockfile out of date?`,l.key);if(l!==void 0)throw new C(`the lockfile lists ${T(`${l.name} ${l.version}`)} unused where no [patch] does: is it out of date?`,`patch.unused`)}function $t(e){let t=e.package?.edition;return e.workspace?.resolver??e.package?.resolver??(t===`2024`?3:t===`2021`?2:1)}function en(e,t){let n=new Map;for(let r of t){if(!(r in e.packages)||e.packages[r].source!==void 0)throw new C(`${T(r)} is not a path package in the lockfile`,`members`);let{name:t}=e.packages[r];if(n.has(t)&&n.get(t)!==r)throw new C(`${T(n.get(t))} and ${T(r)} are two members of one name, which cargo refuses`,`members`);n.set(t,r)}}function tn(e){let t=new Map;for(let[n,{manifest:r}]of Object.entries(e))if(r.links!==void 0){if(t.has(r.links))throw new C(`links the native library ${T(r.links)}, as ${T(t.get(r.links))} does, which cargo refuses`,n);t.set(r.links,n)}}function nn(e,t,n,r){let i=Object.create(null),a=new Map,o=new Map;for(let[s,c]of Object.entries(e.packages)){let e=t[s]?.package;if(e===void 0)throw new C(`no manifest of this package is given`,s);if(e.name!==c.name||e.version!==c.version)throw new C(`the manifest given is of ${T(`${e.name} ${e.version}`)}`,s);let l=n.includes(s),u=e.dependencies.map((e,t)=>{let n=l||e.kind!==`dev`?on(e,s,r,E(E(s,`dependencies`),String(t))):[],i={...e,resolved:n.length===1?n[0].key:void 0,active:!1};return n.length>1&&a.set(i,n.map(e=>e.key)),n.length===1&&n[0].slot!==void 0&&o.set(i,n[0].slot),i});i[s]={...R(c),manifest:e,dependencies:u}}return{packages:i,ambiguous:a,patched:o}}function rn(e,t,n){let r=new Set(n);for(let e of Object.values(t))for(let t of e.dependencies)t.active&&r.add(t.resolved);let i=Object.keys(t).find(e=>!r.has(e));if(i!==void 0)throw new C(`no member depends on it, directly or not: is the lockfile out of date?`,i);for(let[n,r]of Object.entries(t)){let t=new Set(r.dependencies.filter(e=>e.active).map(e=>e.resolved)),i=e.packages[n].dependencies.find(e=>!t.has(e));if(i!==void 0)throw new C(`the lockfile's edge to ${T(i)} is no dependency the members' features turn on: is it out of date?`,n)}}function an(e,t,n){let{workspace:r,members:i,config:a}=ae(n,[`workspace`,`members`,`config`]);if(r?.patch===void 0||r.workspace===void 0&&r.package===void 0)throw TypeError(`expected the manifest of the workspace root`);if(!Array.isArray(i))throw TypeError(`expected the members of the workspace`);if(a!==void 0&&a?.patch===void 0)throw TypeError(`expected the config, as parseCargoConfig gives it`);en(e,i);let o=r.package===void 0?void 0:L(r.package.name,r.package.version);if(o!==void 0&&!i.includes(o))throw new C(`the root package ${T(o)} is not among the members`,`members`);let s=new Map(Object.entries(e.packages).map(([e,t])=>[e,qt(t,e)])),c=Xt(r,a),{packages:l,ambiguous:u,patched:d}=nn(e,t,i,{locked:s,patches:Map.groupBy(c,e=>e.target)}),f=new Map(i.map(e=>[e,Object.keys(l[e].manifest.features).map(J)])),p=(t,n)=>{if(u.has(t))return`${T(t.name)} could be any of ${u.get(t).map(T).join(`, `)}`;let r=e.packages[n].dependencies.filter(n=>e.packages[n].name===t.package);return r.length===0?`the lockfile resolves no ${T(t.name)}, which the members' features turn on: is it out of date?`:`the lockfile resolves ${T(t.name)} to none but ${r.map(T).join(`, `)}, of another source or version: is it out of date, or [patch]ed by a config not given?`};for(let e of zt(l,f,p))e.active=!0;return rn(e,l,i),tn(l),Qt(s,e.unusedPatches,c,new Set(d.entries().filter(([e])=>e.active).map(([,e])=>e))),{resolver:$t(r),root:o,members:[...i],packages:l}}function on(e,t,{locked:n,patches:r},i){let a=y(G)(e.version,i),o=P(e.source,n.get(t).identity),s=I(e.source),c=r.get(`${s} ${e.package}`)??[];return n.get(t).dependencies.flatMap(t=>{let r=n.get(t);return r.name!==e.package||!Wt(a,r.version)?[]:Gt(o,r)?[{key:t,slot:void 0}]:c.some(e=>Kt(e,r))?[{key:t,slot:`${s} ${t}`}]:[]})}var sn=/^[A-Z_a-z]\w*$/u;function $(e,t){if(typeof e!=`object`||!e||!Array.isArray(e.cfg)||e.name!==void 0&&typeof e.name!=`string`)throw TypeError(`expected ${t} as { name, cfg }`);if(e.decides!==void 0&&!(Array.isArray(e.decides)&&e.decides.every(e=>typeof e==`string`)))throw TypeError(`expected ${t}.decides as the names of cfgs`);let n=e.cfg.map(e=>Fe(e)??w(`${T(e)} is not a line of \`rustc --print cfg\``,t)),r=e.decides?.map(e=>sn.test(e)?e:w(`${T(e)} is not the name of a cfg`,E(t,`decides`)));return{name:e.name,cfg:new Set(n),decides:r===void 0?void 0:new Set(r)}}var cn=e=>e.name===void 0||e.decides!==void 0;function ln(e){let t=$(e,`platform`),n=new Map;return e=>{if(typeof e!=`string`)throw TypeError(`expected a platform as a [target] table names it`);return n.has(e)||n.set(e,V(e)),Re(n.get(e)??w(`${T(e)} is neither a target's name nor a cfg(\u2026) cargo reads`),t)}}function un(e){if(!Array.isArray(e)||!e.every(e=>typeof e==`string`))throw TypeError(`expected the features as strings`);return[...new Set(e.flatMap(e=>e.split(/[\p{White_Space},]+/u)).filter(Boolean))].map(e=>{let t=J(e);if(t.feature===void 0)throw new C(`${T(e)}: \`dep:\` is not taken on the command line`,`features`);if(t.dep!==void 0&&t.feature.includes(`/`))throw new C(`${T(e)} has more than one "/"`,`features`);return{text:e,...t}})}function dn(e){let t=e=>(e.target===void 0?[`normal`,`dev`,`build`]:[`normal`,`build`,`dev`]).indexOf(e.kind),n=e.dependencies.toSorted((e,n)=>{let[r,i]=[e.target??``,n.target??``];return r===i?t(e)-t(n):r<i?-1:1});return new Map(n.map(e=>[e.name,e]))}function fn(e,t,n){let r=dn(e),i=t=>t in e.features||r.get(t)?.optional===!0,a=t=>t.dep===void 0?i(t.feature)?t:void 0:r.has(t.dep)?t:t.dep===e.name&&i(t.feature)?J(t.feature):void 0;return t.flatMap(e=>{let t=a(e);return t===void 0?[]:(n.add(e.text),[t])})}function pn(e,t,n,r){let i=new Map;if(e.root===void 0||e.resolver>=2){let a=new Set;for(let o of n)i.set(o,[fn(e.packages[o].manifest,t,a),!r.noDefaultFeatures]);let o=t.filter(e=>!a.has(e.text));if(o.length>0)throw new C(`no package selected has ${o.map(e=>T(e.text)).join(`, `)}`,`features`);return i}let a=r.current??e.root;if(!e.members.includes(a))throw new C(`${T(a)} is not a member of the workspace`,`current`);let o=t=>e.packages[t].name,s=t=>t.dep!==void 0&&e.members.some(e=>e!==a&&o(e)===t.dep)&&n.some(e=>o(e)===t.dep),c=Map.groupBy(t.filter(s),e=>e.dep);for(let l of e.members)l===a?i.set(l,[t.filter(e=>!s(e)),!r.noDefaultFeatures]):n.includes(l)&&i.set(l,[(c.get(o(l))??[]).map(e=>J(e.feature)),!0]);return i}function mn(e,t){let{packages:n}=t;if(!Array.isArray(n)||n.length===0)throw TypeError(`expected the packages built, as keys of members`);for(let t of n)if(!e.members.includes(t))throw new C(`${T(t)} is not a member of the workspace`,`packages`);let r=e.members.filter(e=>n.includes(e)),i=new Map;for(let[n,[a,o]]of pn(e,un(t.features??[]),r,t)){let{features:r,dependencies:s}=e.packages[n].manifest,c=a.find(e=>e.dep!==void 0&&!s.some(t=>t.name===e.dep));if(c!==void 0)throw new C(`${T(n)} has no dependency ${T(c.dep)}`,`features`);let l=[...o&&`default`in r?[`default`]:[],...t.allFeatures?Object.keys(r):[]];i.set(n,[...a,...l.map(J)])}return i}function hn(e,t){let{undecided:n}=e;if(n===void 0){if(t.some(cn))throw TypeError("expected `undecided`, 'on' or 'off', as a platform leaves cfgs undecided");return!1}if(n!==`on`&&n!==`off`)throw TypeError("expected `undecided` to be 'on' or 'off'");if(e.targets===`all`)throw TypeError("expected no `undecided` with targets 'all', which reads every platform");return n===`on`}var gn=class{constructor(e,t,n){this.graph=e,this.targeted=t;let r=n.targets===`all`;this.host=r?void 0:$(n.host,`host`),this.targets=r?[]:(n.targets?.length>0?n.targets:[n.host]).map((e,t)=>$(e,`targets[${t}]`)),this.undecided=hn(n,r?[]:[this.host,...this.targets]),this.dev=n.dev===!0,this.decoupleHost=e.resolver>=2,this.decoupleDev=e.resolver>=2&&!this.dev,this.ignoreInactive=e.resolver>=2&&!r,this.trackForHost=this.decoupleHost||this.ignoreInactive,this.platforms=new Map,this.depsOf=new Map,this.activated=new Map,this.activatedDeps=new Map,this.processed=new Set,this.deferred=new Map}saved(e){return this.decoupleHost?e:`normal`}enabled(e,t){return Z(this.activated,`${this.saved(t)} ${e}`)}features(e){return this.graph.packages[e].manifest.features}deps(e,t){let n=`${t} ${e}`;return this.depsOf.has(n)||this.depsOf.set(n,this.graph.packages[e].dependencies.filter(e=>this.targeted.has(e)&&!(e.kind===`dev`&&this.decoupleDev)&&(e.target===void 0||!this.ignoreInactive||this.activeFor(e,t))).map(e=>({dep:e,depFk:this.trackForHost&&this.forHost(e)?`host`:t}))),this.depsOf.get(n)}forHost(e){return e.kind===`build`||this.graph.packages[e.resolved].manifest.procMacro}activeFor(e,t){this.platforms.has(e.target)||this.platforms.set(e.target,V(e.target));let n=this.platforms.get(e.target),r=e=>Re(n,e)??this.undecided;return e.kind===`build`||t===`host`?r(this.host):this.targets.some(r)}request(e,t,n,r){if(!(n in this.features(e)))throw Ft(n,e,r);this.activateRec(e,t,n)}activatePkg(e,t,n,r){for(let i of n)this.request(e,t,i,r);if(!this.processed.has(`${t} ${e}`)){this.processed.add(`${t} ${e}`);for(let{dep:n,depFk:r}of this.deps(e,t))n.optional||this.activatePkg(n.resolved,r,Q(this.graph.packages,n),e)}}activateValue(e,t,n){n.dep===void 0?this.activateRec(e,t,n.feature):n.feature===void 0?this.activateDependency(e,t,n.dep):this.activateDepFeature(e,t,n.dep,n.feature,n.weak)}activateRec(e,t,n){let r=this.enabled(e,t);if(r.has(n))return;r.add(n);let i=this.features(e)[n]??[];if(i.includes(n))throw It(n,e);for(let n of i)this.activateValue(e,t,J(n))}activateDependency(e,t,n){Z(this.activatedDeps,`${this.saved(t)} ${e}`).add(n);let r=this.deferred.get(`${t} ${e} ${n}`)??[];this.deferred.delete(`${t} ${e} ${n}`);for(let{dep:i,depFk:a}of this.deps(e,t).filter(e=>e.dep.name===n)){for(let t of r)this.request(i.resolved,a,t,e);this.activatePkg(i.resolved,a,Q(this.graph.packages,i),e)}}activateDepFeature(e,t,n,r,i){for(let{dep:a,depFk:o}of this.deps(e,t).filter(e=>e.dep.name===n)){if(a.optional){if(i&&!this.activatedDeps.get(`${this.saved(t)} ${e}`)?.has(n)){Z(this.deferred,`${t} ${e} ${n}`).add(r);continue}this.activateDependency(e,t,n),!i&&n in this.features(e)&&this.activateRec(e,t,n)}this.request(a.resolved,o,r,e)}}builtKinds(e){let{procMacro:t,procMacroTarget:n}=this.graph.packages[e].manifest;return t||n&&this.dev?[`normal`,`host`]:[`normal`]}resolveRoot(e,t){for(let n of this.trackForHost&&this.graph.packages[e].manifest.procMacroTarget?[`normal`,`host`]:[`normal`]){for(let r of t)this.activateValue(e,n,r);this.activatePkg(e,n,[],`roots`)}}reach(e,t){let n=new Map,r=(e,t)=>{n.has(`${t} ${e}`)||n.set(`${t} ${e}`,[e,t])};for(let[t,n]of e)r(t,n);let i=new Set(n.keys());for(let[e,a]of n.values()){let n=this.activatedDeps.get(`${this.saved(a)} ${e}`);for(let o of this.graph.packages[e].dependencies)!this.targeted.has(o)||o.optional&&!n?.has(o.name)||o.kind===`dev`&&!(this.dev&&i.has(`${a} ${e}`))||o.target!==void 0&&this.host!==void 0&&!this.activeFor(o,a)||t(e,o)&&r(o.resolved,a===`host`||this.forHost(o)?`host`:`normal`)}return n}result(e){let t=e.map(e=>[e,this.graph.packages[e].manifest.procMacro?`host`:`normal`]);this.reach(t,(e,t)=>this.checkNamed(e,t));let n=this.reach(e.flatMap(e=>this.builtKinds(e).map(t=>[e,t])),()=>!0),r=Object.create(null);for(let e of Object.keys(this.graph.packages)){let[t,i]=[`normal`,`host`].map(t=>n.has(`${t} ${e}`)?[...this.enabled(e,t)].sort():void 0);(t!==void 0||i!==void 0)&&(r[e]={normal:t,host:i})}return r}checkNamed(e,t){let n=e=>e.name.replaceAll(`-`,`_`),r=this.graph.packages[e].dependencies.find(e=>this.targeted.has(e)&&e.resolved===t.resolved&&n(e)!==n(t));if(r!==void 0)throw new C(`depends on ${T(t.resolved)} as both ${T(t.name)} and ${T(r.name)}, which cargo refuses to build`,e);return!0}};function _n(e,t){ae(t,[`packages`,`features`,`allFeatures`,`noDefaultFeatures`,`current`,`dev`,`host`,`targets`,`undecided`]);let n=mn(e,t),r=new gn(e,zt(e.packages,n,e=>`the build turns on ${T(e.name)}, which the lockfile does not resolve to one package, and cargo would anew`),t);for(let[e,t]of n)r.resolveRoot(e,t);return r.result(t.packages)}export{C as LockfileError,oe as TomlError,an as linkCargo,ln as matchCargoPlatform,Nt as parseCargoChecksum,Et as parseCargoConfig,we as parseCargoLock,kt as parseCargoManifest,Ut as patchesCargoSource,Pt as readCargoVendor,_n as resolveCargoFeatures};
@@ -0,0 +1,10 @@
1
+ import{a as e,b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{f as r,g as i}from"./chunk-2XUEZHIP.js";var a=class extends n{constructor(t){if(super(t),this.it=i,t.type!==e.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===i||e==null)return this._t=void 0,this.it=e;if(e===r)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};a.directiveName=`unsafeHTML`,a.resultType=1;var o=t(a),s=/^/u,c=/^true$/u,l=/^[\w .,#%()-]*$/u,u=Object.fromEntries([`fill`,`fill-opacity`,`fill-rule`,`clip-rule`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`,`stroke-opacity`,`stroke-dasharray`,`opacity`,`transform`].map(e=>[e,l])),d=(...e)=>({...u,...Object.fromEntries(e.map(e=>[e,l]))}),f=new Set;function p(e){for(let t of e)f.add(t)}var m=e=>{let[t,...n]=e.split(` `);return t===`token`&&n.every(e=>f.has(e)||/^language-[\w-]+$/u.test(e))},h={__proto__:null,span:{class:{test:e=>m(e)||/^(?:code-control|code-look-alike|evd-lineno|report-logo brand-[\w-]+)$/u.test(e)},title:s,"data-tooltip":s,"aria-hidden":c},mark:{class:/^diff-word$/u},code:{class:/^evd-line$/u},button:{type:/^button$/u,class:/^bundle-source-link$/u,"data-bundle-source-link":s},a:{class:/^source-node-doc$/u,href:/^https:\/\/nodejs\.org\/api\/[\w/-]+\.html(?:#[\w-]*)?$/u,target:/^_blank$/u,rel:/^noopener noreferrer$/u,"aria-label":s},svg:{...d(`viewBox`,`width`,`height`),class:/^file-icon(?: brand-[\w-]+)?$/u,"aria-hidden":c},g:u,path:{...d(`d`),class:/^(?:bg|fg)$/u},rect:d(`x`,`y`,`width`,`height`,`rx`,`ry`),circle:d(`cx`,`cy`,`r`),ellipse:d(`cx`,`cy`,`rx`,`ry`),line:d(`x1`,`y1`,`x2`,`y2`),polyline:d(`points`),polygon:d(`points`)},g=/<(?:([a-z]+)((?:[\t\n\f\r ]+[a-zA-Z][\w-]*="[^"]*")*)[\t\n\f\r ]*\/?|\/([a-z]+)[\t\n\f\r ]*)>/uy,_=/([a-zA-Z][\w-]*)="([^"]*)"/gu;function v(e){if(typeof e!=`string`)return!1;for(let t=e.indexOf(`<`);t!==-1;t=e.indexOf(`<`,g.lastIndex)){g.lastIndex=t;let[,n,r,i]=g.exec(e)??[],a=h[n??i];if(!a)return!1;for(let[,e,t]of r?.matchAll(_)??[])if(!Object.hasOwn(a,e)||!a[e].test(t))return!1}return!0}function y(e){return console.error(`Not markup this app writes, shown as text instead:`,e.length>300?`${e.slice(0,300)}\u2026`:e),e}var b=new Set;function x(e){return e==null||e===i?e:b.has(e)?o(e):v(e)?(b.size>=256&&b.clear(),b.add(e),o(e)):y(String(e))}var S=`m5.875 10.154 1.376-.772.023-.067-.023-.037h-.067l-.23-.015-.787-.02-.681-.03-.661-.035-.166-.035-.156-.205.016-.103.14-.094.2.018.442.03.665.046.481.028.714.075h.113l.016-.047-.039-.028-.03-.028-.687-.466-.744-.492-.39-.284-.21-.143-.106-.135-.046-.294.19-.21.258.017.065.018.26.2.557.43.726.535.106.089.042-.03.006-.022-.048-.08-.395-.713-.422-.726-.187-.301-.05-.18a1 1 0 0 1-.03-.213l.218-.296.12-.039.29.039.123.106.18.413.293.65.453.884.133.262.07.242.027.075h.046v-.043l.038-.497.069-.611.067-.787.023-.221.11-.266.218-.143.17.081.14.2-.02.13-.083.54-.163.846-.106.567h.062l.07-.07.287-.382.482-.602.213-.239.248-.264.159-.125h.301l.221.329-.099.34-.31.393-.256.333-.369.496-.23.397.021.032.055-.006.832-.177.45-.081.537-.092.243.113.026.115-.096.236-.573.141-.673.135-1.003.237-.012.01.014.017.452.042.193.01h.473l.88.066.23.153.138.186-.023.141-.354.181-.478-.113-1.116-.266-.383-.096h-.053v.032l.32.312.584.528.731.68.037.168-.094.133-.099-.014-.643-.484-.248-.218-.561-.472H9.08v.05l.129.189.684 1.027.035.315-.05.103-.177.062-.194-.036-.4-.561-.413-.632-.333-.567-.041.023-.197 2.116-.092.108-.212.082-.177-.135-.094-.218.094-.43.113-.561.092-.447.083-.554.05-.184-.004-.013-.04.006-.418.574-.636.858-.503.539-.12.048-.21-.108.02-.193.117-.172.696-.886.42-.549.27-.317-.001-.046h-.016l-1.85 1.201-.328.042-.142-.132.018-.218.067-.071.556-.383Z`,C=`M11.04 8.364a1.72 1.72 0 0 0-.152-1.432 1.8 1.8 0 0 0-1.925-.846 1.8 1.8 0 0 0-.778-.498 1.8 1.8 0 0 0-.927-.05 1.8 1.8 0 0 0-.827.414 1.77 1.77 0 0 0-.507.767 1.8 1.8 0 0 0-.683.297 1.75 1.75 0 0 0-.499.549 1.75 1.75 0 0 0 .22 2.07 1.72 1.72 0 0 0 .151 1.432 1.8 1.8 0 0 0 1.926.846 1.77 1.77 0 0 0 1.333.587c.78 0 1.47-.496 1.707-1.227a1.8 1.8 0 0 0 .684-.298 1.75 1.75 0 0 0 .499-.548 1.75 1.75 0 0 0-.222-2.063m-2.667 3.678a1.33 1.33 0 0 1-.851-.304l.042-.024 1.413-.804a.23.23 0 0 0 .116-.199V8.747l.597.34q.01.005.011.015v1.629a1.323 1.323 0 0 1-1.328 1.31m-2.857-1.203a1.3 1.3 0 0 1-.158-.879l.042.025 1.414.805a.23.23 0 0 0 .23 0l1.729-.982v.68a.02.02 0 0 1-.01.018l-1.431.814a1.34 1.34 0 0 1-1.816-.48m-.372-3.037a1.32 1.32 0 0 1 .7-.574v1.656a.22.22 0 0 0 .114.197l1.72.979-.598.34a.02.02 0 0 1-.021 0L5.63 9.587a1.304 1.304 0 0 1-.487-1.791zm4.907 1.125L8.327 7.94l.596-.34a.02.02 0 0 1 .02 0l1.43.814a1.3 1.3 0 0 1 .512.528 1.3 1.3 0 0 1-.118 1.4 1.33 1.33 0 0 1-.595.436V9.122a.23.23 0 0 0-.12-.195m.594-.881-.042-.025-1.411-.812a.23.23 0 0 0-.232 0l-1.727.983v-.68a.02.02 0 0 1 .008-.018l1.429-.813a1.34 1.34 0 0 1 1.425.061 1.3 1.3 0 0 1 .55 1.298zM6.908 9.252l-.597-.34a.02.02 0 0 1-.012-.016V7.271c0-.249.073-.493.209-.703s.329-.378.557-.483a1.35 1.35 0 0 1 1.415.18l-.042.023-1.413.804a.23.23 0 0 0-.116.2zm.324-.69.77-.438.77.438v.875l-.768.437-.77-.437z`,w=`M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z`,T=`M11.998 24c-.321 0-.641-.084-.922-.247l-2.936-1.737c-.438-.245-.224-.332-.08-.383c.585-.203.703-.25 1.328-.604c.065-.037.151-.023.218.017l2.256 1.339c.082.045.197.045.272 0l8.795-5.076c.082-.047.134-.141.134-.238V6.921c0-.099-.053-.192-.137-.242l-8.791-5.072c-.081-.047-.189-.047-.271 0L3.075 6.68C2.99 6.729 2.936 6.825 2.936 6.921v10.15c0 .097.054.189.139.235l2.409 1.392c1.307.654 2.108-.116 2.108-.89V7.787c0-.142.114-.253.256-.253h1.115c.139 0 .255.112.255.253v10.021c0 1.745-.95 2.745-2.604 2.745c-.508 0-.909 0-2.026-.551L2.28 18.675c-.57-.329-.922-.945-.922-1.604V6.921c0-.659.353-1.275.922-1.603l8.795-5.082c.557-.315 1.296-.315 1.848 0l8.794 5.082c.57.329.924.944.924 1.603v10.15c0 .659-.354 1.273-.924 1.604l-8.794 5.078C12.643 23.916 12.324 24 11.998 24zM19.099 13.993c0-1.9-1.284-2.406-3.987-2.763c-2.731-.361-3.009-.548-3.009-1.187c0-.528.235-1.233 2.258-1.233c1.807 0 2.473.389 2.747 1.607c.024.115.129.199.247.199h1.141c.071 0 .138-.031.186-.081c.048-.054.074-.123.067-.196c-.177-2.098-1.571-3.076-4.388-3.076c-2.508 0-4.004 1.058-4.004 2.833c0 1.925 1.488 2.457 3.895 2.695c2.88.282 3.103.703 3.103 1.269c0 .983-.789 1.402-2.642 1.402c-2.327 0-2.839-.584-3.011-1.742c-.02-.124-.126-.215-.253-.215h-1.137c-.141 0-.254.112-.254.253c0 1.482.806 3.248 4.655 3.248C17.501 17.007 19.099 15.91 19.099 13.993z`,E=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 2 2 5v6l6 3 6-3V5L8 2Z"/><path d="M2 5l6 3 6-3"/><path d="M8 8v6"/></svg>`,D=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,O=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.5" y="4" width="11" height="9" rx="1.2"/><path d="M6 4V3h4v1"/></svg>`,k=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" aria-hidden="true"><path d="m4.5 4.5 7 2-5 5z"/><circle cx="4.5" cy="4.5" r="2" fill="currentColor"/><circle cx="11.5" cy="6.5" r="2" fill="currentColor"/><circle cx="6.5" cy="11.5" r="2" fill="currentColor"/></svg>`,A=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><rect x="1" y="1.5" width="14" height="3" rx=".5"/><rect x="1" y="6.5" width="8" height="3" rx=".5"/><rect x="11" y="6.5" width="4" height="3" rx=".5"/><rect x="1" y="11.5" width="4" height="3" rx=".5"/><rect x="7" y="11.5" width="8" height="3" rx=".5"/></svg>`,j=`<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" aria-hidden="true"><path d="M1 1h4v4H1zm5 5h4v4H6zm5 5h4v4h-4z"/><path d="M6 1h4v4H6zm5 0h4v4h-4zM1 6h4v4H1zm10 0h4v4h-4zM1 11h4v4H1zm5 0h4v4H6z" opacity=".35"/></svg>`,M=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" aria-hidden="true"><rect x="1" y="1" width="14" height="2.5" rx=".5" fill="currentColor" stroke="none"/><rect x="1" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="6.25" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><rect x="11.5" y="12" width="3.5" height="3" rx=".5" fill="currentColor" stroke="none"/><path d="M4 3.5c0 4.5-1.25 4-1.25 8.5M8 3.5v8.5M12 3.5c0 4.5 1.25 4 1.25 8.5"/></svg>`,N=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="2.5" r="1.5" fill="currentColor"/><circle cx="3" cy="13" r="1.5" fill="currentColor"/><circle cx="8" cy="13" r="1.5" fill="currentColor"/><circle cx="13" cy="13" r="1.5" fill="currentColor"/><path d="M8 4v3M8 7H3m5 0h5M3 7v4M8 7v4M13 7v4"/></svg>`,P=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 5.5V5a2 2 0 0 1 4 0v.5"/><rect x="4.75" y="5.5" width="6.5" height="8.5" rx="3.25"/><path d="M8 8.5V14M4.75 9H2.5M11.25 9h2.25M5 12l-2 1.5M11 12l2 1.5M5.25 6.75 3.5 5.25M10.75 6.75l1.75-1.5"/></svg>`,F=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.35" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.5 2.75 3.5v3.75c0 3.2 2.2 5.7 5.25 7.25 3.05-1.55 5.25-4.05 5.25-7.25V3.5Z"/><path d="M8 5v3.5"/><circle cx="8" cy="10.9" r=".2" fill="currentColor"/></svg>`,I=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>`,L=`<svg class="file-icon" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6.67 8.67a3.33 3.33 0 0 0 5.03.36l2-2a3.33 3.33 0 0 0-4.71-4.71l-1.15 1.14"/><path d="M9.33 7.33a3.33 3.33 0 0 0-5.03-.36l-2 2a3.33 3.33 0 0 0 4.71 4.71l1.14-1.14"/></svg>`,R=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 1.5H2.5a1 1 0 0 0-1 1V5m9.5-3.5h2.5a1 1 0 0 1 1 1V5M1.5 11v2.5a1 1 0 0 0 1 1H5m6 0h2.5a1 1 0 0 0 1-1V11"/><circle cx="7.25" cy="7.25" r="2.75"/><path d="m9.25 9.25 2.25 2.25"/></svg>`,z=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 1.5H4a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5.5L9 1.5ZM9 1.5v4h4M5.5 8h5m-5 3h3.5"/></svg>`,B=`<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20V2H6.5A2.5 2.5 0 0 0 4 4.5zM4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5"/></svg>`,V=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4.5 4.5-3 3.5 3 3.5m7-7 3 3.5-3 3.5M9.5 2l-3 12"/></svg>`,H=`<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6.5 3.5 1.6 3.9L12 9l-3.9 1.6-1.6 3.9-1.6-3.9L1 9l3.9-1.6 1.6-3.9ZM12 1.5v4m-2-2h4"/></svg>`,U=`<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"/></svg>`,W=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 1.5v2"/><rect x="2" y="3.5" width="12" height="10" rx="2.5"/><path d="M6 7.5v2m4-2v2"/></svg>`,G=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" aria-hidden="true"><path d="M1 8h3.5m7 0H15"/><circle cx="8" cy="8" r="3.5"/></svg>`,K=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="4" cy="3.5" r="1.5"/><circle cx="4" cy="12.5" r="1.5"/><circle cx="12" cy="12.5" r="1.5"/><path d="M4 5v6M12 11V6a2 2 0 0 0-2-2H7m1.5-1.5L7 4l1.5 1.5"/></svg>`,q=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><circle cx="8" cy="8" r="6"/><path d="M8 2a6 6 0 0 1 0 12Z" fill="currentColor" stroke="none"/></svg>`,J=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><circle cx="8" cy="8" r="6"/><circle cx="8" cy="8" r="1.5" fill="currentColor" stroke="none"/></svg>`,Y=`<svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" aria-hidden="true"><path d="M2 2h5.5l6.5 6.5-5.5 5.5L2 7.5Z"/><circle cx="5" cy="5" r="1"/></svg>`,X=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m10 2 4 4-8 8H2v-4l8-8Zm-1 1 4 4"/></svg>`,Z=`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 4h12M6 4V2h4v2M4 4l.6 10h6.8L12 4M6.5 7v4m3-4v4"/></svg>`;export{p as a,v as b,y as c,x as d,S as e,C as f,w as g,T as h,E as i,D as j,O as k,k as l,A as m,j as n,M as o,N as p,P as q,F as r,I as s,L as t,R as u,z as v,B as w,V as x,H as y,U as z,W as A,G as B,K as C,q as D,J as E,Y as F,X as G,Z as H};
2
+ /*! Bundled license information:
3
+
4
+ lit-html/directives/unsafe-html.js:
5
+ (**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ *)
10
+ */
@@ -0,0 +1 @@
1
+ export{a as lockfileWhy,b as routesTo}from"./chunk-A4BBBHQU.js";import"./chunk-OOJM4CTU.js";