@preventive/triage 1.0.0-alpha.5 → 1.0.0-alpha.50

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 (366) hide show
  1. package/LICENSE-APACHE +202 -0
  2. package/README.md +16 -0
  3. package/api/reap.ts +17 -0
  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 +3 -0
  13. package/common/bundle-compare-diff.js +357 -0
  14. package/common/bundle-compare-inputs.d.ts +2 -0
  15. package/common/bundle-compare-inputs.js +65 -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 +62 -0
  19. package/common/bundle-metadata.d.ts +15 -0
  20. package/common/bundle-metadata.js +226 -0
  21. package/common/bundle-pkg-of.d.ts +1 -0
  22. package/common/bundle-pkg-of.js +90 -0
  23. package/common/bundle-reasons.d.ts +2 -0
  24. package/common/bundle-reasons.js +21 -0
  25. package/common/bundle-source-links.d.ts +6 -0
  26. package/common/bundle-source-links.js +216 -0
  27. package/common/bundle-sourcemap.d.ts +10 -0
  28. package/common/bundle-sourcemap.js +100 -0
  29. package/common/bundle-sources.d.ts +7 -0
  30. package/common/bundle-sources.js +333 -0
  31. package/common/bundle-stats.js +41 -0
  32. package/common/bundle-tabs.js +1 -0
  33. package/common/code-language.js +65 -0
  34. package/common/default-scan-models.ts +31 -0
  35. package/common/dependency-reviews.d.ts +18 -0
  36. package/common/dependency-reviews.js +64 -0
  37. package/common/finding-duplicates.js +58 -0
  38. package/common/finding-filters.js +274 -0
  39. package/common/finding-id.js +47 -0
  40. package/common/github-issue-labels.d.ts +1 -0
  41. package/common/github-issue-labels.js +11 -0
  42. package/common/github-pr.ts +56 -0
  43. package/common/gzip.js +59 -0
  44. package/common/line-diff.d.ts +8 -0
  45. package/common/line-diff.js +57 -0
  46. package/common/linked-workspace-groups.js +63 -0
  47. package/common/managed/agent-tasks.ts +292 -0
  48. package/common/managed/comments.ts +34 -0
  49. package/common/managed/finding-detail.d.ts +2 -0
  50. package/common/managed/finding-detail.js +32 -0
  51. package/common/managed/github-agents.ts +114 -0
  52. package/common/managed/github-logins.ts +49 -0
  53. package/common/managed/npm-packages.d.ts +5 -0
  54. package/common/managed/npm-packages.js +34 -0
  55. package/common/managed/permissions.ts +31 -0
  56. package/common/managed/report-content.ts +72 -0
  57. package/common/managed/report-filter.ts +109 -0
  58. package/common/managed/repository-alias.ts +65 -0
  59. package/common/managed/roles.ts +35 -0
  60. package/common/managed/routes.d.ts +2 -0
  61. package/common/managed/routes.js +347 -0
  62. package/common/managed/scan-models.ts +6 -0
  63. package/common/managed/team-app.d.ts +5 -0
  64. package/common/managed/team-app.js +31 -0
  65. package/common/managed/triage.ts +83 -0
  66. package/common/managed/upload-seal.ts +126 -0
  67. package/common/pretty-print.d.ts +5 -0
  68. package/common/pretty-print.js +24 -0
  69. package/common/revalidation-conflicts.js +48 -0
  70. package/common/revalidation-input-groups.js +56 -0
  71. package/common/save-error-reason.ts +20 -7
  72. package/common/scan-server.ts +13 -0
  73. package/common/security-links.d.ts +5 -0
  74. package/common/security-links.js +33 -0
  75. package/common/server-info.ts +46 -0
  76. package/common/utf8.d.ts +3 -0
  77. package/common/utf8.js +45 -0
  78. package/common/workspace-app.js +39 -0
  79. package/common/workspace-groups.js +176 -0
  80. package/out/activity.js +4 -0
  81. package/out/brotli-fallback.js +3 -3
  82. package/out/chunk-2WDZPXVL.js +3 -0
  83. package/out/chunk-2XUEZHIP.js +28 -0
  84. package/out/chunk-2ZDZWLFY.js +1 -0
  85. package/out/chunk-4HI2MSAV.js +17 -0
  86. package/out/chunk-4XMP7YVH.js +36 -0
  87. package/out/chunk-6LNQTKAV.js +52 -0
  88. package/out/chunk-6S2U2UYG.js +232 -0
  89. package/out/chunk-75YLHBCM.js +3 -0
  90. package/out/chunk-7BKKYVWR.js +7 -0
  91. package/out/chunk-7C7DWL7I.js +1 -0
  92. package/out/chunk-7VAWINQF.js +6 -0
  93. package/out/chunk-C4Z6ZBXV.js +10 -0
  94. package/out/chunk-FC65TPUB.js +1 -0
  95. package/out/chunk-FKBXNUW4.js +1 -0
  96. package/out/chunk-GDPCLSOS.js +2 -0
  97. package/out/chunk-GO7FT4OD.js +1 -0
  98. package/out/chunk-HTBYHSPG.js +1 -0
  99. package/out/chunk-IYPY47MC.js +1 -0
  100. package/out/chunk-IZ7POWI3.js +18 -0
  101. package/out/chunk-JCIIBLKR.js +1 -0
  102. package/out/chunk-NRPC74AM.js +1 -0
  103. package/out/chunk-OOJM4CTU.js +1 -0
  104. package/out/chunk-PBZPYIG7.js +1 -0
  105. package/out/chunk-PNHBZGDD.js +1 -0
  106. package/out/chunk-PWFUOLZK.js +17 -0
  107. package/out/chunk-PXK7EU4V.js +1 -0
  108. package/out/chunk-QB4CBOX2.js +1 -0
  109. package/out/chunk-R3NZFXVR.js +1 -0
  110. package/out/chunk-R5O6FAW4.js +2 -0
  111. package/out/chunk-SXV2T5C4.js +80 -0
  112. package/out/chunk-TQJDYHVE.js +2 -0
  113. package/out/chunk-TUII34K2.js +1 -0
  114. package/out/chunk-UK7RGJT6.js +3 -0
  115. package/out/chunk-VFWMQ3LG.js +2 -0
  116. package/out/chunk-VH4XMZIW.js +2 -0
  117. package/out/chunk-WCPJDAYA.js +10 -0
  118. package/out/chunk-WFYLMF6Z.js +10 -0
  119. package/out/chunk-WYLQWYLA.js +1 -0
  120. package/out/client-managed-import.js +4 -0
  121. package/out/client-managed.js +33 -0
  122. package/out/client-sync.js +11 -17
  123. package/out/compare.js +35 -0
  124. package/out/dialogs.js +55 -0
  125. package/out/github-issue-authorized.html +3 -0
  126. package/out/github-issue-authorized.js +1 -0
  127. package/out/graph.js +17 -4
  128. package/out/index.html +90 -8
  129. package/out/prism.js +14 -10
  130. package/out/scan.js +2 -0
  131. package/out/stasis.svg +20 -0
  132. package/out/terminal.js +366 -39
  133. package/out/view.css +1 -1
  134. package/out/view.js +19 -144
  135. package/package.json +362 -59
  136. package/risk/actions/findings.js +161 -0
  137. package/risk/actions/resolve.js +219 -0
  138. package/risk/actions/scripts/commands.js +182 -0
  139. package/risk/actions/scripts/grade.js +113 -0
  140. package/risk/actions/scripts/packages.js +123 -0
  141. package/risk/actions/scripts/shell.js +169 -0
  142. package/risk/actions/uses.js +76 -0
  143. package/risk/actions/workflow.js +110 -0
  144. package/risk/files/characters.js +196 -0
  145. package/risk/files/hosts.js +205 -0
  146. package/risk/files/readability.js +177 -0
  147. package/risk/files/runs-code.js +615 -0
  148. package/risk/files/script.js +118 -0
  149. package/risk/files/stamps.js +47 -0
  150. package/risk/index.d.ts +254 -0
  151. package/risk/index.js +11 -0
  152. package/risk/npm/assess.js +285 -0
  153. package/risk/npm/combined.js +68 -0
  154. package/risk/npm/compare.js +257 -0
  155. package/risk/npm/dependencies.js +172 -0
  156. package/risk/npm/diff.js +79 -0
  157. package/risk/npm/downloads.js +84 -0
  158. package/risk/npm/files.js +445 -0
  159. package/risk/npm/held.js +63 -0
  160. package/risk/npm/install-scripts.js +34 -0
  161. package/risk/npm/malware.js +36 -0
  162. package/risk/npm/manifest.js +65 -0
  163. package/risk/npm/new-dependency.js +60 -0
  164. package/risk/npm/old-version.js +108 -0
  165. package/risk/npm/registry.js +388 -0
  166. package/risk/npm/release.js +85 -0
  167. package/risk/npm/score.js +59 -0
  168. package/risk/npm/specs.js +124 -0
  169. package/risk/npm/tarball.js +96 -0
  170. package/server-common/database-config.ts +16 -0
  171. package/server-common/initialize.ts +18 -0
  172. package/server-common/npm-advisories.ts +101 -0
  173. package/{server → server-common}/origin.ts +5 -5
  174. package/server-common/reap.ts +48 -0
  175. package/server-common/scan-config.ts +19 -0
  176. package/server-common/standalone.ts +29 -0
  177. package/server-common/storage-crypto.ts +182 -0
  178. package/server-common/storage-log.ts +38 -0
  179. package/server-common/vercel-blob.ts +103 -0
  180. package/server-e2e/app.ts +487 -0
  181. package/{server → server-e2e}/bus-receiver.ts +2 -1
  182. package/{server → server-e2e}/cli.js +9 -4
  183. package/{server → server-e2e}/config.ts +50 -42
  184. package/{server → server-e2e}/db-neon.ts +2 -2
  185. package/{server → server-e2e}/db-revision-sql.ts +1 -1
  186. package/{server → server-e2e}/db-stmt.ts +2 -2
  187. package/{server → server-e2e}/db.ts +7 -7
  188. package/{server → server-e2e}/http.ts +44 -13
  189. package/{server → server-e2e}/hub.ts +40 -9
  190. package/server-e2e/index.ts +17 -0
  191. package/server-e2e/lifecycle.ts +95 -0
  192. package/{server → server-e2e}/neon-driver.ts +2 -2
  193. package/{server → server-e2e}/npm-proxy.ts +12 -145
  194. package/{server → server-e2e}/objstore/blob-vercel.ts +10 -114
  195. package/{server → server-e2e}/objstore/blob.ts +1 -1
  196. package/server-e2e/objstore/fetch-mint-guard.ts +74 -0
  197. package/{server → server-e2e}/objstore/handlers.ts +9 -8
  198. package/{server → server-e2e}/objstore/init.ts +19 -27
  199. package/{server → server-e2e}/objstore/reaper.ts +1 -1
  200. package/server-e2e/objstore/rest-deny.ts +28 -0
  201. package/server-e2e/objstore/rest-mint.ts +224 -0
  202. package/{server → server-e2e}/objstore/rest.ts +3 -3
  203. package/{server → server-e2e}/objstore/store-neon.ts +6 -10
  204. package/{server → server-e2e}/objstore/store.ts +7 -7
  205. package/{server → server-e2e}/objstore/tokens.ts +2 -2
  206. package/{server → server-e2e}/pubsub.ts +12 -9
  207. package/{server → server-e2e}/sign.ts +4 -4
  208. package/{server → server-e2e}/sse-server.ts +60 -33
  209. package/{server → server-e2e}/static.ts +31 -21
  210. package/{server → server-e2e}/sync-handlers.ts +64 -30
  211. package/{server → server-e2e}/ws-server.ts +20 -9
  212. package/server-managed/activity.ts +258 -0
  213. package/server-managed/agent-merges.ts +109 -0
  214. package/server-managed/app-agents.ts +21 -0
  215. package/server-managed/avatar-store.ts +13 -0
  216. package/server-managed/blob-store.ts +17 -0
  217. package/server-managed/brotli.ts +10 -0
  218. package/server-managed/bundle-advisories.ts +120 -0
  219. package/server-managed/bundle-advisory-inventory.ts +77 -0
  220. package/server-managed/bundle-build-diagnostics.d.ts +10 -0
  221. package/server-managed/bundle-build-diagnostics.js +23 -0
  222. package/server-managed/bundle-build-leases.ts +41 -0
  223. package/server-managed/bundle-build-worker.js +115 -0
  224. package/server-managed/bundle-build.ts +200 -0
  225. package/server-managed/bundle-cache.ts +211 -0
  226. package/server-managed/bundle-catalog.ts +29 -0
  227. package/server-managed/bundle-commits.ts +140 -0
  228. package/server-managed/bundle-store.ts +24 -0
  229. package/server-managed/bundle-summary-cache.ts +130 -0
  230. package/server-managed/bundle.ts +119 -0
  231. package/server-managed/cache-storage.ts +20 -0
  232. package/server-managed/cli.js +21 -0
  233. package/server-managed/combined.ts +47 -0
  234. package/server-managed/comments.ts +151 -0
  235. package/server-managed/commit-coauthors.ts +106 -0
  236. package/server-managed/commit-lockfiles.ts +73 -0
  237. package/server-managed/comparison.ts +41 -0
  238. package/server-managed/config.ts +164 -0
  239. package/server-managed/content-access.ts +15 -0
  240. package/server-managed/crypto.ts +25 -0
  241. package/server-managed/db-methods.ts +1923 -0
  242. package/server-managed/db-neon.ts +458 -0
  243. package/server-managed/db-schema.ts +238 -0
  244. package/server-managed/db-table-names.ts +22 -0
  245. package/server-managed/db.ts +142 -0
  246. package/server-managed/dependabot-access.ts +60 -0
  247. package/server-managed/dependabot-alerts.ts +185 -0
  248. package/server-managed/dependency-review-comments.ts +100 -0
  249. package/server-managed/dependency-reviews.ts +346 -0
  250. package/server-managed/github-accounts.ts +60 -0
  251. package/server-managed/github-actions.ts +71 -0
  252. package/server-managed/github-app.ts +415 -0
  253. package/server-managed/github-errors.ts +70 -0
  254. package/server-managed/github-graphql.ts +39 -0
  255. package/server-managed/github-issue-links.ts +140 -0
  256. package/server-managed/github-issue-oauth.ts +47 -0
  257. package/server-managed/github-issues.ts +152 -0
  258. package/server-managed/github-link-oauth.ts +69 -0
  259. package/server-managed/github-links.ts +204 -0
  260. package/server-managed/github-metadata.ts +213 -0
  261. package/server-managed/github-oauth.ts +238 -0
  262. package/server-managed/github-pulls.ts +227 -0
  263. package/server-managed/github-requests.ts +39 -0
  264. package/server-managed/github-users.ts +30 -0
  265. package/server-managed/http-response.ts +76 -0
  266. package/server-managed/http.ts +5329 -0
  267. package/server-managed/import-triage.ts +51 -0
  268. package/server-managed/index.ts +192 -0
  269. package/server-managed/kept-briefly.ts +37 -0
  270. package/server-managed/kept.ts +28 -0
  271. package/server-managed/link-reports.ts +162 -0
  272. package/server-managed/locked-packages.ts +129 -0
  273. package/server-managed/lockfile-scope.ts +49 -0
  274. package/server-managed/lru.ts +30 -0
  275. package/server-managed/managed-issues.ts +78 -0
  276. package/server-managed/management-catalog.ts +45 -0
  277. package/server-managed/management.ts +99 -0
  278. package/server-managed/npm-delta-worker.js +23 -0
  279. package/server-managed/npm-delta.ts +194 -0
  280. package/server-managed/npm-insights.ts +449 -0
  281. package/server-managed/npm-kept.ts +215 -0
  282. package/server-managed/npm-loads.ts +264 -0
  283. package/server-managed/npm-manifest.ts +115 -0
  284. package/server-managed/npm-packages.ts +454 -0
  285. package/server-managed/npm-provenance.ts +123 -0
  286. package/server-managed/npm-risk.ts +285 -0
  287. package/server-managed/object-storage-disk.ts +148 -0
  288. package/server-managed/object-storage-vercel.ts +67 -0
  289. package/server-managed/object-storage.ts +75 -0
  290. package/server-managed/package-entry-points.ts +51 -0
  291. package/server-managed/pretty-print.ts +434 -0
  292. package/server-managed/public-workspace.ts +238 -0
  293. package/server-managed/pull-comment-reviews.ts +161 -0
  294. package/server-managed/pull-dependencies.ts +348 -0
  295. package/server-managed/pull-dependency-reviews.ts +328 -0
  296. package/server-managed/pull-reviews.ts +205 -0
  297. package/server-managed/queue.ts +39 -0
  298. package/server-managed/release-commits.ts +84 -0
  299. package/server-managed/rename-diff-worker.js +26 -0
  300. package/server-managed/rename-diff.ts +279 -0
  301. package/server-managed/repo-path.ts +21 -0
  302. package/server-managed/report-migration.ts +35 -0
  303. package/server-managed/report-query.ts +10 -0
  304. package/server-managed/report-response.ts +16 -0
  305. package/server-managed/report-sources.ts +178 -0
  306. package/server-managed/report-store.ts +85 -0
  307. package/server-managed/repository-actions.ts +218 -0
  308. package/server-managed/repository-agents.ts +355 -0
  309. package/server-managed/repository-aliases.ts +91 -0
  310. package/server-managed/repository-browser.ts +294 -0
  311. package/server-managed/repository-changes.ts +284 -0
  312. package/server-managed/repository-code.ts +215 -0
  313. package/server-managed/repository-dependency-reviews.ts +165 -0
  314. package/server-managed/repository-discovery.ts +82 -0
  315. package/server-managed/repository-history.ts +432 -0
  316. package/server-managed/repository-issues.ts +195 -0
  317. package/server-managed/repository-policy.ts +27 -0
  318. package/server-managed/repository-pulls.ts +156 -0
  319. package/server-managed/repository-pulse.ts +460 -0
  320. package/server-managed/repository-risk-assess.ts +105 -0
  321. package/server-managed/repository-risk-audit.ts +79 -0
  322. package/server-managed/repository-risk-read.ts +170 -0
  323. package/server-managed/repository-risk.ts +491 -0
  324. package/server-managed/repository-squashes.ts +168 -0
  325. package/server-managed/request-timing.ts +63 -0
  326. package/server-managed/reviewed-dependencies.ts +150 -0
  327. package/server-managed/revisions.ts +35 -0
  328. package/server-managed/scan-downloads.ts +87 -0
  329. package/server-managed/session.ts +132 -0
  330. package/server-managed/slugs.ts +38 -0
  331. package/server-managed/solidity-entry-points.ts +71 -0
  332. package/server-managed/sql-postgres.ts +34 -0
  333. package/server-managed/sql.ts +88 -0
  334. package/server-managed/static.ts +28 -0
  335. package/server-managed/storage-command.ts +16 -0
  336. package/server-managed/storage-db.ts +183 -0
  337. package/server-managed/storage-encryption.ts +290 -0
  338. package/server-managed/storage-maintenance.ts +259 -0
  339. package/server-managed/storage-payload.ts +121 -0
  340. package/server-managed/storage-stores.ts +91 -0
  341. package/server-managed/storage.ts +82 -0
  342. package/server-managed/team-app.ts +134 -0
  343. package/server-managed/team-catalog.ts +7 -0
  344. package/server-managed/team-feed.ts +180 -0
  345. package/server-managed/team-npm-scopes.ts +106 -0
  346. package/server-managed/team-reports.ts +307 -0
  347. package/server-managed/triage-response.ts +16 -0
  348. package/server-managed/type-only-worker.js +19 -0
  349. package/server-managed/type-only.ts +105 -0
  350. package/server-managed/uploads.ts +106 -0
  351. package/server-managed/upstream-cache.ts +243 -0
  352. package/server-managed/view-as.ts +58 -0
  353. package/server-managed/workspace-shares.ts +169 -0
  354. package/server.ts +70 -0
  355. package/server/index.ts +0 -480
  356. package/server/lifecycle.ts +0 -208
  357. /package/{LICENSE → LICENSE-MIT} +0 -0
  358. /package/{server → server-e2e}/auth.ts +0 -0
  359. /package/{server → server-e2e}/config.example.json +0 -0
  360. /package/{server → server-e2e}/objstore/blob-fs.ts +0 -0
  361. /package/{server → server-e2e}/objstore/fs.ts +0 -0
  362. /package/{server → server-e2e}/objstore/sign.ts +0 -0
  363. /package/{server → server-e2e}/peer.ts +0 -0
  364. /package/{server → server-e2e}/sse-session.ts +0 -0
  365. /package/{server → server-e2e}/util.ts +0 -0
  366. /package/{server → server-e2e}/validation.ts +0 -0
@@ -0,0 +1,3 @@
1
+ import{b as e,c as t,k as n,p as r}from"./chunk-FC65TPUB.js";import{a as i}from"./chunk-TUII34K2.js";var a=3,o=4,s=/^[\w-]{4}$/u,c=/^[\w-]{8}$/u,l=`AAAA`,u={report:`deepview/finding-link/report/v1
2
+ `,workspace:`deepview/finding-link/workspace/v1
3
+ `},d=new Map;function f(e,t){return`${e}\0${t}`}function p(e){return typeof e==`string`&&s.test(e)}async function m(e,t){let n=u[e];if(!n||typeof t!=`string`||!t)return null;let r=f(e,t),o=d.get(r);if(o!==void 0)return o;let s;try{let e=await crypto.subtle.digest(`SHA-256`,i(n+t));s=new Uint8Array(e).slice(0,a).toBase64({alphabet:`base64url`,omitPadding:!0})}catch{return null}return d.set(r,s),s}function h(e,t){return typeof t!=`string`||!t?null:d.get(f(e,t))??null}function g(e,t){let n=[];for(let[r,i]of[[`report`,e],[`workspace`,t]]){if(i==null||i===``){n.push(l);continue}if(!p(i))throw TypeError(`encodeFindingRef: ${r} must be a link hint token, not a name`);n.push(i)}return n.every(e=>e===l)?null:n[0]===l?`w${n[1]}`:n.join(``)}function _(e){let t=[e.slice(0,o),e.slice(o)].map(e=>e===l?null:e);return{report:t[0],workspace:t[1]}}function v({id:e,report:n,workspace:r}={}){if(!t(e))throw TypeError(`encodeFindingRef: a persistent finding id is required`);let i=[`finding=${encodeURIComponent(e)}`],a=g(n,r);return a&&i.push(`v=${a}`),i.join(`&`)}function y(e,t){let n=v(e);return typeof location>`u`?`${t??``}#${n}`:`${location.origin}${t??location.pathname}#${n}`}function b(n){let r=typeof n==`string`?n:typeof location>`u`?``:location.hash;if(!r)return null;let i=r.replace(/^#/u,``);if(!i)return null;let a={id:null,report:null,workspace:null};for(let n of i.split(`&`)){let r=n.indexOf(`=`);if(r<0)continue;let i=n.slice(0,r),o=n.slice(r+1);if(!o)continue;if(i===`v`){if(o.length===5&&o[0]===`w`&&p(o.slice(1))){let e=o.slice(1);Object.assign(a,{report:null,workspace:e===l?null:e});continue}if(!c.test(o))continue;Object.assign(a,_(o));continue}if(i!==`finding`||o.length>e*3)continue;let s;try{s=decodeURIComponent(o)}catch{continue}t(s)&&(a.id=s)}return a.id?a:null}function x(e,{managed:t=!1}={}){if(typeof location>`u`)return null;let i;try{i=new URL(e)}catch{return null}if(i.href!==e||i.protocol!==location.protocol||i.host!==location.host||i.username||i.password)return null;let a=r(i);if(a?.finding)return{id:a.finding.id,fragment:v(a.finding),path:n(a)};if(t&&a?.view!==`home`&&!/\/(?:index|view)\.html$/u.test(i.pathname))return null;let o=b(i.hash);if(!o)return null;let s=v(o);return{id:o.id,fragment:s,path:`/#${s}`}}function S(e,t){if(typeof e!=`string`)return!1;let n=e.replaceAll(`\\`,`/`);return n.startsWith(`${t}/`)||n.includes(`/${t}/`)}function C(e){let t=!1;for(let n of e){for(let e of n.groups??[])for(let n of e){if(S(n.file,`node_modules`))return`node_modules`;S(n.file,`vendor`)&&(t=!0)}let e=n.tree?w(n.tree):n.treeDependencies;if(e===`node_modules`)return`node_modules`;e===`vendor`&&(t=!0)}return t?`vendor`:`dependencies`}function w(e){let t=!1;for(let n of Object.keys(e??{})){if(S(n,`node_modules`))return`node_modules`;S(n,`vendor`)&&(t=!0)}return t?`vendor`:null}export{S as a,C as b,m as c,h as d,v as e,y as f,b as g,x as h};
@@ -0,0 +1,7 @@
1
+ import{a as e}from"./chunk-TUII34K2.js";var t=`/api/config`,n=`http://127.0.0.1:3123/`;function r(e){if(typeof e!=`string`||!e.trim())return null;try{let t=new URL(e);return![`http:`,`https:`].includes(t.protocol)||t.username||t.password||t.search||t.hash?null:(t.pathname=t.pathname.replace(/\/+$/u,``)+`/`,t.href)}catch{return null}}var i=`deepview.sync.serverInfo`,a=`deepview.sync.standaloneProbe`;function o(){try{return localStorage.getItem(a)===`1`}catch{return!1}}function s(){try{localStorage.setItem(a,`1`)}catch{}}function c(e){return e===`managed+e2e`||e===`e2e+managed`}function l(e,t){return(e===`managed`||c(e))&&/^\/(?:team|manage|npm|my|repo)(?:\/|$)/u.test(t)}function u(e,t=null){return t&&(c(e)||e===t)?t:e===`managed`||e===`managed+e2e`?`managed`:`e2e`}function d(e,t){return e&&c(e.mode)&&t.mode===`e2e`?{...e,githubNewIssueLabels:t.githubNewIssueLabels??``,...t.deepviewScanServer?{deepviewScanServer:t.deepviewScanServer}:{}}:t}function f(e){if(typeof e!=`object`||!e)return null;let t=e.mode;if(t!==`e2e`&&t!==`managed`&&t!==`managed+e2e`&&t!==`e2e+managed`)return null;let n=null,i=e.managed;if(typeof i==`object`&&i){let e=i.loginPath,t=i.cookieName;typeof e==`string`&&typeof t==`string`&&(n={loginPath:e,cookieName:t},i.allowShare===!0&&(n.allowShare=!0))}let a=t===`managed`?null:r(e.deepviewScanServer),o=e.githubNewIssueLabels;return{mode:t,managed:n,...a?{deepviewScanServer:a}:{},...typeof o==`string`&&o.length<=4096?{githubNewIssueLabels:o}:{}}}async function p(){try{let e=await fetch(t,{credentials:`same-origin`,cache:`no-store`,headers:{accept:`application/json`}});if(e.status===404)return`standalone`;if(!e.ok)return null;let n=await e.json(),r=f(n);return r&&n.session!==void 0?{...r,session:n.session}:r}catch{return null}}async function m(e,t=3e3){let n;try{return await Promise.race([e,new Promise(e=>{n=setTimeout(()=>e(null),t)})])}catch{return null}finally{clearTimeout(n)}}function h(){try{let e=localStorage.getItem(i);if(e==null)return null;let t=f(JSON.parse(e));return t?{mode:t.mode,managed:t.managed}:null}catch{return null}}function g(e){try{localStorage.setItem(i,JSON.stringify({mode:e.mode,managed:e.managed})),localStorage.removeItem(a)}catch{}}var _=`deepview.objstore-presence.`;function v(e){return _+e}function y(e){try{let t=localStorage.getItem(v(e));if(!t)return null;let n=JSON.parse(t);return!n||typeof n!=`object`?null:{names:n.names&&typeof n.names==`object`?n.names:{},bundles:n.bundles&&typeof n.bundles==`object`?n.bundles:{},bundleNames:n.bundleNames&&typeof n.bundleNames==`object`?n.bundleNames:{},baselines:b(n.baselines,n.localVersions)}}catch{return null}}function b(e,t){let n={};if(t&&typeof t==`object`)for(let[e,r]of Object.entries(t))Number.isSafeInteger(r)&&r>=0&&(n[e]={version:r,incarnation:null,synced:!0,hash:null});if(e&&typeof e==`object`)for(let[t,r]of Object.entries(e))!r||typeof r!=`object`||!Number.isSafeInteger(r.version)||r.version<0||r.incarnation!=null&&typeof r.incarnation!=`string`||(n[t]={version:r.version,incarnation:r.incarnation??null,synced:r.synced===!0,hash:typeof r.hash==`string`?r.hash:null});return n}function x(e,t,n,r){let i=y(e),a=Object.entries((t===`bundle`?i?.bundles:i?.names)??{}).find(([,e])=>e===n)?.[0],o=i?.baselines?.[a];return{synced:a!==void 0&&(t===`bundle`||o?.synced===!0&&o.hash===r),cached:!0}}var S=`deepview-objstore.v1.put`,C=`deepview-objstore.v1.delete`,w=`deepview-objstore.v1.fetch`,T=`deepview-objstore.v1.fetch-rest`,E=`deepview-objstore.v1.put-rest`,D=`deepview-objstore.v1.delete-rest`;function O(e){return e==null?``:String(e)}function k(e){return e??``}function A(t,n){return e([S,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),t.contentHash,String(t.expectedLength),n].join(`
2
+ `))}function j(t,n){return e([C,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),n].join(`
3
+ `))}function M(t,n,r){return e([w,t,n,r].join(`
4
+ `))}async function N(e,t){return new Uint8Array(await crypto.subtle.sign({name:`Ed25519`},e,t)).toBase64({alphabet:`base64url`,omitPadding:!0})}function P(e,t,n){return N(e,A(t,n))}function F(e,t,n){return N(e,j(t,n))}function I(e,t,n,r){return N(e,M(t,n,r))}function L(t,n,r){return e([T,t,n,String(r)].join(`
5
+ `))}function R(e,t,n,r){return N(e,L(t,n,r))}function z(t,n){return e([E,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),t.contentHash,String(t.expectedLength),String(n)].join(`
6
+ `))}function B(e,t,n){return N(e,z(t,n))}function V(t,n){return e([D,t.workspaceTag,t.resourceTag,O(t.prevVersion),k(t.prevIncarnation),String(n)].join(`
7
+ `))}function H(e,t,n){return N(e,V(t,n))}async function U(e){let t=await crypto.subtle.digest(`SHA-256`,e);return new Uint8Array(t).toBase64({alphabet:`base64url`,omitPadding:!0})}export{n as a,r as b,o as c,s as d,c as e,l as f,u as g,d as h,f as i,p as j,m as k,h as l,g as m,v as n,y as o,x as p,P as q,F as r,I as s,R as t,B as u,H as v,U as w};
@@ -0,0 +1 @@
1
+ function e(e){return e===`inprogress`||e===`fixed`||e===`invalid`||e===`deleted`||e===`ignored`?e:void 0}function t(t){if(t)return e(t.triage)??(t.deleted?`deleted`:void 0)}function n(e){let n=t(e);return n===void 0||n===`ignored`}function r(e){return!e||!e.color&&!t(e)&&!e.comment&&!e.fix&&!(e.ignoredReports&&e.ignoredReports.length>0)&&e.flagged===void 0}function i(e,t,n){let r=e.get(t)?.ignoredReports;return Array.isArray(r)&&r.includes(n)}function a(e,t){return Array.isArray(e?.scopedIgnoredReports)&&e.scopedIgnoredReports.includes(t)}function o(t){if(!t||typeof t!=`object`)return;let n=t,i={};typeof n.color==`string`&&n.color&&(i.color=n.color);let a=e(n.triage)??(n.deleted?`deleted`:void 0);if(a&&(i.triage=a),typeof n.comment==`string`&&n.comment&&(i.comment=n.comment),typeof n.fix==`string`&&n.fix&&(i.fix=n.fix),typeof n.flagged==`boolean`&&(i.flagged=n.flagged),Array.isArray(n.ignoredReports)){let e=n.ignoredReports.filter(e=>typeof e==`string`&&e.length>0);e.length>0&&(i.ignoredReports=e)}if(Array.isArray(n.scopedIgnoredReports)&&i.ignoredReports){let e=[...new Set(n.scopedIgnoredReports.filter(e=>typeof e==`string`&&i.ignoredReports.includes(e)))];e.length>0&&(i.scopedIgnoredReports=e)}return r(i)?void 0:i}function s(e,t){let n=e??[],r=t??[];if(n.length!==r.length)return!1;if(n.length===0)return!0;let i=new Set(n);for(let e of r)if(!i.has(e))return!1;return!0}function c(e,n){let r=e??{},i=n??{};return(r.color??``)===(i.color??``)&&(t(r)??``)===(t(i)??``)&&(r.comment??``)===(i.comment??``)&&(r.fix??``)===(i.fix??``)&&r.flagged===i.flagged&&s(r.ignoredReports,i.ignoredReports)&&s(r.scopedIgnoredReports,i.scopedIgnoredReports)}function l(e,t,n){let r=e.get(t),i=o({...r,...n});return i===void 0?e.delete(t):!c(r,i)&&(e.set(t,i),!0)}function u(e,t,n){let r=o(n),i=e.get(t);return r===void 0?e.delete(t):!c(i,r)&&(e.set(t,r),!0)}function d(e,t,n,r,i=!1){let a=new Set(e.get(t)?.ignoredReports??[]);r?a.add(n):a.delete(n);let o=new Set(e.get(t)?.scopedIgnoredReports??[]);return r&&i&&o.add(n),l(e,t,{ignoredReports:a.size>0?[...a]:void 0,scopedIgnoredReports:[...o]})}async function f(e){let t=await crypto.subtle.digest(`SHA-512`,e);return`sha512-${new Uint8Array(t).toBase64()}`}export{t as a,n as b,i as c,a as d,o as e,l as f,u as g,d as h,f as i};
@@ -0,0 +1,6 @@
1
+ import{a as e}from"./chunk-SXV2T5C4.js";import{b as t}from"./chunk-TUII34K2.js";var n=new Set([`module`,`commonjs`,`json`,`module-typescript`,`commonjs-typescript`]),r=new Set([`solidity`,`php`,`shell`,`rust`]),i=new Set([`java`,`kotlin`,`gradle`,`objc`,`objcpp`,`swift`,`c`,`cpp`,`c-header`,`cpp-header`,`ruby`,`python`,`cmake`,`podspec`,`podfile`,`podfile-lock`,`template`,`xml`,`env`,`fastlane`,`pbxproj`]),a=new Set([`resource`,`resource:base64`]),o=new Set([`stat:file`,`stat:directory`]),s=new Set([...n,...r,...i,...a,`patch`,`directory`,...o]),c=e=>o.has(e),l=e=>e===`directory`||e===`stat:directory`?`directory`:`file`;function u(e,t,n){if(e===t)return e;let r=c(e);if(r!==c(t)&&l(e)===l(t))return r?t:e;throw Error(`format conflict for '${n}' ('${t}' vs '${e}')`)}function d(e,t){return t===``?e:e===`.`?t:`${e}/${t}`}var f=/^(?=[A-Za-z0-9-]{1,39}\/)[A-Za-z0-9](?:-?[A-Za-z0-9])*\/(?!\.\.?$)[\w.-]{1,100}$/u,p=/^(?!\.\.?(?:\/|$))[\w.~@+-]+(?:\/(?!\.\.?(?:\/|$))[\w.~@+-]+)*$/u,m=/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u,h={github:e=>typeof e==`string`&&f.test(e),directory:e=>typeof e==`string`&&e.length<=1024&&(e===``||p.test(e)),commit:e=>typeof e==`string`&&m.test(e)},ee=(e,t)=>e?.toLowerCase()===t?.toLowerCase(),g=(e,t,n)=>{if(e===void 0)return;T(e)||S(!1,`${n} must be an object`);for(let r of Object.keys(e))Object.hasOwn(t,r)||S(!1,`unknown ${n} key '${r}'`);let r=Object.entries(t).map(([t,r])=>typeof r==`object`?[t,g(e[t],r,`${n}.${t}`)]:(e[t]!==void 0&&!r(e[t])&&S(!1,`invalid ${n}.${t}: ${JSON.stringify(e[t])}`),[t,e[t]])).filter(([,e])=>e!==void 0);return r.length===0?void 0:Object.freeze(E(r))},_=(e,t=`bundle repo`)=>g(e,h,t),te=(e,t)=>t??(j(e)?`npm`:void 0),ne=(e,{ecosystem:t,repo:n},r)=>{if(n===void 0)return;te(e,t)===void 0&&S(!1,`${r}: '${e}' is no dependency's bucket, and carries no repo`);let i=_(n,`${r} module '${e}' repo`);return i?.github===void 0&&S(!1,`${r} module '${e}' repo has no github`),i},re=e=>typeof e==`string`&&/^[\w.+@/~'!()*-]+$/u.test(e),v={name:re,version:re},ie=e=>typeof e==`string`&&e!==``&&!e.includes(`\\`)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e!==`node_modules`),ae=(e,t,n)=>typeof e==`string`&&ie(n)&&e===`${t}/${n}`,y={vendored:()=>!0,subpackages:(e,t,n)=>ae(e.name,t,n)},oe=(e,t)=>{for(let n=t.lastIndexOf(`/`);n>0;n=t.lastIndexOf(`/`,n-1))if(Object.hasOwn(e,t.slice(0,n)))return t.slice(0,n)};function se(e,t){if(e===void 0)return;let n=new Set;for(let r of Object.keys(t)){let t=oe(e,r);t!==void 0&&n.add(t)}return n.size===0?void 0:Object.freeze(E([...n].toSorted(C).map(t=>[t,e[t]])))}var b=(e,t,{name:n,ecosystem:r,files:i,[e]:a},o)=>{if(a===void 0)return;te(t,r)===void 0&&S(!1,`${o}: '${t}' is no dependency's bucket, and carries no ${e}`),T(a)||S(!1,`${o} module '${t}' ${e} must be an object`);let s=E(Object.entries(a).map(([r,i])=>{ie(r)||S(!1,`${o} module '${t}' ${e}: invalid directory ${JSON.stringify(r)}`);let a=g(i,v,`${o} module '${t}' ${e} '${r}'`);return a?.name===void 0&&S(!1,`${o} module '${t}' ${e} '${r}' has no name`),y[e](a,n,r)||S(!1,`${o} module '${t}' ${e} '${r}' is named '${a.name}', not '${n}/${r}'`),[r,a]})),c=se(s,i);for(let n of Object.keys(s))Object.hasOwn(c??{},n)||S(!1,`${o} module '${t}' ${e} '${n}' holds none of its files`);return c},x=({name:e,version:t,ecosystem:n,repo:r,vendored:i,subpackages:a,files:o})=>({name:e,version:t,...n===void 0?{}:{ecosystem:n},...r===void 0?{}:{repo:r},...i===void 0?{}:{vendored:i},...a===void 0?{}:{subpackages:a},files:o});function ce(e,t){let n=e.repo??t.repo,r=Object.keys(y).filter(n=>t[n]!==void 0&&Object.keys(t[n]).some(t=>!Object.hasOwn(e[n]??{},t)));if(n===e.repo&&r.length===0)return e;let i=E(r.map(n=>[n,Object.freeze(E([...Object.entries(t[n]),...Object.entries(e[n]??{})]))]));return x({...e,repo:n,...i})}var le=(e,t,n,r,i)=>E(Object.keys(y).map(a=>[a,i.includes(a)?b(a,e,{...t,files:n,[a]:se(t[a],n)},r):void 0]));function ue({name:e,version:t,ecosystem:n,repo:r,vendored:i,subpackages:a,files:o},s,c){return S(n===void 0||typeof n==`string`),o=E(Object.entries(o)),x({name:e,version:t??void 0,ecosystem:n,repo:ne(s,{ecosystem:n,repo:r},c),vendored:b(`vendored`,s,{name:e,ecosystem:n,files:o,vendored:i},c),subpackages:b(`subpackages`,s,{name:e,ecosystem:n,files:o,subpackages:a},c),files:o})}function de(e,{scope:t=`full`}={}){let n=new Set;for(let[r,{files:i}]of e)if(t===`full`||j(r))for(let e of Object.keys(i))n.add(d(r,e));return n}function fe(e,{what:t,files:n,formats:r,scope:i}){if(e.includes(`\\`))return`holds a '\\'`;if(D(e))return`escapes the root`;if(i!==`full`&&!j(e))return`is outside node_modules, which a '${i}'-scope ${t} does not record`;if(!n.has(e))return`names no file the ${t} records`;let a=r.get(e);return a===`directory`?`is a directory capture, not a file`:c(a)?`is a payload-free '${a}' record, not a file`:null}function pe(e,{what:t,files:n,formats:r,scope:i}){for(let a of e){let e=fe(a,{what:t,files:n,formats:r,scope:i});S(e===null,`${t}: executable entry '${a}' ${e}`)}}function me(e,{what:t,files:n,formats:r,scope:i=`full`}){if(e===void 0)return new Set;let a=`${t}: executable`;S(Array.isArray(e),`${a} must be an array of file paths`);let o=new Set;for(let t of e)S(typeof t==`string`&&t!==``,`${a} entry must be a non-empty string`),S(!o.has(t),`${a} entry '${t}' is listed twice`),o.add(t);return pe(o,{what:t,files:n,formats:r,scope:i}),o}function he(e,{what:t,modules:n,formats:r,scope:i}){if(e.size!==0)return pe(e,{what:t,files:de(n,{scope:i}),formats:r,scope:i}),ge(e)}function S(e,t){if(!e)throw Error(t)}function C(e,t){let[n,r]=[e.split(`/`),t.split(`/`)];for(;n.length>0&&n[0]===r[0];)n.shift(),r.shift();if(n.length===0&&r.length===0)return 0;if(n.length<2)return r.length<2&&n>r?1:-1;if(r.length<2)return 1;if(n[0]===`*`)return-1;if(r[0]===`*`||n[0]===`node_modules`)return 1;if(r[0]===`node_modules`)return-1;let[i,a]=[n,r].map(e=>e.join(String.fromCodePoint(0)));if(i<a)return-1;if(i>a)return 1;throw Error(`Unreachable`)}var w=(e,t)=>C(e[0],t[0]),T=e=>e&&[null,Object.prototype].includes(Object.getPrototypeOf(e)),E=e=>Object.setPrototypeOf(Object.fromEntries(e),null),ge=e=>[...e].toSorted(C),_e=(e,{sorted:t=!0}={})=>E((t?[...e].toSorted(w):[...e]).map(([e,n])=>[e,n instanceof Map?_e(n,{sorted:t}):n])),ve=(e,t)=>e.get(t)??e.set(t,new Map).get(t),ye=e=>new Map(Object.entries(e).map(([e,t])=>[e,T(t)?ye(t):t]));function D(e){if(e.startsWith(`/`))return!0;if(!e.includes(`..`))return!1;let t=0;for(let n of e.split(`/`))if(n!==`.`&&n!==``){if(n!==`..`)t++;else if(--t<0)return!0}return!1}var be=e=>e.includes(`\\`)||D(e),O=(e,t)=>S(!be(e),`${t}: path '${e}' escapes the root or holds a '\\'`),xe=(e,t)=>S(typeof e==`string`&&e!==``&&!be(e),`${t}: invalid entry ${JSON.stringify(e)}`);function Se(e,t){S(Array.isArray(e),`${t}: entries must be an array of file paths`);let n=new Set;for(let r of e)xe(r,t),S(!n.has(r),`${t}: entry '${r}' is listed twice`),n.add(r);return n}function Ce(e,t){for(let n of e)xe(n,t);return ge(e)}function we(e,t){O(e,`formats`),S(s.has(t),`unknown format '${t}' for ${e}`)}function Te(e){S(T(e));let t=new Map;for(let[n,r]of Object.entries(e)){we(n,r);let e=n===``?`.`:n;S(!t.has(e),`duplicate format key '${e}'`),t.set(e,r)}return t}function Ee(e){for(let[t,n]of e)we(t,n);return _e(e)}function De(e){for(let[,t]of e){S(t instanceof Map);for(let[e,n]of t){O(e,`imports`),S(n instanceof Map);for(let[,e]of n){if(typeof e==`string`){O(e,`imports`);continue}S(e instanceof Map&&e.size>0,`import target must be a file or a non-empty {platform: file} map`);for(let[t,n]of e)S(typeof t==`string`&&t.length>0&&!t.includes(`/`),`invalid platform key '${t}'`),S(typeof n==`string`),O(n,`imports`)}}}}function Oe(e){S(T(e));let t=ye(e);return De(t),t}function ke(e){return De(e),_e(e)}function Ae(e,{skipEmpty:t=!1,metadata:n=!0,what:r}={}){let i=n===!0?[`repo`,...Object.keys(y)]:n===!1?[]:n,a={modules:[],sources:[]};for(let[n,o]of e){if(t&&Object.keys(o.files).length===0)continue;let e=j(n);e&&S(o.name&&o.version&&o.files);let s=E(Object.entries(o.files).toSorted(w));a[e?`modules`:`sources`].push([n,x({...o,repo:i.includes(`repo`)?ne(n,o,r):void 0,...le(n,o,s,r,i),files:s})])}return{modules:E(a.modules.toSorted(w)),sources:E(a.sources.toSorted(w))}}function je(e,t){let n=e instanceof Map;if(n!==t instanceof Map)return!1;if(!n)return e===t;if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}var Me=e=>e instanceof Map?`{${[...e].map(([e,t])=>`${e}: ${t}`).join(`, `)}}`:e;function Ne(e,t,n){let r=new Map,i=e=>{for(let[t,i]of e){let e=ve(r,t);for(let[t,r]of i){let i=ve(e,t);for(let[e,a]of r)i.has(e)?S(je(i.get(e),a),`${n}: import '${e}' from '${t}' resolves differently ('${Me(i.get(e))}' vs '${Me(a)}')`):i.set(e,a instanceof Map?new Map(a):a)}}};return i(e),i(t),r}function Pe(e,t,n){let r=new Map,i=e=>{for(let[t,i]of e){let e=r.get(t);if(e===void 0){r.set(t,i);continue}try{r.set(t,u(i,e,t))}catch(e){throw Error(`${n}: ${e.message}`,{cause:e})}}};return i(e),i(t),r}function Fe(e,t,n,r){if(e.size===0)return new Set(t);let i=de(n,{scope:r}),a=new Set(t);for(let t of e)i.has(t)||a.add(t);return a}var Ie=/(?:^|\/)\.{0,2}(?:\/|$)/u;function k(e,t,n){let r=d(e,t);return(r!==`.`||t!==``)&&Ie.test(r)&&S(!1,`${n}: non-canonical file key ${JSON.stringify(r)}`),r.includes(`\\`)&&S(!1,`${n}: file key '${r}' holds a '\\', which no path may`),r}function A(e,t,n){let r=new Map;for(let[i,{files:a}]of e){typeof i!=`string`&&S(!1,`${t}: bucket dir ${String(i)} is not a string`),O(i,t);for(let e of Object.keys(a)){let a=k(i,e,t),o=r.get(a);o!==void 0&&n(a,o,i),r.set(a,i)}}return r}var Le=(e,t)=>n=>S(!1,`duplicate file key '${n}' across ${e} buckets -- module bucketing changed between writes (a workspace package without a version now owns its own bucket); regenerate the ${t}`);function Re(e,t,n){let r=new Map,i=e=>{for(let[t,i]of e){let e=r.get(t);if(e===void 0){r.set(t,x({...i,files:Object.assign(Object.create(null),i.files)}));continue}S(e.name===i.name,`${n}: module '${t}' name mismatch ('${e.name}' vs '${i.name}')`),S(e.version===i.version,`${n}: module '${t}' version mismatch ('${e.version}' vs '${i.version}')`+(e.version==null==(i.version==null)?``:` -- an artifact from an older stasis may record a placeholder version for a workspace package without one; regenerate it (bundle=replace / lock=replace)`)),S(e.ecosystem===i.ecosystem,`${n}: module '${t}' ecosystem mismatch ('${e.ecosystem??`(none)`}' vs '${i.ecosystem??`(none)`}')`);let a=ce(e,i);a!==e&&r.set(t,a);for(let[r,a]of Object.entries(i.files))Object.hasOwn(e.files,r)?S(e.files[r]===a,`${n}: content mismatch for '${d(t,r)}'`):e.files[r]=a}};return i(e),i(t),A(r,n,(e,t,r)=>S(!1,`${n}: file '${e}' is bucketed under both '${t}' and '${r}' -- module bucketing changed between the artifacts (a workspace package without a version now owns its own bucket); regenerate the artifact (bundle=replace / lock=replace)`)),r}function j(e){return e.split(`/`).includes(`node_modules`)}function ze(e){let t=e.length;for(;(t=e.lastIndexOf(`node_modules/`,t-1))!==-1;)if(t===0||e[t-1]===`/`)return t;return-1}function Be(e){let t=ze(e);if(t===-1)return null;let n=t+13,r=e.slice(n).split(`/`),i=r[0].startsWith(`@`)?2:1;if(r.length<=i||r.slice(0,i).some(e=>!e))return null;let a=r.slice(0,i).join(`/`);return{dir:e.slice(0,n)+a,rel:r.slice(i).join(`/`),name:a}}var M=1,Ve=0,He=Le(`bundle`,`artifact (bundle=replace)`),Ue=e=>Be(e)??{dir:`.`,rel:e===`.`?``:e,name:null};function We(){throw Error(`bundle: file contents are not retained by this contents-free Bundle`)}var Ge=(e,{files:t,...n})=>{let r=Object.create(null);for(let[n,i]of Object.entries(t))typeof i!=`symbol`&&S(!1,`bundle: file '${d(e,n)}' is not a placeholder`),Object.defineProperty(r,n,{get:We,enumerable:!0});return{...n,files:Object.freeze(r)}},N=(e,t)=>{if(e===void 0&&t===void 0)return;let n=new Map;for(let r of[e,t])for(let[e,t]of Object.entries(r??{})){if(!Array.isArray(t))continue;let r=n.get(e);r===void 0&&n.set(e,r=new Set);for(let e of t)r.add(e)}return E([...n.keys()].toSorted().map(e=>[e,ge(n.get(e))]))},Ke=(e,t)=>Object.hasOwn(h,e)&&h[e](t),qe=(e,t)=>e?.github===void 0||!ee(e.github,t?.github)?void 0:E(Object.keys(h).filter(n=>e[n]!==void 0&&(n===`github`||e[n]===t[n])).map(t=>[t,e[t]])),Je=e=>{if(!T(e)||e.root!==!0||Object.hasOwn(e,`directory`))return e;let{root:t,...n}=e;return n},Ye={npm:v,composer:v,cargo:v},Xe=(e,t)=>E(Object.keys(Ye).map(n=>{let[r,i]=[e?.[n],t?.[n]];return[n,r?.name!==void 0&&r.name===i?.name?E(Object.entries(r).filter(([e,t])=>t===i[e])):void 0]})),P=class e{static VERSION=M;version=M;config;entries;modules;formats;imports;executable;reason;#e;get repo(){return this.#e}set repo(e){this.#e=_(e)}#t;get package(){return this.#t}set package(e){this.#t=g(e,Ye,`bundle package`)}constructor({config:e={scope:`full`},entries:t,modules:n,formats:r,imports:i,executable:a,reason:o,repo:s,package:c,version:l=M}={}){S([Ve,M].includes(l)),S([`node_modules`,`full`].includes(e.scope)),this.version=l,this.config=e,this.entries=t??new Set,this.modules=n??new Map,this.formats=r??new Map,this.imports=i??new Map,this.executable=a??new Set,this.reason=o,this.repo=_(s),this.package=c}get sources(){let e=new Map;for(let[t,{files:n}]of this.modules)for(let[r,i]of Object.entries(n))e.set(d(t,r),i);return e}static isResourceFormat(e){return e===`resource`||e===`resource:base64`||e===`directory`}get hasCode(){for(let[t,{files:n}]of this.modules)for(let r of Object.keys(n))if(!e.isResourceFormat(this.formats.get(d(t,r))))return!0;return!1}static parse(t){return e.fromJSON(JSON.parse(t))}static fileKeyAt(e){let[t,n,r,i]=e;if(typeof n==`string`){if(e.length===2&&t===`sources`){let e=Ue(n);return k(e.dir,e.rel,`bundle`)}if(e.length===4&&(t===`sources`||t===`modules`)&&r===`files`&&typeof i==`string`)return k(n,i,`bundle`)}}static fromJSON(t,{contents:n=!0}={}){S(t.version===M||t.version===Ve),S([`node_modules`,`full`].includes(t.config?.scope));let r=Te(t.formats),i=new Map,a=new Set;if(t.version===M){let e=t.config.scope===`full`;if(t.modules!==void 0){S(typeof t.modules==`object`&&t.modules!==null);for(let[e,n]of Object.entries(t.modules))S(j(e)),O(e,`bundle`),S(n?.name&&n.version&&n.files),i.set(e,ue(n,e,`bundle`))}if(e){S(t.sources&&typeof t.sources==`object`);for(let[e,n]of Object.entries(t.sources))S(!j(e)),O(e,`bundle`),S(n?.name&&n.files),i.set(e,ue(n,e,`bundle`));t.entries!==void 0&&(a=Se(t.entries,`bundle`))}else S(t.entries===void 0),S(t.sources===void 0)}else{S(t.sources);for(let[e,n]of Object.entries(t.sources)){O(e,`bundle`);let{dir:t,rel:r,name:a}=Ue(e);S(!D(t)&&!D(r)),i.has(t)||i.set(t,{name:a,version:null,files:Object.create(null)});let{files:o}=i.get(t);S(!Object.hasOwn(o,r),`bundle: duplicate file key '.' (v0 '' and '.')`),o[r]=n}}let o=A(i,`bundle`,He),s=Oe(t.imports);if(!n)for(let[e,t]of i)i.set(e,Ge(e,t));return new e({version:t.version,config:t.config,entries:a,modules:i,formats:r,imports:s,executable:t.version===M?me(t.executable,{what:`bundle`,files:o,formats:r,scope:t.config.scope}):new Set,reason:T(t.reason)?t.reason:void 0,repo:Je(t.repo),package:t.package})}serialize(){A(this.modules,`bundle`,He);let{modules:e,sources:t}=Ae(this.modules,{skipEmpty:!0,what:`bundle`}),n=this.config.scope===`full`,r={version:M,config:this.config};this.repo!==void 0&&(r.repo=this.repo),this.package!==void 0&&(r.package=this.package),n&&(r.entries=Ce(this.entries,`bundle`)),r.formats=Ee(this.formats),r.imports=ke(this.imports);let i=he(this.executable,{what:`bundle`,modules:this.modules,formats:this.formats,scope:this.config.scope});return i!==void 0&&(r.executable=i),this.reason!==void 0&&(r.reason=N(this.reason,void 0)),n&&(r.sources=t),r.modules=e,JSON.stringify(r,void 0,2)}withReason(t){let{version:n,config:r,entries:i,modules:a,formats:o,imports:s,executable:c,repo:l,package:u}=this,d=N(this.reason,{[t]:[...this.sources.keys()]});return new e({version:n,config:r,entries:i,modules:a,formats:o,imports:s,executable:c,reason:d,repo:l,package:u})}merge(t){return S(this.config.scope===t.config.scope,`bundle merge: scope mismatch ('${this.config.scope}' vs '${t.config.scope}')`),new e({config:{scope:this.config.scope},entries:new Set([...this.entries,...t.entries]),modules:Re(this.modules,t.modules,`bundle merge`),formats:Pe(this.formats,t.formats,`bundle merge`),imports:Ne(this.imports,t.imports,`bundle merge`),executable:Fe(this.executable,t.executable,t.modules,this.config.scope),reason:N(this.reason,t.reason),repo:qe(this.repo,t.repo),package:Xe(this.package,t.package)})}},Ze={__proto__:null,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jsx:`jsx`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsx:`tsx`,json:`json`,css:`css`,html:`markup`,htm:`markup`,xml:`markup`,svg:`markup`,yml:`yaml`,yaml:`yaml`,sh:`bash`,bash:`bash`,md:`markdown`,markdown:`markdown`,sol:`solidity`,php:`php`,phtml:`php`,rs:`rust`,rb:`ruby`,py:`python`,pyw:`python`,pyi:`python`,java:`java`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,"c++":`cpp`,hpp:`cpp`,hh:`cpp`,hxx:`cpp`,"h++":`cpp`,h:`cpp`,c:`c`,m:`objectivec`,mm:`objectivec`},Qe={__proto__:null,module:`javascript`,commonjs:`javascript`,"module-typescript":`typescript`,"commonjs-typescript":`typescript`,json:`json`,solidity:`solidity`,php:`php`,shell:`bash`,rust:`rust`,java:`java`,objc:`objectivec`,objcpp:`objectivec`,c:`c`,"c-header":`c`,cpp:`cpp`,"cpp-header":`cpp`,ruby:`ruby`,podspec:`ruby`,podfile:`ruby`,fastlane:`ruby`,"podfile-lock":`yaml`,xml:`markup`};function $e(e){if(typeof e!=`string`)return!1;let t=e.length-1,n=0;for(;n<t&&/\s/u.test(e[n]);)n++;for(;t>n&&/\s/u.test(e[t]);)t--;return n<t&&e[n]===`{`&&e[t]===`}`}function et(e,t,n){if(typeof t==`string`&&Qe[t])return Qe[t];if(typeof e!=`string`)return null;let r=e.slice(e.lastIndexOf(`/`)+1),i=r.lastIndexOf(`.`);if(i<=0)return null;let a=r.slice(i+1).toLowerCase();return a===`map`?$e(n)?`json`:null:Ze[a]??null}var tt=/^webpack(?:-internal)?:\/\/[^/]*\//u,nt=/^[a-z][\d+.a-z-]*:/iu,rt=/^file:/iu,it=/^(?:file|ftp|https?|wss?):/iu,at=/^(?:[a-z][\d+.a-z-]*:\/\/[^/]*\/?|\/\/[^/]+\/|[a-z]:\/|\/)?/iu,F=e=>at.exec(e)[0],I=e=>F(e).includes(`://`),L=e=>e.replace(I(e)?/[#?].*$/su:/\?.*$/su,``),ot=e=>e.slice(e.lastIndexOf(`/`)+1),R=(e,t)=>URL.parse(e,t)?.href??null;function z(e){let t=F(e),n=t.includes(`://`)&&R(e);if(n)return n;let r=[];for(let n of e.slice(t.length).split(`/`))n===``||n===`.`||(n===`..`?r.length>0&&r.at(-1)!==`..`?r.pop():t||r.push(`..`):r.push(n));let i=/^[a-z]:\/$/iu.test(t)?t.toUpperCase():t.startsWith(`//`)?t.toLowerCase():t;return i?i.replace(/\/?$/u,`/`)+r.join(`/`):r.join(`/`)||`.`}function st(e,t){let n=F(t);return I(e)&&!n.includes(`:`)?R(t,e)??z(`${e}/../${t}`):z(n===`/`?F(e).replace(/\/?$/u,``)+t:n?t:`${e}/../${t}`)}function ct(e){try{return decodeURIComponent(e)}catch{return e}}function B(e,t){let n=e.replaceAll(`\\`,`/`);if(tt.test(n))return z(n.replace(tt,``));let r=it.test(n)?R(n)??n:n,i=/^file:\/\/([^/#]*)([^#]*)/isu.exec(r);if(i){let[,e,t]=i;return z(ct(e&&e.toLowerCase()!==`localhost`?`//${e}${t}`:t).replace(/^\/(?=[a-z]:\/)/iu,``))}if(nt.test(r)&&!F(r).includes(`:`))return r;if(t===void 0)return z(r);if(rt.test(t)&&!F(r))return B(R(r,t)??r);let a=B(t);return F(r)&&!I(a)?z(r):st(a,r)}var lt=/^(?:@[\dA-Za-z~-][\w.~-]*\/)?[\dA-Za-z~-][\w.~-]*$/u;function V(e){let t=e.split(`/`).slice(0,e.startsWith(`@`)?2:1).join(`/`);return lt.test(t)?t:null}var ut=new Set([`.pnpm`,`.bun`,`.deno`]),dt=/^\d+\.\d+\.\d+(?:-[\d.a-z-]+)?(?:\+[\d.a-z-]+)?$/iu;function ft(e,t){let n=`${t.replace(`/`,`+`)}@`,r=e.startsWith(n)?e.slice(n.length).split(/[(_]/u)[0]:null;return dt.test(r)?r:null}function pt(e){let t=L(e).split(`/`),n=t.lastIndexOf(`node_modules`),r=n<0?null:V(t.slice(n+1).join(`/`));if(r===null)return null;let i=n+1+r.split(`/`).length;if(i>=t.length||t.slice(i).includes(``))return null;let a=t.slice(0,i).join(`/`);return{name:r,version:ut.has(t[n-2])?ft(t[n-1],r):null,root:a,path:e.slice(a.length+1)}}var mt=new Map([[`js`,`jsx`],[`mjs`,`jsx`],[`cjs`,`jsx`],[`jsx`,`jsx`],[`es`,`jsx`],[`es6`,`jsx`],[`ts`,`ts`],[`mts`,`ts`],[`cts`,`ts`],[`tsx`,`tsx`],[`json`,`json`]]);function ht(e){let t=ot(L(e));return/^[\w-]+$/u.test(t)?`jsx`:mt.get(/\.([\da-z]+)$/iu.exec(t)?.[1].toLowerCase())??null}var gt=[`.js`,`.mjs`,`.cjs`,`.jsx`,`.ts`,`.tsx`,`.mts`,`.cts`,`.json`],_t=[`.ios`,`.android`,`.web`];function vt(e){let t=e.map(e=>/\.[a-z]+(?=\.\w+$)/u.exec(ot(L(e.path??``)))?.[0]),[[n,r],[,i]]=_t.map(e=>[e,t.filter(t=>t===e).length]).toSorted((e,t)=>t[1]-e[1]);return[...r===i?[]:[n],`.native`,``,`.browser`,`.node`]}var yt=new Map([[`.js`,[`.ts`,`.tsx`]],[`.jsx`,[`.tsx`]],[`.mjs`,[`.mts`]],[`.cjs`,[`.cts`]]]),bt=[`index`,`main`,`browser`,`node`],xt=[``,`src/`,`lib/`,`dist/`,`build/`],St=new Set([`lib`,`dist`,`build`,`out`,`esm`,`cjs`]);function*Ct(e,t){yield e;let n=/\.[^./]+$/u.exec(e)?.[0];for(let t of yt.get(n)??[])yield e.slice(0,-n.length)+t;for(let n of e.endsWith(`/`)?[`${e}index`]:[e,`${e}/index`])for(let e of gt)for(let r of t)yield n+r+e;if(n)for(let r of t.filter(Boolean))yield e.slice(0,-n.length)+r+n}function*wt(e){let t=e;for(;;){t.startsWith(`src/`)||(yield`src/${t}`),t!==e&&(yield t);let n=t.indexOf(`/`);if(n<0||!St.has(t.slice(0,n)))return;t=t.slice(n+1)}}function Tt(e){let t=new Map,n=new Map,r=new Map;for(let i of e)i.path!==null&&t.set(i.path,i),i.package&&(n.set(i.package.name,(n.get(i.package.name)??new Set).add(i.package.root)),(r.get(i.package.root)??r.set(i.package.root,[]).get(i.package.root)).push(i));return{byPath:t,roots:n,byRoot:r,platforms:vt(e),found:new Map}}function H(e,t){if(!e.found.has(t)){let n=L(t),r=Ct(n,e.platforms).map(e=>e+t.slice(n.length));e.found.set(t,e.byPath.get(r.find(t=>e.byPath.has(t)))??null)}return e.found.get(t)}function Et(e,t,n){let r=e.roots.get(n);if(!r)return null;let i=t.path.split(`/`);for(let e=i.length-1;e>=0;e--){let t=[...i.slice(0,e),`node_modules`,n].join(`/`);if(r.has(t))return t}return r.size===1?[...r][0]:null}var Dt=new Set(`assert.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.domain.events.fs.http.http2.https.inspector.module.net.os.path.perf_hooks.process.punycode.querystring.readline.repl.stream.string_decoder.sys.timers.tls.trace_events.tty.url.util.v8.vm.wasi.worker_threads.zlib._http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert/strict.dns/promises.fs/promises.inspector/promises.path/posix.path/win32.readline/promises.stream/consumers.stream/promises.stream/web.timers/promises.util/types`.split(`.`));function Ot(e){if(e.startsWith(`node:`)||Dt.has(e))return{builtin:!0};let t=V(L(e));return t===null?{}:{package:t}}function kt(){let e=[],t=new Map,n=(n,r,i)=>{let a=t.get(n)??t.set(n,new Set).get(n);a.has(r)||(a.add(r),e.push(i))};return{edges:e,add:n,link:(e,t,r)=>{e&&t&&t!==e&&n(e,t,{from:e,to:t,kind:r})}}}function At(e,t){for(let n of bt)for(let r of xt){let i=H(e,`${t}/${r}${n}`);if(i)return i}let n=e.byRoot.get(t);return n?.length===1?n[0]:null}function jt(e,t,n,r){return/^\/[^?]/u.test(n)?H(e,t+n)??wt(n.slice(1)).map(n=>H(e,`${t}/${n}`)).find(Boolean):H(e,t+n)??r(e,t)}function Mt(e,t,n,r=At){let i=/^(?:\.{1,2}|[a-z]:)?\\/iu.test(n)?n.replaceAll(`\\`,`/`):n,a=it.test(i);if(a||/^(?:\.{1,2}(?:\/|$)|\/|[a-z]:\/)/iu.test(i)||I(i)){let n=a?B(i):st(t.path,i),r=H(e,n);return r?{to:r}:{to:null,path:n}}if(nt.test(i)&&e.byPath.has(i))return{to:e.byPath.get(i)};let o=V(L(n)),s=o===null?null:Et(e,t,o);if(s===null)return{to:null,...Ot(n)};let c=jt(e,s,n.slice(o.length),r);return c?{to:c}:{to:null,package:o}}var U=class extends Error{name=`SourceMapError`},Nt=new Uint8Array(128).fill(255);for(let[e,t]of[...`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/,;`].entries())Nt[t.codePointAt(0)]=e;function W(e){let t=new Int32Array(e.length*2);return t.set(e),t}function Pt(e){let{starts:t,columns:n,sources:r,names:i}=e;for(let e=0;e+1<t.length;e++){let[a,o]=[t[e],t[e+1]],s=a+1;for(;s<o&&n[s-1]<=n[s];)s++;if(s>=o)continue;let c=Array.from(n.subarray(a,o),(e,t)=>[e,r[a+t],i[a+t]]).sort((e,t)=>e[0]-t[0]);for(let[e,[t,o,s]]of c.entries())[n[a+e],r[a+e],i[a+e]]=[t,o,s]}return e}function Ft(e){let t=[0],n=new Int32Array(1024),r=new Int32Array(1024),i=new Int32Array(1024),a=0;for(let{mappings:o,files:s,line:c,column:l,names:u,nameCount:d}of e){if(typeof o!=`string`)throw new U(`mappings is not a string`);for(;t.length<=c;)t.push(a);let e=[0,0,0,0,0],f=0,p=0,m=1,h=l;for(let c=0;c<=o.length;c++){let l=c<o.length?Nt[o.codePointAt(c)]??255:64;if(l<32){if(p+=l*m,f===5)throw new U(`mappings: a segment of more than 5 fields at ${c}`);e[f++]+=p%2?(1-p)/2:p/2,p=0,m=1;continue}if(l<64){if(p+=(l-32)*m,m*=32,m>2**30)throw new U(`mappings: a value at ${c} runs past 32 bits`);continue}if(l===255)throw new U(`mappings: ${JSON.stringify(o[c])} at ${c} is not a base64 digit`);if(m!==1)throw new U(`mappings: the value before ${c} is cut off`);if(f>0){if(f===2||f===3)throw new U(`mappings: a segment of ${f} fields before ${c}`);let t=f===1?-1:s[e[1]];if(t===void 0)throw new U(`mappings: source ${e[1]} before ${c} is not in sources`);if(e[0]<0)throw new U(`mappings: a negative generated column before ${c}`);a===n.length&&([n,r,i]=[W(n),W(r),W(i)]),n[a]=e[0]+h,r[a]=t,i[a++]=f===5&&e[4]>=0&&e[4]<d?u+e[4]:-1,f=0}l===65&&(t.push(a),e[0]=0,h=0)}}return t.push(a),Pt({starts:Int32Array.from(t),columns:n.slice(0,a),sources:r.slice(0,a),names:i.slice(0,a)})}var It=new WeakMap,Lt=e=>It.get(e),G=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function K(e,t){if(!e)throw new U(t)}function Rt(e,t){if(e===void 0)return[];K(Array.isArray(e),`${t} is not an array`);for(let n of e)K(typeof n==`string`||n===null,`${t} holds ${JSON.stringify(n)}`);return e}function zt(e,t,n,r){let i=e.bySource.get(t);if(i!==void 0)return e.files[i].content??=n,e.files[i].ignored||=r,i;let a=t===null?null:B(t,e.mapPath);return e.files.push({source:t,path:a,package:a===null?null:pt(a),content:n,ignored:r}),t!==null&&e.bySource.set(t,e.files.length-1),e.files.length-1}function Bt(e,t,n,r){K(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),K(e.sourceRoot===void 0||typeof e.sourceRoot==`string`,`sourceRoot is not a string`);let i=Rt(e.sources,`sources`),a=Rt(e.sourcesContent,`sourcesContent`),o=e.ignoreList??e.x_google_ignoreList??[];K(Array.isArray(o)&&o.every(e=>Number.isInteger(e)&&e>=0&&e<i.length),`ignoreList is not a list of indices into sources`);let s=new Set(o),c=e.sourceRoot?e.sourceRoot.replace(/\/?$/u,`/`):``,l=i.map((e,n)=>zt(t,e===null?null:c+e,a[n]??null,s.has(n))),u=Array.isArray(e.names)?e.names:[];t.parts.push({mappings:e.mappings,files:l,line:n,column:r,names:t.names.length,nameCount:u.length}),t.names.push(...u)}function Vt(e,t){K(e.version===3,`version ${JSON.stringify(e.version)} is not 3`),K(Array.isArray(e.sections),`sections is not an array`);for(let[n,r]of e.sections.entries()){let{offset:i,map:a}=G(r)?r:{};K(G(i)&&[i.line,i.column].every(e=>Number.isInteger(e)&&e>=0),`sections[${n}].offset is not a line and a column`),K(G(a)&&a.sections===void 0,`sections[${n}].map is not a plain source map`);let o=e.sections[n-1]?.offset;K(!o||o.line<i.line||o.line===i.line&&o.column<=i.column,`sections[${n}] starts before sections[${n-1}]`),Bt(a,t,i.line,i.column)}}function Ht(e,t={}){if(!G(t))throw TypeError(`readSourceMap: options is not an object`);if(t.path!==void 0&&typeof t.path!=`string`)throw TypeError(`readSourceMap: options.path is not a string`);let n=e;if(typeof e==`string`||e instanceof Uint8Array)try{let t=typeof e==`string`?e:new TextDecoder(`utf-8`,{fatal:!0}).decode(e);n=JSON.parse(t.replace(/^\)\]\}'[^\n]*\n/u,``))}catch(e){throw new U(`not JSON: ${e.message}`,{cause:e})}K(G(n),`not a JSON object`);let r={files:[],bySource:new Map,mapPath:t.path,parts:[],names:[]};n.sections===void 0?Bt(n,r,0,0):Vt(n,r);let i={files:r.files};return It.set(i,{...Ft(r.parts),nameList:r.names}),i}var Ut=/\r\n?|[\n\u2028\u2029]/gu;function Wt(e){let t=[0];for(let n of e.matchAll(Ut))t.push(n.index+n[0].length);return t}function Gt(e,t,n,r){let[i,a]=[t,n];for(;i<a;){let t=i+a>>1;e[t]<=r?i=t+1:a=t}return i-1}function q(e,t){let n=Gt(e,0,e.length,t);return[n,t-e[n]]}function Kt(e,[t,n]){if(t>=e.starts.length-1)return-1;let r=e.starts[t],i=Gt(e.columns,r,e.starts[t+1],n);return i<r?-1:i}function qt(e,t,n,r){let i=Lt(e),a=q(t,n),[o,s]=q(t,r),c=new Map,l=Kt(i,a);for(let e=a[0];e<=o&&e<i.starts.length-1;e++){let t=e===a[0]&&l>=0?l:i.starts[e];for(let n=t;n<i.starts[e+1];n++){let t=i.sources[n];if(e===o&&i.columns[n]>=s)break;t>=0&&c.set(t,(c.get(t)??0)+1)}}let[u]=[...c].reduce((e,t)=>t[1]>e[1]?t:e,[-1,0]);return u<0?null:e.files[u]}var Jt=/\s+/uy,Yt=`
2
+ \r\u2028\u2029`,Xt=/[\n\r\u2028\u2029]/gu,Zt=/[\n\r\u2028\u2029]/u,J=/[\w$\u0080-￿]+/uy,Qt=new Set([`return`,`typeof`,`instanceof`,`in`,`of`,`new`,`delete`,`void`,`throw`,`case`,`default`,`extends`,`do`,`else`,`yield`,`await`]),$t=new Set([`if`,`while`,`for`,`with`]),en=new Set([`break`,`continue`,`debugger`]),tn=new Set([`(`,`[`,"${",`,`,`=`,`:`,`?`,`!`,`~`,`+`,`-`,`*`,`/`,`%`,`&`,`|`,`^`,`<`,`>`]);function nn(e,t){return e?.type===`word`?t&&[`return`,`yield`].includes(e.value)?!1:Qt.has(e.value)&&![`do`,`else`].includes(e.value):tn.has(e?.value)}function rn(e){let t=e.at(-1);return t?.type===`word`&&($t.has(t.value)||t.value===`await`&&e.at(-2)?.value===`for`)}function an(e){return e?e.type===`word`?Qt.has(e.value)||en.has(e.value)||e.label===!0:e.value===`)`?e.control:e.value===`}`?!e.object:e.type===`punctuator`&&![`++`,`--`,`]`].includes(e.value):!0}var on=(e,t)=>e.startsWith(`\r
3
+ `,t+1)?3:2,sn=/\\(?:u\{([\da-f]+)\}|u([\da-f]{4})|x([\da-f]{2})|([0-3][0-7]{0,2}|[4-7][0-7]?)|(\r\n|[\n\r\u2028\u2029])|(.))/giu,cn={b:`\b`,f:`\f`,n:`
4
+ `,r:`\r`,t:` `,v:`\v`};function ln(e){return e.includes(`\\`)?e.replace(sn,(e,t,n,r,i,a,o)=>{if(a!==void 0)return``;if(i!==void 0)return String.fromCodePoint(Number.parseInt(i,8));let s=Number.parseInt(t??n??r,16);return Number.isNaN(s)?cn[o]??o:String.fromCodePoint(Math.min(s,1114111))}):e}function un(e,t){let n=e[t],r=t+1;for(;r<e.length&&e[r]!==n&&!Yt.includes(e[r]);)r+=e[r]===`\\`?on(e,r):1;return[e[r]===n?ln(e.slice(t+1,r)):null,r+1]}function dn(e,t){let n=t+1,r=!1;for(;n<e.length&&!Yt.includes(e[n])&&(r||e[n]!==`/`);)e[n]===`\\`?n++:e[n]===`[`?r=!0:e[n]===`]`&&(r=!1),n++;return J.lastIndex=n+1,J.test(e)?J.lastIndex:n+1}function fn(e,t,n){for(let r=t;r<e.length;r++)if(e[r]===`\\`)r++;else{if(e[r]==="`")return r+1;if(e[r]===`$`&&e[r+1]===`{`)return n.push(`template`),r+2}return e.length}function pn(e){let t=[],n=[],r=[],i=0,a=0;for(;i<e.length;){let o=t.length;if(Jt.lastIndex=i,Jt.test(e)&&(i=Jt.lastIndex),i>=e.length)break;let s=e[i],c=e[i+1];if(J.lastIndex=i,s===`/`&&c===`/`)Xt.lastIndex=i+2,i=Xt.test(e)?Xt.lastIndex-1:e.length;else if(s===`/`&&c===`*`){let t=e.indexOf(`*/`,i+2);i=t<0?e.length:t+2}else if(s===`"`||s===`'`){let[n,r]=un(e,i);t.push({type:`string`,value:n}),i=r}else if(s==="`"||s===`}`&&n.at(-1)===`template`){s===`}`&&n.pop();let r=n.length,a=fn(e,i+1,n),o=s==="`"&&n.length===r&&e[a-1]==="`";t.push({type:`string`,value:o?ln(e.slice(i+1,a-1)):null}),n.length>r&&t.push({type:`punctuator`,value:"${"}),i=a}else if(s===`/`&&an(t.at(-1)))i=dn(e,i),t.push({type:`regex`});else if(J.test(e)){let n=en.has(t.at(-1)?.value)&&!Zt.test(e.slice(a,i));t.push({type:`word`,value:e.slice(i,J.lastIndex),...n&&{label:n}}),i=J.lastIndex}else{s===`{`&&n.push(nn(t.at(-1),Zt.test(e.slice(a,i)))?`object`:`block`);let o=s===`}`?n.pop():void 0;s===`(`&&r.push(rn(t));let l=(s===`+`||s===`-`)&&c===s||s===`=`&&c===`>`?s+c:s;t.push({type:`punctuator`,value:l,...s===`)`&&{control:r.pop()===!0},...s===`}`&&{object:o===`object`}}),i+=l.length}t.length>o&&(a=i)}return t}var mn=e=>e?.type===`string`&&e.value!==null,hn=new Set([`type`,`typeof`]),gn=(e,t)=>e[t+1]?.type===`word`&&(e[t+1].value!==`as`||e[t+2]?.type!==`word`||e[t+2].value===`as`);function _n(e,t){let n=!1;for(let r=t+1;r<e.length&&e[r].value!==`}`;r++)if(!(r>t+1&&e[r-1].value!==`,`)){if(!hn.has(e[r].value)||!gn(e,r))return!1;n=!0}return n}function vn(e,t){for(let n=t;n<e.length;n++){let{value:r}=e[n];if(r===`;`||n>t&&(r===`import`||r===`export`))return null;if(r===`from`&&mn(e[n+1]))return e[n+1].value}return null}function yn(e,t){let[n,r,i]=[e[t].value,e[t+1],e[t+2]],a=n===`import`?`import`:`export-from`;if(n===`import`&&mn(r))return{kind:a,specifier:r.value};if(hn.has(r?.value)&&![`,`,`from`].includes(i?.value)||r?.value===`{`&&_n(e,t+1)||n===`export`&&![`{`,`*`].includes(r?.value)||n===`import`&&r?.type!==`word`&&![`{`,`*`].includes(r?.value))return null;let o=vn(e,t+1);return o===null?null:{kind:a,specifier:o}}function bn(e,t){let[n,r]=[e[t+2],e[t+3]];if(n?.value!==`)`)return mn(n)&&[`)`,`,`].includes(r?.value)?n.value:null}function xn(e,t=new Set){let n=pn(e),r=[];for(let[e,i]of n.entries()){if(i.type!==`word`||[`.`,`#`,`function`].includes(n[e-1]?.value)||n[e-1]?.value===`=`&&n[e-3]?.value===`type`&&n[e-4]?.value===`import`)continue;let a=n[e+1]?.value===`(`,o=a?bn(n,e):void 0;if((i.value===`require`||t.has(i.value))&&o!==void 0)r.push({kind:`require`,specifier:o,...i.value!==`require`&&{callee:i.value}});else if(i.value===`import`&&a)o!==void 0&&r.push({kind:`dynamic-import`,specifier:o});else if(i.value===`import`||i.value===`export`){let t=yn(n,e);t&&r.push(t)}}return r}var Sn=/^[\w$]*__d\(/gmu,Cn=([e,t,n,...r])=>(typeof e==`number`||typeof e==`string`)&&(t===void 0||typeof t==`object`)&&(n===void 0||typeof n==`string`)&&r.length===0;function wn(e){let t=/\);?\s*$/u.exec(e)?.index,n=null,r=t===void 0?-1:e.lastIndexOf(`},`,t);for(;r>=0&&/[\d"]/u.test(e[r+2]);){let i;try{i=JSON.parse(`[${e.slice(r+2,t)}]`)}catch{break}if(!Cn(i))break;n=i,r=r>0?e.lastIndexOf(`},`,r-1):-1}return n}function Tn(e){let t=/^[^(]*\(\s*(?:function\s*[\w$]*\s*)?\(([^)]*)\)/u.exec(e)?.[1].split(`,`).slice(1,4).map(e=>e.trim().replaceAll(`$`,`\\$`));if(!t?.length)return[];let n=e.matchAll(RegExp(`(?<=[^\\w$.#]|\\.\\.\\.)(?:${t.join(`|`)})\\((\\d+|"(?:[^"\\\\]|\\\\.)*")[,)]`,`gu`));return[...new Set([...n].map(e=>JSON.parse(e[1])))]}function En(e,t){if(Array.isArray(e))return e;let n=Object.entries(e??{}).filter(([e])=>/^\d+$/u.test(e)).map(([,e])=>e);return n.length>0?n:Tn(t)}function Dn(e,t){let n=new Map(t.files.map((e,t)=>[e,t])),r=e.flatMap((e,t)=>e.file?[{k:t,at:n.get(e.file)}]:[]);for(let n=0;n<(r[0]?.k??0);n++)e[n].file=t.files[r[0].at-r[0].k+n]??null;for(let[n,{k:i,at:a}]of r.entries()){let o=r[n+1];if(!(o&&o.at-a!==o.k-i))for(let n=i+1;n<(o?.k??e.length);n++)e[n].file=t.files[a+n-i]??null}}function On(e,t){let n=[...e.matchAll(Sn)].map(e=>e.index);if(n.length===0)return null;let r=Wt(e),i=t=>e.slice(r[t],r[t+1]),a=[];for(let[o,s]of n.entries()){let[c]=q(r,s),[l]=q(r,(n[o+1]??e.length)-1),u=wn(i(l));for(;!u&&l>c;)u=wn(i(--l));if(!u)throw Error(`bundleEdges: the Metro module at line ${c+1} ends in no define params`);let d=r[l+1]??e.length;a.push({id:u[0],file:qt(t,r,s,d),dependencies:En(u[1],e.slice(s,d))})}Dn(a,t);let o=new Map(a.map(e=>[e.id,e])),{edges:s,link:c}=kt();for(let{file:e,dependencies:t}of a)for(let n of t)c(e,o.get(n)?.file,`dependency`);return s}var kn=e=>e.path!==null&&![`json`,null].includes(ht(e.path)),An=e=>e.path!==null&&ht(e.path)===null;function jn(e){let t=/^_([A-Za-z]+)\d+$/u.exec(e)?.[1];if(t)return[t,`interopRequireDefault`];let n=/^_(interopRequire(?:Default|Wildcard)|jsx(?:Dev)?Runtime|callSuper)$/u.exec(e)?.[1];return n===`callSuper`?[`getPrototypeOf`,`possibleConstructorReturn`,`interopRequireDefault`]:n?[n]:[]}var Mn={jsxRuntime:`react/jsx-runtime`,jsxDevRuntime:`react/jsx-dev-runtime`};function Nn(e){let{sources:t,names:n,nameList:r}=Lt(e),i=new Map,a=new Map,o=e.files.map(()=>new Set);for(let e=0;e<n.length;e++)n[e]<0||t[e]<0||(a.has(n[e])||a.set(n[e],jn(r[n[e]]).length>0),a.get(n[e])&&o[t[e]].add(r[n[e]]));for(let[t,n]of o.entries()){if(n.size===0)continue;let r=e.files[t],a=new Set(Array.from((r.content??``).matchAll(/(?:function|var|let|const)\s+(_[A-Za-z]+\d*)\b/gu),e=>e[1])),o=[...n].filter(e=>!a.has(e)&&!a.has(e.replace(/\d+$/u,``))).flatMap(jn);o.length>0&&i.set(r,o.map(e=>Mn[e]??`@babel/runtime/helpers/${e}`))}return i}function Pn(e,t){let n=new Map;for(let[r,i]of e){let e=n.get(r)??n.set(r,new Map).get(r);for(let n of i)e.set(n,Mt(t,r,n,()=>null))}let r=new Set([...n.values()].flatMap(e=>[...e.values()].map(e=>e.to))),i=(e,n)=>t.byRoot.get(n).find(e=>!r.has(e))??t.byRoot.get(n)[0];return(e,r)=>{let a=n.get(e)?.get(r);return a?.to?a:Mt(t,e,r,i)}}var Fn=e=>/(?:^|\/)__prelude__$/u.test(e.source??``),In=e=>e?.package?.name===`metro-runtime`&&e.package.path===`src/polyfills/require.js`;function Ln(e){if(!e.files.some(Fn)&&!In(e.files[0]))return null;if(!e.files.some(e=>e.content!==null&&!Fn(e)&&!In(e)))throw Error("bundleEdges: the Metro map carries no sourcesContent, which its edges are read from; pass the bundle as `code`");let t=Tt(e.files),n=e.files[e.files.findIndex(An)+1],r=e.files.find(e=>e.package?.name===`metro-runtime`&&e.package.path===`src/modules/asyncRequire.js`),i=new Map(e.files.filter(e=>e.content!==null&&kn(e)).map(e=>[e,xn(e.content)])),a=Nn(e),o=Pn([...[...i].map(([e,t])=>[e,t.flatMap(({specifier:e})=>e===null?[]:[e])]),...a],t),{edges:s,add:c,link:l}=kt();for(let t of e.files){An(t)&&l(t,n,`dependency`);for(let{kind:e,specifier:n}of i.get(t)??[]){let i=n===null?{to:null}:o(t,n);i.to!==t&&c(t,`${e}\0${JSON.stringify(n)}`,{from:t,kind:e,specifier:n,...i}),e===`dynamic-import`&&l(t,r,`dependency`)}for(let e of a.get(t)??[])l(t,o(t,e).to,`dependency`)}return s}var Rn=(e,t)=>t==null?Ln(e):On(t,e);function zn(e,t){let n=Rn(e,t);if(!n)throw Error(`bundleEdges: not a Metro ${t==null?`map`:`bundle`}; edges-lite.js reads only those, edges.js reads others`);return{edges:n}}function Bn(e){let t=JSON.parse(e.replace(/^\)\]\}'[^\n]*\n/u,``)),n=Ht(t),r=t.sections?t.sections.reduce((e,t)=>e+(t.map.names?.length??0),0):t.names?.length??null;return{json:{version:t.version,file:t.file,sourceRoot:t.sourceRoot},map:n,namesCount:r}}function Vn(e){if(e.map)return e.map.files.flatMap(e=>e.source===null?[]:[[e.source,e.content]]);let t=e.json?.sourcesContent??[];return(e.json?.sources??[]).map((e,n)=>[e,t[n]??null])}function Hn(e,t){let n=new Map;for(let{from:r,to:i,specifier:a}of t(e).edges){if(r.source===null||i?.source==null||i.source===r.source)continue;let e=typeof a==`string`?[r.source,i.source,a]:[r.source,i.source];n.set(e.join(`\0`),e)}return[...n.values()]}function Un(e){try{return zn(e)}catch{return{edges:[]}}}var Wn=Object.freeze([]);function Gn(e){return e?.edges?e.edges:e?.map?(e.edges=Hn(e.map,Un),e.edges):Wn}var Kn=new WeakMap,qn=new WeakMap;function Jn(e){let t=Gn(e);if(!Kn.has(t)){let e=new Map;for(let[n,r]of t)e.has(n)||e.set(n,new Set),e.get(n).add(r);Kn.set(t,e)}return Kn.get(t)}function Yn(e){let t=Gn(e);if(!qn.has(t)){let e=new Map;for(let[n,r,i]of t)i!==void 0&&(e.has(n)||e.set(n,new Map),e.get(n).set(i,r));qn.set(t,e)}return qn.get(t)}var Xn=new WeakMap,Zn=new WeakMap,Qn=new WeakMap,$n=new WeakMap,Y=new WeakMap,er=new WeakMap;function X(e){if(e?.metadataOnly)return new Map;let t=e?.bundle??e?.json;if(t&&Xn.has(t))return Xn.get(t);let n=new Map;if(!e)return n;if(e.kind===`stasis`){if(!e.bundle)return n;let t=e.bundle.formats;for(let[r,i]of e.bundle.sources)typeof i==`string`&&(P.isResourceFormat(t?.get(r))||n.set(r,i))}else if(e.kind===`sourcemap`)for(let[t,r]of Vn(e))typeof r==`string`&&n.set(t,r);return t&&Xn.set(t,n),n}function tr(e){let t=1;for(let n=e.indexOf(`
5
+ `);n!==-1;n=e.indexOf(`
6
+ `,n+1))t++;return t}var nr=new WeakMap;function rr(e){let t=nr.get(e);if(!t){let n=[...e.keys()].toSorted();t={paths:n,numbers:new Map(n.map((e,t)=>[e,t+1]))},nr.set(e,t)}return t}function ir(e,t){let n=Array.isArray(t)?t:[];return{integrity:e.integrity,kind:`sourcemap`,size:e.size,json:{version:3,sources:n.map(([e])=>e),sourcesContent:n.map(([,,e])=>typeof e==`string`?e:null)},fileSizes:new Map(n.map(([e,t])=>[e,t])),npmBinaries:new Map(n.filter(([,,e,t])=>typeof e!=`string`&&typeof t==`string`).map(([e,t,,n])=>[e,{size:t,digest:n}]))}}function ar(e){let t=e?.bundle??e?.json;if(t&&Zn.has(t))return Zn.get(t);let n=new Map(X(e));for(let[t,r]of e?.npmBinaries??[])n.set(t,{format:`digest`,...r});if(e?.kind===`stasis`&&e.bundle){let t=e.bundle.formats;for(let[r,i]of e.bundle.sources){if(typeof i!=`string`)continue;let e=t?.get(r);e===`resource`?n.set(r,i):e===`resource:base64`&&n.set(r,{format:`base64`,data:i})}}return t&&Zn.set(t,n),n}var or=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function sr(e){let t=e.endsWith(`=`);if(t?e.length%4!=0||e.at(-3)===`=`:e.length%4==1)return null;let n=t?e.slice(0,e.endsWith(`==`)?-2:-1):e;if(/[^A-Za-z0-9+/]/u.test(n))return null;let r=n.length%4;return r>1&&or.indexOf(n.at(-1))&(r===2?15:3)?null:Math.floor(n.length*3/4)}function cr(e){return typeof e==`string`?t(e):e?.format===`digest`?e.size:e?.format===`base64`?sr(e.data):null}function Z(e){if(e?.fileSizes)return e.fileSizes;let t=e?.bundle??e?.json;if(t&&Qn.has(t))return Qn.get(t);let n=new Map,r=ar(e),i=e?.kind===`stasis`?e.bundle?.sources.keys():e&&Vn(e).map(([e])=>e);for(let e of i??[])n.set(e,cr(r.get(e)));return t&&Qn.set(t,n),n}function lr(e){if(e?.metadataOnly)return e.unsizedFiles??new Set;let t=Z(e);if(er.has(t))return er.get(t);let n=new Set;for(let r of ar(e).keys())t.get(r)===null&&n.add(r);return er.set(t,n),n}function ur(e){let t=Z(e);if(Y.has(t))return Y.get(t);let n=lr(e),r=e?.kind===`stasis`?e.bundle?.formats:null,i=new Map;for(let[a,o]of t)o===null&&!n.has(a)||i.set(a,P.isResourceFormat(r?.get(a))||e?.npmBinaries?.has(a)?`resource`:`source`);return Y.set(t,i),i}function dr(e){let t=Z(e),n=e?.kind===`stasis`?e.bundle?.formats:null;if(!n||n.size===0)return t;if($n.has(t))return $n.get(t);let r=new Map;for(let[e,i]of t)P.isResourceFormat(n.get(e))||r.set(e,i);return $n.set(t,r),r}var fr=new WeakMap;function pr(e){if(e?.kind!==`stasis`||!e.bundle?.modules)return null;if(fr.has(e.bundle))return fr.get(e.bundle);let t=new Map;for(let[n,r]of e.bundle.modules)for(let e of Object.keys(r.files))t.set(n===`.`?e:`${n}/${e}`,n);return fr.set(e.bundle,t),t}function mr(e,t=null,n=(e,t)=>t.name){let r=new Map;if(e?.kind!==`stasis`||!e.bundle?.modules)return r;let i=t===null?null:pr(e),a=t===null?null:new Set([...t].map(e=>i?.get(e)));for(let[t,i]of e.bundle.modules){if(a&&!a.has(t)||!t.includes(`node_modules`)||!i?.name||typeof i.version!=`string`||!i.version)continue;let e=n(t,i),o=r.get(e);o||(o=new Set,r.set(e,o)),o.add(i.version)}return r}var hr=Object.freeze({javascript:`JavaScript`,jsx:`JSX`,typescript:`TypeScript`,tsx:`TSX`,json:`JSON`,css:`CSS`,markup:`HTML`,yaml:`YAML`,bash:`Shell`,markdown:`Markdown`,solidity:`Solidity`,php:`PHP`,rust:`Rust`,ruby:`Ruby`,java:`Java`,cpp:`C++`,c:`C`,objectivec:`Objective-C`,python:`Python`,go:`Go`,kotlin:`Kotlin`,swift:`Swift`,dart:`Dart`,sql:`SQL`,lua:`Lua`,csharp:`C#`,scala:`Scala`,vue:`Vue`,svelte:`Svelte`}),gr=Object.freeze({py:`python`,pyw:`python`,go:`go`,kt:`kotlin`,kts:`kotlin`,swift:`swift`,dart:`dart`,sql:`sql`,lua:`lua`,cs:`csharp`,scala:`scala`,sc:`scala`,vue:`vue`,svelte:`svelte`});function _r(e){let t=typeof e==`string`?e.slice(e.lastIndexOf(`/`)+1):``,n=t.lastIndexOf(`.`),r=n>0?t.slice(n+1).trim().toLowerCase():``,i=et(e)??gr[r];return i?{key:i,label:hr[i]??i}:r?{key:`extension:${r}`,label:`.${r}`}:{key:`other`,label:`Other`}}function vr(e,t){let n=new Map,r=0,i=0;for(let[a,o]of e){let e=_r(a),s=n.get(e.key)??{...e,files:0,lines:0,bytes:0};s.files++,s.lines+=o,s.bytes+=t.get(a)??0,n.set(e.key,s),i+=o,r+=t.get(a)??0}return{files:e.size,lines:i,bytes:r,languages:[...n.values()].toSorted((e,t)=>t.lines-e.lines||e.label.localeCompare(t.label))}}var yr=6,Q=new WeakMap,br=new Set([`terminal`,`code`,`search`,`compare`]);function xr(e,t=null){return!!t||br.has(e)}var Sr=/^sha512-[A-Za-z0-9+/]{86}==$/u;function Cr(t){if(t.fileHashes)return Promise.resolve(t.fileHashes);if(Q.has(t))return Q.get(t);let n=(async()=>{let n=[...X(t)],r=new Map;for(let t=0;t<n.length;t+=32){let i=await Promise.all(n.slice(t,t+32).map(async([t,n])=>[t,await e(n)]));for(let[e,t]of i)r.set(e,t)}return t.fileHashes=r,r})();return Q.set(t,n),n.catch(()=>Q.delete(t)),n}function wr(e){if(typeof e!=`string`)return 0;let t=/\S/gu,n=/[\r\n]/gu,r=0;for(;t.test(e)&&(r++,n.lastIndex=t.lastIndex,n.test(e));)t.lastIndex=n.lastIndex;return r}function Tr(e){return e.lineCounts??=new Map([...X(e)].map(([e,t])=>[e,wr(t)]))}function $(e){return e instanceof Map?Object.fromEntries([...e].map(([e,t])=>[e,$(t)])):e}async function Er(e){let n=await Cr(e),r=Z(e),i=Tr(e),a={version:yr,integrity:e.integrity,kind:e.kind,size:e.size,codeStats:vr(i,r),files:[...r].map(([e,t])=>[e,t,n.get(e)??null,i.get(e)??null])},o=lr(e);if(o.size>0&&(a.unsized=[...o]),e.kind===`sourcemap`){let{version:n,file:r,sourceRoot:i,names:o}=e.json,s=Vn(e);a.json={version:n,file:r,sourceRoot:i,sources:s.map(([e])=>e)},a.sourceSizes=s.map(([,e])=>typeof e==`string`?t(e):null),a.namesCount=e.namesCount??o?.length??null;let c=new Map(a.files.map(([e],t)=>[e,t]));a.edges=Gn(e).map(([e,t,...n])=>[c.get(e),c.get(t),...n])}else{let t=e.bundle,n={version:t.version,config:t.config,repo:t.repo,package:t.package,formats:$(t.formats),imports:$(t.imports),reason:t.reason,executable:[...t.executable]};if(t.version===0)n.sources=Object.fromEntries([...r.keys()].map(e=>[e,null]));else{let e={},r={};for(let[n,i]of t.modules){let t=n.split(`/`).includes(`node_modules`)?e:r;Object.defineProperty(t,n,{enumerable:!0,value:{name:i.name,version:i.version,ecosystem:i.ecosystem,repo:i.repo,files:Object.fromEntries(Object.keys(i.files).map(e=>[e,null]))}})}n.modules=e,t.config.scope===`full`&&(n.sources=r,n.entries=[...t.entries])}a.bundle=n}return a}function Dr(e,t){if(![1,2,3,4,5,yr].includes(e?.version)||e.integrity!==t||![`stasis`,`sourcemap`].includes(e.kind)||!Number.isSafeInteger(e.size)||e.size<0||!Array.isArray(e.files))throw Error(`Invalid bundle metadata`);let n=e.version!==yr,r=e.version===1,i=new Map,a=new Map,o=new Map;for(let t of e.files){if(!Array.isArray(t)||t.length!==4&&!(r&&t.length===3))throw Error(`Invalid bundle metadata file`);let[e,n,s,c]=t;if(typeof e!=`string`||a.has(e)||n!==null&&(!Number.isSafeInteger(n)||n<0)||s!==null&&(typeof s!=`string`||!Sr.test(s))||n===null&&s!==null||r&&n!==null&&s===null||c!=null&&(!Number.isSafeInteger(c)||c<0))throw Error(`Invalid bundle metadata file`);a.set(e,n),s!==null&&i.set(e,s),c!=null&&o.set(e,c)}let s=new Set(e.unsized??[]);if(e.unsized!==void 0&&(r||!Array.isArray(e.unsized)||s.size!==e.unsized.length)||[...s].some(e=>typeof e!=`string`||!a.has(e)||a.get(e)!==null))throw Error(`Invalid bundle metadata`);let c={integrity:t,kind:e.kind,size:e.size,metadataOnly:!0,fileSizes:a,fileHashes:i,lineCounts:o,unsizedFiles:s,stale:n};if(e.kind===`stasis`){c.bundle=P.fromJSON(e.bundle);let t=c.bundle.sources;if(t.size!==a.size||[...t.keys()].some(e=>!a.has(e)))throw Error(`Invalid bundle metadata inventory`);let n=c.bundle.formats;if(!r&&[...a].some(([e,t])=>i.has(e)!==(t!==null&&!P.isResourceFormat(n.get(e))))||[...s].some(e=>n.get(e)!==`resource:base64`))throw Error(`Invalid bundle metadata inventory`)}else{if(!e.json||typeof e.json!=`object`||![null,void 0].includes(e.namesCount)&&(!Number.isSafeInteger(e.namesCount)||e.namesCount<0))throw Error(`Invalid sourcemap metadata`);if(!Array.isArray(e.json.sources)||e.json.sources.some(e=>!a.has(e))||!Array.isArray(e.sourceSizes)||e.sourceSizes.length!==e.json.sources.length||e.sourceSizes.some(e=>e!==null&&(!Number.isSafeInteger(e)||e<0))||[...a].some(([e,t])=>i.has(e)!==(t!==null))||s.size>0)throw Error(`Invalid sourcemap inventory`);c.json=e.json,c.sourceSizes=e.sourceSizes,c.namesCount=e.namesCount,e.edges!==void 0&&(c.edges=Or(e.edges,e.files))}if(e.codeStats===void 0)c.codeStats=vr(o,a);else{let t=e.codeStats,n=e=>Number.isSafeInteger(e)&&e>=0;if(!t||![t.files,t.lines,t.bytes].every(n)||!Array.isArray(t.languages)||t.languages.some(e=>!e||typeof e.key!=`string`||typeof e.label!=`string`||![e.files,e.lines,e.bytes].every(n)))throw Error(`Invalid bundle code stats`);c.codeStats=t}return c}function Or(e,t){if(!Array.isArray(e))throw Error(`Invalid sourcemap edges`);return e.map(e=>{if(!Array.isArray(e)||![2,3].includes(e.length)||e[0]===e[1]||e.length===3&&typeof e[2]!=`string`||e.slice(0,2).some(e=>!Number.isSafeInteger(e)||e<0||e>=t.length))throw Error(`Invalid sourcemap edges`);return[t[e[0]][0],t[e[1]][0],...e.slice(2)]})}function kr(e,{integrity:t,kind:n,size:r}){if(n===`stasis`)return{integrity:t,kind:n,size:r,bundle:P.parse(e)};if(n!==`sourcemap`)throw Error(`Unsupported bundle format`);return{integrity:t,kind:n,size:r,...Bn(e)}}export{Ke as a,P as b,et as c,Jn as d,Yn as e,X as f,tr as g,rr as h,ir as i,ar as j,cr as k,Z as l,ur as m,dr as n,pr as o,mr as p,vr as q,xr as r,Cr as s,wr as t,Tr as u,Er as v,Dr as w,kr as x};
@@ -0,0 +1,10 @@
1
+ var e={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},t=e=>(...t)=>({_$litDirective$:e,values:t}),n=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};export{e as a,t as b,n as c};
2
+ /*! Bundled license information:
3
+
4
+ lit-html/directive.js:
5
+ (**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ *)
10
+ */
@@ -0,0 +1 @@
1
+ var e=new Set([`overview`,`graph`,`treemap`,`compare`,`advisories`,`issues`,`code`,`search`,`terminal`]),t=/^\d+$/u;function n(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(n<32||n===127)return!0}return!1}var r=512;function i(e){return typeof e==`string`&&e.length>0&&e.length<=r&&!n(e)}function a(e){return i(e)&&!t.test(e)}var o=/^(?=.{1,214}$)(?:@[\w.-]+\/[\w-]|[\dA-Za-z])[\w.-]*$/u,s=/^(?=.{1,256}$)[\dA-Za-z][\w.+-]*$/u,c=/^@[\da-z~-][\w.~-]*$/u;function l(e){return typeof e==`string`&&o.test(e)}function u(e){return typeof e==`string`&&s.test(e)}function d(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase(),n=t.startsWith(`@`)?t:`@${t}`;return n.length<=214&&c.test(n)?n:null}var f=new Set([`code`,`diff`]),p=e=>f.has(e)?`code`:`overview`,m=e=>f.has(e)?{compareMode:`code`}:{},h=e=>f.has(e)?`/code`:``,g=Object.freeze({manage:`/manage`,"manage-bundles":`/manage/bundle`,"manage-scans":`/manage/scans`,"manage-reports":`/manage/report`,"manage-repos":`/manage/repositories`,"manage-repo-risk":`/manage/repositories/risk`,"admin-users":`/manage/users`,"manage-teams":`/manage/team`,"manage-import":`/manage/import`,"manage-links":`/manage/links`,"manage-deduplication":`/manage/deduplication`,"manage-history":`/manage/history`}),_=new Set([`workspace-reports`,`workspace-bundles`,`workspace-repositories`,`workspace-dependencies`]),v=new Set([`pulls`,`versions`,`branch`,`reviews`]),y=e=>e.view===`workspace-dependencies`&&e.dependencyTab!=null?{dependencyTab:e.dependencyTab}:{};function b(e){if(!a(e)||e===`.`||e===`..`)return null;try{return`/finding/${encodeURIComponent(e)}`}catch{return null}}function x(t){if(!t)return null;if(t.view===`home`)return`/`;if(t.view===`reviews`)return`/my/reviews`;if(t.view===`profile`)return`/my/profile`;if(t.view===`npm`)return C(t);if(t.view===`repository-code`)return P(t);if(_.has(t.view)){let e=y(t).dependencyTab??`pulls`;return!/^[A-Za-z0-9_-]+$/u.test(t.teamSlug??``)||!v.has(e)?null:`/team/${t.teamSlug}/${t.view.slice(10)}${e===`pulls`?``:`/${e}`}`}if(t.view===`bundles`){if(!/^[A-Za-z0-9_-]+$/u.test(t.bundleSlug??``)||[t.teamSlug,t.compareSlug].some(e=>e!=null&&!/^[A-Za-z0-9_-]+$/u.test(e)))return null;let n=t.bundleTab??`overview`;if(!e.has(n))return null;let r=t.teamSlug?`/team/${t.teamSlug}`:`/manage`,i=n===`code`&&I(t.file)?`/${t.file}`:``,a=i&&I(t.line)?`#L${t.line}${I(t.endLine)&&t.endLine>t.line?`-L${t.endLine}`:``}`:``,o=n===`compare`&&t.compareSlug!=null?`/${t.compareSlug}${h(t.compareMode)}`:``;return`${r}/bundle/${t.bundleSlug}${n===`overview`?``:`/${n}`}${i}${o}${a}`}if(Object.hasOwn(g,t.view)){let e=g[t.view];return t.view===`manage-deduplication`&&t.linkId?`${e}?report=${encodeURIComponent(t.linkId)}`:t.view===`manage-bundles`&&Number.isSafeInteger(t.createRepoId)&&t.createRepoId>0?`${e}?createRepo=${t.createRepoId}`:t.view===`manage-scans`&&t.scanMode===`link`?`${e}?mode=link`:t.view===`manage-scans`&&t.bundleId?`${e}?bundle=${encodeURIComponent(t.bundleId)}${t.scanMode===`dependencies`?`&mode=dependencies`:``}`:t.view===`manage-history`&&t.actor?`${e}?actor=${encodeURIComponent(t.actor)}`:e}if(![`findings`,`files`].includes(t.view)||!t.teamSlug||[t.teamSlug,t.reportSlug].some(e=>e!=null&&!/^[A-Za-z0-9_-]+$/u.test(e)))return null;let n=`/team/${encodeURIComponent(t.teamSlug)}`,r=t.reportSlug?`/report/${encodeURIComponent(t.reportSlug)}`:``;if(t.finding){let e=b(t.finding.id);return t.view===`findings`&&e?`${n}${r}${e}`:null}return`${n}${r}${t.view===`files`?`/files`:``}`}var S=new Set([`overview`,`code`,`search`,`compare`,`review`,`treemap`]);function C(e){if(e.packageName==null)return`/npm`;let t=e.bundleTab??`overview`;if(!l(e.packageName)||e.packageSpec!=null&&!u(e.packageSpec)||!S.has(t)||e.compareSpec!=null&&!u(e.compareSpec))return null;if(t===`review`){if(e.reviewPackage!=null&&!l(e.reviewPackage)||e.reviewSpec!=null&&!u(e.reviewSpec))return null;let t=e.reviewPackage==null?``:`/${e.reviewPackage}${e.reviewSpec==null?``:`@${e.reviewSpec}`}`;return`/npm/${e.packageName}${e.packageSpec==null?``:`@${e.packageSpec}`}/review${t}`}let n=t===`code`&&I(e.file)?`/${e.file}`:``,r=n&&I(e.line)?`#L${e.line}${I(e.endLine)&&e.endLine>e.line?`-L${e.endLine}`:``}`:``,i=t===`compare`&&e.compareSpec!=null?`/${e.compareSpec}${h(e.compareMode)}`:``;return`/npm/${e.packageName}${e.packageSpec==null?``:`@${e.packageSpec}`}${t===`overview`?``:`/${t}`}${n}${i}${r}`}function w(e,t){let n=/^\/npm\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?\/review(?:\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?)?$/u.exec(e);if(n){if(!l(n[1])||n[2]!=null&&!u(n[2])||n[3]!=null&&!l(n[3])||n[4]!=null&&!u(n[4]))return null;let e=n[3]&&/^\d+\.\d+\.\d+(?:[-+].*)?$/u.test(n[3])&&n[4]==null;return{view:`npm`,packageName:n[1],packageSpec:n[2]??null,bundleTab:`review`,...n[3]?{reviewPackage:e?n[1]:n[3],reviewSpec:e?n[3]:n[4]??null}:{}}}let r=/^\/npm(?:\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(?:\/(code|search|compare|treemap)(?:\/([^/]+)(?:\/([a-z]+))?)?)?)?$/u.exec(e);if(!r)return;if(r[1]==null)return{view:`npm`};if(!l(r[1])||r[2]!=null&&!u(r[2]))return null;let i={view:`npm`,packageName:r[1],packageSpec:r[2]??null,bundleTab:r[3]??`overview`};if(r[4]==null)return i;if(i.bundleTab===`compare`)return u(r[4])&&(r[5]==null||f.has(r[5]))?{...i,compareSpec:r[4],...m(r[5])}:null;if(i.bundleTab!==`code`)return null;let a=Number(r[4]);return!r[5]&&/^[1-9]\d*$/u.test(r[4])&&Number.isSafeInteger(a)?{...i,file:a,...L(t)}:null}var T=new Set([`code`,`search`,`treemap`,`compare`,`commits`,`issues`,`pulls`,`agents`,`pulse`,`replay`]),E=new Set([`commits`,`issues`,`pulls`,`agents`,`pulse`,`replay`]),D=new Map([[`issues`,new Set([`closed`])],[`pulls`,new Set([`closed`])],[`pulse`,new Set([`week`,`quarter`,`year`])],[`replay`,new Set([`100`,`1000`])]]),O=/^[a-z][a-z\d-]{0,31}$/u,k=(e,t)=>e===`agents`?typeof t==`string`&&O.test(t)&&t!==`all`:D.get(e)?.has(t)===!0,A=/^[a-f\d]{40}$/u,j=500,M=e=>Number.isSafeInteger(e)&&e>0;function N(e){return typeof e==`string`&&(e===``||e.length<=j&&!/[\p{Cc}\\]/u.test(e)&&e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`&&e===e.trim()))}function P(e){let t=e.bundleTab??`code`,n=e.path??``;if(!M(e.repoId)||e.commit!=null&&!A.test(e.commit)||!N(n)||!T.has(t)||e.compareCommit!=null&&!A.test(e.compareCommit))return null;let r=n?`?path=${n.split(`/`).map(encodeURIComponent).join(`/`)}`:``;if(e.commit==null)return`/repo/${e.repoId}${r}`;let i=t===`code`&&I(e.file)?`/code/${e.file}`:t===`code`?``:`/${t}`,a=t===`compare`&&e.compareCommit!=null?`/${e.compareCommit}${h(e.compareMode)}`:``,o=k(t,e.subtab)?`/${e.subtab}`:``,s=t===`code`&&I(e.file)&&I(e.line)?`#L${e.line}${I(e.endLine)&&e.endLine>e.line?`-L${e.endLine}`:``}`:``;return`/repo/${e.repoId}/${e.commit}${i}${a}${o}${r}${s}`}function F(e){let t=/^\/(?:repo|manage\/code)\/([1-9]\d*)(?:\/([a-f\d]{40})(?:\/(code|search|treemap|compare|commits|history|issues|pulls|agents|pulse|replay)(?:\/([^/]+)(?:\/([a-z]+))?)?)?)?$/u.exec(e.pathname.replace(/\/$/u,``));if(!t)return;let n=Number(t[1]),r=e.searchParams.get(`path`)??``,i=t[3]===`history`?`commits`:t[3]??`code`;if(!M(n)||!N(r))return null;let a={view:`repository-code`,repoId:n,commit:t[2]??null,path:r,bundleTab:i};if(t[4]==null)return a;if(i===`compare`)return A.test(t[4])&&(t[5]==null||f.has(t[5]))?{...a,compareCommit:t[4],...m(t[5])}:null;if(E.has(i))return t[5]==null&&k(i,t[4])?{...a,subtab:t[4]}:null;let o=Number(t[4]);return i===`code`&&t[5]==null&&/^[1-9]\d*$/u.test(t[4])&&Number.isSafeInteger(o)?{...a,file:o,...L(e.hash)}:null}function I(e){return Number.isSafeInteger(e)&&e>0}function L(e){let t=/^#L([1-9]\d*)(?:-L([1-9]\d*))?$/u.exec(e),[n,r]=t?[Number(t[1]),Number(t[2]??t[1])]:[];return!I(n)||!I(r)?{}:n===r?{line:n}:{line:Math.min(n,r),endLine:Math.max(n,r)}}function R(t){let n=t.pathname.replace(/\/$/u,``)||`/`;if(n===`/`||n===`/index.html`)return{view:`home`};if(n===`/my/reviews`)return{view:`reviews`};if(n===`/my/profile`){let e=t.searchParams.get(`link-error`);return{view:`profile`,...e&&/^[a-z-]{1,64}$/u.test(e)?{linkError:e}:{}}}let i=Object.keys(g).find(e=>g[e]===n);if(i){let e=Number(t.searchParams.get(`createRepo`));return{view:i,...i===`manage-deduplication`&&t.searchParams.get(`report`)?{linkId:t.searchParams.get(`report`)}:{},...i===`manage-bundles`&&Number.isSafeInteger(e)&&e>0?{createRepoId:e}:{},...i===`manage-history`&&t.searchParams.get(`actor`)?{actor:t.searchParams.get(`actor`)}:{},...i===`manage-scans`?t.searchParams.get(`mode`)===`link`?{scanMode:`link`}:t.searchParams.get(`bundle`)?{bundleId:t.searchParams.get(`bundle`),...t.searchParams.get(`mode`)===`dependencies`?{scanMode:`dependencies`}:{}}:{}:{}}}let a=/^(?:\/team\/([A-Za-z0-9_-]+)|\/manage)\/bundle\/([A-Za-z0-9_-]+)(?:\/([a-z]+)(?:\/([A-Za-z0-9_-]+)(?:\/([a-z]+))?)?)?$/u.exec(n);if(a){let n=a[3]??`overview`;if(!e.has(n))return null;let r={view:`bundles`,teamSlug:a[1]??null,bundleSlug:a[2],bundleTab:n};if(a[4]==null)return r;if(n===`compare`)return a[5]==null||f.has(a[5])?{...r,compareSlug:a[4],...m(a[5])}:null;let i=Number(a[4]);return n!==`code`||a[5]||!/^[1-9]\d*$/u.test(a[4])||!Number.isSafeInteger(i)?null:{...r,file:i,...L(t.hash)}}let o=w(n,t.hash);if(o!==void 0)return o;let s=F(t);if(s!==void 0)return s;let c=/^\/team\/([A-Za-z0-9_-]+)\/(reports|bundles|repositories|dependencies)$/u.exec(n);if(c)return{view:`workspace-${c[2]}`,teamSlug:c[1]};let l=/^\/team\/([A-Za-z0-9_-]+)\/dependencies\/([a-z]+)$/u.exec(n);if(l)return v.has(l[2])?{view:`workspace-dependencies`,teamSlug:l[1],dependencyTab:l[2]}:null;let u=/^\/team\/([^/]+)(?:\/report\/([^/]+))?(?:\/(files)|\/finding\/([^/]+))?$/u.exec(n);if(!u)return null;try{let e=decodeURIComponent(u[1]),t=u[2]?decodeURIComponent(u[2]):null;if([e,t].some(e=>e!=null&&!/^[A-Za-z0-9_-]+$/u.test(e))||u[4]?.length>r*9)return null;let n=u[4]?decodeURIComponent(u[4]):null;return n!=null&&!b(n)?null:{view:u[3]?`files`:`findings`,teamSlug:e,reportSlug:t,...n==null?{}:{finding:{id:n}}}}catch{return null}}function z(e,t,n=[]){if(_.has(e.view)){let n=t.filter(t=>t.slug===e.teamSlug);return n.length===1?{view:e.view,teamId:n[0].id,...y(e)}:null}if(e.view===`bundles`){let{teamSlug:r,bundleSlug:i,compareSlug:a,compareMode:o,...s}=e,c=r==null?[]:t.filter(e=>e.slug===r);if(r!=null&&c.length!==1)return null;let l=c[0],u=r==null?n:t.flatMap(e=>e.bundles??[]),d=e=>new Set(u.filter(t=>t.slug===e).map(e=>e.id)),f=d(i),p=(l?.bundles??n).find(e=>e.slug===i);if(!i||!p||f.size!==1)return null;let h=a==null?null:d(a),g=h?.size===1?{compareId:[...h][0],...m(o)}:{};return{...s,teamId:l?.id??null,bundleId:p.id,...g}}if(![`findings`,`files`].includes(e.view))return e;let{teamSlug:r,reportSlug:i,...a}=e,o=t.filter(e=>e.slug===r);if(!r||o.length!==1)return null;let s=o[0];if(i==null)return{...a,teamId:s.id,reportId:null};let c=t.flatMap(e=>e.reports??[]).filter(e=>e.slug===i),l=new Set(c.map(e=>e.id)),u=(s.reports??[]).find(e=>e.slug===i);return u&&l.size===1?{...a,teamId:s.id,reportId:u.id}:null}function B(e,t,n=[]){if(_.has(e.view)){let n=t.find(t=>t.id===e.teamId),r={view:e.view,teamSlug:n?.slug,...y(e)};return n?.slug&&z(r,t)?r:null}if(e.view===`bundles`){let{teamId:r,bundleId:i,compareId:a,compareMode:o,...s}=e,c=t.find(e=>e.id===r);if(r!=null&&!c?.slug)return null;let l=(c?.bundles??n).find(e=>e.id===i);if(!l?.slug)return null;let u=a==null?null:(r==null?n:t.flatMap(e=>e.bundles??[])).find(e=>e.id===a),d={...s,teamSlug:c?.slug??null,bundleSlug:l.slug,...u?.slug?{compareSlug:u.slug,...m(o)}:{}},f=z(d,t,n);if(!f)return null;if(d.compareSlug!=null&&f.compareId!==a){let{compareSlug:e,compareMode:t,...n}=d;return n}return d}if(![`findings`,`files`].includes(e.view))return e;let{teamId:r,reportId:i,...a}=e,o=t.find(e=>e.id===r),s=i==null?null:o?.reports?.find(e=>e.id===i);if(!o?.slug||i!=null&&!s?.slug)return null;let c={...a,teamSlug:o.slug,reportSlug:s?.slug??null};return z(c,t)?c:null}export{e as a,r as b,a as c,l as d,u as e,d as f,p as g,m as h,g as i,v as j,x as k,S as l,T as m,E as n,k as o,R as p,z as q,B as r};
@@ -0,0 +1 @@
1
+ import{b as e}from"./chunk-NRPC74AM.js";import{a as t,d as n,f as r,h as i}from"./chunk-7C7DWL7I.js";import{d as a}from"./chunk-PNHBZGDD.js";import{a as o,b as s}from"./chunk-75YLHBCM.js";import{c}from"./chunk-FC65TPUB.js";import{C as l,D as u,G as d,J as f,K as p,L as m,O as h,q as g}from"./chunk-SXV2T5C4.js";import{a as _}from"./chunk-TUII34K2.js";function v(e,t){let n=s([{groups:[e],tree:t.tree,treeDependencies:t.treeDependencies}]);for(let r of e)l(r,t),r.isApp??=g(r,r.source??t.source),r._depsDirectory=n}function y(e,t){return!(e.isApp??g(e,e._source??e.source))&&o(e.file,e._depsDirectory??t??s([{groups:[[e]]}]))}function ee(e,n,r){let i=t(n);return i===`ignored`&&y(e,r)?void 0:i}function b(e,n,a,o){let s=n.id??String(n._id),c=n._reportName??``;y(n,o)&&(a===`ignored`||a===`untriaged`)?(t(e.get(s))!==`ignored`&&r(e,s,{triage:void 0}),i(e,s,c,a===`ignored`,!0)):(r(e,s,{triage:a===`untriaged`?void 0:a}),a!==`ignored`&&a!==`untriaged`&&i(e,s,c,!1))}function x(e,a){let o=new Set;for(let t of e.values()){let e=t?.ignoredReports;if(!e?.length)continue;let r=new Set(e).size!==e.length;for(let i of e)(r||!n(t,i))&&o.add(i)}if(o.size===0)return!1;let c=!1;for(let l of a){let a=(l.groups??[]).flat();if(!a.some(e=>o.has(e._reportName??l.name??l.fileName??``)))continue;let u=s([l]),d=e=>({...e,_source:e._source??e.source??l.source}),f=new Set(a.filter(e=>y(d(e),u)).map(e=>e.id??String(e._id)));for(let o of a){let a=o.id??String(o._id),s=o._reportName??l.name??l.fileName??``,p=e.get(a);p?.ignoredReports?.includes(s)&&(n(p,s)||y(d(o),u)||(t(p)||(c=r(e,a,{triage:`ignored`})||c),f.has(a)||(c=i(e,a,s,!1)||c)))}for(let t of a){if(!y(d(t),u))continue;let n=t.id??String(t._id),r=t._reportName??l.name??l.fileName??``;e.get(n)?.ignoredReports?.includes(r)&&(c=i(e,n,r,!0,!0)||c)}}return c}async function S(e,t){let r=new Set(Object.values(e??{}).flatMap(e=>Array.isArray(e?.ignoredReports)?e.ignoredReports.filter(t=>typeof t==`string`&&!n(e,t)):[])),i=[];for(let e of r){let n;try{let r=await t(e);if(typeof r!=`string`)continue;n=await h(r)}catch{continue}n&&i.push({...n.data,name:e,groups:[n.findings]})}return i}async function C(e,t){if(e!=null&&(typeof e!=`object`||Array.isArray(e)))return{entries:e,changed:!1};let n=new Map(Object.entries(e??{})),r=x(n,await S(e,t));return{entries:Object.fromEntries(n),changed:r}}var w=`links`;function T(e){if(typeof e==`string`)return e.length>0?e:null;if(!e||typeof e!=`object`||Array.isArray(e))return null;let{id:t}=e;return typeof t==`string`&&t.length>0?t:null}function E(e){if(typeof e==`string`&&!/^\s*\[/u.test(e))return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Array.isArray(t)||t.length===0)return null;let n=[],r=0;for(let e of t){if(!Array.isArray(e))return null;let t=new Set;for(let n of e){let e=T(n);if(e===null)return null;c(e)?t.add(e):r++}t.size>1&&n.push([...t])}return{groups:n,skipped:r}}function D(e){let t=new Set;for(let n of e)for(let e of n)t.add(e);return t.size}function te(e,t){for(let n of e)for(let e of n){let r=t.get(e);r||t.set(e,r=new Set);for(let t of n)t!==e&&r.add(t)}return t}var O=1,k=16,A=12,j=1+k+A+16,M=1+k+A;async function N(e,t){let n=await crypto.subtle.importKey(`raw`,_(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,salt:t,iterations:3e6},n,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}function P(e){return!(e instanceof Uint8Array)||e.length<j?!1:e[0]===O}async function F(e,t){if(!(e instanceof Uint8Array))throw TypeError(`encryptWithPassword: plaintext Uint8Array required`);if(typeof t!=`string`||!t)throw TypeError(`encryptWithPassword: password required`);let n=new Uint8Array(M+e.length+16);n[0]=O,crypto.getRandomValues(n.subarray(1,1+k)),crypto.getRandomValues(n.subarray(1+k,M));let r=n.subarray(1,1+k),i=n.subarray(1+k,M),a=await N(t,r),o=new Uint8Array(await crypto.subtle.encrypt({name:`AES-GCM`,iv:i,additionalData:n.subarray(0,M)},a,e));return n.set(o,M),n}async function ne(e,t){if(typeof t!=`string`||!t)throw TypeError(`tryDecryptWithPassword: password required`);if(!(e instanceof Uint8Array)||e.length<j||e[0]!==O)return{ok:!1,reason:`malformed`};let n=e.subarray(1,1+k),r=e.subarray(1+k,M),i=e.subarray(M),a=await N(t,n),o;try{o=new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:e.subarray(0,M)},a,i))}catch{return{ok:!1,reason:`wrong-password`}}return{ok:!0,plaintext:o}}async function I(e,t,n){if(!n||typeof n.malformedMsg!=`string`||typeof n.wrongPasswordMsg!=`string`)throw TypeError(`decryptWithPasswordOrThrow: { malformedMsg, wrongPasswordMsg } strings required`);let r=await ne(e,t);if(r.ok)return r.plaintext;throw r.reason===`wrong-password`?Error(n.wrongPasswordMsg):Error(n.malformedMsg)}var L=P,R=F;function z(e,t){return I(e,t,{malformedMsg:`malformed encrypted bundle`,wrongPasswordMsg:`wrong password or corrupt bundle`})}var B=1,V=1024,H=1024,U=200,W=104857600,G=Math.ceil(W*4/3)+16,K=512,q=64;function J(e){if(!e||typeof e!=`object`)return`payload is not an object`;if(e.version!==B)return`unsupported export version: ${e.version}`;if(!e.workspace||typeof e.workspace!=`object`)return`workspace metadata missing`;if(typeof e.workspace.id!=`string`)return`workspace.id must be a string`;if(typeof e.workspace.name!=`string`)return`workspace.name must be a string`;if(typeof e.workspace.privateKey!=`string`)return`workspace.privateKey must be a string`;if(e.workspace.createdAt!==void 0&&!Number.isFinite(e.workspace.createdAt))return`workspace.createdAt must be a finite number or omitted`;if(!Array.isArray(e.reports))return`reports field must be an array`;if(e.reports.length>H)return`reports count (${e.reports.length}) exceeds cap (${H})`;if(e.bundles!==void 0){if(!Array.isArray(e.bundles))return`bundles field must be an array when present`;if(e.bundles.length>V)return`bundles count (${e.bundles.length}) exceeds cap (${V})`;for(let t of e.bundles){if(typeof t!=`string`)return`bundles entries must be strings`;if(t.length>U)return`bundle integrity exceeds per-entry length cap (${U})`}}if(e.bundleBlobs!==void 0){if(!Array.isArray(e.bundleBlobs))return`bundleBlobs field must be an array when present`;if(e.bundleBlobs.length>q)return`bundleBlobs count (${e.bundleBlobs.length}) exceeds cap (${q})`;for(let t of e.bundleBlobs){if(!t||typeof t!=`object`||Array.isArray(t))return`bundleBlobs entries must be objects`;if(typeof t.integrity!=`string`||t.integrity.length===0)return`bundleBlobs.integrity must be a non-empty string`;if(t.integrity.length>U)return`bundleBlobs.integrity exceeds per-entry length cap (${U})`;if(typeof t.name!=`string`||t.name.length===0)return`bundleBlobs.name must be a non-empty string`;if(t.name.length>K)return`bundleBlobs.name exceeds per-entry length cap (${K})`;if(t.name.includes(`\0`))return`bundleBlobs.name cannot contain NUL`;if(typeof t.data!=`string`)return`bundleBlobs.data must be a base64 string`;if(t.data.length>G)return`bundleBlobs.data exceeds per-blob size cap (${W} bytes raw)`}}return null}async function Y(e){return new Uint8Array(await e.arrayBuffer())}async function X(e,t){if(L(e)){if(typeof t!=`string`||!t)throw TypeError(`parseWorkspaceBundleBytes: password required for encrypted bundle`);let n=await z(e,t);try{return Z(await a(n))}catch(e){throw Error(`wrong password or corrupt bundle`,{cause:e})}}let n;try{n=await a(e)}catch(e){throw Error(`gzip decompression failed: ${e.message}`,{cause:e})}return Z(n)}function Z(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`payload is not JSON: ${e.message}`,{cause:e})}let n=J(t);if(n===null)return t;let r=n.includes(`exceeds cap`);throw Error(r?n:`not a deepview workspace export: ${n}`)}function Q(e,t){let n=e.trimStart().startsWith(`[`)?E(e):null;if(n)return{data:{source:`links`,findings:[],links:n.groups},format:`links`,reason:null};let r=m(e);if(r.data!=null||p(e,t)!==`codex`)return r;try{return{data:{type:`security`,source:`codex-security`,findings:d(e).flatMap(e=>e.data.findings)},format:`codex`,reason:null}}catch(e){return{data:null,format:null,reason:e instanceof Error?e.message:`Invalid Codex CSV`}}}function re(e,t){let n=Q(e,t);return n.data==null?Promise.resolve(null):h(JSON.stringify(n.data))}function ie(e){let t=new Set;for(let n of e){if(!n||typeof n!=`object`)continue;let e=n;typeof e.file==`string`&&e.file&&t.add(e.file);for(let n of Array.isArray(e.evidence)?e.evidence:[])typeof n?.file==`string`&&n.file&&t.add(n.file)}return t}function $(e){let t=(f(e)??[]).flat().filter(e=>typeof e==`object`&&!!e),n=s([{groups:[t],tree:e?.tree}]);return{directory:n,own:t.filter(e=>!o(e.file,n))}}function ae(e){let t=new Map;for(let n of $(e).own){let e=u(n);e&&t.set(e.toLowerCase(),e)}return t.size===1?[...t.values()][0]:null}function oe(t){let{directory:n,own:r}=$(t);return e([...ie(r)].filter(e=>!o(e,n)))}var se=[`inprogress`,`fixed`,`invalid`,`deleted`,`ignored`];function ce(e){return typeof e==`string`&&se.includes(e)}function le(e){if(e===null)return null;if(typeof e!=`object`||Array.isArray(e))return`invalid`;let t=e,n={},r=t.color;if(r!=null){if(typeof r!=`string`||r.length>50)return`invalid`;r!==``&&(n.color=r)}let i=t.triage;if(i!=null){if(!ce(i))return`invalid`;n.triage=i}for(let e of[`comment`,`fix`]){let r=t[e];if(r!=null){if(typeof r!=`string`||r.length>1e4)return`invalid`;r!==``&&(n[e]=r)}}let a=t.flagged;if(a!=null){if(typeof a!=`boolean`)return`invalid`;n.flagged=a}return n}export{v as a,y as b,ee as c,b as d,x as e,S as f,C as g,w as h,E as i,D as j,te as k,F as l,I as m,L as n,R as o,H as p,Y as q,X as r,Z as s,Q as t,re as u,ae as v,oe as w,le as x};
@@ -0,0 +1,2 @@
1
+ import{d as e,i as t,r as n,s as r,u as i}from"./chunk-WFYLMF6Z.js";import{c as a,g as o}from"./chunk-2XUEZHIP.js";var s=[[`manage`,`Overview`],[`manage-bundles`,`Bundles`],[`manage-scans`,`Scans`],[`manage-reports`,`Reports`],[`manage-deduplication`,`Deduplication`,`admin`],[`manage-repos`,`Repositories`,`admin`],[`admin-users`,`Users`,`admin`],[`manage-teams`,`Teams`,`admin`],[`manage-import`,`Import`,`admin`],[`manage-links`,`Links`],[`manage-history`,`History`]];function c(e,t,n=!1){return a`<header class="manage-header"><nav class="manage-nav" aria-label="Management pages">${s.filter(([e,,r])=>(r==null||r===t)&&(e!==`manage-links`||n)).map(([t,n])=>a`<button type="button" aria-current="${e===t?`page`:o}" @click="${()=>{document.dispatchEvent(new CustomEvent(`managed-admin-navigate`,{detail:{view:t},bubbles:!0,composed:!0}))}}">${n}</button>`)}</nav></header>`}function l(s){if(s===`bundle`)return e(t);if(s===`report`||s===`preview`)return e(r);if(s===`scan`)return e(n);if(s===`code`)return e(i);let c={users:`M10.75 4.75a2.75 2.75 0 1 1-5.5 0 2.75 2.75 0 0 1 5.5 0ZM3 14v-1.5A3.5 3.5 0 0 1 6.5 9h3a3.5 3.5 0 0 1 3.5 3.5V14`,team:`M8.5 5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM1.5 14v-1.5A3.5 3.5 0 0 1 5 9h2a3.5 3.5 0 0 1 3.5 3.5V14M11 2.75a2.5 2.5 0 0 1 0 4.5m1 2a3 3 0 0 1 2.5 3V14`,repo:`M3 12.5V3a1.5 1.5 0 0 1 1.5-1.5H13v13H4.5a1.5 1.5 0 0 1 0-3H13M7 1.5v6l2-1.5 2 1.5v-6`,history:`M2 5a6.25 6.25 0 1 1-.25 5M1.5 1.5V5H5M8 4.5V8l3 1.5`,arrow:`M3 8h10M9 4l4 4-4 4`,show:`M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Zm9 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0`,hide:`m2 2 12 12M6 3.75A8 8 0 0 1 8 3.5c4.5 0 7 4.5 7 4.5a12 12 0 0 1-2 2.5M3.5 5A13 13 0 0 0 1 8s2.5 4.5 7 4.5a8 8 0 0 0 3-.6`,download:`M8 2v8M5 7l3 3 3-3M2 11v3h12v-3`,upload:`M8 11V2m-3 3 3-3 3 3M2 10v4h12v-4`};return a`<svg class="${s===`repo`?`repo-icon`:o}" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${c[s]??c.repo}"></path></svg>`}var u=`:host{display:flex;flex-direction:column;position:relative;padding:0 clamp(1rem,3vw,3rem) 3rem;color:var(--text);container-type:inline-size;font-family:var(--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);font-size:.875rem;line-height:1.5;--panel:color-mix(in srgb, var(--bg) 50%, var(--surface));--panel-hover:color-mix(in srgb, var(--text) 3%, var(--panel))}*,*:before,*:after{box-sizing:border-box}button,summary,select,label,legend,h1,h2,h3,.section-heading,.ui-hint,.page-intro>.intro,.count,.result-count,.repository-count,.breadcrumb-separator,.list-head,.report-list-head,.history-head,.bundle-group-head,.drop-copy,.local-import-copy,.location-field>span,.empty:not(.error,[role=alert]),.msg:not(.error,[role=alert]),.local-import-message:not(.error,[role=status]),.data-empty,.revision-empty{cursor:default;user-select:none;-webkit-user-select:none}input:not([type=checkbox],[type=radio]),textarea,[contenteditable],pre,code,.mono{cursor:text;user-select:text;-webkit-user-select:text}.wrap{width:100%;max-width:76rem;margin:0 auto;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:none;scrollbar-gutter:stable}.manage-header{position:sticky;top:0;z-index:2}.wrap:has(>.manage-list){display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto}.wrap:has(>.manage-list)>:not(.manage-list){flex:none}.manage-list{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.manage-list.has-intro{margin-top:calc(-.45rem - 1px);padding-top:calc(.45rem + 1px)}.manage-nav button{flex:0 0 auto;position:relative;min-height:3.7rem;padding:.9rem 0;border:0;border-radius:0;color:var(--muted);background:none;font-size:.8rem;font-weight:500;white-space:nowrap}.manage-nav button:hover,.manage-nav button[aria-current=page]{color:var(--text)}.manage-nav button[aria-current=page]:after{content:"";position:absolute;bottom:.6rem;inset-inline:0;height:2px;background:var(--accent);border-radius:var(--ui-radius, 2px)}.manage-nav button:focus-visible{outline-offset:-3px}.head{display:flex;align-items:center;flex-wrap:wrap;gap:.7rem;margin:0 0 .5rem}h1,.head h1{margin:0;font-size:1.9rem;font-weight:600;letter-spacing:-.045em;line-height:1.2}.count{display:inline-flex;align-items:center;justify-content:center;min-width:1.6rem;padding:.12rem .5rem;border:1px solid var(--border);border-radius:6px;color:var(--muted);background:var(--surface);font-size:.73rem;font-weight:500;font-variant-numeric:tabular-nums}button,input,select{font:inherit}button,select,input[type=checkbox]{cursor:default}button,a,input,select{-webkit-app-region:no-drag}button,a{transition:background .15s,color .15s,border-color .15s}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:disabled,select:disabled{opacity:.45}input:not([type=checkbox]),select{min-width:0;min-height:2.25rem;padding:.45rem .65rem;border:1px solid var(--border);border-radius:var(--ui-radius, 7px);background:var(--bg);color:var(--text);font-size:.8rem}input::placeholder{color:var(--muted)}input[type=checkbox]{accent-color:var(--accent)}.btn,.drop-browse{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:2.25rem;height:auto;padding:.45rem .8rem;border:1px solid var(--border);border-radius:var(--ui-radius, 7px);background:var(--surface);color:var(--text);font-size:.8rem;font-weight:500;text-decoration:none;white-space:nowrap}.btn:hover:not(:disabled),.drop-browse:hover:not(:disabled){background:var(--surface-active);border-color:var(--muted)}.btn.primary,.drop-browse{color:var(--bg);background:var(--accent);border-color:var(--accent)}.btn.primary:hover:not(:disabled),.drop-browse:hover:not(:disabled){background:var(--accent);filter:brightness(1.08)}.btn svg,.icon-btn svg{width:1rem;height:1rem}.icon-btn{width:2rem;height:2rem}.avatar{color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--bg));border:1px solid color-mix(in srgb,var(--accent) 16%,var(--border))}.breadcrumb{display:flex;align-items:center;flex-basis:100%;gap:.4rem;margin-bottom:.8rem}.breadcrumb-manage{padding:.1rem 0;border:0;background:transparent;color:var(--muted);font-size:.78rem}.breadcrumb-manage:hover{color:var(--text)}.breadcrumb-separator{color:var(--muted)}.msg{margin:1rem 0;padding:1.1rem 1.25rem;border:1px solid var(--border);border-radius:var(--ui-radius, 9px);color:var(--muted);font-size:.85rem}.msg.error{color:var(--critical);border-color:color-mix(in srgb,var(--critical) 35%,var(--border))}.empty{padding:3.5rem 1.5rem;border:1px dashed var(--border);border-radius:var(--ui-radius, 10px);color:var(--muted);text-align:center}.empty strong{display:block;margin-bottom:.4rem;color:var(--text);font-size:.95rem;font-weight:500}.empty p{margin:0;font-size:.85rem}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@container (max-width: 35rem){.drop-copy>span{display:none}.manage-nav{gap:1.2rem;margin-bottom:1.75rem}.manage-nav button{min-height:3.25rem}h1,.head h1{font-size:1.65rem}.intro{margin-bottom:1.5rem}}@media(prefers-reduced-motion:reduce){button,a{transition:none}}.collection-toolbar input{flex:1;max-width:26rem;min-width:10rem}.collection-toolbar select{min-width:10rem}.result-count{text-align:right;white-space:nowrap;margin-left:auto;color:var(--muted);font-size:.75rem;font-variant-numeric:tabular-nums}@container (max-width: 35rem){.collection-toolbar input{flex-basis:100%;max-width:none}}.manage-nav{display:flex;gap:1.35rem;align-items:stretch;overflow-x:auto;scrollbar-width:thin;border-bottom:1px solid var(--border);margin-bottom:1.5rem;padding:0 .1rem}.wrap>:not(.manage-header),.manage-nav{-webkit-app-region:no-drag;app-region:no-drag}@media(display-mode:window-controls-overlay){.manage-header{display:flow-root}.manage-header:before{content:"";float:right;width:var(--wco-right-toolbar, 0px);height:var(--wco-titlebar-height)}.manage-nav{width:max-content;max-width:100%;border-bottom:0}.manage-nav button{min-height:var(--wco-titlebar-height);padding-block:.35rem}.manage-nav button[aria-current=page]:after{bottom:0}}.intro{margin:0 0 1.25rem;max-width:46rem;color:var(--muted);font-size:.875rem;line-height:1.65}.collection-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-bottom:.85rem}.page-intro{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem 1rem;margin-bottom:1.25rem}.page-intro .intro{margin:0}.page-intro>.btn{margin-block:calc(-.45rem - 1px)}a{cursor:default}.loading-rows{border:1px solid var(--border);border-radius:var(--ui-radius, 10px);overflow:hidden}.loading-row{display:grid;align-content:center;gap:.6rem;min-height:4.25rem;padding:.85rem 1rem}.loading-row+.loading-row{border-top:1px solid var(--border)}.loading-row span{width:40%;height:.65rem;border-radius:3px;background:color-mix(in srgb,var(--muted) 15%,transparent)}.loading-row span+span{width:65%;height:.5rem}.drop-card{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem;padding:.7rem .85rem;border:1px dashed color-mix(in srgb,var(--muted) 35%,var(--border));border-radius:var(--ui-radius, 8px);background:var(--panel)}.drop-icon{display:grid;place-items:center;flex-shrink:0;width:1.8rem;height:1.8rem;color:var(--muted)}.drop-icon svg{width:1.1rem;height:1.1rem}.drop-copy{min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:.2rem .6rem}.drop-copy strong{font-size:.8rem;font-weight:500}.drop-copy>span{color:var(--muted);font-size:.75rem}.drop-browse{min-width:7rem;margin-left:auto;flex-shrink:0}.content-hidden .filename,.content-hidden .report-name,.content-hidden .report-uploader{color:var(--muted)}.status{display:inline-flex;align-items:center;gap:.3rem;width:fit-content;padding:.1rem .4rem;border:1px solid var(--border);border-radius:5px;color:var(--muted);font-size:.65rem}.status:before{content:"";width:.25rem;height:.25rem;border-radius:50%;background:currentcolor}.status.visible{color:var(--green);border-color:rgb(from var(--green) r g b / .2);background:rgb(from var(--green) r g b / .06)}:host-context(body.theme-w95) *{overscroll-behavior:none}
2
+ `;export{c as a,l as b,u as c};
@@ -0,0 +1 @@
1
+ import{a as e,d as t,j as n}from"./chunk-PXK7EU4V.js";function r(){let e=new(t?Uint32Array:Int32Array)(4096);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}for(let t=0;t<256;t++){let n=e[t];for(let r=256+t;r<e.length;r+=256)n=e[r]=n>>>8^e[n&255]}return e}var i=r(),[a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]=Array.from({length:16},(e,t)=>i.subarray(t*256,t*256+256));function x(r){n(r);let x=-1,S=0,C=r.length;if(e&&C>1024){let e=4-(r.byteOffset&3)&3;for(;S<e;S++)x=a[(x^r[S])&255]^x>>>8;let n=C-S>>>2,o=new(t?Uint32Array:Int32Array)(r.buffer,r.byteOffset+S,n),s=0;for(let e=n-3;s<e;s+=4){let e=o[s]^x,t=o[s+1],n=o[s+2],r=o[s+3];x=i[3840+(e&255)]^i[3584+(e>>>8&255)]^i[3328+(e>>>16&255)]^i[3072+(e>>>24)]^i[2816+(t&255)]^i[2560+(t>>>8&255)]^i[2304+(t>>>16&255)]^i[2048+(t>>>24)]^i[1792+(n&255)]^i[1536+(n>>>8&255)]^i[1280+(n>>>16&255)]^i[1024+(n>>>24)]^i[768+(r&255)]^i[512+(r>>>8&255)]^i[256+(r>>>16&255)]^i[r>>>24]}S+=s*4}else for(let e=C-15;S<e;S+=16)x=b[(r[S]^x)&255]^y[(r[S+1]^x>>>8)&255]^v[(r[S+2]^x>>>16)&255]^_[r[S+3]^x>>>24]^g[r[S+4]]^h[r[S+5]]^m[r[S+6]]^p[r[S+7]]^f[r[S+8]]^d[r[S+9]]^u[r[S+10]]^l[r[S+11]]^c[r[S+12]]^s[r[S+13]]^o[r[S+14]]^a[r[S+15]];for(let e=S;e<C;e++)x=a[(x^r[e])&255]^x>>>8;return~x>>>0}export{x as a};
@@ -0,0 +1 @@
1
+ import{Ue as e,We as t,Ye as n,a as r,ua as i,w as a}from"./chunk-6S2U2UYG.js";import{c as o,d as s,g as c}from"./chunk-2XUEZHIP.js";var l=e(s`<path d="M3.5 8.4l2.9 2.9 6.1-6.6"/>`),u=e(s`<circle class="fill" cx="8" cy="8" r="3"/>`),d=e(s`<path d="M4.2 4.2l7.6 7.6M11.8 4.2l-7.6 7.6"/>`),f=e(s`<circle class="dotted" cx="8" cy="8" r="5.5"/>`),p=e(s`<path d="M2.6 3.2h7.6v5.3H6.3L4 10.4V8.5H2.6z"/><path d="M12.2 6.2h1.2v5.3H12v1.9l-2.3-1.9H7"/>`),m={approved:[`approved`,n.approved[1],`Approved`],changes:[`changes`,n.changes[1],`Changes requested`],commented:[`commented`,t,`Commented`],dismissed:[`dismissed`,t,`Review dismissed`]},h={done:[`reviewed`,l,`Reviewed`],running:[`running`,u,`Reviewing`],failed:[`failed`,d,`Review failed`],requested:[`requested`,f,`Asked to review again`]},g=[`requested`,f,`Review requested`],_=e=>e.slice(0,7),v=e=>new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),y=(e,t,n=!1)=>`${e.toLocaleString(`en-US`)}${n?`+`:``} ${t}${e===1&&!n?``:`s`}`;function b(e){return e?e.failed?h.failed:e.requested?h.requested:h[e.code?.status]??null:null}function x(e){let t=b(e.codex),n=e.codex?.code?.commit??null;return[...t?[{who:i(e.codex.login,`Codex`),standing:t,commit:n,stale:n!==null&&n!==e.head}]:[],...e.reviewers.map(t=>({who:i(t.login,t.login??`someone`),standing:m[t.state]??g,requested:t.requested&&!!m[t.state],workflow:t.workflow??null,commit:t.commit,at:t.at,stale:t.commit!==null&&t.commit!==e.head}))]}var S=e=>(e.moreReviews??0)+(e.moreRequests??0),C=e=>[e.moreReviews>0?y(e.moreReviews,`more review`):null,e.moreRequests>0?y(e.moreRequests,`more review request`):null].filter(Boolean).join(` and `);function w(e){if(!e.head)return!0;let t=e.codex?.code;return t?.status===`done`&&t.commit===e.head||e.reviewers.some(t=>m[t.state]&&t.state!==`dismissed`&&t.commit===e.head)?!0:e.moreReviews>0&&null}var T=e=>e?o`<span class="${`review-severity is-${e}`}">${e.toUpperCase()}</span>`:c;function E(e){if(!e)return c;let t=x(e),{open:n,more:r,severity:i}=e.threads,a=n>0?`${y(n,`open review thread`,r)}${i?`, the gravest ${i.toUpperCase()}`:``}`:r?`No open review thread among those read; more on GitHub`:null,s=w(e);return o`<span class="issue-reviews">${t.map(({who:e,standing:[t,n,r],commit:i,stale:a,requested:s})=>{let c=`${r}${s?`, and requested again`:``}${a?`, on an earlier commit (${_(i)})`:i?`, on the latest commit`:``}`;return o`<span class="${`review-mark is-${t}${a?` is-stale`:``}`}"><span class="review-glyph" role="img" aria-label="${c}" data-tooltip="${c}">${n}</span><span class="review-who">${e}</span></span>`})} ${S(e)>0?o`<span class="review-more" data-tooltip="${`${C(e)}, on GitHub`}">+${S(e)}</span>`:c} ${a?o`<span class="review-threads" role="img" aria-label="${a}" data-tooltip="${a}">${p}<span>${n}${r?`+`:``}</span>${T(i)}</span>`:c} ${s===!1?o`<span class="review-unreviewed" data-tooltip="${t.length>0?`No review is on the latest commit`:`No reviews yet`}">Unreviewed</span>`:s===null?o`<span class="review-unreviewed" data-tooltip="No review read is on the latest commit; more on GitHub">Unreviewed?</span>`:c}</span>`}function D(e,t,n){if(!e)return c;let r=o`<code>${_(e)}</code>`;return o`<span class="review-on">on ${n?o`<a href="${`https://github.com/${n}/commit/${e}`}" target="_blank" rel="noopener noreferrer">${r}</a>`:r}${e===t?`, the latest commit`:`, an earlier commit`}</span>`}function O(e,t){if(!e)return c;let{head:n,codex:r}=e,a=(e,[a,s,c],l)=>o`<li class="review-row">${i(r.login,`Codex`)} <span class="${`review-state is-${a}`}">${s}${l}: ${c.toLowerCase()}</span>${D(e.commit,n,t)}</li>`,s=[...r?.code?[a(r.code,b(r)??h.done,`Code review`)]:[],...r?.security?[a(r.security,h[r.security.status]??h.done,`Security review`)]:[],...x({...e,codex:null}).map(({who:e,standing:[r,i,a],commit:s,at:l,requested:u,workflow:d})=>o`<li class="review-row">${e} <span class="${`review-state is-${r}`}">${i}${a}${u?`, requested again`:``}</span>${d?o`<span class="review-on">by the workflow <code>${d}</code></span>`:c}${D(s,n,t)}${l?o`<time datetime="${new Date(l).toISOString()}">${v(l)}</time>`:c}</li>`)],{open:l,resolved:u,more:d,list:f=[]}=e.threads;return o`<section class="repo-item-section"><h4>Reviews</h4>${s.length>0?o`<ul>${s}</ul>`:o`<p class="repo-item-quiet">No reviews yet.</p>`} ${S(e)>0?o`<p class="repo-item-quiet">And ${C(e)}, on GitHub.</p>`:c} ${w(e)===null?o`<p class="repo-item-quiet">No review read is on the latest commit, <code>${_(n)}</code>; one of those on GitHub may be.</p>`:s.length>0&&!w(e)?o`<p class="repo-item-quiet">No review is on the latest commit, <code>${_(n)}</code>.</p>`:c}</section>${l>0||u>0?o`<section class="repo-item-section"><h4>Open threads</h4>${f.length>0?o`<ul>${f.map(e=>o`<li><a class="repo-item-row review-thread" href="${e.url??c}" target="_blank" rel="noopener noreferrer">${T(e.severity)}<span class="repo-item-title">${e.title||`(no comment)`}</span> ${e.path?o`<code class="review-path">${e.path}${e.line?`:${e.line}`:``}</code>`:c} ${e.outdated?o`<span class="repo-item-quiet">outdated</span>`:c}</a></li>`)}</ul>`:o`<p class="repo-item-quiet">${d?`None open among those read.`:`None open.`}</p>`} ${u>0||d?o`<p class="repo-item-quiet">${u>0?`${y(u,`thread`)} resolved`:``}${d?`${u>0?`; `:``}more on GitHub`:``}.</p>`:c}</section>`:c}`}var k=r({items:new Map,changes:0}),A=null,j=()=>a.managedSession?`${a.managedSession.id}\0${a.managedSession.role}`:null,M=(e,t,n)=>`${e}\0${t}\0${n}`,N=e=>Number.isSafeInteger(e?.readAt)&&e.readAt>0?e.readAt:Date.now();function P(e,t,n,r=null){let i=j();i!==A&&(k.items.clear(),A=i);let a=!1;for(let o of t){let t=M(i,e,o.number),s=k.items.get(t);if(s&&s.readAt>n)continue;let c=s&&(s.item.state===`open`?`open`:`closed`),l=!c||c===(o.state===`open`?`open`:`closed`)?s?.moved??null:{from:c,before:s.readAt};k.items.set(t,{item:{...o,kind:o.kind??r??s?.item.kind??null},readAt:n,moved:l}),a=!0}a&&k.changes++}var F=(e,t)=>k.items.get(M(j(),e,t))??null;function I(e,t){let n=M(j(),e,``);return k.changes,[...k.items].flatMap(([e,r])=>e.startsWith(n)&&r.item.kind===t?[r]:[])}var L=()=>k.changes,R=e=>e.state===`open`?`open`:`closed`;function z(e,t){let n=R(e.item);if(e.readAt<=t||!e.moved)return n;if(e.moved.before>=t)return e.moved.from;let r=e.item.closedAt??e.item.mergedAt??null;return n===`closed`&&r!==null&&r>t?e.moved.from:n}export{E as a,O as b,N as c,P as d,F as e,I as f,L as g,R as h,z as i};
@@ -0,0 +1 @@
1
+ function e(e,{packageDir:t=null}={}){if(t){if(t!==`.`){let e=t.match(/(?:^|\/)node_modules\/(@[^/]+\/[^/]+|[^/]+)$/u);return e&&e[1]!==`.pnpm`?e[1]:t}}else{let t=/\.sol$/iu.test(e)?/(?:^|\/)(?:node_modules\/(@[^/]+\/[^/]+|[^/]+)|dependencies\/(@[^/]+\/[^/]+|[^/]+)\/)/gu:/(?:^|\/)node_modules\/(@[^/]+\/[^/]+|[^/]+)/gu,n;for(;(n=t.exec(e))!==null;){let e=n[1]??n[2];if(e!==`.pnpm`)return e}}return`__own__`}function t(t,n=null){return e(t,{packageDir:n})===`__own__`||!!n&&!/(?:^|\/)(?:node_modules|dependencies|vendor)(?:\/|$)/u.test(n)}function n(e,n=null){let r=[],i=[];for(let a of e)(t(a,n?.get(a))?r:i).push(a);return[...r,...i]}function r(e){return e===`__own__`?`Own source`:typeof e==`string`?e.match(/^(?:.*\/)?vendor\/(.+)$/u)?.[1]??e:e}function i(e){return typeof e==`string`&&/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/u.test(e)?e:null}export{i as a,e as b,t as c,n as d,r as e};
@@ -0,0 +1,18 @@
1
+ import{a as e,b as t,d as n,e as r}from"./chunk-2ZDZWLFY.js";import"./chunk-PXK7EU4V.js";import{a as i,b as a,c as o,d as s,e as c,f as l,g as u,h as d,i as f,j as p,k as m,l as h,m as g,n as _,o as v,p as y,q as b,r as x,s as ee}from"./chunk-VH4XMZIW.js";import"./chunk-OOJM4CTU.js";var te=Object.freeze(Object.create(null));function S(e){return e===void 0?`nothing`:e===null?`null`:Array.isArray(e)?`a sequence`:typeof e==`object`?`a mapping`:typeof e==`string`?`the string ${u(e)}`:`the ${typeof e} ${String(e)}`}function ne(e,t,n,r,i){let a=(t,n,r)=>new s(`expected ${t}, found ${e(n)}`,r),o=(e,t)=>(n,r)=>{if(!e(n))throw a(t,n,r);return n},c=(e,i,o,c={})=>{if(!t(e))throw a(n,e,i);for(let t of o===void 0?[]:Object.keys(e)){if(Object.hasOwn(c,t))throw new s(c[t],d(i??``,t));if(!o.includes(t))throw new s(`unsupported ${r} ${u(t)}`,i)}return e};return{refuse:a,record:c,entries:(e,t)=>Object.entries(c(e,t)).map(([e,n])=>[e,n,d(t,e)]),sequence:o(Array.isArray,i),string:o(e=>typeof e==`string`,`a string`),boolean:o(e=>typeof e==`boolean`,`true or false`),count:o(e=>Number.isSafeInteger(e)&&e>=0,`a non-negative integer`)}}var C=e=>typeof e==`object`&&!!e&&!Array.isArray(e),{refuse:w,record:T,entries:E,sequence:re,string:D,boolean:O,count:ie}=ne(S,C,`a mapping`,`field`,`a sequence`),k=e=>e===void 0?te:e,A=(e,t,n,r)=>e[t]===void 0?void 0:r(e[t],d(n,t));function j(e,t){if(D(e,t)===``)throw new s(`expected a non-empty string`,t);return e}function M(e,t,n=e=>e){return re(e,t).map((e,r)=>n(j(e,`${t}[${r}]`),`${t}[${r}]`))}function N(e,t,n,r=E){let i=Object.create(null);for(let[a,o,s]of r(e,t))i[a]=n(o,s,a);return i}var P=(e,t,n=()=>{})=>N(e,t,(e,t,r)=>(n(r,t),D(e,t)));function F(e,t){if(e!==void 0&&e!==!0)throw w(`true`,e,t);return e===!0}var ae=e=>(t,n)=>(r,i)=>{let a=e(r,i);if(!t(a))throw new s(`${u(a)} is not ${n}`,i);return a};function oe(e,t){if(!C(e))throw TypeError(`expected an options object`);let n=Object.keys(e).find(e=>!t.includes(e));if(n!==void 0)throw TypeError(`unknown option ${u(n)}, of ${t.join(`, `)}`);return e}function se({checkVersions:e=!0,semver:t},n){if(typeof e!=`boolean`)throw TypeError(`checkVersions: expected a boolean`);if(t!==void 0&&!n.every(e=>typeof t?.[e]==`function`))throw TypeError(`semver: expected the semver package, with ${n.join(`, `)}`);if(e&&t===void 0)throw TypeError(`checkVersions needs semver: pass it as semver, or set checkVersions to false`);return e}function ce(e,t=new Set){if(t.has(e))return;t.add(e);let{parent:n}=e;if(n===void 0)return;let r=ce(n,t);return r===void 0?n.bundleDependencies?.includes(e.folder)||e.edgesIn.some(e=>ce(e.from,t)===n)?n:void 0:r}var le=({parent:e})=>e!==void 0&&(e.bundleDependencies!==void 0||le(e)),ue=e=>le(e)?ce(e):void 0;function de(e,t){let n=ue(e);return n!==void 0&&n!==t}function fe(e,t){let n=ue(e);if(e.inBundle!==(n!==void 0))throw new s(n===void 0?`set, where nothing bundles it`:`expected true, as ${u(n.location)} bundles it`,d(e.where,`inBundle`));let{resolution:r}=e;if(n===void 0||n===t){if(r===void 0)throw new s(`expected where it comes from, resolved or an integrity`,e.where)}else if(r!==void 0){let t=r.type===`git`||r.tarball!==void 0?`resolved`:`integrity`;throw new s(`npm takes it from the tarball of ${u(n.location)}, and from nothing else`,d(e.where,t))}}function pe(e){let t=e.get(``);for(let n of e.values())n.kind===`package`&&fe(n,t)}var me=ae(j),he=/^(?:@[\dA-Za-z~-][\w.~-]*\/)?[\dA-Za-z~-][\w.~-]*$/u,ge=e=>e.length<=214&&he.test(e);function I(e,t){if(!ge(e))throw new s(`${u(e)} is not a package name`,t);return e}var _e=`(0|[1-9]\\d*)`,ve=`(?:0|[1-9]\\d*|\\d*[A-Za-z-][\\dA-Za-z-]*)`,ye=RegExp(`^${_e}\\.${_e}\\.${_e}(?:-${ve}(?:\\.${ve})*)?(?:\\+[\\dA-Za-z-]+(?:\\.[\\dA-Za-z-]+)*)?$`,`u`);function be(e){if(e.length>256)return!1;let t=ye.exec(e);return t!==null&&t.slice(1,4).every(e=>Number(e)<=2**53-1)}var xe=me(be,`a version`),Se=/[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control}\\]/u,Ce=e=>e!==``&&e!==`.`&&e!==`..`&&!Se.test(e),we=e=>!/^[A-Za-z]:/u.test(e)&&e.split(`/`).every(Ce);function L(e,t){let n=j(e,t);if(n===`.`)return n;let r=!0;for(let e of n.split(`/`))if(!(e===`..`&&r)&&(r=!1,!Ce(e)))throw new s(`${u(n)} is not a relative path in normal form`,t);if(/^[A-Za-z]:/u.test(n))throw new s(`${u(n)} starts with a drive letter`,t);return n}function Te(e,t){let n=L(e,t);if(n===`..`||n.startsWith(`../`))throw new s(`${u(n)} climbs out of the directory it is in`,t);return n}function Ee(e,t){let n=e===`.`?[]:e.split(`/`);for(let e of t===`.`?[]:t.split(`/`))e===`..`&&n.length>0&&n.at(-1)!==`..`?n.pop():n.push(e);return n.length===0?`.`:n.join(`/`)}var De=(e,t)=>Ee(e,t.split(`/`).filter(e=>e!==``&&e!==`.`).join(`/`)||`.`);function Oe(e,t){let n=e===`.`?[]:e.split(`/`),r=t===`.`?[]:t.split(`/`),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return[...n.slice(i).map(()=>`..`),...r.slice(i)].join(`/`)||`.`}var ke=e=>/^(?:[\da-f]{40}|[\da-f]{64})$/u.test(e),Ae=e=>/^[\da-f]{40}$/u.test(e),je=/^$|^@$|^-|[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control} ~^:?*[\\]|\.\.|@\{|^\/|\/$|\/\/|(?:^|\/)\.|\.lock(?:\/|$)|\.$/u;me(e=>!je.test(e),`a branch or tag name git takes`);var Me=/^(?:[^/:]*:\/\/)?(?:[^/@]*@)?-/u,Ne=/^[\dA-Za-z][\d+.A-Za-z-]*::/u,Pe=e=>e.replace(/%([\dA-Fa-f]{2})/gu,(e,t)=>String.fromCodePoint(Number.parseInt(t,16)));function Fe(e,t){let n=j(e,t);if(Me.test(n)||Me.test(Pe(n)))throw new s(`${u(n)} has a "-" where git or ssh would read an option`,t);if(Ne.test(n))throw new s(`${u(n)} names a remote helper of git's, which is not supported`,t);return n}function Ie(e,t){if(/[\s\p{Cc}]/u.test(j(e,t)))throw new s(`${u(e)} is not a repository URL`,t);return Fe(e,t)}var Le={__proto__:null,sha1:20,sha256:32,sha384:48,sha512:64},Re=e=>l(()=>t(e,{padding:!0}).length,()=>{});function ze(e,t){let n=j(e,t),r=n.indexOf(`-`),i=r===-1?void 0:Le[n.slice(0,r)];if(i===void 0||Re(n.slice(r+1))!==i)throw new s(`${u(e)} is not a sha1, sha256, sha384 or sha512 integrity`,t);return e}function Be(e,t){let n=new Map;for(let r of j(e,t).split(` `)){let e=ze(r,t).slice(0,r.indexOf(`-`));if(n.has(e))throw new s(`two ${e} integrities`,t);n.set(e,r)}return n}var Ve=e=>/^https?:\/\//u.test(e)&&!/[\s\p{Cc}]/u.test(e)&&URL.canParse(e),He=new Set([`registry.npmjs.org`,`registry.npmjs.com`,`registry.yarnpkg.com`]);function Ue(e,t,n,r){let i=new URL(e),a=i.hostname.replace(/(?<!\.)\.+$/u,``);if(He.has(a)&&i.pathname.replace(/^(\/@[^/]+)%2f/iu,`$1/`)!==`/${t}/-/${t.slice(t.indexOf(`/`)+1)}-${n}.tgz`)throw new s(`${u(e)} is not the registry's tarball of ${t}@${n}`,r)}var We=e=>e?.endsWith(`.git`)?e.slice(0,-4):e;function Ge(e,t,n){let r=We(t);return e&&r?{user:e,project:r,committish:n}:void 0}var Ke=e=>t=>{let[,n,r,i]=t.pathname.split(`/`,4);return i===e?void 0:Ge(n,r,t.hash.slice(1))},R={__proto__:null,github:{protocols:[`git:`,`http:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`github.com`,extract:e=>{let[,t,n,r,i]=e.pathname.split(`/`,5);if(!(r&&r!==`tree`))return Ge(t,n,r?i:e.hash.slice(1))}},bitbucket:{protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`bitbucket.org`,extract:Ke(`get`)},gitlab:{protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gitlab.com`,extract:e=>{let t=e.pathname.slice(1);if(t.includes(`/-/`)||t.includes(`/archive.tar.gz`))return;let n=t.split(`/`),r=n.pop();return Ge(n.join(`/`),r,e.hash.slice(1))}},gist:{protocols:[`git:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gist.github.com`,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(r!==`raw`&&(t||n))return{user:n?t:null,project:We(n||t),committish:e.hash.slice(1)}}},sourcehut:{protocols:[`git+ssh:`,`https:`],domain:`git.sr.ht`,extract:Ke(`archive`)}},qe=new Map(Object.entries(R).map(([e,t])=>[t.domain,e])),Je=new Map(Object.keys(R).map(e=>[`${e}:`,e])),Ye=new Set([`git+ssh:`,`ssh:`,`git+https:`,`git:`,`http:`,`https:`,`git+http:`,...Je.keys()]);function Xe(e){let t=e.indexOf(`#`),n=e=>e===-1||t>-1&&e>t,r=e.indexOf(`/`);return n(e.search(/\s/u))&&r>0&&(t>-1?e[t-1]!==`/`:!e.endsWith(`/`))&&!e.startsWith(`.`)&&n(e.indexOf(`@`))&&n(e.indexOf(`:`))&&n(e.indexOf(`/`,r+1))}var Ze=(e,t,n)=>{let r=e.indexOf(n);return e.lastIndexOf(t,r>-1?r:1/0)};function Qe(e){let t=e.indexOf(`:`);if(Ye.has(e.slice(0,t+1))||e.slice(t,t+3)===`://`)return e;let n=e.indexOf(`@`);return n>-1?n>t?`git+ssh://${e}`:e:`${e.slice(0,t+1)}//${e.slice(t+1)}`}function $e(e){let t=e,n=Ze(t,`:`,`#`);return n>Ze(t,`@`,`#`)&&(t=`${t.slice(0,n)}/${t.slice(n+1)}`),Ze(t,`:`,`#`)===-1&&!t.includes(`//`)&&(t=`git+ssh://${t}`),t}var z=e=>e&&decodeURIComponent(e);function et(e){let t=e.pathname.startsWith(`/`)?e.pathname.slice(1):e.pathname,n=t.indexOf(`@`);n>-1&&(t=t.slice(n+1));let r=t.lastIndexOf(`/`),i=We(z(t.slice(r+1)));return{user:r>-1&&z(t.slice(0,r))||null,project:i,committish:z(e.hash.slice(1))||null}}function tt(e){if(!e)return;let t=Qe(Xe(e)?`github:${e}`:e),n=URL.parse(t)??URL.parse($e(t));if(n===null)return;let r=Je.get(n.protocol),i=r??qe.get(n.hostname.replace(/^www\./u,``));if(i!==void 0)try{if(r!==void 0)return{type:i,...et(n)};if(!R[i].protocols.includes(n.protocol))return;let e=R[i].extract(n);return e===void 0?void 0:{type:i,user:z(e.user),project:z(e.project),committish:z(e.committish)||null}}catch(e){if(e instanceof URIError)return;throw e}}function nt({type:e,user:t,project:n,committish:r},i){let a=i&&r?`#${r}`:``;return e===`gist`?`git@${R[e].domain}:${n}.git${a}`:`git@${R[e].domain}:${t}/${n}.git${a}`}var rt=/^(?:[Gg][Ii][Tt]\+)?[A-Za-z]+:/u,it=/^[^@]+@[^.:]+\.[^:]+:.+$/iu,at=/\.(?:tgz|tar\.gz|tar)$/iu,ot=e=>at.test(e),st=/^git(?:\+(?:https?|rsync|ftp|ssh))?:/u,B=(e,t)=>new s(`${u(e)} is ${t}`);function ct(e,t){let n=at.test(e)?`file`:`directory`;if(/^file:/iu.test(e)&&!e.startsWith(`file:`))throw B(e,`a path whose "file:" npm reads in another case otherwise`);let r=e.startsWith(`file:`)?e.slice(5):e;if(/^(?:[/~]|[A-Za-z]:)/u.test(r))throw B(e,`a path from the root, a drive or the home directory, which a lockfile does not hold`);return{type:n,path:De(t,r)}}function lt(e,t){let n={committish:null,range:null};for(let r of t?t.split(`::`):[]){let[t,i]=r.includes(`:`)?r.split(`:`):[void 0,r];if(t===`path`)throw B(e,`a subdirectory of a repository, which is not supported`);if(t!==void 0&&t!==`semver`)throw B(e,`a git spec with ${u(t)}, which npm passes over`);if(n.committish!==null||n.range!==null)throw B(e,`a git spec with two refs or ranges, which npm refuses`);t===void 0?n.committish=i:n.range=ut(e,i)}return n}var ut=(e,t)=>l(()=>decodeURIComponent(t),()=>{throw B(e,`a git spec npm cannot decode`)});function dt(e){let t=e.startsWith(`git+ssh:`)?/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/iu.exec(e):null;if(t!==null&&!/:\d+(?:\/|$)/u.test(t[1]))return{type:`git`,hosted:void 0,fetchSpec:t[1],...lt(e,t[2])};let n=URL.parse(e);if(n===null)throw B(e,`not a URL npm reads`);if(n.protocol===`http:`||n.protocol===`https:`)return{type:`remote`,url:e};if(!st.test(n.protocol))throw B(e,`of a protocol npm does not read, ${u(n.protocol)}`);let r=lt(e,n.hash.slice(1));return n.hash=``,{type:`git`,hosted:void 0,fetchSpec:n.href.replace(/^git\+/u,``),...r}}function ft(e,t,n){let r=t.trim();if(n===void 0)return{type:`registry`,name:e,fetchSpec:r,kind:void 0};let i=`tag`;if(n.valid(r,!0)===null?n.validRange(r,!0)!==null&&(i=`range`):i=`version`,i===`tag`&&encodeURIComponent(r)!==r)throw B(t,`a tag npm refuses, of a character a URL escapes`);return{type:`registry`,name:e,fetchSpec:r,kind:i}}function V(e,t,n,r){if(/^(?:file:|[.]|~\/|\/|[A-Za-z]:)/iu.test(t))return ct(t,n);if(/^npm:/iu.test(t))return mt(t,n,r);let i=tt(t);return i===void 0?rt.test(t)?dt(t):t.includes(`/`)||at.test(t)?ct(t,n):ft(e,t,r):{type:`git`,hosted:i,fetchSpec:void 0,...lt(t,i.committish)}}function pt(e,t,n){let r=e.indexOf(`@`,1),i=r>0?e.slice(0,r):e;return rt.test(e)?V(void 0,e,t,n):it.test(e)?V(void 0,`git+ssh://${e}`,t,n):!i.startsWith(`@`)&&(i.includes(`/`)||at.test(i))?V(void 0,e,t,n):V(I(i,void 0),r>0&&e.slice(r+1)||`*`,t,n)}function mt(e,t,n){let r=pt(e.slice(4),t,n);if(r.type===`alias`)throw B(e,`an alias of an alias, which npm refuses`);if(r.type!==`registry`||r.name===void 0)throw B(e,`an alias of no package of the registry, which npm refuses`);return{type:`alias`,sub:r}}var ht=(e,t,n,r)=>V(e,t||`*`,n,r),gt=e=>V(void 0,e,`.`,void 0),H=[`dev`,`optional`,`devOptional`,`peer`],_t=[`name`,`version`,`dependencies`,`optionalDependencies`,`peerDependencies`,`peerDependenciesMeta`,`bundleDependencies`,`acceptDependencies`,`funding`,`engines`,`os`,`cpu`,`libc`,`license`,`hasInstallScript`,`bin`,`deprecated`,`workspaces`,...H],vt={link:[`link`,`resolved`],importer:[..._t,`devDependencies`],package:[..._t,`resolved`,`integrity`,`inBundle`]},yt={hasShrinkwrap:`a shrinkwrap of its own, which is not supported`,extraneous:`nothing leads to it, and npm prunes it rather than install it`};function U(e,t){if(typeof e==`object`&&e&&Object.keys(e).length===0)throw new s(`expected what npm writes, which leaves an empty ${Array.isArray(e)?`sequence`:`mapping`} out`,t);return e}var bt=e=>(t,n)=>N(U(t,n),n,e),xt=(e,t)=>P(U(e,t),t,I),St=(e,t)=>I(j(e,t),t),Ct=(e,t)=>M(U(e,t),t,I),W=(e,t)=>M(U(e,t),t),wt=e=>(t,n)=>Array.isArray(t)?W(t,n):e(t,n),Tt=bt((e,t,n)=>(I(n,t),{optional:A(T(e,t),`optional`,t,O)??!1}));function Et(e,t){return typeof e==`string`?j(e,t):(T(U(e,t),t),{type:A(e,`type`,t,j),url:A(e,`url`,t,j)})}var Dt=(e,t)=>Array.isArray(e)?U(e,t).map((e,n)=>Et(e,`${t}[${n}]`)):Et(e,t);function Ot(e,t,n){if(!Ce(n)||/[/:]/u.test(n))throw new s(`${u(n)} is not the name of a bin, as npm writes one`,t);if(!we(j(e,t).replace(/\/$/u,``)))throw new s(`${u(e)} is not a path within the package, as npm writes a bin's`,t);return e}var kt=wt((e,t)=>(T(U(e,t),t,[`packages`,`nohoist`]),A(e,`nohoist`,t,W),W(e.packages,d(t,`packages`)))),At={__proto__:null,dependencies:xt,optionalDependencies:xt,peerDependencies:xt,devDependencies:(e,t)=>P(e,t,I),peerDependenciesMeta:Tt,acceptDependencies:xt,bundleDependencies:Ct,funding:Dt,engines:wt((e,t)=>P(U(e,t),t)),os:W,cpu:W,libc:W,license:wt(j),bin:bt(Ot),deprecated:j,workspaces:kt};function jt(e,t){let n=Object.fromEntries(H.map(n=>[n,F(e[n],d(t,n))]));if(n.devOptional&&(n.dev||n.optional))throw new s(`set beside dev or optional, where npm leaves it out`,d(t,`devOptional`));return n}var Mt=(e,t)=>Be(e,t)&&e;function Nt(e,t,n,r){if(e.startsWith(`file:`)){if(!ot(e))throw new s(`${u(e)} is a directory, which npm packs again at every install: not supported`,r);L(e.slice(5),r);return}if(!Ve(e))throw new s(`${u(e)} is not an http(s) URL, a file: tarball or a git URL`,r);if(tt(e)!==void 0)throw new s(`${u(e)} is a repository to npm, which it reads as one on a git host`,r);Ue(e,t,n,r)}function Pt(e,t,n,r){let i=d(t,`resolved`),a=A(e,`resolved`,t,j),o=A(e,`integrity`,t,Mt);if(a===void 0)return o===void 0?void 0:{type:`tarball`,tarball:void 0,integrity:o};if(st.test(a)){if(o!==void 0)throw new s(`an integrity, which npm does not check for a git repository`,d(t,`integrity`));let e=a.lastIndexOf(`#`);if(e===-1||!ke(a.slice(e+1)))throw new s(`expected a full commit hash after the "#" of ${u(a)}`,i);return{type:`git`,repo:Ie(a.slice(0,e),i),commit:a.slice(e+1)}}if(Nt(a,n,r,i),o===void 0)throw new s(`expected an integrity, which npm checks the tarball with`,t);return{type:`tarball`,tarball:a,integrity:o}}function Ft(e){let t=e.split(`/`),n=t.at(-1);return t.at(-2)?.startsWith(`@`)?`${t.at(-2)}/${n}`:n}function It(e,t){if(T(e,t,vt.link,yt),e.link!==!0)throw w(`true`,e.link,d(t,`link`));return e.resolved===``?``:L(e.resolved,d(t,`resolved`))}function Lt(e,t,n,r){T(e,t,vt[n],yt);let i=Object.create(null);for(let n of Object.keys(At))i[n]=A(e,n,t,At[n]);if(n===`importer`&&r!==void 0&&i.bundleDependencies!==void 0)throw new s(`a bundle of a directory, which is not supported`,d(t,`bundleDependencies`));let a=A(e,`name`,t,St);if(a!==void 0&&a===r)throw new s(`the name of its folder, which npm leaves out`,d(t,`name`));let o=A(e,`version`,t,n===`package`?xe:j);if(n===`package`&&o===void 0&&!st.test(e.resolved??``))throw new s(`expected a version, which only a package from a git repository is read without`,d(t,`version`));let c={name:a??r,version:o,...i,hasInstallScript:F(e.hasInstallScript,d(t,`hasInstallScript`)),flags:jt(e,t)};return n===`package`&&(c.resolution=Pt(e,t,c.name,o),c.inBundle=F(e.inBundle,d(t,`inBundle`))),c}function Rt(e,t){let[n,r,i,a]=[0,0,-1,0];for(;r<t.length;)if(e[n]===`*`)i=n++,a=r;else if(e[n]===`?`||e[n]===t[r])n++,r++;else{if(i===-1)return!1;n=i+1,r=++a}for(;e[n]===`*`;)n++;return n===e.length}function zt(e,t){let n=e.split(`/`);if(n.length>30||n.some(e=>e===``||/[[\]{}()!+#\\]/u.test(e)))throw new s(`${u(e)} is a glob not read here`,t);return n.map(e=>{if(e===`**`)return null;let t=!e.startsWith(`.`)&&/[*?]/u.test(e),n=[...e];return e=>!(t&&e.startsWith(`.`))&&Rt(n,[...e])})}function Bt(e,t){let n=t;for(let t=0;t<e.length;t++)n&1<<t&&e[t]===null&&(n|=1<<t+1);return n}function Vt(e,t,n){let r=0;for(let i=0;i<e.length;i++)t&1<<i&&(e[i]===null?r|=n.startsWith(`.`)?0:1<<i:e[i](n)&&(r|=1<<i+1));return Bt(e,r)}var Ht=(e,t)=>!!(t&1<<e.length),Ut=(e,t)=>Ht(e,t.split(`/`).reduce((t,n)=>Vt(e,t,n),Bt(e,1))),Wt=`packages`,Gt=/^(?:(.+)\/)?node_modules\/((?:@[^/]+\/)?[^/]+)$/u;function Kt(e,t){if(e===``)return{kind:`root`,parent:void 0,folder:void 0};L(e,t);let n=Gt.exec(e);if(n!==null){if(n[2]===`node_modules`)throw new s(`a folder named "node_modules", which no package is`,t);return{kind:`package`,parent:n[1]??``,folder:I(n[2],t)}}let r=e.split(`/`);if(r.includes(`node_modules`))throw new s(`in a node_modules, but none of its packages`,t);if(r.every(e=>e===`..`))throw new s(`a directory the project is in, which is not supported`,t);return{kind:`importer`,parent:void 0,folder:Ft(e)}}function qt(e,t,n){let{kind:r,parent:i,folder:a}=Kt(e,n),o={location:e,where:n,kind:r,parentLocation:i,folder:a,parent:void 0,fsParent:void 0,children:new Map,links:[],edges:new Map,edgesIn:[]};if(t?.link===void 0)return Object.assign(o,Lt(t,n,r===`package`?`package`:`importer`,a));if(r!==`package`)throw new s(`a link outside a node_modules, where npm writes none`,n);return Object.assign(o,{kind:`link`,targetLocation:It(t,n),target:void 0})}function Jt(e,t){let n=t.get(e.parentLocation);if(n===void 0)throw new s(`in the node_modules of ${u(e.parentLocation)}, which the lockfile does not have`,e.where);if(n.kind===`link`)throw new s(`in the node_modules of ${u(e.parentLocation)}, a link, in which npm installs nothing`,e.where);let r=e.folder.toLowerCase(),i=n.children.get(r);if(i!==void 0)throw new s(`in the folder of ${u(i.location)} to npm, which takes names in one case`,e.where);n.children.set(r,e),e.parent=n}function Yt(e,t){let n=t.get(e.targetLocation),r=d(e.where,`resolved`);if(n===void 0)throw new s(`${u(e.targetLocation)} is not in the lockfile, where npm looks for what a link leads to`,r);if(n.kind===`link`)throw new s(`${u(e.targetLocation)} is a link, where npm links the project, a directory or a package`,r);e.target=n,n.links.push(e)}function Xt(e,t){let n=e.location.split(`/`);for(;n.pop()!==void 0&&n.at(-1)!==`..`;){let e=t.get(n.join(`/`));if(e!==void 0)return e}}var Zt=e=>e.parent??e.fsParent,G=e=>e.kind===`link`?e.target:e,K=e=>e.location||`.`;function Qt(e,t){let n=t.toLowerCase();for(let t=e;t!==void 0;t=Zt(t)){let e=t.children.get(n);if(e!==void 0)return e}}function $t(e){let t=new Map;for(let[n,r,i]of E(e,Wt))t.set(n,qt(n,r,i));t.has(``)||t.set(``,qt(``,Object.create(null),d(Wt,``)));for(let e of t.values())e.parentLocation!==void 0&&Jt(e,t),e.kind===`link`&&Yt(e,t);for(let e of t.values())if(e.kind===`importer`){if(e.links.length===0)throw new s(`a directory no link leads to, of which npm installs nothing`,e.where);e.fsParent=Xt(e,t)}return t}function en(e){let t=e.get(``),n=d(t.where,`workspaces`),r=new Map;for(let[i,a]of(t.workspaces??[]).entries()){let t=zt(a.replace(/^\.?\/+/u,``),`${n}[${i}]`);for(let n of e.values()){if(n.kind!==`importer`||r.get(n.name)===n||!Ut(t,n.location))continue;let e=I(n.name,d(n.where,`name`));if(r.has(e))throw new s(`the name of the workspace ${u(r.get(e).location)} too, of which npm keeps one`,n.where);r.set(e,n)}}return r}var tn={__proto__:null,workspace:`workspaces`,peer:`peerDependencies`,peerOptional:`peerDependencies`,prod:`dependencies`,optional:`optionalDependencies`,dev:`devDependencies`},nn=e=>e.type===`workspace`?d(e.from.where,`workspaces`):d(d(e.from.where,tn[e.type]),e.name);function rn(e,t,n){let r=(t,n,r)=>{let i=t.toLowerCase(),a=e.edges.get(i);if(a?.type===`workspace`)return;let o={name:t,type:n,spec:r,accept:e.acceptDependencies?.[t],from:e,to:void 0};if(a!==void 0&&a.name!==t)throw new s(`${u(a.name)} too, to npm, which takes names in one case`,nn(o));e.edges.delete(i),e.edges.set(i,o)};if(e.kind===`root`)for(let[e,{location:n}]of t)r(e,`workspace`,`file:${n}`);let i=e.peerDependenciesMeta??Object.create(null),a=n?[]:Object.entries(e.peerDependencies??{});for(let[e,t]of a)i[e]?.optional||r(e,`peer`,t);for(let[e,t]of a)i[e]?.optional&&r(e,`peerOptional`,t);for(let t of e.parent===void 0?[`prod`,`optional`,`dev`]:[`prod`,`optional`])for(let[n,i]of Object.entries(e[tn[t]]??{}))r(n,t,i)}function an(e,t,n){for(let r of e.values())r.kind!==`link`&&rn(r,t,n);for(let t of e.values())for(let e of t.edges.values())e.to=Qt(t,e.name),e.to?.edgesIn.push(e)}var on=[...H,`extraneous`],sn=e=>new Map([...e.values()].map(e=>[e,Object.fromEntries(on.map(t=>[t,e.kind!==`root`]))]));function cn(e,t,n){if(!e.get(t)[n])for(let r=Zt(t);r!==void 0&&e.get(r)[n];r=Zt(r))e.get(r)[n]=!1}function ln(e,t){let[n,r,i]=[t===`dev`,t===`optional`||t===`peerOptional`,t.startsWith(`peer`)];return{extraneous:!e.extraneous&&!(i&&r),dev:!e.dev&&!n,optional:!e.optional&&!r,devOptional:!e.devOptional&&!e.dev&&!e.optional&&!n&&!r,peer:!e.peer&&!i}}function un(e,t){let n=sn(e),r=new Set,i=[e.get(``)];for(;i.length>0;){let e=i.pop();r.add(e);let a=n.get(e);if(cn(n,e,`extraneous`),e.kind===`link`){let o=n.get(e.target),s=on.filter(e=>o[e]&&!a[e]);if(t)Object.assign(o,a);else for(let e of s)o[e]=!1;(t||s.length>0||!r.has(e.target))&&i.push(e.target);continue}for(let{type:t,to:r}of e.edges.values()){if(r===void 0)continue;let e=ln(a,t),o=n.get(r),s=on.filter(t=>o[t]&&e[t]);for(let e of s)o[e]=!1;s.length>0&&i.push(r)}}return n}function dn(e,t,n){let r=[e],i=new Set;for(;r.length>0;){let e=r.pop();i.has(e)||(i.add(e),r.push(...n(e,t(e))))}}function fn(e){let t=sn(e),n=(e,n)=>{if(!t.get(e)[n])return;let r=e=>Object.assign(t.get(e),{extraneous:!1,[n]:!1});dn(e,e=>{r(e),e.kind===`link`&&r(e.target)},e=>[...G(e).edges.values()].filter(({type:e,to:r})=>r!==void 0&&t.get(r)[n]&&(n!==`peer`&&e===`peer`||e===`prod`)).map(({to:e})=>e))},r=e=>{let i=t.get(e);i.extraneous=!1;for(let n of on)cn(t,e,n);if(e.kind===`link`){for(let n of H)t.get(e.target)[n]=i[n];return r(e.target)}for(let{type:r,to:a}of e.edges.values()){if(a===void 0)continue;t.get(a).extraneous=!1;let e=ln(i,r);for(let t of[`peer`,`devOptional`,`dev`,`optional`])e[t]&&n(a,t)}return e};return dn(e.get(``),r,(e,t)=>[...t.edges.values()].map(({to:e})=>e).filter(e=>e!==void 0)),t}function pn(e,t,n){for(let r of e.values()){let e=t.get(r);if(e.extraneous)return new s(`nothing installed leads to it, so ${n} takes it as extraneous, and prunes it`,r.where);if(r.kind===`link`)continue;let i={...e,devOptional:e.devOptional&&!e.dev&&!e.optional},a=H.find(e=>r.flags[e]!==i[e]);if(a!==void 0)return new s(`expected ${i[a]?`true`:`none`}, as ${n} sets it from what depends on it`,d(r.where,a))}}var mn=[e=>un(e,!1),e=>un(e,!0),fn];function hn(e){let[t,n,r]=e.split(`.`).map(Number);return t>11||t===11&&n>=18?mn[0]:mn[t===11&&(n>6||n===6&&r>=3)?1:2]}function gn(e,t,n=t===void 0?`npm`:`npm ${t}`){let r=pn(e,(t===void 0?mn[0]:hn(t))(e),n);if(r!==void 0&&(t!==void 0||mn.slice(1).every(t=>pn(e,t(e),`npm`)!==void 0)))throw r}var _n=64;function vn(e,t){if(typeof e!=`object`||!e)return e;if(t>_n)throw new s(`nested more than ${_n} deep, as npm writes nothing`);if(Array.isArray(e))return e.map(e=>vn(e,t+1));let n=Object.create(null);for(let[r,i]of Object.entries(e))n[r]=vn(i,t+1);return n}function yn(e,t){let n=e.split(`
2
+ `),r=t.split(`
3
+ `),i=0;for(;n[i]===r[i];)i++;if(i===r.length-1&&i===n.length)return f(`expected a line end after the last "}"`,i-1);let a=i<n.length?u(n[i]):`the end of the file`;return f(`expected ${i<r.length?u(r[i]):`the end of the file`}, as npm writes it, found ${a}`,i)}function bn(e){m(e,`npm`);let[t,n]=h(e,`npm`),r=l(()=>JSON.parse(e),e=>c(`not JSON: ${e.message}`)),i=vn(r,0),a=`${JSON.stringify(r,null,n)}
4
+ `.replaceAll(`
5
+ `,t);if(a!==e)throw yn(e,a);return i}var xn=/^[\dA-Fa-f]{40,64}$/u;function Sn(e){let t=e.resolution?.tarball;return t?.startsWith(`file:`)?Ee(t.slice(5),`..`):K(e)}var q=e=>u(e.location);function Cn(e,{fetchSpec:t,kind:n},r){let i=G(e);if(!(n===void 0||n===`range`&&t===`*`))return n===`tag`?e.kind===`link`||!/^https?:/u.test(e.resolution?.tarball??``)?`is a tag, which npm holds met by a tarball from a URL alone, and ${q(e)} is none`:void 0:r.satisfies(i.version??``,t,!0)?void 0:`is not satisfied by ${q(e)}, ${i.version??`of no version`}`}function wn(e,t,n){let{resolution:r,version:i}=e;if(e.kind===`link`||r?.type!==`git`)return`asks for a git repository, and ${q(e)} is from none`;let a=gt(`${r.repo}#${r.commit}`),o=xn.test(t.committish??``);if(!(t.hosted===void 0?a.hosted===void 0&&a.fetchSpec===t.fetchSpec:a.hosted!==void 0&&nt(t.hosted,o)===nt(a.hosted,o)))return`asks for another repository than ${q(e)} is from${o?`, or another commit`:``}`;if(!(t.range===null||n===void 0||n.satisfies(i??``,t.range,!0)))return`asks for a version of the repository ${q(e)} is not, ${i??`of no version`}`}function Tn(e,t,n){switch(t.type){case`registry`:return Cn(e,t,n);case`alias`:return Cn(e,t.sub,n);case`directory`:return e.kind===`link`&&K(e.target)===t.path?void 0:`asks for a link to ${u(t.path)}, and ${q(e)} is ${e.kind===`link`?`one to ${u(K(e.target))}`:`no link`}`;case`file`:case`remote`:{let n=t.type===`file`?`file:${t.path}`:t.url;return e.kind!==`link`&&e.resolution?.tarball===n?void 0:`asks for the tarball ${u(n)}, and ${q(e)} is from another`}default:return wn(e,t,n)}}function En(e,t){let{name:n}=G(e);if(t.type===`alias`&&n!==t.sub.name)return`asks for ${u(t.sub.name)}, and ${q(e)} is ${u(n)}, which npm does not check`;let{committish:r}=t;if(t.type===`git`&&xn.test(r??``)&&r.toLowerCase()!==e.resolution.commit)return`asks for another commit than ${q(e)} is of, which npm does not check of a repository on no host it knows`}function Dn(e,t,n){let{from:r,to:i,spec:a}=e;if(e.type.startsWith(`peer`)&&i.parent===r&&r.parent!==void 0)return`${u(a)} is met in the node_modules of the package that asks for it, which npm holds a peer not to be`;if(i.folder!==e.name)return`is met by ${q(i)}, which npm takes for it, though the names are in other cases`;let o=a=>{let o=ht(e.name,a,Sn(r),t);return Tn(i,o,t)??(n?En(i,o):void 0)},s=o(a);if(!(s===void 0||e.accept!==void 0&&o(e.accept)===void 0))return`${u(a)} ${s}, so npm would install another`}function On(e,t){return l(()=>Dn(e,t,!1)===void 0,e=>{if(e instanceof s)return!1;throw e})}function kn(e,t){let n=nn(e);if(e.type===`peerOptional`)return;if(e.to===void 0)throw new s(`${u(e.spec)} is met by nothing where npm looks for ${u(e.name)}, so npm would install it`,n);let r=l(()=>Dn(e,t,!0),e=>{throw e instanceof s&&e.where===void 0?new s(e.message,n):e});if(r!==void 0)throw new s(r,n)}function An(e,t){let n=new Set([e.get(``)]);for(let e of n){let r=new Set(e.kind===`package`?e.bundleDependencies:[]);for(let i of e.edges.values()){r.has(i.name)||kn(i,t);let e=i.to===void 0?void 0:G(i.to);e!==void 0&&!e.location.startsWith(`../`)&&n.add(e)}}}var jn=[`version`,`resolved`,`integrity`,`bundled`,...H,`requires`,`dependencies`,`from`],Mn=e=>e.location===``?`the project`:u(e.location);function Nn(e){let[t,n,r]=e.split(`.`).map(Number);return t===9||t===10&&(n<9||n===9&&r<=2)||t===11&&n<2}function Pn(e,t){let n=[],r;for(let i of e.edgesIn){let e=i.from.location.split(`node_modules`),a=[e.length,e.at(-1)],o=r===void 0?-1:a[0]-r[0]||a[1].localeCompare(r[1],`en`);o>0||!On(i,t)||(o<0?[n,r]=[[i],a]:n.push(i))}return n}function Fn(e,t){let n=Oe(e,t);return`file:${n===`.`?``:n}`}function In(e,t){let n=K(t.from),r=ht(e.folder,t.spec,n,void 0),i=`${e.folder}@${t.spec}`;return r.type===`file`?{type:`file`,save:Fn(n,r.path),raw:i}:r.type===`remote`?{type:`remote`,save:r.url,raw:i}:{type:r.type,raw:i}}function Ln(e,t,n){if(e.kind===`link`)return{version:`file:${n(e.target.location)}`};let{resolution:r}=e,i=r?.type===`git`?`${r.repo}#${r.commit}`:r?.tarball,a;r?.type===`git`?a=`git`:i!==void 0&&(a=i.startsWith(`file:`)?`file`:`remote`);let o=t===void 0?{type:a,save:i,raw:i}:In(e,t);return o.type===`file`||o.type===`remote`?{version:o.save}:o.type===`git`||a===`git`?{version:i,from:o.raw}:{version:e.name===e.folder?e.version:`npm:${e.name}@${e.version}`,resolved:a===`remote`?i:void 0}}var Rn=e=>[...new Map(e.map(e=>[JSON.stringify(e),e])).values()];function zn(e,t,n,r){if(e===t)return;let i=t===void 0?`none`:typeof t==`string`?u(t):String(t);throw new s(`expected ${i}, found ${S(e)}, as npm writes it of ${Mn(r)}`,n)}var Bn=(e,t,n,r,i)=>zn(e[t],n,d(r,t),i);function Vn(e,t,n,r){let{path:i}=l(()=>ht(e.name,e.spec,t,void 0),e=>{throw e instanceof s&&e.where===void 0?new s(e.message,r):e});return n(Fn(t,i))}function Hn(e,t,n){if(e.edges.size===0)return;let r=Object.create(null);for(let i of e.edges.values())i.type.startsWith(`peer`)||(r[i.name]=i.spec.startsWith(`file:`)?Vn(i,K(e),t,d(n,i.name)):i.spec);return r}function Un(e,t,n,r){let i=Hn(t,n,r);if(i===void 0)return zn(e,void 0,r,t);let a=T(e,r);for(let[e,n]of Object.entries(a)){if(!Object.hasOwn(i,e))throw new s(`${Mn(t)} asks for no such package, or for a peer, which npm leaves out`,d(r,e));if(n!==i[e])throw new s(`expected ${u(i[e])}, as ${Mn(t)} asks for it, found ${S(n)}, which npm writes there of an override alone, not read here`,d(r,e))}let o=Object.keys(i).find(e=>!Object.hasOwn(a,e));if(o!==void 0)throw new s(`expected ${u(o)}, which ${Mn(t)} asks for`,r)}function Wn(e,t,n,r,i){let a=new Set([...t.children.values()].filter(e=>!r.includes(G(e).location)));if(a.size===0)return zn(e,void 0,n,t);let o=[...r,t.location],c=e===void 0?Object.create(null):T(e,n);for(let[e,r]of Object.entries(c)){let c=t.children.get(e.toLowerCase()),l=`${t.location===``?``:`${t.location}/`}node_modules/${e}`;if(c===void 0||c.folder!==e)throw new s(`${u(l)} is not in packages`,d(n,e));if(!a.has(c))throw new s(`${u(l)} links to ${u(K(G(c)))}, which this is under already, and npm leaves it out`,d(n,e));qn(r,c,d(n,e),o,i)}let l=[...a].find(e=>!Object.hasOwn(c,e.folder));if(l!==void 0)throw new s(`expected ${u(l.folder)}, as npm writes ${u(l.location)} of packages`,n)}function Gn(e,t,n,r,i){if(t!==void 0&&e===void 0){if(i.resolved!==void 0)throw new s(`expected ${u(t)}: npm leaves it out of every entry or of none, and ${i.resolved} has it`,n);i.omitted??=n;return}if(zn(e,t,n,r),e!==void 0){if(i.omitted!==void 0)throw new s(`expected none: npm leaves it out of every entry or of none, and ${i.omitted} has none`,n);i.resolved??=n}}function Kn(e,t){let{semver:n,escape:r,own:i,root:a}=t;if(!i.has(e)){let t=e.kind===`link`?[]:Pn(e,n),o=Rn(t.length===0?[Ln(e,void 0,r)]:t.map(t=>Ln(e,t,r)));i.set(e,{heads:o,bundled:de(e,a)||void 0})}return i.get(e)}function qn(e,t,n,r,i){T(e,n,jn);let{heads:a,bundled:o}=Kn(t,i),s=a.find(({version:t,from:n})=>t===e.version&&n===e.from)??a[0];Bn(e,`version`,s.version,n,t),Bn(e,`from`,s.from,n,t),Gn(e.resolved,s.resolved,d(n,`resolved`),t,i),Bn(e,`bundled`,o,n,t),Bn(e,`integrity`,t.resolution?.integrity,n,t);for(let r of H)Bn(e,r,t.flags?.[r]||void 0,n,t);let c=G(t);Un(e.requires,c,i.escape,d(n,`requires`)),Wn(e.dependencies,c,d(n,`dependencies`),r,i)}function Jn(e,t,n,r,i={}){let a=e=>e.includes(`#`)?(i.hash=!0,r?e.replaceAll(`#`,`%23`):e):e,o=t.get(``);Wn(e,o,`dependencies`,[],{semver:n,escape:a,own:new Map,root:o,omitted:void 0,resolved:void 0})}var Yn=`9.0.0`;function Xn(e,t,n,r){if(r!==void 0)return Jn(e,t,n,Nn(r));let i={hash:!1};try{Jn(e,t,n,!1,i)}catch(r){if(!(r instanceof s)||!i.hash)throw r;try{Jn(e,t,n,!0)}catch{throw r}gn(t,Yn,`an npm that writes a "#" as "%23"`)}}var Zn=[`checkVersions`,`semver`,`legacyPeerDeps`,`npm`],Qn=[`satisfies`,`valid`,`validRange`],$n=[`name`,`version`,`lockfileVersion`,`requires`,`packages`,...H];function er(e){let{semver:t,legacyPeerDeps:n=!1,npm:r}=oe(e,Zn),i=se(e,Qn);if(typeof n!=`boolean`)throw TypeError(`legacyPeerDeps: expected a boolean`);if(r!==void 0&&!(/^\d+\.\d+\.\d+$/u.test(r)&&Number(r.split(`.`)[0])>=9))throw TypeError(`npm: expected a version of npm 9 or later, such as 11.12.1`);if(r===`11.6.1`||r===`11.6.2`)throw TypeError(`npm: ${r} works the flags out in a way not read here`);return{semver:i?t:void 0,legacyPeerDeps:n,npm:r}}function tr(e){let t=T(e,void 0).lockfileVersion;if(t!==2&&t!==3)throw new s(`unsupported version: expected 2 or 3, found ${S(t)}`,`lockfileVersion`);if(T(e,void 0,t===2?[...$n,`dependencies`]:$n),e.requires!==!0)throw w(`true`,e.requires,`requires`);return t}function nr(e,t){let n=j(e.name,`name`);if(t.name!==void 0&&t.name!==n)throw new s(`expected the project's, ${u(t.name)}`,`name`);if(e.version!==t.version)throw new s(t.version===void 0?`a version, where the project has none`:`expected the project's, ${u(t.version)}`,`version`);let r=H.find(n=>F(e[n],n)!==t.flags[n]);if(r!==void 0)throw new s(`expected ${t.flags[r]?`true`:`none`}, as the project's in packages`,r);return{name:n,version:t.version}}var rr=e=>e.kind===`link`?`link:${K(e.target)}`:e.location;function ir(e){let t=Object.create(null);for(let n of e.edges.values())t[n.name]={type:n.type,spec:n.spec,accept:n.accept,target:n.to===void 0?void 0:rr(n.to)};return t}function ar(e){let{name:t,version:n,os:r,cpu:i,libc:a,license:o,funding:s,deprecated:c,hasInstallScript:l,flags:u}=e;return{name:t,version:n,edges:ir(e),bundleDependencies:e.bundleDependencies??[],engines:e.engines??Object.create(null),os:r,cpu:i,libc:a,bin:e.bin??Object.create(null),license:o,funding:s,deprecated:c,hasInstallScript:l,...u,devOptional:u.devOptional||u.dev||u.optional}}function or(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{semver:n,legacyPeerDeps:r,npm:i}=er(t),a=bn(e),o=tr(a),s=$t(a.packages),c=s.get(``),l=en(s);an(s,l,r),An(s,n),gn(s,i),pe(s),o===2&&Xn(a.dependencies,s,n,i);let u=nr(a,c),d=new Set(l.values()),f=Object.create(null),p=Object.create(null),m=Object.create(null);for(let e of new Set([c,...s.values()]))e.kind===`link`?m[e.location]=K(e.target):e.kind===`package`?p[e.location]={...ar(e),resolution:e.resolution,inBundle:e.inBundle}:f[K(e)]={...ar(e),workspace:d.has(e),workspaces:e.workspaces??[]};return{lockfileVersion:o,...u,importers:f,packages:p,links:m}}var J=class extends o{},sr=e=>RegExp(`(?:[^ ?:,[\\]{}#&*!|>'"%@\`-]|[-?:](?=[^${e}]))(?:[^:${e}]|:(?=[^${e}])| +(?=[^#:${e}]|:[^${e}]))*`,`uy`),cr={block:sr(` `),flow:sr(` ,[\\]{}`)},lr=/'((?:[^']|'')*)'/uy,ur=/"((?:[^"\\]|\\.)*)"/uy,dr={__proto__:null,0:`\0`,a:`\x07`,b:`\b`,t:` `,n:`
6
+ `,v:`\v`,f:`\f`,r:`\r`,e:`\x1B`," ":` `,'"':`"`,"/":`/`,"\\":`\\`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`},fr=/\\(?:x([\dA-Fa-f]{2})|u([\dA-Fa-f]{4})|U([\dA-Fa-f]{8})|(.))/gu;function pr(e,t){return e.replace(fr,(e,n,r,i,a)=>{if(a!==void 0){if(!(a in dr))throw new J(`unknown escape \\${a}`,t.line);return dr[a]}let o=Number.parseInt(n??r??i,16);if(o>1114111||o>=55296&&o<=57343)throw new J(`${e} is not a Unicode scalar value`,t.line);return String.fromCodePoint(o)})}var mr={__proto__:null,true:!0,false:!1,null:null},hr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[Ee][+-]?\d+)?$/u,gr=/^(?:~|null|true|false|\.nan|[+-]?(?:\.inf|0[box][\d_a-f]+|(?:\d[\d_]*(?:\.[\d_]*)?|\.[\d_]+)(?:e[+-]?\d+)?))$/iu,_r=/^\d{4}-(?:\d\d-\d\d|\d\d?-\d\d?(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)?(?: *(?:Z|[+-]\d\d?(?::\d\d)?))?)$/u;function vr(e,t){if(e in mr)return mr[e];if(hr.test(e)&&e!==`-0`){let n=Number(e);if(Math.abs(n)>2**53-1)throw new J(`number out of range ${a(e)}`,t.line);return n}if(gr.test(e)||_r.test(e))throw new J(`ambiguous scalar ${a(e)}, quote it`,t.line);return e}var yr=e=>e.pos<e.text.length?a(e.text.slice(e.pos)):`the end of the line`,br=(e,t)=>pr(e,{line:t});function xr(e,t){let n=g(e,lr);return n===null?(n=g(e,ur),n===null?(n=g(e,cr[t]),n===null?void 0:vr(n[0],e)):pr(n[1],e)):n[1].replaceAll(`''`,`'`)}function Sr(e,t){let n=xr(e,t);if(n===void 0)throw new J(`expected a scalar, found ${yr(e)}`,e.line);return n}function Cr(e,t,n,r){if(typeof t!=`string`)throw new J(`keys must be strings`,r);if(t===`<<`)throw new J(`merge keys are not supported`,r);if(t in e)throw new J(`duplicate key ${a(t)}`,r);e[t]=n}var wr=/ */uy,Tr=/, */uy,Er=/: +/uy,Dr=/:(?: +(?:#.*)?|$)/uy,Or=/(?: +#.*| *)$/uy,kr=64;function Ar(e,t){let n=t===`]`?[]:Object.create(null);if(e.workflow&&++e.depth>kr)throw new J(`nested too deep`,e.line);if(e.pos++,g(e,wr),e.text[e.pos]!==t)do{if(e.workflow&&e.text[e.pos]===t)break;if(e.workflow)Pr(e,n,t);else{let r=jr(e);if(t===`]`)n.push(r);else{if(g(e,Er)===null)throw new J(`expected ": " after the key, found ${yr(e)}`,e.line);Cr(n,r,jr(e),e.line)}}g(e,wr)}while(g(e,Tr)!==null);if(e.text[e.pos]!==t)throw new J(`expected "," or "${t}", found ${yr(e)}`,e.line);return e.pos++,e.workflow&&e.depth--,n}function jr(e){let t=e.text[e.pos];return e.workflow&&(t===`[`||t===`{`)?Ar(e,t===`[`?`]`:`}`):Sr(e,`flow`)}var Mr=/ *:(?=[ ,\]}]|$)/uy,Nr=/ *:/uy;function Pr(e,t,n){let r=e.text[e.pos]===`"`||e.text[e.pos]===`'`,i=jr(e),a=g(e,r?Nr:Mr)!==null;if(n===`]`&&!a){t.push(i);return}g(e,wr);let o=a&&e.text[e.pos]!==`,`&&e.text[e.pos]!==n?jr(e):null;if(n===`}`){Cr(t,i,o,e.line);return}let s=Object.create(null);Cr(s,i,o,e.line),t.push(s)}function Fr(e,t,n=!1){let r={text:e,pos:0,line:t,workflow:n,depth:0},i=e.startsWith(`{`)?Ar(r,`}`):e.startsWith(`[`)?Ar(r,`]`):Sr(r,`block`);if(g(r,Or)===null)throw new J(`unexpected ${yr(r)} after the value`,t);return i}function Ir(e,t){let n={text:e,pos:0,line:t},r=xr(n,`block`),i=n.pos;if(r===void 0||g(n,Dr)===null)return null;if(i>1024)throw new J(`a key longer than 1024 characters is written after "? "`,t);return{key:r,rest:e.slice(n.pos)}}var Lr=2**20,Rr=128;function zr(e){if(e.text.includes(` `))throw new J(`U+0009 is not allowed outside a block scalar`,e.number)}function Br(e,t){if(!e.startsWith(`&`))return{anchor:null,rest:e};let n=/^&([^ ,[\]{}]+)(?: +|$)/u.exec(e);if(n===null)throw new J(`expected an anchor's name, found ${a(e)}`,t);let r=e.slice(n[0].length);if(r.startsWith(`*`))throw new J(`an alias with an anchor is not supported`,t);return{anchor:n[1],rest:r}}function Vr(e,t,n){if(/^\*[^ ,[\]{}]+ *:(?: |$)/u.test(t))throw new J(`an alias as a key is not supported`,n);let r=/^\*([^ ,[\]{}]+)(?: +#.*| *)$/u.exec(t);if(r===null)throw new J(`unexpected ${a(t)} after an alias`,n);if(!e.anchors.has(r[1]))throw new J(`unknown alias ${a(`*${r[1]}`)}`,n);return e.aliased=!0,e.anchors.get(r[1])}function Hr(e,t=1){let n=e[0];for(let r=t;r<e.length;r++)if(n===`"`&&e[r]===`\\`)r++;else if(e[r]===n){if(n===`'`&&e[r+1]===`'`)r++;else return r}return-1}function Ur(e,t){let n=/ *$/u.exec(e).index,r=/\\*$/u.exec(e.slice(0,n))[0].length;return t&&r%2==1?n===e.length?{text:e.slice(0,-1),escaped:!0}:{text:e.slice(0,n+1),escaped:!1}:{text:e.slice(0,n),escaped:!1}}function Wr(e,t,n){let r=0,i=!1,a=``;for(let[o,s]of e.entries()){let c=o===e.length-1,l=o===0?s:s.replace(/^ +/u,``);if(o>0&&!c&&l===``){r++;continue}if(i&&r>0)throw new J(`an empty line after an escaped line break is not supported`,n);o>0&&(a+=r>0?`
7
+ `.repeat(r):i?``:` `);let u=c?{text:l,escaped:!1}:Ur(l,t);a+=u.text,r=0,i=u.escaped}return a}function Gr(e,t,n,r){let i=t[0]===`"`,o=[t.slice(1)],s=[n.number];for(let c=e.line;;c=e.advance()){if(c===void 0||e.isMarker(c))throw new J(`a quoted scalar that does not close`,n.number);zr(c),s.push(c.number);let l=Hr(`${t[0]}${c.text}`);if(l===-1){o.push(c.text);continue}if(o.push(c.text.slice(0,l-1)),!/^(?: +#.*| *)$/u.test(c.text.slice(l)))throw new J(`unexpected ${a(c.text.slice(l))} after the value`,c.number);if(e.advance(),i)for(let[e,t]of o.entries())r(t,s[e]);let u=Wr(o,i,n.number);return i?r(u,n.number):u.replaceAll(`''`,`'`)}}function Kr(e,t,n){if(/(?:^| )#/u.test(t))return t;let r=0,i=t.replace(/ +$/u,``);for(let t=e.line;t!==void 0;t=e.advance()){if(t.text===``){r++;continue}if(t.indent<=n||t.text.startsWith(`#`)||e.isMarker(t))break;if(zr(t),i+=`${r>0?`
8
+ `.repeat(r):` `}${t.text.replace(/ +$/u,``)}`,r=0,/ #/u.test(t.text)){e.advance();break}}return i}function qr(e,t,n){let r=n===`plain`;for(let i=0;i<e.length;i++){let a=e[i];if(a!==` `){if((a===`"`||a===`'`)&&n!==`plain`){let t=Hr(e.slice(i));if(t===-1)return{open:-1,kept:e,last:n,comment:!1};i+=t,n=`quoted`}else{if(a===`#`&&(i===0||e[i-1]===` `))return{open:t,kept:e.slice(0,i),last:n,comment:!0};if(a===`[`||a===`{`)t++,n=`open`;else if(a===`]`||a===`}`){if(n=`close`,--t===0)return{open:t,kept:e.slice(0,i+1),after:e.slice(i+1),last:n,comment:!1}}else if(a===`,`||a===`:`&&/^(?:[ ,[\]{}]|$)/u.test(e[i+1]??``)){if(a===`:`&&r)return{open:t,kept:e,last:n,comment:!1,keyed:!0};n=`indicator`}else n=`plain`}r&&=n===`plain`}}return{open:t,kept:e,last:n,comment:!1}}function Jr(e,t,n,r){let i=0,o=!1,s=null,c=!1,l=qr(t,0,null),u=null,d=``;for(let t=n;;){if(l.open===-1)throw new J(`a quoted scalar in a flow collection does not close on its line`,t.number);let f=l.kept.replace(/ +$/u,``);if(f!==``){let e=c&&!/^(?:[,\]}]|:(?:[ ,[\]{}]|$))/u.test(f);if(e&&o)throw new J(`a plain scalar in a flow collection goes on past a comment`,t.number);if(l.keyed||f.startsWith(`:`)&&!e&&(s===`plain`||s===`quoted`))throw new J(`a key over more than one line is not supported`,t.number);if(e&&u!==null&&zr(u),e&&t.indent<=r)throw new J(`bad indentation of a plain scalar in a flow collection`,t.number);d!==``&&(d+=e&&i>1?`
9
+ `.repeat(i-1):` `),d+=f,i=0,s=l.last,c=s===`plain`,o=!1,u=null}if(o||=c&&l.comment,l.after!==void 0){if(!/^(?: +#.*| *)$/u.test(l.after))throw new J(`unexpected ${a(l.after)} after the value`,t.number);return t!==n&&e.advance(),d}if(t=t===n?e.line:e.advance(),t===void 0||e.isMarker(t))throw new J(`a flow collection that does not close`,n.number);let p=/^[\t ]*$/u.test(t.text);!p&&!t.text.startsWith(`#`)?zr(t):p&&c&&!o&&t.text.includes(` `)&&(u??=t),i++,l=qr(p?``:t.text,l.open,c&&!o?`plain`:null)}}function Yr(e){let t=new Map,n=(e,r)=>{if(typeof e!=`object`||!e)return{size:1,height:0};if(r>Rr)throw new J(`aliases nest the document past ${Rr} levels`);let i=t.get(e);if(i===void 0){i={size:1,height:0};for(let t of Object.values(e)){let e=n(t,r+1);if(i.size+=e.size,i.height=Math.max(i.height,e.height+1),i.size>Lr)throw new J(`aliases expand the document past ${Lr} nodes`)}t.set(e,i)}if(r+i.height>Rr)throw new J(`aliases nest the document past ${Rr} levels`);return i};n(e,0)}var Xr=64,Zr=RegExp(`(?! )${p.source}`,`u`);function Qr(e){if(typeof e!=`object`||!e)throw TypeError(`expected an options object`);let t=Object.keys(e).find(e=>e!==`workflow`&&e!==`lines`);if(t!==void 0)throw TypeError(`unknown option ${t}`);let{workflow:n=!1,lines:r}=e;if(typeof n!=`boolean`)throw TypeError(`expected workflow to be a boolean`);if(r!==void 0&&!(r instanceof WeakMap))throw TypeError(`expected lines to be a WeakMap`);return{workflow:n,lines:r}}var $r=e=>e.indent===0&&/^(?:---|\.\.\.)(?: |$)/u.test(e.text);function ei(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let n={text:e,pos:0,number:-1,line:void 0,...Qr(t),anchors:null,aliased:!1};n.workflow&&Object.assign(n,{advance:()=>Y(n),isMarker:$r}),Y(n);let r=[];ti(n);do r.push(ni(n));while(ti(n));return r}function ti(e){return X(e)!==void 0||e.line===void 0?!1:(Y(e),!0)}function ni(e){let t=X(e);if(t===void 0)throw new J(`empty document`,e.line?.number);if(t.indent!==0)throw new J(`the document does not start at column 0`,t.number);e.workflow&&Object.assign(e,{anchors:new Map,aliased:!1});let n=ii(e,0,0);if(e.aliased&&Yr(n),X(e)!==void 0)throw new J(`unexpected content after the document`,e.line.number);if(typeof n!=`object`||!n)throw new J(`the document is a lone scalar, not a mapping or a sequence`,t.number);return n}function Y(e){let{text:t,pos:n}=e;if(e.line=void 0,n>=t.length)return;let r=t.indexOf(`
10
+ `,n);r===-1&&(r=t.length),e.pos=r+1;let a=++e.number;if(t[r-1]===`\r`&&r--,r-n>y)throw new J(`line longer than ${y} characters`,a);let o=n;for(;t[o]===` `;)o++;let s=t.slice(o,r),c=(e.workflow?Zr:p).exec(s)?.[0];if(c!==void 0)throw new J(`${i(c)} is not allowed`,a);return e.line={indent:o-n,text:s,number:a},e.line}function X(e){let t=e.line;for(;t!==void 0&&(t.text===``||t.text[0]===`#`||e.workflow&&/^[\t ]*$/u.test(t.text));)t=Y(e);if(t!==void 0&&e.workflow&&zr(t),t?.indent!==0||!/^(?:---|\.\.\.(?: |$)|%)/u.test(t.text))return t;if(!/^--- *$/u.test(t.text))throw new J(t.text.startsWith(`---`)?`content on the document marker line`:`document end markers and directives are not supported`,t.number)}var Z=e=>/^-(?: |$)/u.test(e.text),ri=e=>/^[|>]/u.test(e);function ii(e,t,n){let r=X(e);if(n>Xr)throw new J(`nested too deep`,r.number);if(Z(r))return si(e,t,n);let i=r.text.startsWith(`? `)?void 0:gi(e,r);return i===null?(Y(e),e.workflow?pi(e,r.text,r.indent-1,n,r):Fr(r.text,r.number)):oi(e,t,n,i)}function ai(e,t,n,r){let i;for(i=X(e);i?.indent===t;i=X(e)){if(r?.(i))return;n(i)}if(i?.indent>t)throw new J(`bad indentation`,i.number)}function oi(e,t,n,r){let i=Object.create(null),o=e.lines&&new Map;e.lines?.set(i,o);let s=r;return ai(e,t,r=>{if(!r.text.startsWith(`? `)){let c=s??gi(e,r);if(s=void 0,c===null)throw new J(`expected a mapping key, found ${a(r.text)}`,r.number);Y(e),c.anchor&&e.anchors.set(c.anchor,c.key),Cr(i,c.key,ci(e,c.rest,t,n,r),r.number),o?.set(c.key,r.number);return}Y(e);let c=Fr(r.text.slice(2),r.number),l=X(e);if(l?.indent!==t||!/^:(?: |$)/u.test(l.text))throw new J(`expected ": " below the explicit key`,(l??r).number);Cr(i,c,li(e,l,t,n),r.number),o?.set(c,r.number)}),i}function si(e,t,n,r=!1){let i=[],o=e.lines&&[];return e.lines?.set(i,o),ai(e,t,r=>{if(!Z(r))throw new J(`expected "- ", found ${a(r.text)}`,r.number);o?.push(r.number),i.push(li(e,r,t,n))},r?e=>!Z(e):void 0),i}function ci(e,t,n,r,i){if(e.workflow)return pi(e,t,n,r,i);if(ri(t))return ui(e,t,n,i);if(t!==``)return Fr(t,i.number);let a=X(e);if(a?.indent===n&&Z(a)&&!Z(i))throw new J(`a sequence under a key must be indented`,a.number);if(a===void 0||a.indent<=n)throw new J(`missing value`,i.number);return ii(e,a.indent,r+1)}function li(e,t,n,r){let i=/^[-:] *(?:#.*)?/u.exec(t.text)[0].length;if(e.workflow)return hi(e,t,n,r,i);let a=t.text.slice(i);return a===``||ri(a)?(Y(e),ci(e,a,n,r,t)):(e.line={...t,indent:t.indent+i,text:a},ii(e,t.indent+i,r+1))}function ui(e,t,n,r){let{folded:i,digit:a,chomp:o}=di(e,t,r),s=n+Number(a),c=a!==``,l=0,u=``,d=null;for(let t=e.line;t!==void 0&&(t.text===``||t.indent>n);t=Y(e)){if(c||(s=Math.max(s,t.indent)),c||=t.text!==``,t.text!==``&&t.indent<s)throw new J(`bad indentation in the block scalar`,t.number);let e=`${` `.repeat(Math.max(t.indent-s,0))}${t.text}`;if(e!==``){let t=/^[\t ]/u.test(e);u+=i?fi(l,d,t):`
11
+ `.repeat(l),u+=e,d=t}l=e===``?l+1:1}return o===`+`?u+`
12
+ `.repeat(l):o===`-`?u:u&&`${u}
13
+ `}function di(e,t,n){let r=e.workflow?/^([|>])(?:([1-9])([+-]?)|([+-])([1-9]?))?(?: +#.*| *)$/u.exec(t):/^\|([1-9]?)([+-]?)$/u.exec(t);if(r===null)throw new J(`unsupported block scalar ${a(t)}`,n.number);return e.workflow?{folded:r[1]===`>`,digit:r[2]??r[5]??``,chomp:r[3]||r[4]||``}:{folded:!1,digit:r[1],chomp:r[2]}}var fi=(e,t,n)=>t===null||t||n?`
14
+ `.repeat(e):e===1?` `:`
15
+ `.repeat(e-1);function pi(e,t,n,r,i){let{anchor:a,rest:o}=Br(t,i.number),s=mi(e,o.startsWith(`#`)?``:o,n,r,i);return a!==null&&e.anchors.set(a,s),s}function mi(e,t,n,r,i){if(t.startsWith(`*`))return Vr(e,t,i.number);if(ri(t))return ui(e,t,n,i);if(t.startsWith(`[`)||t.startsWith(`{`))return Fr(Jr(e,t,i,n),i.number,!0);let a=t.startsWith(`'`)||t.startsWith(`"`);if(a&&Hr(t)===-1)return Gr(e,t,i,br);if(t!==``)return Fr(a?t:Kr(e,t,n),i.number,!0);let o=X(e);return o?.indent===n&&Z(o)&&!Z(i)?si(e,n,r+1,!0):o===void 0||o.indent<=n?null:!Z(o)&&!o.text.startsWith(`? `)&&gi(e,o)===null?(Y(e),pi(e,o.text,n,r+1,o)):ii(e,o.indent,r+1)}function hi(e,t,n,r,i){let a=t.text.slice(i),{anchor:o,rest:s}=Br(a,t.number),c=t.indent+i;if(s!==``&&!s.startsWith(`#`)&&(Z({text:s})||s.startsWith(`? `))){if(o!==null)throw new J(`an anchor before a block on its own line is not supported`,t.number);return e.line={...t,indent:c,text:s},ii(e,c,r+1)}if(s!==``&&!s.startsWith(`#`)&&Ir(s,t.number)!==null)return e.line={...t,indent:c,text:a},ii(e,c,r+1);Y(e);let l=mi(e,s.startsWith(`#`)?``:s,n,r,t);return o!==null&&e.anchors.set(o,l),l}function gi(e,t){if(!e.workflow||!t.text.startsWith(`&`))return Ir(t.text,t.number);let{anchor:n,rest:r}=Br(t.text,t.number),i=Ir(r,t.number);return i&&{...i,anchor:n}}var Q=[`dependencies`,`devDependencies`,`optionalDependencies`];function _i(e,t,n){let[r,i]=[`dependencies`,`optionalDependencies`].map(r=>n(e[r],d(t,r))),a=Object.keys(i).find(e=>e in r);if(a!==void 0)throw new s(`listed under dependencies too`,d(d(t,`optionalDependencies`),a));return{dependencies:r,optionalDependencies:i}}function vi(e,t){let n=new Set,r=e=>{for(let t of Object.values(e))t.startsWith(`link:`)||n.add(t)};for(let t of e)r(t);for(let e of n)r(t[e].dependencies),r(t[e].optionalDependencies);return Object.keys(t).find(e=>!n.has(e))}function yi(e,t,{required:n=[`dependencies`],dev:r=[`devDependencies`],optional:i=[`optionalDependencies`]}={}){let a=(n,r)=>{let i=new Set,a=t=>{for(let n of Object.values(t))n.startsWith(`link:`)||i.add(e[n])};for(let e of Object.values(t))for(let t of n)a(e[t]);for(let e of i)for(let t of r)a(e[t]);return i},o=a([...n,...i],[`dependencies`,`optionalDependencies`]),s=a([...n,...r],[`dependencies`]),c=a(n,[`dependencies`]);return e=>({dev:!o.has(e),optional:!s.has(e),devOptional:!c.has(e)})}var bi=`(patch_hash=`;function xi(e){let t={start:e.length,peers:e.length};if(!e.endsWith(`)`))return t;let n=1;for(let t=e.length-2;t>=0;t--)if(e[t]===`(`)n--;else if(e[t]===`)`)n++;else if(n===0){if(!e.startsWith(bi,t+1))return{start:t+1,peers:t+1};let n=e.indexOf(`(`,t+2);return{start:t+1,peers:n===-1?e.length:n}}return t}function Si(e){if(typeof e!=`string`)throw TypeError(`expected a string`);return e.slice(0,xi(e).start)}function Ci(e,t,n){let r=[],[i,a]=[0,0];for(let o=0;o<e.length;o++){if(i===0&&(e[o]!==`(`||e[o+1]===`)`||e.startsWith(bi,o)))throw new s(`${u(t)} does not end in peers in parentheses`,n);e[o]===`(`&&i++===0?a=o+1:e[o]===`)`&&--i===0&&r.push(e.slice(a,o))}return r}function wi(e,t){let{start:n,peers:r}=xi(e),i;if(n<r){let a=e.slice(n,r);if(i=/^\(patch_hash=([\da-z]+)\)$/u.exec(a)?.[1],i===void 0)throw new s(`${u(a)} is not a patch hash`,t)}return{base:e.slice(0,n),patchHash:i,peers:Ci(e.slice(r),e,t)}}var Ti=e=>r(e,{padding:!1}),Ei=(e,t,n)=>l(()=>e===e.toLowerCase()&&n(e).length===t,()=>!1);function Di(e,t){let n=e.indexOf(`@`,1);if(n===-1||n===e.length-1)throw new s(`${u(e)} is not a key of the form name@version`,t);if(Si(e)!==e)throw new s(`${u(e)} carries a peer or patch suffix, which only a snapshot key does`,t);return{name:I(e.slice(0,n),t),ref:e.slice(n+1)}}var Oi=(e,t)=>/^[^:(]*@/u.test(e)?e:`${t}@${e}`;function ki(e,t){let n=j(e,t);if(n.startsWith(`file:`))L(n.slice(5),t);else if(!Ve(n))throw new s(`${u(n)} is not an http(s) URL or a file: path`,t);return n}var Ai=(e,t)=>e===``?`.`:L(e,t),ji=(e,t)=>A(e,`path`,t,(e,t)=>(Te(j(e,t).replace(/^\//u,``),t),e));function Mi(e,t){T(e,t,[`integrity`,`tarball`,`path`,`gitHosted`]);let{integrity:n,tarball:r}=e;if(n===void 0&&r===void 0)throw new s(`expected an integrity or a tarball`,t);return{type:`tarball`,integrity:A(e,`integrity`,t,ze),tarball:A(e,`tarball`,t,ki),path:ji(e,t),gitHosted:F(e.gitHosted,d(t,`gitHosted`))}}function Ni(e,t){T(e,t,[`type`,`repo`,`commit`,`path`]);let n=j(e.commit,d(t,`commit`));if(!ke(n))throw new s(`${u(n)} is not a full commit hash`,d(t,`commit`));return{type:`git`,repo:Ie(e.repo,d(t,`repo`)),commit:n,path:ji(e,t)}}function Pi(e,t){return T(e,t,[`type`,`directory`]),{type:`directory`,directory:Ai(e.directory,d(t,`directory`))}}var Fi=new Map([[void 0,Mi],[`git`,Ni],[`directory`,Pi]]);function Ii(e,t){let n=T(e,t),r=Fi.get(n.type);if(r===void 0)throw new s(`unsupported resolution type, ${S(n.type)}`,d(t,`type`));return r(n,t)}var Li=[`resolution`,`version`,`name`,`engines`,`cpu`,`os`,`libc`,`deprecated`,`hasBin`,`bundledDependencies`,`peerDependencies`,`peerDependenciesMeta`],Ri=[`dependencies`,`optionalDependencies`,`optional`,`transitivePeerDependencies`],zi=new Set([`bitbucket`,`catalog`,`custom`,`file`,`git`,`github`,`gitlab`,`http`,`https`,`jsr`,`link`,`npm`,`ssh`,`workspace`]);function Bi(e,t,n,r,i){let{type:a,tarball:o}=r,c=o?.startsWith(`file:`);if(be(t)){if(a!==`tarball`||r.integrity===void 0||c||r.gitHosted||r.path!==void 0)throw new s(`expected a registry tarball with an integrity, for the version ${u(t)}`,d(i,`resolution`));if(n.version!==void 0&&n.version!==t)throw new s(`expected the version in the key, ${u(t)}`,d(i,`version`));return o!==void 0&&Ue(o,e,t,d(d(i,`resolution`),`tarball`)),t}let l=/^([A-Za-z][\w+.-]*):/u.exec(t)?.[1];if(l===void 0)throw new s(`${u(t)} is neither a version nor a source`,i);if(l===`runtime`||!zi.has(l)&&be(t.slice(l.length+1)))throw new s(`${u(t)} is from a runtime or a named registry, which is not supported`,i);if(!(l===`file`?t===(a===`directory`?`file:${n.resolution.directory}`:o):a===`git`||a===`tarball`&&o!==void 0&&!c))throw new s(`${u(t)} is not where the resolution says the package comes from`,d(i,`resolution`));if(a===`directory`){if(n.version!==void 0)throw new s(`a directory has no version in the lockfile`,d(i,`version`));return}if(n.version===void 0)throw new s(`expected a version, for a package not from the registry`,i);return xe(n.version,d(i,`version`))}var Vi=(e,t)=>M(e,t,I);function Hi(e,t,n){T(t,n,Li);let{name:r,ref:i}=Di(e,n);if(t.name!==void 0&&t.name!==r)throw new s(`expected the name in the key, ${u(r)}`,d(n,`name`));let a=Ii(t.resolution,d(n,`resolution`)),o=t.bundledDependencies;return{name:r,version:Bi(r,i,t,a,n),resolution:a,engines:P(k(t.engines),d(n,`engines`)),os:A(t,`os`,n,M),cpu:A(t,`cpu`,n,M),libc:A(t,`libc`,n,M),deprecated:A(t,`deprecated`,n,j),hasBin:F(t.hasBin,d(n,`hasBin`)),bundledDependencies:o===void 0||o===!0?o:Vi(o,d(n,`bundledDependencies`)),peerDependencies:P(k(t.peerDependencies),d(n,`peerDependencies`),I),peerDependenciesMeta:Wi(t.peerDependenciesMeta,d(n,`peerDependenciesMeta`))}}var Ui=(e,t)=>(n,r)=>N(k(n),r,(n,r,i)=>(T(n,r,e),I(i,r),t(n,r))),Wi=Ui([`optional`],(e,t)=>({optional:F(e.optional,d(t,`optional`))}));function Gi(e,t,n,r,i){if(e.startsWith(`link:`))return`link:${Ee(n,Ai(e.slice(5),i))}`;let a=Oi(e,t);if(!(a in r))throw new s(`${u(e)} leads to ${u(a)}, which is not in snapshots`,i);return a}var Ki=(e,t,n)=>N(k(e),t,(e,t,r)=>{let i=j(e,t);if(i===`link:<root>`||i.startsWith(`link:<root>/`))throw new s(`${u(i)} leads into the package that asks for it, which is not supported`,t);return Gi(i,I(r,t),`.`,n,t)});function qi(e,t,n){return T(e,t,Ri),{..._i(e,t,(e,t)=>Ki(e,t,n)),optional:F(e.optional,d(t,`optional`)),transitivePeerDependencies:A(e,`transitivePeerDependencies`,t,Vi)??[]}}var Ji=e=>Ei(e,16,Ti)||Ei(e,16,n);function Yi(e){let t=e.indexOf(`@`,1);return t===-1?``:e.slice(0,t)}function Xi(e){let t=l(()=>wi(e),()=>{});if(t===void 0)return;let n=t.patchHash===void 0?t.base:`${t.base}(patch_hash=${t.patchHash})`;if(t.peers.length===1&&Ji(t.peers[0]))return{unpeered:n,peers:void 0};let r=new Map(t.peers.map(e=>[Yi(e),e]));return r.size===t.peers.length?{unpeered:n,peers:r}:void 0}var Zi=32;function Qi(e,t,n,r=0){if(e===t)return!0;let[i,a]=[Xi(e),Xi(t)];if(r>Zi||i===void 0||a===void 0||i.unpeered!==a.unpeered)return!1;if(i.peers===void 0||a.peers===void 0)return!0;let{dependencies:o,optionalDependencies:s}=n[t];return[...i.peers].every(([e,t])=>{if(!a.peers.has(e))return!1;let i=o[e]??s[e];return i===void 0?t===a.peers.get(e):!i.startsWith(`link:`)&&Qi(t,i,n,r+1)})}function $i(e,t,n,r,i,a){if(e.length===0||e.length===1&&Ji(e[0]))return;let o=new Set,c=new Set;for(let[e,r]of Object.entries({...t.dependencies,...t.optionalDependencies})){if(r.startsWith(`link:`)){c.add(e);continue}o.add(r);let t=n.get(Si(r));t!==void 0&&(t.version===void 0?c.add(t.name):o.add(`${t.name}@${t.version}`))}let l=t.transitivePeerDependencies;for(let n of e){let e=Yi(n);if(e===``)throw new s(`${u(n)} is not a peer, as pnpm writes one in a key`,a);let d=!n.includes(`(`);if(o.has(n)||d&&c.has(e))continue;let f=d&&l.includes(e)&&!be(n.slice(e.length+1));if(!(l.length>0&&(r().has(n)||f))){if(d)throw ea(n,a);i.push({group:n,snapshot:t,where:a})}}}var ea=(e,t)=>new s(`the peer ${u(e)} is not one of its dependencies, nor a peer of theirs it resolves`,t);function ta(e,t){let n;for(let{group:r,snapshot:i,where:a}of e){let e=Object.values({...i.dependencies,...i.optionalDependencies}).filter(e=>!e.startsWith(`link:`)),o=Xi(r)?.unpeered;if(i.transitivePeerDependencies.includes(Yi(r))&&o!==void 0&&(n??=Map.groupBy(Object.keys(t),e=>Xi(e)?.unpeered),e.push(...n.get(o)??[])),!e.some(e=>Qi(r,e,t)))throw ea(r,a)}}function na(e,t,n){if(e.version===void 0&&[...t.keys()].some(t=>t.startsWith(`${e.name}@`)))throw new s(`a package of no version in the lockfile, which a patch of a version of ${u(e.name)} may be of`,n);let r=`${e.name}@${e.version}`;return e.version!==void 0&&t.has(r)?r:t.has(e.name)?e.name:void 0}function ra(e,t,n){let r=new Map,i=new Map,a=d(t,`packages`);for(let[t,n,o]of E(k(e.packages),a)){let e=Hi(t,n,o);r.set(t,e),n.version!==void 0&&t===`${e.name}@${e.version}`&&i.set(t,d(o,`version`))}let o=d(t,`snapshots`),c=T(k(e.snapshots),o),l,f=()=>l??=new Set([...Object.keys(c),...r.keys(),...[...r.values()].map(e=>`${e.name}@${e.version}`)]),p=new Set,m=new Set,h=[],g=N(c,o,(e,t,a)=>{let{base:o,patchHash:l,peers:d}=wi(a,t),g=r.get(o);if(g===void 0)throw new s(`${u(o)} is not in packages`,t);let _=na(g,n,t);_!==void 0&&m.add(_);let v=_===void 0?void 0:n.get(_).hash;if(v!==l){let e=_===void 0?`none, as patchedDependencies patches no such package`:`${u(v)}, of patchedDependencies[${u(_)}]`;throw new s(`expected the patch hash ${e}, found ${l===void 0?`none`:u(l)}`,t)}p.add(o),a.includes(`:`)&&i.delete(o);let y=qi(e,t,c);return $i(d,y,r,f,h,t),{...g,patchHash:l,...y}});ta(h,g);for(let e of r.keys())if(!p.has(e))throw new s(`no snapshot is of this package`,d(a,e));let _=[...n.keys()].find(e=>!m.has(e));if(_!==void 0)throw new s(`patches no package in the lockfile, which pnpm refuses to install with`,d(d(t,`patchedDependencies`),_));for(let e of i.values())throw new s(`a registry package has its version in its key, except where a snapshot of it has a source in its peers`,e);return{packages:g,snapshots:c}}var ia=[...Q,`dependenciesMeta`,`publishDirectory`,`linkDirectory`],aa=[`configDependencies`,`packageManagerDependencies`];function oa(e,t,n,r,i){let a=Object.create(null),o={specifiers:a},c=Object.create(null);for(let l of t)o[l]=N(k(e[l]),d(r,l),(e,t,r)=>{if(I(r,t),T(e,t,[`specifier`,`version`]),r in a)throw new s(`listed under ${c[r]} too`,t);a[r]=D(e.specifier,d(t,`specifier`)),c[r]=l;let o=d(t,`version`);return Gi(j(e.version,o),r,n,i,o)});return o}var sa=Ui([`injected`,`node`],(e,t)=>({injected:A(e,`injected`,t,O)??!1,node:A(e,`node`,t,j)}));function ca(e,t,n,r){if(T(e,n,ia),e.linkDirectory!==void 0&&e.linkDirectory!==!1)throw new s(`expected false, the only value pnpm writes`,d(n,`linkDirectory`));return{...oa(e,Q,t,n,r),dependenciesMeta:sa(e.dependenciesMeta,d(n,`dependenciesMeta`)),publishDirectory:A(e,`publishDirectory`,n,L),linkDirectory:e.linkDirectory!==!1}}function la(e,t,n,r){let i=N(e,t,(e,t,i)=>{if(L(i,t),!r)return ca(e,i,t,n);if(i!==`.`)throw new s(`the env document has no importer but "."`,t);return T(e,t,aa),oa(e,aa,i,t,n)});if(r&&!(`.`in i))throw new s(`expected the "." importer`,t);return i}var ua=[`lockfileVersion`,`settings`,`catalogs`,`overrides`,`patchedDependencies`,`packageExtensionsChecksum`,`pnpmfileChecksum`,`ignoredOptionalDependencies`,`time`,`importers`,`packages`,`snapshots`],da=[`lockfileVersion`,`importers`,`packages`,`snapshots`],fa={__proto__:null,autoInstallPeers:O,dedupePeers:O,excludeLinksFromLockfile:O,injectWorkspacePackages:O,peersSuffixMaxLength:ie},pa=(e,t)=>N(T(k(e),t,Object.keys(fa)),t,(e,t,n)=>fa[n](e,t)),ma=(e,t)=>N(k(e),t,(e,t,n)=>(j(n,t),Ui([`specifier`,`version`],(e,t)=>({specifier:D(e.specifier,d(t,`specifier`)),version:j(e.version,d(t,`version`))}))(e,t)));function ha(e,t){if(e.indexOf(`@`,1)===-1)return I(e,t);if(!be(Di(e,t).ref))throw new s(`${u(e)} is not a name and a version, or a name alone, which is not supported`,t)}var ga=(e,t)=>N(k(e),t,(e,t,r)=>{let i=typeof e!=`string`;i&&T(e,t,[`hash`,`path`]);let a=i?d(t,`hash`):t,o=j(i?e.hash:e,a);if(!Ei(o,32,n)&&!Ei(o,16,Ti))throw new s(`${u(o)} is not a patch hash`,a);return ha(r,t),{hash:o,path:i?L(e.path,d(t,`path`)):void 0}});function _a(e,t){let r=j(e,t);if(Ei(r,16,n)||Ei(r,16,Ti))return r;if(!r.startsWith(`sha256-`))throw new s(`${u(r)} is not a checksum`,t);return ze(r,t)}var va=/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d+)?Z$/u,ya=(e,t,n)=>N(k(e),t,(e,t,r)=>{if(!(r in n))throw new s(`${u(r)} is not in packages`,t);let i=j(e,t),a=va.test(i)?Date.parse(i):NaN;if(Number.isNaN(a)||new Date(a).toISOString().slice(0,19)!==i.slice(0,19))throw new s(`${u(i)} is not a UTC timestamp`,t);return i});function ba(e,t,n,r){let i=vi(Object.values(e).flatMap(e=>r.map(t=>e[t])),t);if(i!==void 0)throw new s(`no importer depends on it, directly or not`,d(d(n,`snapshots`),i))}function xa(e,t,n){let r=yi(t,e,n?{required:aa,dev:[],optional:[]}:void 0);for(let e of Object.values(t)){let{dev:t,devOptional:n}=r(e);Object.assign(e,{dev:t,devOptional:n})}}function Sa(e,t,n){let r=t===``?void 0:t,i=T(e,r).lockfileVersion;if(i!==`9.0`)throw new s(`unsupported version: expected "9.0", found ${S(i)}`,d(t,`lockfileVersion`));T(e,r,n?da:ua);let a=ga(e.patchedDependencies,d(t,`patchedDependencies`)),{packages:o,snapshots:c}=ra(e,t,new Map(Object.entries(a))),l=la(e.importers,d(t,`importers`),c,n);return ba(l,o,t,n?aa:Q),xa(l,o,n),n?{lockfileVersion:i,importers:l,packages:o}:{lockfileVersion:i,settings:pa(e.settings,d(t,`settings`)),catalogs:ma(e.catalogs,d(t,`catalogs`)),overrides:P(k(e.overrides),d(t,`overrides`),j),patchedDependencies:a,packageExtensionsChecksum:A(e,`packageExtensionsChecksum`,t,_a),pnpmfileChecksum:A(e,`pnpmfileChecksum`,t,_a),ignoredOptionalDependencies:A(e,`ignoredOptionalDependencies`,t,M)??[],time:ya(e.time,d(t,`time`),k(e.packages)),importers:l,packages:o}}function Ca(e){if(typeof e!=`string`)throw TypeError(`expected a string`);let t=/^---\r?\n/u.exec(e)?.[0];if(t===void 0){let t=ei(e);if(t.length!==1)throw new s(`expected one document, found ${t.length}`);return{lockfile:Sa(t[0],``,!1),env:void 0}}let n=/\n---\r?\n/gu;n.lastIndex=t.length;let r=n.exec(e);if(r===null)throw new s(`expected the env document the first "---" starts to end at a line of "---"`);let i=/^(?: *\r?\n)* *$/u.test(e.slice(n.lastIndex)),a=ei(i?e.slice(0,r.index+1):e);if(a.length!==(i?1:2))throw new s(`expected the env document${i?``:` and the lockfile`} between lines of "---" alone, found ${a.length} documents`);return{lockfile:i?void 0:Sa(a[1],``,!1),env:Sa(a[0],`env`,!0)}}var wa=[`name`,`version`,`uid`,`resolved`,`integrity`,`dependencies`,`optionalDependencies`];function Ta(e,t){let n=e.indexOf(`@`,1);if(n===-1)throw new s(`${u(e)} is not a pattern of the form name@range`,t);return{name:I(e.slice(0,n),t),range:e.slice(n+1)}}function Ea(e){if(!e.startsWith(`npm:`))return;let t=e.slice(4),n=t.indexOf(`@`,1);return n===-1?{name:t,range:``}:{name:t.slice(0,n),range:t.slice(n+1)}}var Da=new Set([`github.com`,`gitlab.com`,`bitbucket.com`,`bitbucket.org`]);function Oa(e){if(/^(?:git:|git\+.+:|ssh:|https?:.+\.git(?:$|#.))/u.test(e))return!0;let t=URL.parse(e);return t!==null&&Da.has(t.hostname)&&`${t.pathname}${t.search}`.split(`/`).filter(Boolean).length===2}var ka=/^[^:@%/\s.-][^:@%/\s]*\/[^:@\s/%][^:@\s/%#]*(?:#.*)?$/u;function Aa(e){return Oa(e)?`git`:/^https?:\/\//u.test(e)||!e.includes(`@`)&&/\.(?:tgz|tar\.gz)$/u.test(e)?`tarball`:e.startsWith(`github:`)||ka.test(e)?`github`:/^(?:file:|\.{1,2}\/|\/)/u.test(e)?`file`:/^(link|gitlab|gist|bitbucket):/u.exec(e)?.[1]??`registry`}var ja={github:{host:`github.com`,archive:e=>[`https://codeload.github.com/${e}/tar.gz/`,``]},gitlab:{host:`gitlab.com`,archive:e=>[`https://gitlab.com/${e}/repository/archive.tar.gz?ref=`,``]},bitbucket:{host:`bitbucket.org`,archive:e=>[`https://bitbucket.org/${e}/get/`,`.tar.gz`]}};function Ma(e){let t=e.split(`@`),n=(t.length>2?`${t[1]}@${t[2]}`:e).replace(/#.*/u,``).replace(/^.*:/u,``).replace(/.git$/u,``).split(`/`);return n.length<2?void 0:n.slice(-2).join(`/`)}function Na(e){let t=e.replace(/^(?:file|link):/u,``);return t.startsWith(`/`)?`/${t.split(`/`).filter(e=>e!==``&&e!==`.`).join(`/`)}`:De(`.`,t)}function Pa(e,t,n){let r=xe(e,t);if(n!==void 0&&n.valid(r)===null)throw new s(`${u(r)} is not a version semver reads`,t);return r}function Fa(t,r,i,a,o){if(t.startsWith(`file:`))L(t.slice(t.startsWith(`file:./`)?7:5),a);else if(!Ve(t))throw new s(`${u(t)} is not an http(s) URL, a file: path or a git URL`,a);if(r!==void 0&&!Ae(r))throw new s(`${u(r)} is not the hex sha1 of a tarball`,a);let c=i===void 0?void 0:Be(i,o).get(`sha1`);if(r!==void 0&&c!==void 0&&c.slice(5)!==e(n(r)))throw new s(`${u(c)} is not the sha1 after the "#" of resolved`,o);return{type:`tarball`,tarball:t,sha1:r,integrity:i}}function Ia(e,t){let n=d(t,`resolved`),r=d(t,`integrity`);if(e.resolved===void 0){if(e.integrity!==void 0)throw new s(`an integrity, with nothing resolved`,r);return}let[i,a,...o]=j(e.resolved,n).split(`#`);if(o.length>0)throw new s(`more than one "#", of which yarn reads the first alone`,n);if(!Oa(i))return Fa(i,a,e.integrity,n,r);if(e.integrity!==void 0)throw new s(`an integrity, which yarn does not check for a git repository`,r);if(a===void 0||!ke(a))throw new s(`expected a full commit hash after the "#" of ${u(i)}`,n);return{type:`git`,repo:Ie(i,n),commit:a}}function La(e){if(e!==void 0)return e.type===`git`?`${e.repo}#${e.commit}`:e.tarball.replace(/^file:\.\//u,`file:`)}var Ra=e=>e===void 0?`nothing, as for a directory`:e.type===`git`?`a git repository`:`a file: tarball`;function za(e,t,n){let[r]=e,i=e.find(e=>e.name!==r.name);if(i!==void 0)throw new s(`${u(r.key)} and ${u(i.key)} give it two names, of which yarn installs it under one alone`,n);if(t.name!==void 0){let e=D(t.name,d(n,`name`)),i=e===r.name?`the name its patterns give, which yarn does not write`:`yarn installs this as ${u(e)}, and leaves ${u(r.name)} out, which its patterns ask for`;throw new s(i,d(n,`name`))}let a=e.filter(e=>e.source===`registry`).map(({key:e,name:t,alias:r})=>[e,r===void 0?t:I(r.name,n)]),o=a.find(([,e])=>e!==a[0][1]);if(o!==void 0)throw new s(`${u(a[0][0])} and ${u(o[0])} ask for two packages, ${u(a[0][1])} and ${u(o[1])}`,n);return a[0]?.[1]}function Ba({range:e,source:t},n){let r=e.split(`#`)[0];if(t===`file`||t===`link`)return n===void 0;if(t===`tarball`)return n?.tarball===r;if(t===`git`)return n?.repo===r;if(t===`gist`)return n?.repo===`https://gist.github.com/${r.slice(5)}.git`;let{host:i,archive:a}=ja[t],o=Ma(e);if(o===void 0||n===void 0)return!1;if(n.type===`git`)return n.repo===`git+ssh://git@${i}/${o}.git`;let[s,c]=a(o),{tarball:l}=n;return l.startsWith(s)&&l.endsWith(c)&&ke(l.slice(s.length,l.length-c.length))}function Va(e,t){let[n,...r]=e.filter(e=>e.source===`file`||e.source===`link`),i=r.find(e=>n.source===`link`||e.source===`link`||Na(e.range)!==Na(n.range));if(i!==void 0)throw new s(`${u(n.key)} and ${u(i.key)} share an entry, where yarn writes one for each`,t)}function Ha(e,t,{asks:n,version:r},i){let a=e.filter(e=>e.source!==`registry`),o=a.find(e=>!Ba(e,t));if(o!==void 0)throw new s(`${u(o.key)} resolves to another source than it names`,d(i,`resolved`));Va(e,i);let c=e.find(e=>e.source===`registry`);if((a.length===0||a.some(e=>e.source===`tarball`))&&t?.type===`tarball`&&t.sha1===void 0&&t.integrity===void 0)throw new s(`a tarball with no hash, neither a sha1 after "#" nor an integrity, where yarn writes the sha1`,d(i,`resolved`));if(c!==void 0){if(a.length>0)return{registry:c.key,sources:a.map(e=>e.key)};if(t===void 0&&e.length===1)return{registry:c.key,sources:[]};if(t?.type!==`tarball`||t.tarball.startsWith(`file:`))throw new s(`${u(c.key)} asks for the registry, and resolves to ${Ra(t)}`,i);Ue(t.tarball,n,r,d(i,`resolved`))}}function Ua(e,t,n){let r=Object.create(null);for(let[i,a,o]of E(k(e),t)){let e=`${I(i,o)}@${D(a,o)}`;r[i]=e,n.push({targets:r,name:i,range:a,pattern:e,where:o})}return r}function Wa({keys:e,fields:t},n,r){T(t,n,wa);let i=e.map(e=>{let{name:t,range:n}=Ta(e,d(``,e));return{key:e,name:t,range:n,source:Aa(n),alias:Ea(n)}}),a=za(i,t,n),o=Pa(t.version,d(n,`version`),r),c=Ia(t,n),l=Ha(i,c,{asks:a,version:o},n),u=[],{dependencies:f,optionalDependencies:p}=_i(t,n,(e,t)=>Ua(e,t,u)),m=A(t,`uid`,n,D);if(m===o)throw new s(`the version, which yarn does not write as a uid`,d(n,`uid`));return{pkg:{patterns:e,name:i[0].name,version:o,uid:m,resolution:c,dependencies:f,optionalDependencies:p},patterns:i,handed:l,requests:u}}var Ga=/^(?![vV=]?\d|[xX*](?:\.|$))[A-Za-z][\w.-]*$/u;function Ka(e,t){return t===void 0?!/[:/@#]/u.test(e)&&!Ga.test(e):t.validRange(e)!==null}function qa(e,t,n,r,i){let a=e=>e.source===`registry`&&Ka(e.range,r),o=t.find(a)??n.patterns.find(a);if(o!==void 0)throw new s(`is ${e.name} ${e.version}, as ${u(n.key)} is, and yarn gives ${u(o.key)} whichever it resolves first`,i)}var Ja=({integrity:e})=>e===void 0?new Map:Be(e),Ya=e=>JSON.stringify(Object.entries(e).sort(([e],[t])=>e<t?-1:1));function Xa(e,t,n,r){for(let i of[`dependencies`,`optionalDependencies`])if(Ya(e[i])!==Ya(t[i]))throw new s(`other ${i} ${n}`,d(r,i))}function Za(e,t,n){let r=`than ${u(t.patterns[0])}, of the same ${e.resolution.type===`git`?`commit`:`tarball`}`;if(e.version!==t.version)throw new s(`another version ${r}`,d(n,`version`));Xa(e,t,r,n);let[i,a]=[e.resolution,t.resolution];if(i.sha1!==void 0&&a.sha1!==void 0&&i.sha1!==a.sha1)throw new s(`another sha1 ${r}`,d(n,`resolved`));let o=Ja(a);for(let[e,t]of Ja(i))if(o.has(e)&&o.get(e)!==t)throw new s(`another ${e} integrity ${r}`,d(n,`integrity`))}function Qa(e,t){let n=Object.create(null),r=[],i=[],a=[],o=new Map,c=new Map,l=new Map;for(let f of e){let[e]=f.keys,p=d(``,e),m=Wa(f,p,t),{pkg:h}=m;for(let e of f.keys)n[e]=h;r.push(...m.patterns),i.push(...m.requests),m.handed!==void 0&&a.push({pkg:h,...m.handed});let g=m.patterns.find(e=>e.source===`file`),_=f.fields.resolved??(g===void 0?void 0:`
16
+ ${Na(g.range)}`),v=_===void 0?void 0:`${h.name}
17
+ ${_}`;if(o.has(v))throw new s(`resolves as ${u(o.get(v))} does, which yarn writes as one entry`,p);v!==void 0&&o.set(v,e);let y=La(h.resolution);if(y!==void 0){let e=c.get(y)??c.set(y,[]).get(y);e.length>0&&Za(h,e[0],p),e.push(h)}if(m.handed?.sources.length===0)continue;let b=`${h.name}
18
+ ${h.version}`,x=l.get(b);x===void 0?l.set(b,{key:e,patterns:m.patterns}):qa(h,m.patterns,x,t,p)}for(let e of a)e.other=c.get(La(e.pkg.resolution))?.find(t=>t!==e.pkg);return{packages:n,patterns:r,requests:i,mixed:a}}var $=`manifests`;function $a(e,t,n){let r=/^(?:file|link):/u.exec(e)?.[0];if(r===void 0&&!e.startsWith(`/`))return e;let i=e.slice(r?.length??0);if(i.startsWith(`/`)||/^[A-Za-z]:/u.test(i))throw new s(`${u(e)} is an absolute path`,n);let a=L(De(t,i),n);return`${r}${a!==`.`&&/^\.(?:\/|$)/u.test(i)&&!/^\.{0,2}\//u.test(a)?`./`:``}${a}`}var eo=(e,t,n)=>n===void 0?e.version===t||void 0:n.satisfies(e.version,t,{loose:!0});function to({name:e,range:t,pattern:n,where:r},i,a){let o=i.get(e);if(o!==void 0&&eo(o,t,a)===!0)throw new s(`${u(n)} is satisfied by the workspace ${u(o.dir)}, which yarn links instead`,r)}function no({name:e,range:t,pattern:n,where:r},i,a){let o=i?.get(e);if(o===void 0)throw new s(`${u(n)} is not a pattern of the lockfile${i===void 0?`, nor a workspace's, as only the manifests may say`:``}`,r);if(eo(o,t,a)===!1)throw new s(`${u(n)} is not a pattern of the lockfile, nor satisfied by the workspace ${u(o.dir)}, ${o.version}`,r);return`link:${o.dir}`}function ro(e,t,n,r){for(let i of e)i.pattern in t||(i.targets[i.name]=no(i,n,r))}function io(e,{packages:t,workspaces:n,semver:r}){return e.pattern in t?(to(e,n,r),e.pattern):no(e,n,r)}var ao=[`optionalDependencies`,`dependencies`,`devDependencies`];function oo(e,t,n,r){let i=new Map,a=new Map;for(let t of ao)for(let[r,o,s]of E(k(e[t]),d(n,t))){if(r===`//`)continue;let e=D(o,s);i.has(r)||i.set(r,{kind:t,value:e,here:s}),!a.has(r)&&e!==``&&e!==`*`&&a.set(r,e)}let o=Object.create(null);for(let e of Q)o[e]=Object.create(null);for(let[e,{kind:n,value:s,here:c}]of i){let i=$a(a.get(e)??s,t,c);o[n][e]=io({name:e,range:i,pattern:`${I(e,c)}@${i}`,where:c},r)}return o}function so(e,t,n){let r=[];for(let[i,a,o]of E(k(e),t)){if(i===`//`)continue;if(/\/$|\/\/|\*$/u.test(i))throw new s(`${u(i)} is a path yarn ignores`,o);let e=i.match(/(?:@[^/]+\/)?[^/]+/gu)??[i],t=zt(e.length===1?`**/${i}`:i,o),c=I(e.at(-1),o),l=e.slice(0,-1).find(e=>e!==`**`&&!ge(e.replaceAll(/[*?]/gu,`x`)));if(l!==void 0)throw new s(`${u(l)} is not a package name, or a glob of one`,o);let d=D(a,o);if(Aa(d)===`registry`&&!Ka(d,n))throw new s(`${u(d)} is a range yarn ignores in a resolution: neither a semver range nor a source`,o);r.push({path:i,tests:t,name:c,range:d,pattern:`${c}@${d}`,where:o})}return r}function co(e,t,n){let r=Object.values(e).flatMap(e=>Q.map(t=>e[t])),i=vi([n.map(e=>e.pattern).filter(e=>e in t),...r],t);if(i!==void 0)throw new s(`nothing asks for it: no manifest, no package and no resolution`,d(``,i))}function lo(e,t){let n=e.workspaces;if(n===void 0)return[];let r=d(t,`workspaces`),i=n;Array.isArray(n)||(T(n,r,[`packages`,`nohoist`]),A(n,`nohoist`,r,M),i=n.packages===void 0?[]:n.packages,r=d(r,`packages`));let a=M(i,r);if(a.length>0&&e.private!==!0)throw new s(`expected true, as yarn has workspaces in a private project alone`,d(t,`private`));return a.map((e,t)=>zt(e.replace(/^(?:\.\/)+/u,``).replace(/(?<!\/)\/+$/u,``),`${r}[${t}]`))}var uo={__proto__:null,depdenencies:`dependencies`,dependancies:`dependencies`,dependecies:`dependencies`,depends:`dependencies`,"dev-dependencies":`devDependencies`,devDependences:`devDependencies`,devDepenencies:`devDependencies`,devEependencies:`devDependencies`,devdependencies:`devDependencies`},fo=/^[\s\dA-Za-z.+=-]{1,256}$/u;function po(e,t,n){let r=j(e,t);if(!fo.test(r))throw new s(`${u(r)} is not a version`,t);if(n===void 0)return r;let i=n.clean(r,{loose:!0});if(i===null)throw new s(`${u(r)} is not a version semver reads`,t);return i}function mo(e,t,n,r,i){for(let e of Object.keys(uo))if(Object.hasOwn(t,e))throw new s(`a field yarn does not read, for ${u(uo[e])}`,d(n,e));if(L(e,n)===`.`)return;if(r.length===0)throw new s(`expected workspaces, as there are manifests of workspaces`,d(d($,`.`),`workspaces`));if(e.split(`/`).includes(`node_modules`)||!r.some(t=>Ut(t,e)))throw new s("not a workspace the root's `workspaces` finds",n);if(t.resolutions!==void 0)throw new s(`a workspace's, which yarn does not read`,d(n,`resolutions`));let a=d(n,`name`),o=I(D(t.name,a),a);if(t.version===void 0)throw new s(`expected a version, without which yarn ignores the workspace`,d(n,`version`));return{name:o,dir:e,version:po(t.version,d(n,`version`),i)}}function ho(e,t,n,r){T(e,$);let i=d($,`.`),a=e[`.`];if(a===void 0)throw new s(`expected the manifest beside the lockfile, "."`,$);let o=lo(T(a,i),i),c=new Map;for(let[t,n,i]of E(e,$)){let e=mo(t,T(n,i),i,o,r);if(e!==void 0){if(c.has(e.name))throw new s(`the name of the workspace ${u(c.get(e.name).dir)} too`,d(i,`name`));c.set(e.name,e)}}for(let e of n)e.pattern in t&&to(e,c,r);ro(n,t,c,r);let l={packages:t,workspaces:c,semver:r},f=N(e,$,(e,t,n)=>oo(e,n,t,l)),p=so(a.resolutions,d(i,`resolutions`),r);for(let e of p){if(!(e.pattern in t)&&!c.has(e.name))throw new s(`${u(e.pattern)} is not a pattern of the lockfile, where yarn records every resolution's`,e.where);e.target=io(e,l)}return co(f,t,p),{importers:f,workspaces:c,rules:p,aggregated:Array.isArray(a.workspaces?.packages??a.workspaces)}}var go=`workspace-aggregator-00000000-0000-0000-0000-000000000000`;function _o(e,{importers:t,workspaces:n,rules:r,aggregated:i},a){let o=r.map(e=>e.tests),c=(e,t)=>t.split(`/`).reduce((e,t)=>e.map((e,n)=>Vt(o[n],e,t)),e),l=n=>n.startsWith(`link:`)?t[n.slice(5)]:e[n],f=(e,n,r,i)=>{let a=e.patterns===void 0?d($,Object.keys(t).find(n=>t[n]===e)):d(``,e.patterns[0]);return new s(`${u(e[n][r])} ${i}`,d(d(a,n),r))},p=new Map,m=[],h=new Set,g=new Map,_=(e,t,n,r)=>{let i=e[t][n],a=r===void 0||r.pattern===i,o=a?g.get(i):h.has(i)?r:void 0;if(o!==void 0)throw f(e,t,n,`is asked for both where the resolution ${u(o.path)} applies and where none does, and yarn writes one entry for both`);a?h.add(i):g.set(i,r)},v=new Set,y=(e,t)=>{if(v.has(e))return;let n=p.get(e)??new Set,r=t.join();n.has(r)||(p.set(e,n.add(r)),m.push([e,t]))},b=t[`.`],x=o.map(e=>Bt(e,1)),ee=c(x,go),te=new Map,S=[],ne=(t,n)=>e[t.target]===n||a.get(n)?.sources[0]===t.target,C=(t,s,d,p)=>{let m=t[s][d],h=c(p,d),g=e[m],v=a.get(g),x=v===void 0?``:`the resolution ${u(v.rule.path)} resolves to`,C=t===b&&(!i||n.has(d)),w=t===b&&!C?c(ee,d):h,T=r.find((e,t)=>e.name===d&&Ht(o[t],w[t]));if(C){if(v!==void 0)throw f(t,s,d,`is given what ${x}, which yarn applies to no dependency of the root's own`);if(T!==void 0&&!ne(T,g))throw f(t,s,d,`is not given ${u(T.pattern)} as the resolution ${u(T.path)} says, which yarn ignores for the root's own dependencies`);return _(t,s,d,void 0),y(l(m),h)}if(T!==void 0&&!ne(T,g))throw f(t,s,d,`is not given ${u(T.pattern)}, which the resolution ${u(T.path)} resolves it to`);if(v?.sources.includes(m))throw f(t,s,d,`asks for what ${x}, as a dependency of its own`);if(v!==void 0&&!v.sources.includes(T?.target))throw f(t,s,d,`is given what ${x}, which yarn does not apply to it here`);_(t,s,d,T),t===b&&T!==void 0&&te.set(m,T),T===void 0?y(l(m),h):T.target.startsWith(`link:`)&&S.push([t[s],d,T.target])},w=()=>{for(;m.length>0;){let[e,t]=m.pop();for(let n of Q)for(let r of Object.keys(k(e[n])))C(e,n,r,t)}};for(let t of r)t.pattern in e&&(h.add(t.pattern),y(e[t.pattern],c(x,t.name)));w(),v=new Set(p.keys());for(let e of Q)for(let t of Object.keys(b[e]))C(b,e,t,x);for(let[e,{dir:r}]of n)y(t[r],c(ee,e));w();for(let[e,t,n]of S)e[t]=n;return{plain:h,own:te}}function vo(e,t,n,r,i){for(let{key:a,range:o,source:c,alias:l}of t){let t=n?.own.get(a);if(c!==`registry`||t===void 0&&n?.plain.has(a)===!1)continue;let f=l?.range??o,{version:p}=e[a];if(f===``||r.satisfies(p,f)||r.validRange(f)===null)continue;let m=i?`and no resolution gives it`:`which only a resolution may excuse, as the manifests would say`;throw t!==void 0&&(m=`which the root asks for before the resolution ${u(t.path)} applies, so yarn takes it as outdated`),new s(`${p} does not satisfy ${u(f)}, ${m}`,d(``,a))}}function yo(e,t,n){let r=t?.workspaces.get(e.name);if(r===void 0)return;let i=t.rules.find(e=>e.target===`link:${r.dir}`);if(i===void 0)return;let a=`than the workspace ${u(r.dir)}, which the resolution ${u(i.path)} gives it`;if(e.version!==r.version)throw new s(`another version ${a}, ${r.version}`,d(n,`version`));return Xa(e,t.importers[r.dir],a,n),i}function bo({packages:e,patterns:t,mixed:n},r,i){let a=new Map;for(let{pkg:e,registry:t,sources:i,other:o}of n){let n=d(``,e.patterns[0]);if(i.length===0){let i=yo(e,r,n);if(i===void 0)throw new s(`${u(t)} asks for the registry, and resolves to nothing, ${r===void 0?`which only a resolution to a workspace may, as the manifests would say`:`as for a directory`}`,n);a.set(e,{sources:[i.target],rule:i});continue}if(r===void 0)throw new s(`${u(t)} asks for the registry, and is given what ${u(i[0])} names, which only a resolution may, as the manifests would say`,n);let c=i.find(e=>!r.rules.some(t=>t.pattern===e));if(c!==void 0)throw new s(`${u(t)} asks for the registry, and is given what ${u(c)} names, which no resolution does`,n);let l=r.rules.find(e=>i.includes(e.pattern));if(o!==void 0)throw new s(`asks for what the resolution ${u(l.path)} resolves to, as a dependency of its own`,d(``,o.patterns[0]));a.set(e,{sources:i,rule:l})}let o=r!==void 0&&r.rules.length>0?_o(e,r,a):void 0;i!==void 0&&vo(e,t,o,i,r!==void 0);for(let[t,{sources:n}]of a)n[0].startsWith(`link:`)&&delete e[t.patterns[0]]}var xo=[`# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.`,`# yarn lockfile v1`],So=/^# yarn lockfile v(\d+)$/u,Co=/[:\s\\",[\]]/u,wo=e=>e.startsWith(`true`)||e.startsWith(`false`)||Co.test(e)||!/^[A-Za-z]/u.test(e),To=/[A-Za-z][^\s:\\",[\]]*/uy;function Eo(e,t,n){let[r,a]=ee(e,t,n);if(r.includes(`\\"`))throw f(`${u(r)} is a string yarn reads to another quote`,n);let o=p.exec(r)?.[0];if(o!==void 0)throw f(`an escape for ${i(o)}, which is not allowed`,n);if(!wo(r))throw f(`${u(r)} is quoted, where yarn writes it bare`,n);return[r,a]}function Do(e,t,n){if(e[t]===`"`)return Eo(e,t,n);To.lastIndex=t;let r=To.exec(e)?.[0];if(r===void 0)throw f(`expected a string, found ${_(e,t)}`,n);if(wo(r))throw f(`${u(r)} is bare, where yarn quotes it`,n);return[r,t+r.length]}function Oo(e,t,n){let[r,i]=Do(e,t,n);if(r===``)throw f(`an empty key, which yarn does not read`,n);return[r,i]}function ko(e,t,n){let[r,i]=Do(e,t,n);if(r.startsWith(`null`)&&e[t]!==`"`)throw f(`${u(r)} is bare, and read as null by some readers`,n);return Ao(e,i,n),r}function Ao(e,t,n){if(t!==e.length)throw f(`expected the end of the line, found ${u(e.slice(t))}`,n)}function jo(e,t){if(e.line!==t)throw f(`expected yarn's header, ${u(t)}`,e.number);x(e)}function Mo(e){jo(e,xo[0]);let t=So.exec(e.line??``)?.[1];if(t!==void 0&&t!==`1`)throw f(`unsupported version: expected "1", found ${u(t)}`,e.number);for(jo(e,xo[1]);e.line?.startsWith(`#`);x(e)){if(/^yarn lockfile v\d+$/u.test(e.line.slice(1).trim()))throw f(`a second lockfile version`,e.number);if(e.line===`#`)throw f(`a comment of "#" alone, which @yarnpkg/parsers does not read`,e.number)}}function No(e,t,n,r,i){let a=Object.create(null);for(let n=e.line;n?.startsWith(` `)&&v(n)>t-2;n=e.line){if(v(n)!==t)throw f(`expected ${t} spaces of indentation, found ${v(n)}`,e.number);let[r,o]=Oo(n,t,e.number);i(a,r,o,n,e.number)}if(Object.keys(a).length===0)throw f(n,r);return a}var Po=(e,t,n)=>No(e,4,`expected what ${u(t)} holds below it`,n,(n,r,i,a,o)=>{if(a[i]!==` `)throw f(`expected a space and a range after ${u(r)}`,o);let s=ko(a,i+1,o);if(r in n)throw f(`${u(r)} is in ${u(t)} twice`,o);n[r]=s,x(e)}),Fo=(e,t)=>No(e,2,`expected the fields of the entry below it`,t,(t,n,r,i,a)=>{if(n in t)throw f(`the field ${u(n)} twice`,a);if(i[r]===`:`){Ao(i,r+1,a),x(e),t[n]=Po(e,n,a);return}if(i[r]!==` `)throw f(`expected a space and a value, or ":", after ${u(n)}`,a);t[n]=ko(i,r+1,a),x(e)});function Io(e,t){let{line:n,number:r}=e,i=[];for(let e=0;;){let[a,o]=Oo(n,e,r);if(t.has(a))throw f(`${u(a)} is a key ${t.get(a)===r?`twice`:`at line ${t.get(a)+1} too`}`,r);if(t.set(a,r),i.push(a),n[o]===`:`){Ao(n,o+1,r);break}if(!n.startsWith(`, `,o))throw f(`expected ", " and a pattern, or ":", after ${u(a)}`,r);e=o+2}return x(e),{keys:i,fields:Fo(e,r)}}function Lo(e){m(e,`yarn`);let t=b(e,p);x(t),Mo(t);let n=[],r=new Map,i;for(let e=t.line;e!==void 0;e=t.line){if(e===``){n.length>0&&(i??=t.number),x(t);continue}if(e.startsWith(` `))throw i===void 0?f(`expected an entry, at column 0`,t.number):f(`a blank line within an entry`,i);if(e.startsWith(`#`))throw f(`a comment, which yarn writes in the header alone`,t.number);i=void 0,n.push(Io(t,r))}return n}var Ro=[`manifests`,`checkVersions`,`semver`],zo=[`clean`,`satisfies`,`valid`,`validRange`];function Bo(e,t){let n=t===void 0?()=>({dev:void 0,optional:void 0,devOptional:void 0}):yi(e,t);for(let t of new Set(Object.values(e)))Object.assign(t,n(t))}function Vo(e,t={}){if(typeof e!=`string`)throw TypeError(`expected a string`);let{manifests:n,semver:r}=oe(t,Ro);se(t,zo);let i=Qa(Lo(e),r),{packages:a,requests:o}=i;n===void 0&&ro(o,a);let s=n===void 0?void 0:ho(n,a,o,r);return bo(i,s,r),Bo(a,s?.importers),{packages:a,importers:s?.importers}}var Ho=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])),Uo=(...e)=>e.flatMap(e=>Object.values(e));function Wo(e,t,{manifest:n}={}){if(e===`npm`){let e=e=>Object.values(e.edges).map(e=>e.target).filter(e=>e!==void 0),{importers:n,packages:r}=or(t,{checkVersions:!1});return{importers:Ho(n,t=>({version:t.version,dependencies:e(t)})),packages:Ho(r,t=>({name:t.name,version:t.version,dependencies:e(t)}))}}if(e===`pnpm`){let{lockfile:e}=Ca(t);return{importers:Ho(e?.importers??{},e=>({dependencies:Uo(e.dependencies,e.devDependencies,e.optionalDependencies)})),packages:Ho(e?.packages??{},e=>({name:e.name,version:e.version,dependencies:Uo(e.dependencies,e.optionalDependencies)}))}}if(e!==`yarn`)throw TypeError(`readLockfile: ${e} lockfiles are not read`);if(/^__metadata:/mu.test(t))throw Error(`a yarn.lock of Yarn 2 or later, which is not read`);let r=Go(n),{importers:i,packages:a}=Vo(t,{checkVersions:!1,...r&&{manifests:{".":r}}}),o=new Map;for(let[e,t]of Object.entries(a))o.has(t)||o.set(t,e);let s=e=>e.startsWith(`link:`)?e:o.get(a[e]);return{importers:Ho(i??{},e=>({version:r.version,dependencies:Uo(e.dependencies,e.devDependencies,e.optionalDependencies).map(s)})),packages:Object.fromEntries([...o].map(([e,t])=>[t,{name:/@npm:((?:@[^/@]+\/)?[^/@]+)/u.exec(e.patterns[0]??``)?.[1]??e.name,version:e.version,dependencies:Uo(e.dependencies,e.optionalDependencies).map(s)}]))}}function Go(e){if(typeof e!=`string`)return null;try{let t=JSON.parse(e);return t&&typeof t==`object`&&!Array.isArray(t)&&t.workspaces===void 0?t:null}catch{return null}}export{Wo as readLockfile};
@@ -0,0 +1 @@
1
+ function e(e,t,a){let o=new Map;for(let t of e.onlyBase)o.set(t.pkg,{base:t.bytes,other:null});for(let t of e.onlyOther)o.set(t.pkg,{base:null,other:t.bytes});for(let t of e.changed)o.set(t.pkg,{base:t.baseBytes,other:t.otherBytes});for(let t of e.unchanged??[])o.set(t.pkg,{base:t.bytes,other:t.bytes});let s=(e,t)=>[...e.get(t)??[]].toSorted(n),c=new Set([...e.onlyBase,...e.onlyOther,...e.changed].map(e=>e.pkg));for(let e of new Set([...t.keys(),...a.keys()]))r(s(t,e),s(a,e))||c.add(e);let l=[],u=[],d=[];for(let e of c){let n=o.get(e)??{base:null,other:null},c=s(a,e),f=s(t,e),p=n.base!==null||f.length>0,m=n.other!==null||c.length>0;p&&!m?d.push({pkg:e,bytes:n.base,versions:f}):m&&!p?l.push({pkg:e,bytes:n.other,versions:c}):u.push({pkg:e,baseBytes:n.base,otherBytes:n.other,delta:n.base!==null&&n.other!==null?n.other-n.base:null,baseVersions:f,otherVersions:c,direction:f.length>0&&c.length>0&&!r(f,c)?i(f,c):null})}let f=(e,t)=>e.pkg.localeCompare(t.pkg);return{removed:d.toSorted(f),added:l.toSorted(f),changed:u.toSorted(f)}}function t(e){let t=String(e).trim().split(`+`,1)[0],n=t.indexOf(`-`);return n===-1?{core:t,pre:``}:{core:t.slice(0,n),pre:t.slice(n+1)}}function n(e,n){if(e===n)return 0;let r=t(e),i=t(n),a=r.core.split(`.`),o=i.core.split(`.`);for(let t=0;t<Math.max(a.length,o.length);t++){let r=Number(a[t]??0),i=Number(o[t]??0);if(Number.isNaN(r)||Number.isNaN(i))return e<n?-1:1;if(r!==i)return r<i?-1:1}if(r.pre===i.pre)return 0;if(!r.pre)return 1;if(!i.pre)return-1;let s=r.pre.split(`.`),c=i.pre.split(`.`);for(let e=0;e<Math.max(s.length,c.length);e++){let t=s[e],n=c[e];if(t===void 0)return-1;if(n===void 0)return 1;if(t===n)continue;let r=/^\d+$/u.test(t),i=/^\d+$/u.test(n);return r&&i?Number(t)<Number(n)?-1:1:r===i?t<n?-1:1:r?-1:1}return 0}function r(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function i(e,t){let r=e.filter(e=>!t.includes(e)).toSorted(n),i=t.filter(t=>!e.includes(t)).toSorted(n),a=e.filter(e=>t.includes(e)).toSorted(n),[o,s]=r.length>0&&i.length>0?[r,i]:r.length>0?[r,a]:[a,i];if(o.length===0||s.length===0)return`changed`;let c=(e,t)=>n(e.at(-1),t[0])<0;return c(o,s)?`up`:c(s,o)?`down`:`changed`}function a(e,t){let a=[],o=[],s=[],c=new Set([...e.keys(),...t.keys()]);for(let l of c){let c=e.get(l),u=t.get(l);if(c&&u){let e=[...c].toSorted(n),t=[...u].toSorted(n);if(r(e,t))continue;a.push({pkg:l,baseVersions:e,otherVersions:t,direction:i(e,t)})}else c?s.push({pkg:l,versions:[...c].toSorted(n)}):o.push({pkg:l,versions:[...u].toSorted(n)})}let l=(e,t)=>e.pkg.localeCompare(t.pkg);return a.sort(l),o.sort(l),s.sort(l),{updated:a,added:o,removed:s,totals:{baseDeps:e.size,otherDeps:t.size}}}export{e as a,n as b,a as c};
@@ -0,0 +1 @@
1
+ function e(e,t){return!e||t===e||t.startsWith(`${e}/`)}function t(t,n){if(e(t.oldPath,n)){let e=n.slice(t.oldPath.length).replace(/^\//u,``);return{directory:[t.newPath,e].filter(Boolean).join(`/`),filePrefix:``}}if(!e(n,t.oldPath))return null;let r=t.oldPath.slice(n.length).replace(/^\//u,``);return t.newPath===r?{directory:``,filePrefix:r}:t.newPath.endsWith(`/${r}`)?{directory:t.newPath.slice(0,-r.length-1),filePrefix:r}:null}function n(n,r,i,a=``){let o=null,s=-1;for(let c of i){if(c.oldRepo.toLowerCase()!==n.toLowerCase())continue;let i=t(c,r);!i||!e(i.filePrefix,a)||c.oldPath.length<=s||(o={repoId:c.repoId,directory:i.directory},s=c.oldPath.length)}return o}function r(e){let t;for(let n of e){let e=n.split(`/`);if(e.some(e=>!e||e===`.`||e===`..`)||n.includes(`\\`))return``;if(e.pop(),t===void 0)t=e;else{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];)n++;t.length=n}if(t.length===0)return``}return t?.join(`/`)??``}export{n as a,r as b};
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},s=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(let c of r(i))!a.call(e,c)&&c!==o&&t(e,c,{get:()=>i[c],enumerable:!(s=n(i,c))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{o as a,s as b,l as c};
@@ -0,0 +1 @@
1
+ import{Ka as e}from"./chunk-6LNQTKAV.js";import{l as t,o as n,u as r}from"./chunk-7VAWINQF.js";import{a as i}from"./chunk-WCPJDAYA.js";import{b as a}from"./chunk-IYPY47MC.js";import{D as o,J as s,L as c,q as l}from"./chunk-SXV2T5C4.js";function u(e){let{data:t}=c(e);return t&&d(t)>0?t:null}function d(e){return(s(e)??[]).filter(t=>(Array.isArray(t)?t:[t]).some(t=>t&&typeof t==`object`&&l(t,t.source??e.source))).length}function f(e,t){let n=[],r=new Map;for(let{name:t,content:i,fallbackRepo:a}of e){if(typeof i!=`string`)continue;let e=u(i);if(!e)continue;let c=s(e),l=o(e)??o({repo:{github:a}}),f=new Set(l?[l]:[]);if(!l)for(let e of c.flat()){if(/(?:^|\/)(?:node_modules|dependencies)\//u.test(e?.file??``))continue;let t=o(e);t&&f.add(t)}for(let e of f)r.set(e,{id:e,label:e});n.push({id:t,filename:t,repoIds:[...f],analyzer:e.source,appFindings:d(e)})}let i=new Set(n.map(e=>e.id));return{merge:{bundles:[],results:[]},link:{reports:n,repositories:[...r.values()],workspaces:t.map(e=>({id:e.id,label:e.name,reports:e.reports.filter(e=>i.has(e))})).filter(e=>e.reports.length>0)}}}function p(e,t){let n=(e.reports??[]).filter(e=>e.visible&&e.repoId!=null).flatMap(e=>{let t=u(e.content??``);return t?[{id:e.id,filename:e.filename,repoIds:[e.repoId],repo:e.repoFullName,directory:e.repoDirectory,analyzer:e.analyzer,appFindings:d(t)}]:[]}),r=new Map((e.repos??[]).map(e=>[e.repoId,{id:e.repoId,label:e.fullName}]));for(let e of n)r.has(e.repoIds[0])||r.set(e.repoIds[0],{id:e.repoIds[0],label:e.repo??String(e.repoIds[0])});let a=t.results??[],o=new Set(a.map(e=>e.bundleId));return{merge:{bundles:(t.bundles??[]).filter(e=>o.has(e.id)).map(e=>({...e,size:i(e.byteSize)})),results:a},link:{repositories:[...r.values()].filter(e=>n.some(t=>t.repoIds.includes(e.id))),reports:n}}}var m=new Map([[`openai/gpt-6-astra`,`GPT-6 Astra`],[`openai/gpt-6-astra-pro`,`GPT-6 Astra Pro`],[`openai/gpt-5.6-sol`,`GPT-5.6 Sol`],[`openai/gpt-5.6-terra`,`GPT-5.6 Terra`],[`openai/gpt-5.6-luna`,`GPT-5.6 Luna`],[`anthropic/claude-fable-5.1`,`Claude Fable 5.1`],[`anthropic/claude-opus-5`,`Claude Opus 5`],[`anthropic/claude-sonnet-5`,`Claude Sonnet 5`],[`moonshotai/kimi-k3`,`Kimi K3`],[`z-ai/glm-5.3`,`GLM 5.3`],[`qwen/qwen3.8-max`,`Qwen3.8 Max`],[`deepseek/deepseek-v4.1-flash`,`DeepSeek V4.1 Flash`],[`deepseek/deepseek-v4-pro`,`DeepSeek V4 Pro`]]),h=new Map([[`openai`,`OpenAI`],[`anthropic`,`Anthropic`],[`moonshotai`,`Moonshot AI`],[`google`,`Google`],[`nvidia`,`NVIDIA`],[`qwen`,`Qwen`],[`deepseek`,`DeepSeek`],[`x-ai`,`xAI`],[`z-ai`,`Z.ai`],[`mistralai`,`Mistral AI`],[`meta`,`Meta`],[`unbiased`,`Unbiased`]]),g=new Map([[`meta-llama`,`meta`]]),_=new Map([[`gpt`,`GPT`],[`gptoss`,`GPT OSS`],[`oss`,`OSS`],[`o`,`O`],[`ai`,`AI`],[`api`,`API`],[`4o`,`4o`],[`k3`,`K3`],[`k4`,`K4`],[`qwen`,`Qwen`],[`kimi`,`Kimi`],[`mimo`,`MiMo`],[`gemini`,`Gemini`],[`claude`,`Claude`],[`fable`,`Fable`],[`opus`,`Opus`],[`sonnet`,`Sonnet`],[`astra`,`Astra`],[`terra`,`Terra`],[`luna`,`Luna`],[`codex`,`Codex`],[`deepseek`,`DeepSeek`],[`nemotron`,`Nemotron`],[`gemma`,`Gemma`]]);function v(e){let t=e.replace(/:free$/u,``).replaceAll(`_`,`-`).split(`-`).filter(Boolean),n=[];for(let e=0;e<t.length;e++){let r=t[e],i=t[e+1];if(/^\d+$/u.test(r)&&/^\d+$/u.test(i??``)){n.push(`${r}.${i}`),e++;continue}let a=_.get(r.toLowerCase());n.push(a??(/^(?:[a-z]+\d+|\d+[a-z]+)$/iu.test(r)?r.toUpperCase():r[0]?.toUpperCase()+r.slice(1)))}return n.join(` `).replace(/^GPT (\d)/u,`GPT-$1`)}function y(e){return m.get(e)??v(e.includes(`/`)?e.slice(e.indexOf(`/`)+1):e)}function b(e){let t=e.includes(`/`)?e.split(`/`)[0].replace(/^~/u,``):`other`,n=g.get(t)??t;return{key:n,name:h.get(n)??(n===`other`?`Other`:v(n))}}function x(e){return e===`xhigh`?`Extra high`:e?e[0].toUpperCase()+e.slice(1):`Unavailable`}function S(e){return e.efforts.includes(`max`)?`max`:e.efforts.at(-1)??null}async function C(e,t=fetch){let n=await t(`/api/admin/scan/models`,{credentials:`same-origin`,headers:{accept:`application/json`},signal:e});if(!n.ok)throw Error(`HTTP ${n.status}`);return w(await n.json())}function w(e){if(!Array.isArray(e?.models))throw Error(`No model catalogue returned`);let t=e.models.filter(e=>typeof e?.id==`string`&&e.id.length>0).map(e=>({id:e.id,efforts:Array.isArray(e.efforts)?[...new Set(e.efforts.filter(e=>typeof e==`string`&&e.length>0))]:[]}));if(t.length===0)throw Error(`No models available`);return{models:t,defaultModel:t.find(t=>t.id===e.defaultModel)?.id??t[0].id}}function T(e,t=[]){let n=new Map,r=e.flatMap(e=>{let r=t.filter(t=>t.bundles?.includes(e.integrity));return(r.length>0?r.map(e=>({id:e.id,label:e.name})):[{id:`unattached`,label:`Unattached`}]).map(t=>(n.set(t.id,t),{id:e.integrity,integrity:e.integrity,filename:e.name,repoId:t.id,repo:t.label,files:null,reasons:[],size:`—`}))});return{repositories:[...n.values()],bundles:r,reports:[],scans:[]}}function E(o,s){if(s.error)throw Error(s.error);let c=n(s),l=s.kind===`stasis`?s.bundle?.formats:null,u=r(s),d=[...t(s)].filter(([,e])=>e!=null).map(([e,t])=>({path:e,format:l?.get(e)??null,bytes:t,lines:u.get(e)??0,size:i(t),module:a(e,{packageDir:c?.get(e)})})),f=[{id:`all`,label:`All`,filePaths:null},...[...e(s,d.map(e=>e.path))].map(([e,t])=>({id:`reason:${e}`,label:e,filePaths:[...t]}))];return{...o,files:d,reasons:f,size:i(s.size)}}export{T as a,E as b,f as c,p as d,y as e,b as f,x as g,S as h,C as i,w as j};
@@ -0,0 +1 @@
1
+ import{a as e,c as t}from"./chunk-TUII34K2.js";async function n(e){let t=new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`));return new Uint8Array(await new Response(t).arrayBuffer())}async function r(e,{maxBytes:t}={}){let n=new Blob([e]).stream().pipeThrough(new DecompressionStream(`gzip`));if(t==null)return new Uint8Array(await new Response(n).arrayBuffer());let r=n.getReader(),i=[],a=0;for(;;){let{value:e,done:n}=await r.read();if(n)break;if(a+=e.length,a>t){try{await r.cancel()}catch{}throw RangeError(`gunzipBytes: decompressed size exceeds ${t}-byte cap`)}i.push(e)}let o=new Uint8Array(a),s=0;for(let e of i)o.set(e,s),s+=e.length;return o}async function i(t){return await n(e(t))}async function a(e){return t(await r(e))}export{n as a,r as b,i as c,a as d};
@@ -0,0 +1,17 @@
1
+ import{a as e,b as t,c as n}from"./chunk-C4Z6ZBXV.js";import{f as r,h as i}from"./chunk-2XUEZHIP.js";var a=`!important`,o=t(class extends n{constructor(t){if(super(t),t.type!==e.ATTRIBUTE||t.name!==`style`||t.strings?.length>2||t.strings?.some(e=>e!==``))throw Error("`styleMap` must be the whole of a `style` attribute.");this.shown=new Set}render(){return r}update(e,[t]){let{style:n}=e.element;for(let e of this.shown)t[e]??(this.shown.delete(e),e.includes(`-`)?n.removeProperty(e):n[e]=null);for(let[e,r]of Object.entries(t)){if(r==null)continue;this.shown.add(e);let t=typeof r==`string`&&r.endsWith(a);e.includes(`-`)||t?n.setProperty(e,t?r.slice(0,-a.length):r,t?`important`:``):n[e]=r}return r}}),{I:s}=i,c=e=>e,l=e=>e.strings===void 0,u=()=>document.createComment(``),d=(e,t,n)=>{let r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0)n=new s(r.insertBefore(u(),i),r.insertBefore(u(),i),e,e.options);else{let t=n._$AB.nextSibling,a=n._$AM,o=a!==e;if(o){let t;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(t=e._$AU)!==a._$AU&&n._$AP(t)}if(t!==i||o){let e=n._$AA;for(;e!==t;){let t=c(e).nextSibling;c(r).insertBefore(e,i),e=t}}}return n},f=(e,t,n=e)=>(e._$AI(t,n),e),p={},m=(e,t=p)=>e._$AH=t,h=e=>e._$AH,g=e=>{e._$AR(),e._$AA.remove()},_=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},v=t(class extends n{constructor(t){if(super(t),t.type!==e.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,i]){let a=h(e),{values:o,keys:s}=this.dt(t,n,i);if(!Array.isArray(a))return this.ut=s,o;let c=this.ut??=[],l=[],u,p,v=0,y=a.length-1,b=0,x=o.length-1;for(;v<=y&&b<=x;)if(a[v]===null)v++;else if(a[y]===null)y--;else if(c[v]===s[b])l[b]=f(a[v],o[b]),v++,b++;else if(c[y]===s[x])l[x]=f(a[y],o[x]),y--,x--;else if(c[v]===s[x])l[x]=f(a[v],o[x]),d(e,l[x+1],a[v]),v++,x--;else if(c[y]===s[b])l[b]=f(a[y],o[b]),d(e,a[v],a[y]),y--,b++;else if(u===void 0&&(u=_(s,b,x),p=_(c,v,y)),u.has(c[v])){if(u.has(c[y])){let t=p.get(s[b]),n=t===void 0?null:a[t];if(n===null){let t=d(e,a[v]);f(t,o[b]),l[b]=t}else l[b]=f(n,o[b]),d(e,a[v],n),a[t]=null;b++}else g(a[y]),y--}else g(a[v]),v++;for(;b<=x;){let t=d(e,l[x+1]);f(t,o[b]),l[b++]=t}for(;v<=y;){let e=a[v++];e!==null&&g(e)}return this.ut=s,m(e,l),r}});export{o as a,l as b,m as c,v as d};
2
+ /*! Bundled license information:
3
+
4
+ lit-html/directive-helpers.js:
5
+ (**
6
+ * @license
7
+ * Copyright 2020 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ *)
10
+
11
+ lit-html/directives/repeat.js:
12
+ (**
13
+ * @license
14
+ * Copyright 2017 Google LLC
15
+ * SPDX-License-Identifier: BSD-3-Clause
16
+ *)
17
+ */