@preventive/triage 1.0.0-alpha.53 → 1.0.0-alpha.54

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 (109) hide show
  1. package/common/bundle-compare-diff.js +28 -9
  2. package/common/bundle-compare-inputs.d.ts +1 -0
  3. package/common/bundle-compare-inputs.js +91 -15
  4. package/common/bundle-comparison.js +14 -7
  5. package/common/default-scan-models.ts +3 -0
  6. package/common/dependency-reviews.d.ts +1 -1
  7. package/common/dependency-reviews.js +1 -1
  8. package/common/managed/finding-detail.d.ts +1 -1
  9. package/common/managed/finding-detail.js +7 -7
  10. package/common/managed/team-app.d.ts +7 -0
  11. package/common/managed/team-app.js +31 -7
  12. package/common/workspace-app.js +19 -7
  13. package/out/activity.js +4 -4
  14. package/out/chunk-4EMM6UCD.js +1 -0
  15. package/out/chunk-4ISO5F7Y.js +7 -0
  16. package/out/chunk-4XIH7YTX.js +1 -0
  17. package/out/chunk-6W5BMATD.js +1 -0
  18. package/out/{chunk-WFYLMF6Z.js → chunk-74AEKRES.js} +1 -1
  19. package/out/chunk-DEVAORP2.js +1 -0
  20. package/out/{chunk-KOGNQDSJ.js → chunk-DTM47KGS.js} +1 -1
  21. package/out/chunk-E3LFSUDJ.js +9 -0
  22. package/out/chunk-FHIVVVUA.js +6 -0
  23. package/out/chunk-G3LY2FV4.js +1 -0
  24. package/out/chunk-HAZKDK4M.js +4 -0
  25. package/out/chunk-HOB3YPS5.js +1 -0
  26. package/out/chunk-I47TYPXO.js +52 -0
  27. package/out/chunk-J7A5OSZE.js +244 -0
  28. package/out/chunk-JFL7WLRV.js +1 -0
  29. package/out/chunk-JMG5DXII.js +2 -0
  30. package/out/chunk-JOXLZXMI.js +1 -0
  31. package/out/chunk-L4CTEMRG.js +2 -0
  32. package/out/chunk-M37X4LCF.js +14 -0
  33. package/out/chunk-M3Y6SLC4.js +1 -0
  34. package/out/chunk-NXATZJQ2.js +1 -0
  35. package/out/{chunk-MYGJBYYJ.js → chunk-ORIP5INC.js} +1 -1
  36. package/out/chunk-PAD2JHZT.js +1 -0
  37. package/out/chunk-QMVOEBWC.js +13 -0
  38. package/out/{chunk-SXV2T5C4.js → chunk-QRKFPLA4.js} +1 -1
  39. package/out/chunk-RRBIJL2B.js +1 -0
  40. package/out/{chunk-GDPCLSOS.js → chunk-SYXT3SFP.js} +1 -1
  41. package/out/chunk-TOXMUOIW.js +5 -0
  42. package/out/chunk-UBOCLLF2.js +1 -0
  43. package/out/chunk-UCP3JRE2.js +1 -0
  44. package/out/{chunk-JEFZTVNX.js → chunk-VC72ZO3P.js} +1 -1
  45. package/out/chunk-VRX2APNA.js +9 -0
  46. package/out/{chunk-NE2UGKRJ.js → chunk-VZMELPVL.js} +4 -3
  47. package/out/{chunk-YA4ETCFU.js → chunk-WHVXTJHK.js} +1 -1
  48. package/out/chunk-WMFDQS2L.js +11 -0
  49. package/out/chunk-WNSVBOSO.js +41 -0
  50. package/out/chunk-WREU7JAG.js +1 -0
  51. package/out/chunk-Y5ZHFNBD.js +2 -0
  52. package/out/chunk-YF4M5OCI.js +1 -0
  53. package/out/chunk-Z667U2UJ.js +1 -0
  54. package/out/chunk-ZQHLECTI.js +1 -0
  55. package/out/client-managed-import.js +1 -1
  56. package/out/client-managed.js +27 -26
  57. package/out/compare.js +14 -14
  58. package/out/dialogs.js +36 -51
  59. package/out/graph.js +17 -15
  60. package/out/index.html +26 -10
  61. package/out/prism.js +1 -1
  62. package/out/scan.js +2 -2
  63. package/out/terminal.js +232 -232
  64. package/out/view.css +1 -1
  65. package/out/view.js +15 -15
  66. package/package.json +11 -7
  67. package/risk/actions/resolve.js +36 -5
  68. package/risk/index.d.ts +20 -2
  69. package/risk/npm/malware.js +6 -4
  70. package/risk/npm/registry.js +8 -6
  71. package/server-managed/bundle-advisories.ts +56 -74
  72. package/server-managed/bundle-build-worker.js +61 -4
  73. package/server-managed/bundle-build.ts +13 -4
  74. package/server-managed/bundle-dependency-reviews.ts +74 -0
  75. package/server-managed/bundle-validation.ts +32 -0
  76. package/server-managed/db-methods.ts +51 -16
  77. package/server-managed/db-neon.ts +18 -2
  78. package/server-managed/db.ts +11 -2
  79. package/server-managed/github-issue-links.ts +151 -47
  80. package/server-managed/github-pulls.ts +34 -15
  81. package/server-managed/http.ts +227 -12
  82. package/server-managed/index.ts +13 -1
  83. package/server-managed/managed-issues.ts +29 -15
  84. package/server-managed/npm-insights.ts +4 -3
  85. package/server-managed/npm-kept.ts +4 -0
  86. package/server-managed/package-entry-points.ts +37 -9
  87. package/server-managed/pretty-print.ts +7 -5
  88. package/server-managed/public-workspace.ts +2 -2
  89. package/server-managed/repository-actions.ts +7 -4
  90. package/server-managed/repository-browser.ts +11 -4
  91. package/server-managed/repository-risk-audit.ts +4 -5
  92. package/server-managed/repository-risk.ts +4 -4
  93. package/server-managed/sql.ts +2 -1
  94. package/server-managed/stasis-config.ts +46 -0
  95. package/server-managed/team-app-summaries.ts +54 -0
  96. package/server-managed/team-app.ts +52 -31
  97. package/server-managed/team-reports.ts +27 -7
  98. package/server-managed/upstream-cache.ts +41 -32
  99. package/server-managed/workspace-shares.ts +3 -1
  100. package/out/chunk-2ZDZWLFY.js +0 -1
  101. package/out/chunk-7VAWINQF.js +0 -6
  102. package/out/chunk-FMXWXDR4.js +0 -36
  103. package/out/chunk-IZ7POWI3.js +0 -18
  104. package/out/chunk-LJ7XRXFU.js +0 -52
  105. package/out/chunk-QB4CBOX2.js +0 -1
  106. package/out/chunk-TQJDYHVE.js +0 -2
  107. package/out/chunk-TSIFIFBX.js +0 -232
  108. package/out/chunk-VH4XMZIW.js +0 -2
  109. package/out/chunk-WYLQWYLA.js +0 -1
@@ -1,18 +0,0 @@
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};
@@ -1,52 +0,0 @@
1
- import{c as e,d as t,l as n}from"./chunk-7VAWINQF.js";import{a as r,b as i,c as a}from"./chunk-IYPY47MC.js";import{a as o,b as s,c}from"./chunk-PWFUOLZK.js";import{D as l,E as u,F as d,J as f}from"./chunk-SXV2T5C4.js";import{e as p,f as m}from"./chunk-WFYLMF6Z.js";import{a as h,b as ee,c as te}from"./chunk-C4Z6ZBXV.js";import{b as ne,c as g,d as _,f as v,g as y,j as re}from"./chunk-2XUEZHIP.js";function b(e){let t=null,n=0,r={module:null,load(){return t??=(n?import(`${e}?retry=${n}`):import(e)).then(e=>r.module=e,e=>{throw t=null,n++,e}),t}};return r}var ie=b(`./dialogs.js`),x=e=>async(...t)=>(await ie.load())[e](...t),ae=x(`openAdvisoryDetailsDialog`),oe=x(`openCommentDialog`),se=x(`openDeleteBundleDialog`),ce=x(`openDeleteReportDialog`),le=x(`openDetachBundleDialog`),ue=x(`openDetachReportDialog`),de=x(`openDiscardReviewDialog`),fe=x(`openDownloadBundleDialog`),pe=x(`openExportConfirmDialog`),me=x(`openExportViewDialog`),he=x(`openFindingHistoryDialog`),ge=x(`openFindingSourceDialog`),_e=x(`openFixLinkDialog`),ve=x(`openImportConflictDialog`),ye=x(`openLeaveWorkspaceDialog`),be=x(`openLocalContentImportDialog`),xe=x(`openLocalTriageImportDialog`),Se=x(`openManagedCommentsDialog`),Ce=x(`openManagedIssueDialog`),we=x(`openManagedShareDialog`),Te=x(`openNewWorkspaceDialog`),Ee=x(`openNpmCompareAdvisoriesDialog`),De=x(`openObjstoreRecoveryDialog`),Oe=x(`openPasskeySetupDialog`),ke=x(`openPersistenceDegradedDialog`),Ae=x(`openReportCompareDialog`),je=x(`openRepositoryItemDialog`),Me=x(`openRevalidationConflictsDialog`),Ne=x(`openStoragePersistDialog`),Pe=x(`openSyncDownloadDialog`),Fe=x(`openSyncSuggestDialog`),Ie=x(`openSyncUploadDialog`),Le=x(`openTriageComparisonDialog`),Re=x(`openTriageExportDialog`),ze=x(`openWhyDialog`),Be=x(`openWorkspaceExportDialog`),Ve=x(`openWorkspaceShareLinkDialog`),He=x(`openWorkspaceUnlockBundleDialog`),Ue=x(`openWorkspaceUnlockLinkDialog`);function We(e){if(!e?.startsWith(`#public=`))return null;let t=/^#public=([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]{43})$/u.exec(e);return t?{id:t[1],token:t[2]}:{id:``,token:``}}var Ge=globalThis.location?.hash,S=We(Ge);globalThis.addEventListener?.(`hashchange`,()=>{let e=globalThis.location?.hash;e?.startsWith(`#public=`)&&e!==Ge&&globalThis.location.reload()});function Ke(){return S}function qe(e=S){return`/api/shares/${encodeURIComponent(e.id)}/workspace`}function Je(e,t=S){return t?`${e.replace(/#.*$/su,``)}#public=${t.id}.${t.token}`:e}var C=[`admin`,`manage`,`triage`,`view`,`none`];function Ye(e){return typeof e==`string`&&C.includes(e)}function Xe(e,t){let n=C.indexOf(e);return n!==-1&&n<=C.indexOf(t)}function Ze(e){return e!=null&&!e.publicShare&&Xe(e.role,`view`)}var Qe={default:{className:`brand-deepview`,mark:`<path class="fg" d="M7.843 6.719c-1.605 0-2.926 1.292-3.477 1.947.466.58 1.872 2.024 3.496 2.024s2.907-1.292 3.486-2.005c-.627-.703-1.88-1.966-3.505-1.966m.019 3.857c-1.51 0-2.802-1.263-3.353-1.9.55-.617 1.814-1.852 3.334-1.852 1.51 0 2.698 1.12 3.335 1.852-.533.618-1.787 1.9-3.316 1.9m-.019-3.42c-.826 0-1.577.694-1.577 1.596 0 .789.599 1.577 1.577 1.577.893 0 1.587-.684 1.587-1.577-.01-.779-.627-1.596-1.587-1.596m0 3.069a1.476 1.476 0 0 1-1.482-1.473c0-.722.599-1.491 1.482-1.491.846 0 1.482.693 1.492 1.491 0 .808-.618 1.473-1.492 1.473m.01-2.727c-.637 0-1.264.532-1.264 1.244 0 .627.475 1.235 1.245 1.245.684 0 1.254-.522 1.254-1.244 0-.58-.475-1.236-1.235-1.245m-.02 2.403a1.167 1.167 0 0 1-1.149-1.159c0-.532.456-1.14 1.169-1.149.56 0 1.149.427 1.159 1.15 0 .636-.485 1.158-1.179 1.158m-.769-1.833c-.19.238-.275.494-.237.864l.74.057zm1.026-.294c-.295-.057-.665 0-.912.228l.323.607zm.133.047-.38.56.988.114c-.057-.275-.323-.579-.608-.674m-.124.741.456.912c.21-.209.352-.484.314-.836zm-1.225.504a.97.97 0 0 0 .57.617l.399-.551zm.713.664c.313.076.636.01.845-.161l-.295-.618zm-.637 1.55c0 .028-.028.066-.066.066h-.59c-.028 0-.066-.028-.066-.066s.029-.066.067-.066h.579c.048 0 .076.028.076.066m.712 0c0 .028-.028.066-.066.066h-.437c-.028 0-.066-.028-.066-.066s.028-.066.066-.066h.437c.038 0 .066.028.066.066m.666 0c0 .028-.029.066-.067.066h-.37c-.029 0-.067-.028-.067-.066s.029-.066.067-.066h.37c.038 0 .067.028.067.066m-1.672.351c0 .029-.029.067-.067.067h-.295c-.028 0-.066-.028-.066-.066 0-.029.029-.067.067-.067h.294c.038 0 .066.028.066.066m.694 0c0 .029-.028.067-.066.067h-.409c-.028 0-.066-.028-.066-.066 0-.029.028-.067.066-.067h.399c.038 0 .076.028.076.066m.732 0c0 .029-.029.067-.067.067h-.465c-.029 0-.067-.028-.067-.066 0-.029.029-.067.067-.067h.465c.038 0 .067.028.067.066m-1.093.371a.065.065 0 0 1-.067.066h-.627c-.028 0-.075-.028-.066-.066 0-.028.029-.066.067-.066h.627c.038 0 .066.028.066.066m.684 0a.065.065 0 0 1-.066.066h-.39c-.028 0-.076-.028-.066-.066 0-.028.028-.066.066-.066h.39c.038 0 .066.028.066.066M5.088 6.263c-.019-.105-.114-.19-.237-.19s-.257.104-.257.237.105.238.247.238c.105 0 .218-.076.238-.18h.864v.826l.095-.048V6.31c0-.028-.019-.057-.048-.057h-.902zm-.237.19c-.076 0-.143-.066-.143-.143s.066-.142.143-.142.142.066.142.143c.01.076-.066.142-.143.142m2.89-.323H6.38l.418-.475v-.332a.255.255 0 0 0 .218-.248c0-.123-.114-.256-.256-.256s-.266.114-.266.257c0 .123.095.228.209.247v.284l-.456.523v.893l.095-.047v-.742h1.396c.029 0 .067-.009.067-.057 0-.028-.019-.047-.067-.047m-1.13-1.054c0-.076.066-.152.152-.152s.152.066.152.151c0 .076-.066.152-.152.152s-.152-.066-.152-.152m-.836 5.264h-.874c-.019-.105-.114-.219-.247-.219s-.256.105-.256.257c0 .132.114.275.266.275.104 0 .218-.076.237-.19h.827v.608l-.257.285a.3.3 0 0 0-.095-.019c-.133 0-.256.105-.256.228 0 .133.104.238.237.238.124 0 .247-.105.247-.238a.23.23 0 0 0-.057-.152l.285-.304v-.712c0-.029-.019-.058-.057-.058m-1.121.219a.16.16 0 0 1-.152-.161c0-.077.066-.162.152-.162s.152.066.152.152-.066.171-.152.171m.713 1.14c-.076 0-.143-.066-.143-.143s.066-.133.143-.133.142.067.142.143c0 .066-.066.133-.143.133m5.472-1.377a.24.24 0 0 0-.237.208h-1.13c-.029 0-.038.02-.038.048v.712l-.323.39h-.029a.245.245 0 0 0-.247.247c0 .133.114.256.247.256s.247-.113.247-.256a.26.26 0 0 0-.123-.219l.313-.38v-.674h1.083c.019.105.114.2.238.2.133 0 .266-.105.266-.257 0-.133-.105-.276-.266-.276m-1.758 1.767a.15.15 0 0 1-.143-.152c0-.075.067-.142.143-.142s.152.066.152.143a.15.15 0 0 1-.152.151m1.758-1.33a.15.15 0 0 1-.143-.152.147.147 0 0 1 .294.001.15.15 0 0 1-.152.151M8.917 5.55h-.399a.075.075 0 0 1-.076-.076c0-.028.029-.066.067-.066h.418c.028 0 .066.028.066.066s-.038.076-.076.076m.742 0H9.22c-.038 0-.067-.028-.067-.076 0-.028.029-.066.067-.066h.437c.038 0 .066.028.066.066s-.028.076-.066.076m.883 0h-.598c-.029 0-.067-.028-.067-.076 0-.028.029-.066.067-.066h.598c.028 0 .066.028.066.066s-.028.076-.066.076m-1.282.4h-.741c-.038 0-.076-.029-.076-.067s.028-.076.066-.076h.75c.039 0 .067.038.067.076 0 .029-.028.067-.066.067m.797 0h-.503c-.038 0-.076-.029-.076-.067s.028-.066.066-.066h.513c.038 0 .067.028.067.066 0 .029-.029.067-.067.067m.476 0h-.19c-.039 0-.067-.029-.067-.067s.028-.066.066-.066h.2c.028 0 .066.028.066.066 0 .029-.028.067-.075.067m-1.682.398h-.332c-.039 0-.077-.028-.077-.066s.029-.066.067-.066h.342c.038 0 .076.028.076.066s-.028.066-.076.066m.789 0h-.494c-.038 0-.067-.028-.067-.066s.029-.066.067-.066h.494c.038 0 .066.028.066.066s-.028.066-.066.066m.893 0h-.599c-.038 0-.076-.028-.076-.066s.028-.066.066-.066h.618c.028 0 .066.028.066.066s-.028.066-.076.066m.418.305a.69.69 0 0 0-.674.712c0 .086.019.18.048.257l.085.066c-.028-.085-.057-.171-.057-.304 0-.285.228-.646.598-.646.295 0 .599.228.599.636a.58.58 0 0 1-.599.59.8.8 0 0 1-.237-.048l.123.114a.4.4 0 0 0 .114.01c.39 0 .684-.276.684-.666 0-.313-.266-.712-.684-.722m.353.552-.019-.01-.161.19-.143-.01-.057-.047-.019-.133.19-.2a.28.28 0 0 0-.361.077c-.076.095-.076.209-.038.351l-.247.304.171.152.266-.266c.142.038.285.019.38-.095a.31.31 0 0 0 .038-.313"/>`},"claude-security":{className:`brand-claude`,mark:`<path class="fg" d="${p}"/>`},"codex-security":{className:`brand-codex`,mark:`<path class="fg" d="${m}"/>`},deepsec:{className:`brand-vercel`,mark:`<path class="fg" d="m8 5.97 3.5 6.062h-7Z"/>`},"markdown-generic":{className:`brand-markdown`,mark:`<path class="fg" d="M4 7h1.2l1.2 1.5L7.6 7h1.2v4H7.6V8.8L6.4 10 5.2 8.8V11H4zm5.6 0h1.2v2.3H12l-1.8 1.8-1.8-1.8h1.2Z"/>`},piolium:{className:`brand-piolium`,mark:`<path class="fg" d="M8 6.4 5.6 7.2v2.3c0 1.6 1 2.7 2.4 3.3 1.4-.6 2.4-1.7 2.4-3.3V7.2Z"/>`}},$e={default:[`#2563eb`,`#fff`],"claude-security":[`#d97757`,`#fff`],"codex-security":[`#fff`,`#000`],deepsec:[`#000`,`#fff`],piolium:[`#fbb829`,`#1c1b19`],"markdown-generic":[`#374151`,`#fff`]},et=Object.fromEntries(Object.entries(Qe).map(([e,{className:t,mark:n}])=>{let[r,i]=$e[e];return[e,`<svg class="file-icon ${t}" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path class="bg" fill="${r}"${e===`codex-security`||e===`deepsec`?` stroke="${i}" stroke-width=".5"`:``} d="M3 2h6l4 4v8H3z"/><path fill="rgba(0,0,0,.18)" d="M9 2v4h4Z"/><g fill="${i}">${n}</g></svg>`]})),tt=Object.fromEntries(Object.entries(Qe).map(([e,{className:t,mark:n}])=>[e,`<span class="report-logo ${t}" aria-hidden="true"><svg viewBox="${e==="default"?`3.5 4 9 9`:`4 5 8 8`}" width="14" height="14">${n}</svg></span>`]));function nt(e){let t=e.toLowerCase();if(t.endsWith(`.generic-md`)){let t=e.slice(0,-11);try{return decodeURIComponent(t)}catch{return t}}return t.endsWith(`.codex`)?e.slice(0,-6).replaceAll(`__`,`/`):e}var w=ee(class extends te{constructor(e){if(super(e),e.type!==h.PROPERTY&&e.type!==h.ATTRIBUTE&&e.type!==h.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!s(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===v||t===y)return t;let n=e.element,r=e.name;if(e.type===h.PROPERTY){if(t===n[r])return v}else if(e.type===h.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(r))return v}else if(e.type===h.ATTRIBUTE&&n.getAttribute(r)===t+``)return v;return c(e),t}}),rt=_`<path d="M8 1C4.5 1 4 1.5 4 3v1h4v1H3C1.5 5 1 6 1 8s.5 3 2 3h1V9c0-1.5 1-2 2.5-2H10c1.5 0 2-.5 2-2V3c0-1.5-.5-2-4-2Z" fill="#3776ab"/><path d="M8 1C4.5 1 4 1.5 4 3v1h4v1H3C1.5 5 1 6 1 8s.5 3 2 3h1V9c0-1.5 1-2 2.5-2H10c1.5 0 2-.5 2-2V3c0-1.5-.5-2-4-2Z" fill="#ffd43b" transform="rotate(180 8 8)"/><circle cx="6" cy="2.8" r=".65" fill="#fff"/><circle cx="10" cy="13.2" r=".65" fill="#fff"/>`,it=_`<path d="M6.42 2.11 6.81 .49 9.19 .49 9.58 2.11 11.05 2.72 12.47 1.85 14.15 3.53 13.28 4.95 13.89 6.42 15.51 6.81 15.51 9.19 13.89 9.58 13.28 11.05 14.15 12.47 12.47 14.15 11.05 13.28 9.58 13.89 9.19 15.51 6.81 15.51 6.42 13.89 4.95 13.28 3.53 14.15 1.85 12.47 2.72 11.05 2.11 9.58 .49 9.19 .49 6.81 2.11 6.42 2.72 4.95 1.85 3.53 3.53 1.85 4.95 2.72ZM8 3.7a4.3 4.3 0 1 0 0 8.6 4.3 4.3 0 1 0 0 -8.6Z" fill="#c97d5d" fill-rule="evenodd"/><text x="8" y="10.8" text-anchor="middle" fill="currentColor" font-family="serif" font-size="8" font-weight="700">R</text>`,at=_`<g fill="#8892bf" transform="translate(0 .5) scale(.5)"><path d="M28 10a4 4 0 0 0-4-4h-6v6a6 6 0 0 1-6 6h-2v2h2v6h4v-6h8v6h4V16h2v-4a2 2 0 0 0-2-2"/><path d="M12 4H8v2a6 6 0 0 0-6 6v6a2 2 0 0 0 2 2v2H2.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5H6a2 2 0 0 0 2-2v-8h4a4 4 0 0 0 4-4V8a4 4 0 0 0-4-4M6 14H4v-2h2Z"/></g>`,ot=/^(?:(?:un)?licen[cs]e|copying)(?:-[^/.]*)?(?:\.(?:mit|bsd|isc|apache|[al]?gpl|mpl|epl|eupl|cddl|cc0|zlib|psf|boost|bsl|artistic|unicode|ofl|wtfpl|lesser|lib)(?:v?\d[^/.]*|-[^/.]*)?)?(?:\.\d[^/.]*)*(?:\.(?:md|markdown|txt|text|rst|adoc|asciidoc|org))?$/iu,st=new Set([`resource:base64`,`directory`,`binary`]),ct=e=>st.has(e);function lt(e,t,n){return n!==null&&n!==`markdown`||ct(t)?!1:ot.test(e.slice(e.lastIndexOf(`/`)+1))}function ut(e,t){return(e?.kind===`stasis`?e.bundle?.formats?.get(t):void 0)??(e?.npmBinaries?.has(t)?`binary`:void 0)}var dt=e=>{let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n>0?t.slice(n+1).toLowerCase():``},ft=new Set([`node`,`so`,`dylib`,`dll`]);function pt(t,n){let r=e(t,n);if(r===null&&/\.map$/iu.test(t))return`map`;if(lt(t,n,r))return`license`;if([`javascript`,`jsx`].includes(r))return`js`;if([`typescript`,`tsx`].includes(r))return`ts`;let i=dt(t);return[`c`,`cpp`,`objectivec`].includes(r)&&i===`h`?`header`:[`solidity`,`rust`,`php`,`python`,`json`,`markdown`,`css`,`yaml`,`markup`,`java`,`ruby`,`c`,`cpp`].includes(r)?r:r===`bash`?`shell`:r===`objectivec`?`objc`:i===`wasm`?`wasm`:ft.has(i)?`native`:`generic`}var mt=_`<path d="M1.5 3.4 5.3 2l5.4 1.6 3.8-1.4v10.4l-3.8 1.4-5.4-1.6-3.8 1.4Z" fill="#3fa59a" fill-opacity=".22" stroke="#3fa59a" stroke-width="1.1" stroke-linejoin="round"/><path d="M5.3 2v10.4m5.4-8.8V14" stroke="#3fa59a" stroke-width="1.1"/>`,ht=_`<circle cx="8" cy="2.6" r="1" fill="currentColor"/><path d="M8 3.6v9.9m-3.5 0h7M3 4.6h10M3 4.6 1.2 9.2M3 4.6l1.8 4.6M13 4.6l-1.8 4.6M13 4.6l1.8 4.6" fill="none" stroke="currentColor" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 9.2h4a2 2 0 0 1-4 0Zm10 0h4a2 2 0 0 1-4 0Z" fill="currentColor"/>`,gt=_`<rect x="1" y="1" width="14" height="14" rx="2" fill="#663399"/><text x="14" y="13.2" text-anchor="end" fill="#fff" font-family="sans-serif" font-size="6.4" font-weight="700" letter-spacing="-.2">CSS</text>`,_t=_`<path d="M1 11.5v-7h2l1.7 2.3 1.7-2.3h2v7h-2V7.8L4.7 10 3 7.8v3.7Zm10.2-7h2V8H15l-2.8 3.5L9.4 8h1.8Z" fill="var(--green, #3fb950)"/>`,T=(e,t,n=`#fff`)=>t.length>2?_`<rect x="1" y="1" width="14" height="14" rx="2" fill=${e}/><text x="8" y="10.6" text-anchor="middle" fill=${n} font-family="sans-serif" font-size="6.2" font-weight="700" letter-spacing="-.2">${t}</text>`:_`<rect x="1" y="1" width="14" height="14" rx="2" fill=${e}/><text x="8" y="11.5" text-anchor="middle" fill=${n} font-family="sans-serif" font-size="8" font-weight="700">${t}</text>`,vt={__proto__:null,js:T(`#e6c84f`,`JS`,`#202020`),ts:T(`#3178c6`,`TS`),solidity:_`<path d="m8 1 4 6-4 2-4-2Z" fill="currentColor"/><path d="m4 8 4 2 4-2-4 7Z" fill="currentColor" opacity=".65"/>`,rust:it,php:at,python:rt,map:mt,markdown:_t,license:ht,css:gt,json:_`<path d="M6 2.5C4.6 2.5 4.4 3.3 4.4 4.6v1.6C4.4 7.4 3.8 8 2.6 8c1.2 0 1.8.6 1.8 1.8v1.6c0 1.3.2 2.1 1.6 2.1M10 2.5c1.4 0 1.6.8 1.6 2.1v1.6c0 1.2.6 1.8 1.8 1.8-1.2 0-1.8.6-1.8 1.8v1.6c0 1.3-.2 2.1-1.6 2.1" fill="none" stroke="light-dark(#a26e12, #f2b440)" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,yaml:T(`#cb171e`,`YML`),shell:_`<rect x="1.5" y="2.5" width="13" height="11" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.1"/><path d="m4.2 6 2 2-2 2m3.3 0h4.2" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>`,markup:_`<path d="M4.8 4.5 1.5 8l3.3 3.5m6.4-7L14.5 8l-3.3 3.5M9.3 3 6.7 13" fill="none" stroke="#e34c26" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>`,wasm:T(`#654ff0`,`WA`),native:_`<rect x="4" y="4" width="8" height="8" rx="1" fill="none" stroke="currentColor" stroke-width="1.1"/><rect x="6.4" y="6.4" width="3.2" height="3.2" fill="currentColor"/><path d="M6 1.5V4m4-2.5V4M6 12v2.5m4-2.5v2.5M1.5 6H4m-2.5 4H4M12 6h2.5M12 10h2.5" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/>`,java:_`<path d="M5.4 5.8c-.9-1 .9-1.7 0-3M8.4 5.8c-.9-1 .9-1.7 0-3" fill="none" stroke="#e76f00" stroke-width="1.1" stroke-linecap="round"/><path d="M2.5 7h9v3.3A3.7 3.7 0 0 1 7.8 14H6.2a3.7 3.7 0 0 1-3.7-3.7Z" fill="#5382a1"/><path d="M11.5 8.2h.9a1.6 1.6 0 0 1 0 3.2h-1.1" fill="none" stroke="#5382a1" stroke-width="1.1"/>`,objc:T(`#438eff`,`OC`),c:T(`#3949ab`,`C`),cpp:T(`#00599c`,`C++`),header:T(`#607d8b`,`H`),ruby:_`<path d="M4.5 2.5h7L14.5 6 8 14 1.5 6Z" fill="#cc342d"/><path d="M1.5 6h13M4.5 2.5 6 6l2 8 2-8 1.5-3.5M6 6l2-3.5L10 6" fill="none" stroke="#fff" stroke-opacity=".55" stroke-width=".7" stroke-linejoin="round"/>`},yt=_`<path d="M4 1.5h5l3 3v10H4Zm5 0v3h3M6 8h4M6 10.5h4" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/>`;function bt(e,t){let n=pt(e,t);return g`<svg class="source-file-icon" data-file-type="${n}" width="16" height="16" viewBox="0 0 16 16" style="${o({flex:`none`})}" aria-hidden="true">${vt[n]??yt}</svg>`}var xt=g`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" style="${o({flex:`none`})}" aria-hidden="true"><path d="M1.5 4V2.5h5L8 4h6.5v9h-13Z" stroke-linejoin="round"/></svg>`,St=g`<svg class="bundle-code-tree-npm" width="12" height="12" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M1 1h14v14H1Zm3 3v8h4V6h2v6h2V4Z"/></svg>`,Ct=g`<svg class="bundle-code-tree-soldeer" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7Z" fill="none" stroke="currentColor" stroke-width="1"/><path d="m8 3 2.5 4L8 8.5 5.5 7Zm-2.5 5L8 9.5 10.5 8 8 13Z" fill="currentColor"/></svg>`,wt=g`<svg class="bundle-code-tree-composer" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1 15 4.5v7L8 15l-7-3.5v-7Z" fill="#8892bf"/><path d="m1 4.5 7 3.5 7-3.5M8 8v7M4.5 2.75l7 3.5" fill="none" stroke="var(--surface, #fff)" stroke-width=".9"/></svg>`,Tt=g`<svg class="bundle-code-tree-cargo" width="12" height="12" viewBox="9.25 6.14 14 14" aria-hidden="true"><path d="m16.264 11.547 6.2-2.446v8.16l-6.2 2.485Zm0-.019-6.2-2.481v8.123l6.2 2.522Z" fill="#e5ac3d" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m16.277 11.508 6.169-2.435-6.2-2.531-6.2 2.467Z" fill="#e3b04e" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m12.82 10.149 6.196-2.467" fill="none" stroke="#73561f" stroke-miterlimit="10" stroke-width=".05430921534373718px"/><path d="m18.301 7.395-6.24 2.484 1.482.593 6.196-2.466z" fill="#fff" stroke="#73561f" stroke-miterlimit="10" stroke-width=".04741218643894885px" opacity=".3"/><path d="m13.562 10.47-1.453-.565v1.645l.201-.136.18.285.104.04.138-.121.137.228.129.05.189-.166.238.332.137.053zm-1.423 7.576 1.461.545-.023-1.645-.2.139-.184-.282-.104-.039-.136.123-.14-.226-.131-.049-.186.169-.243-.329-.137-.051z" fill="#fff" stroke="#73561f" stroke-miterlimit="10" stroke-width=".06661495224335688px" opacity=".3"/><path d="m21.426 13.49-.172-.039V13.4l.148-.208a.1.1 0 0 0 .018-.065.035.035 0 0 0-.037-.03l-.189.006-.015-.045.118-.222a.07.07 0 0 0 .007-.063.04.04 0 0 0-.045-.018l-.2.051-.024-.037.084-.229a.06.06 0 0 0 0-.058.04.04 0 0 0-.051-.006l-.2.094-.032-.027.047-.227a.05.05 0 0 0-.016-.052.05.05 0 0 0-.056.007l-.2.133-.039-.017.007-.215a.04.04 0 0 0-.026-.043.07.07 0 0 0-.058.02l-.184.166-.045-.006-.033-.2a.036.036 0 0 0-.036-.032.08.08 0 0 0-.057.031l-.164.194-.049.005-.071-.168a.036.036 0 0 0-.044-.021.1.1 0 0 0-.055.042l-.138.214-.05.016-.107-.135a.04.04 0 0 0-.05-.008.1.1 0 0 0-.05.051l-.107.226-.05.026-.138-.1a.05.05 0 0 0-.055 0 .1.1 0 0 0-.044.058l-.071.228-.049.036-.164-.054a.06.06 0 0 0-.057.017.1.1 0 0 0-.036.063l-.033.223-.045.044-.184-.01a.08.08 0 0 0-.058.029.1.1 0 0 0-.026.065l.007.209-.039.05-.2.035a.1.1 0 0 0-.056.04.1.1 0 0 0-.016.065l.046.187-.032.054-.2.079a.1.1 0 0 0-.051.049.07.07 0 0 0 0 .062l.084.157-.024.057-.2.119a.1.1 0 0 0-.045.057.06.06 0 0 0 .007.057l.118.122-.015.058-.189.155a.1.1 0 0 0-.037.062.045.045 0 0 0 .018.05l.148.082v.055l-.172.185a.1.1 0 0 0-.028.065.04.04 0 0 0 .028.041l.172.039v.051l-.148.208a.1.1 0 0 0-.018.065.035.035 0 0 0 .037.03l.189-.006.015.045-.118.222a.07.07 0 0 0-.007.063.04.04 0 0 0 .045.018l.2-.051.024.037-.084.229a.06.06 0 0 0 0 .058.04.04 0 0 0 .051.006l.2-.094.032.027-.046.227a.05.05 0 0 0 .016.051.05.05 0 0 0 .056-.007l.2-.133.039.017-.007.215a.04.04 0 0 0 .026.043.07.07 0 0 0 .058-.02l.184-.166.045.006.033.2a.035.035 0 0 0 .036.032.08.08 0 0 0 .057-.031l.164-.194.049-.005.071.168a.036.036 0 0 0 .044.02.1.1 0 0 0 .055-.042l.138-.214.05-.016.107.135a.04.04 0 0 0 .05.008.1.1 0 0 0 .05-.051l.107-.226.05-.027.138.1a.05.05 0 0 0 .055 0 .1.1 0 0 0 .044-.058l.071-.228.049-.036.164.054a.06.06 0 0 0 .057-.017.1.1 0 0 0 .036-.063l.033-.223.045-.044.184.01a.08.08 0 0 0 .058-.029.1.1 0 0 0 .026-.065l-.007-.209.039-.05.2-.035a.1.1 0 0 0 .056-.04.1.1 0 0 0 .016-.065l-.046-.187.017-.053.2-.079a.1.1 0 0 0 .051-.049.07.07 0 0 0 0-.062l-.084-.157.024-.057.2-.119a.1.1 0 0 0 .045-.057.06.06 0 0 0-.007-.057l-.118-.122.015-.058.189-.155a.1.1 0 0 0 .037-.062.045.045 0 0 0-.018-.05l-.148-.082v-.055l.172-.185a.1.1 0 0 0 .028-.065.04.04 0 0 0-.014-.039m-1.153 1.988c-.066.013-.108-.037-.094-.112a.21.21 0 0 1 .145-.16c.066-.013.108.037.094.112a.21.21 0 0 1-.145.16m-.059-.39a.19.19 0 0 0-.132.146l-.061.325a2.3 2.3 0 0 1-.619.4 1.4 1.4 0 0 1-.632.123l-.061-.273c-.013-.057-.072-.072-.132-.033l-.252.164a1 1 0 0 1-.13-.106l1.226-.521q.022-.007.023-.026v-.455c0-.013-.009-.012-.023-.006l-.359.152v-.288l.388-.165a.16.16 0 0 1 .239.115c.015.057.049.249.072.3s.117.172.217.13l.611-.26.022-.012a3 3 0 0 1-.139.23Zm-1.7 1.13c-.066.043-.131.026-.145-.037a.2.2 0 0 1 .094-.192c.066-.043.131-.026.145.037a.2.2 0 0 1-.09.192Zm-.465-1.779a.18.18 0 0 1-.062.2c-.062.055-.134.056-.161 0a.18.18 0 0 1 .062-.2c.066-.051.138-.053.165 0Zm-.143.416.263-.234a.16.16 0 0 0 .057-.178l-.054-.105.213-.09v1l-.429.182a1.4 1.4 0 0 1-.057-.407c.001-.052.001-.11.011-.168Zm1.152-.587v-.3l.506-.215c.026-.011.185-.047.185.077 0 .1-.122.192-.222.234l-.47.2Zm1.84-.516v.118l-.154.065a.04.04 0 0 0-.022.036v.074a.31.31 0 0 1-.176.3c-.078.043-.165.036-.176-.01-.046-.253-.123-.278-.245-.327a1 1 0 0 0 .308-.578.3.3 0 0 0-.235-.315.57.57 0 0 0-.322.026l-1.592.677a2.7 2.7 0 0 1 .84-.853l.188.127c.042.029.113 0 .157-.063l.21-.3a.94.94 0 0 1 1.027.33l-.144.4c-.025.069 0 .128.057.13l.277.011q.004.073.004.152Zm-1.591-1.044c.049-.069.126-.1.172-.069s.045.113 0 .183-.126.1-.172.069-.044-.114.005-.184Zm1.427.6a.19.19 0 0 1 .161-.133c.062 0 .089.066.062.142a.19.19 0 0 1-.161.133c-.057-.006-.085-.07-.058-.15Z" opacity=".55"/><path d="M0 16.309h22.926v9.971L45.72 13.139 22.926 0v9.97H0z" fill="#231f20" transform="matrix(0 -.029 .022 .013 10.451 11.138)"/><path d="M0 16.309h22.926v9.971L45.72 13.139 22.926 0v9.97H0z" fill="#231f20" transform="matrix(0 -.029 .022 .013 15.013 12.984)"/></svg>`;function Et(e){return e===`composer`?wt:e===`cargo`?Tt:e===`soldeer`?Ct:St}var Dt=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/iu,Ot=200;function kt(e){let t=[...e];return t.length>Ot?`${t.slice(0,Ot-1).join(``).trimEnd()}\u2026`:e}var E=e=>e.split(`/`).map(encodeURIComponent).join(`/`),At=(e,t)=>`https://github.com/${E(e)}/releases/tag/${E(t)}`;function jt(e,t){return t&&e?.sha===t&&Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`&&e):[]}function Mt(e,t,n=null){let r=typeof e?.github==`string`&&typeof n==`string`&&n.toLowerCase()===e.github.toLowerCase()?jt(e,t):[],i=t&&e?.sha===t&&typeof e.details?.subject==`string`?e.details:null;if(i||r.length!==0)return JSON.stringify({tags:r,...i?{title:kt(i.subject),authorName:i.authorName,authorLogin:i.authorLogin,date:i.committedAt??i.authoredAt}:{}})}function Nt(e,t=``,n=null){let i=[],a=l(e);if(a){let o=[u(e.repo),u({directory:t})].filter(Boolean).join(`/`),s=r(e.repo?.commit),c=o.split(`/`).map(encodeURIComponent).join(`/`),d=`https://github.com/${a}`,f=l({repo:{github:n?.github}}),p=f?jt(n,s):[];i.push({label:`GitHub`,text:a+(o?`/${o}`:``),href:s||o?`${d}/tree/${s??`HEAD`}${c?`/${c}`:``}`:d,...s?{commit:{hash:s,text:s.slice(0,7),href:`${d}/commit/${s}`,...p.length>0?{tags:p.map(e=>({name:e,href:At(f,e)}))}:{}}}:{}})}let o=e?.package?.npm;if(typeof o?.name==`string`&&Dt.test(o.name)){let e=typeof o.version==`string`?o.version.trim():``;i.push({label:`npm`,text:o.name+(e?`@${e}`:``),href:`https://www.npmjs.com/package/${o.name}${e?`/v/${encodeURIComponent(e)}`:``}`})}return i}function Pt(e,t){let r=new Map,i=e?.kind===`stasis`?e.bundle?.reason:null;if(!i||typeof i!=`object`||Array.isArray(i))return r;let a=new Set(t??[...n(e)].filter(([,e])=>e!=null).map(([e])=>e));for(let[e,t]of Object.entries(i).toSorted(([e],[t])=>e.localeCompare(t))){if(!e||!Array.isArray(t))continue;let n=new Set(t.filter(e=>typeof e==`string`&&a.has(e)));n.size>0&&r.set(e,n)}return[...r.values()].some(e=>e.size<a.size)||r.clear(),r}function Ft(e,t,n){let r=new Set;for(let[i,o]of e)a(i,n?.get(i))&&r.add(t(o));return r}function It(e,t,n){let r=new Set;for(let i of e?.bundle?.entries??[]){let e=t.get(i);e!==void 0&&r.add(n(e))}return r}function Lt(e,t,n,r){let i=n.has(r)?r:null;if(i===null)return{tree:e,origToStripped:t,selected:i};let a=new Map([...t].filter(([e])=>n.get(i).has(e))),o=new Set(a.values());return{tree:Object.fromEntries([...o].map(t=>[t,{...e[t],imports:(e[t].imports??[]).filter(e=>o.has(e))}])),origToStripped:a,selected:i}}function D(e){if(e?.kind===`sourcemap`)return t(e);let n=new Map;if(e?.kind!==`stasis`||!e.bundle)return n;for(let t of e.bundle.imports.values())for(let[e,r]of t){n.has(e)||n.set(e,new Set);for(let t of r.values()){let r=typeof t==`string`?[t]:t instanceof Map?t.values():[];for(let t of r)typeof t==`string`&&n.get(e).add(t)}}return n}function Rt(e,t,n=t,r){let a=D(e),o=new Set(e?.bundle?.entries??[]),s=[],c=new Set,l=[...o];for(let e of l){if(c.has(e))continue;if(c.add(e),t.has(e)){o.has(e)&&s.push({file:t.get(e)});continue}if(n.has(e))continue;let u=[];for(let r of a.get(e)??[])t.has(r)?u.push(t.get(r)):!n.has(r)&&a.has(r)&&(u.push(r),l.push(r));s.push({file:e,origFile:e,virtual:!0,...o.has(e)?{}:{entry:!1},pkg:i(e,{packageDir:r?.get(e)}),imports:u})}return s}function zt(e,t,n,r,a=t){let o=D(e),s=new Set;for(let[e,a]of t)i(e,{packageDir:r?.get(e)})===`__own__`&&s.add(n(a));for(let r of It(e,t,n))s.add(r);if(s.size===0){let e=Ft(t,n,r),i=new Set;for(let[r,a]of o){let o=t.get(r);if(o!==void 0&&e.has(n(o)))for(let e of a){let r=t.get(e);r!==void 0&&n(o)!==n(r)&&i.add(n(r))}}for(let t of e)i.has(t)||s.add(t)}let c=new Set;for(let[e,s]of o)if(!a.has(e)&&i(e,{packageDir:r?.get(e)})===`__own__`)for(let e of s){let r=t.get(e);r!==void 0&&c.add(n(r))}return c.size>0&&s.add(`__own__`),{roots:[...s],appImports:[...c]}}function Bt(e,t){let n=d(e);if(n===null)return null;let r=t.replace(/\.(?:md|markdown)$/iu,``),i=new Set;return n.map(({displayName:e,data:t})=>{let n=`${r}: ${e}`.replaceAll(`%`,`%25`).replaceAll(/[\\/\p{Cc}]/gu,`_`)+`.generic-md`;if(i.has(n))throw Error(`Markdown (generic): products produce the same report name: ${n}`);return i.add(n),{name:n,content:JSON.stringify(t)}})}var Vt=`...`,Ht=120;function Ut(e){for(let t of(f(e)??[]).flat()){let e=t?.description;typeof e==`string`&&e.length===Ht&&e.endsWith(Vt)&&(t.description=`${e.slice(0,-Vt.length)}\u2026`)}return e}var Wt=b(`./scan.js`),Gt=()=>Wt.load();function Kt(e){if(/^https?:\/\//iu.test(e)){try{let t=new URL(e),n=t.pathname.split(`/`).filter(Boolean);if(n.length>=2)return{owner:`${t.host}/${n[0]}`,name:n.slice(1).join(`/`)}}catch{}return{owner:null,name:e}}let t=/^([^\s/:]+)\/(.+)$/u.exec(e);return t?{owner:t[1],name:t[2]}:{owner:null,name:e}}var qt=e=>e.normalize(`NFKC`).toLocaleLowerCase(),O=(e,t)=>e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`}),Jt=Symbol(`other repositories`);function Yt(e,t=``,n=null,{includeSingletonOrganizations:r=!1}={}){let i=e.map(e=>({...e,...e.special?{owner:null,name:e.label}:Kt(e.label)})),a=new Map;for(let e of i)e.owner!=null&&a.set(e.owner,(a.get(e.owner)??0)+1);let o=r?1:2,s=[...a].filter(([,e])=>e>=o).toSorted(([e],[t])=>O(e,t)).map(([e,t])=>({value:e,name:e,count:t})),c=e=>(a.get(e.owner)??0)<o,l=i.filter(e=>!e.special&&!e.reset&&c(e)).length;l>0&&s.push({value:Jt,name:`Other`,count:l});let u=s.some(e=>e.value===n)?n:null,d=qt(t.trim()).split(/\s+/u).filter(Boolean),f=e=>d.every(t=>qt(e.label).includes(t)),p=i.filter(e=>e.reset||e.special&&f(e)),m=i.filter(e=>!e.reset&&!e.special&&f(e)&&(u==null||(u===Jt?c(e):e.owner===u))),h=new Map;for(let e of m){let t=(a.get(e.owner)??0)>=o?e.owner:null;h.has(t)||h.set(t,[]),h.get(t).push(e)}return{facets:s,activeFacet:u,pinned:p,sections:[...h].toSorted(([e],[t])=>e==null?1:t==null?-1:O(e,t)).map(([e,t])=>({label:e??(s.some(e=>e.value!==Jt)?`Other`:null),organization:e!=null,options:t.toSorted((e,t)=>O(e.label,t.label))})),count:m.length+p.filter(e=>!e.reset).length,total:i.filter(e=>!e.reset).length,showFacets:s.length>1}}function Xt(e,t,n){let r=e[0].getBoundingClientRect().top,i=1;for(;i<e.length&&Math.abs(e[i].getBoundingClientRect().top-r)<1;)i++;if(i===1&&(n===`ArrowLeft`||n===`ArrowRight`))return t;let a=t+{ArrowLeft:-1,ArrowRight:1,ArrowUp:-i,ArrowDown:i}[n];if(a<0)return n===`ArrowUp`?-1:t;let o=Math.floor((e.length-1)/i);return a<e.length?a:Math.floor(t/i)<o?e.length-1:t}var Zt=class extends re{static properties={options:{attribute:!1},value:{attribute:!1},label:{type:String},placeholder:{type:String},disabled:{type:Boolean},_query:{state:!0},_facet:{state:!0},_open:{state:!0}};static styles=ne`:host{display:block;min-width:0}:host,.menu{-webkit-app-region:no-drag;app-region:no-drag}*{box-sizing:border-box}button,input{font:inherit;color:var(--text)}button{cursor:default;user-select:none}.trigger{display:flex;align-items:center;gap:.6rem;width:100%;height:2rem;padding:.28rem .5rem;border:1px solid var(--border);border-radius:var(--ui-radius, 5px);background:var(--bg);text-align:left;font-size:.76rem}.trigger:hover:not(:disabled){border-color:var(--muted)}.trigger:disabled{opacity:.5}:host([variant=filter]){display:inline-block;max-width:min(20rem,100%)}:host([variant=filter]) .trigger{height:30px;min-width:8.5rem;background:transparent;font-size:.8rem;font-weight:500;border-radius:var(--ui-radius, 4px)}.name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.option-copy{flex:1;min-width:0;display:grid;gap:.08rem}.secondary{color:var(--muted);font-size:.64rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.secondary.is-warning{color:var(--warning);font-weight:600}.avatar{display:grid;place-items:center;flex:0 0 1.5rem;width:1.5rem;height:1.5rem;border-radius:50%;color:var(--accent);background:rgb(from var(--accent) r g b / .13);font-family:sans-serif;font-size:.62rem;font-weight:600}.detail,.count{flex:0 0 auto;color:var(--muted);font-size:.66rem;font-variant-numeric:tabular-nums;white-space:nowrap}svg{flex:0 0 auto;width:.9rem;height:.9rem;color:var(--muted)}.menu{visibility:hidden;position:fixed;inset:auto;margin:0;padding:0;overflow:hidden;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);background:var(--bg);color:var(--text);box-shadow:0 .6rem 1.6rem #0006;user-select:none}.menu:popover-open{display:flex;flex-direction:column}.menu[data-positioned]{visibility:visible}.search{display:flex;align-items:center;gap:.5rem;flex:0 0 auto;padding:.55rem .65rem;border-bottom:1px solid var(--border)}input{flex:1;min-width:0;width:0;padding:.15rem 0;border:0;background:transparent;font-size:.78rem;outline:none}input::placeholder{color:var(--muted)}.search:focus-within{box-shadow:inset 0 -2px var(--accent)}.body{display:flex;min-height:0;flex:1}.facets{width:10.5rem;flex:0 0 auto;padding:.35rem;overflow:auto;overscroll-behavior:none;border-right:1px solid var(--border);background:rgb(from var(--bg) r g b / .25)}.org{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .45rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;text-align:left;font-size:.7rem}.org[aria-pressed=true]{color:var(--accent);background:rgb(from var(--accent) r g b / .1)}.results{flex:1;min-width:0;overflow:auto;overscroll-behavior:none;padding:.3rem}.group+.group{margin-top:.35rem;padding-top:.35rem;border-top:1px solid var(--border)}.heading{position:sticky;top:-.3rem;z-index:1;display:flex;align-items:center;gap:.4rem;margin:0;padding:.4rem .5rem;color:var(--muted);background:var(--bg);font-size:.68rem;font-weight:600}.heading svg{width:.8rem;height:.8rem}.option{display:flex;align-items:center;gap:.65rem;width:100%;padding:.35rem .5rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;text-align:left;font-size:.76rem}.option svg{width:.8rem;height:.8rem;opacity:0;color:var(--accent)}.option[aria-selected=true]{color:var(--accent);background:rgb(from var(--accent) r g b / .1)}.option[aria-selected=true] svg{opacity:1}.option:disabled{opacity:.45}.option:hover:not(:disabled),.org:hover{background:rgb(from var(--text) r g b / .05)}.pinned{padding-bottom:.25rem;margin-bottom:.25rem;border-bottom:1px solid var(--border)}.empty{margin:0;padding:1.3rem .7rem;color:var(--muted);font-size:.76rem}button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}@media(max-width:40rem){.facets{width:8.5rem}}@media(max-width:28rem){.facets{width:7rem}.option{gap:.35rem}}:host-context(body.theme-w95){.trigger,.trigger:hover:not(:disabled){height:23px;padding:0 1px 0 4px;gap:4px;border:0;border-radius:0;background:#fff;box-shadow:var(--w95-sunken);font-size:11px;font-weight:400}.trigger>svg:last-child{width:16px;height:19px;padding:3px 2px;background:var(--w95-face);box-shadow:var(--w95-raised);color:#000}.menu{border:1px solid #000;border-radius:0;box-shadow:none;font-size:11px}.search{border-bottom:0;box-shadow:inset 0 -1px var(--w95-shadow)}.search:focus-within{box-shadow:inset 0 -1px var(--w95-shadow)}:is(.option,.org){border-radius:0;font-size:11px}:is(.option,.org):is(:hover:not(:disabled),[aria-selected=true],[aria-pressed=true]){background:var(--w95-title);color:#fff;.secondary,svg,.detail,.count{color:#fff}}.avatar{border-radius:0}& button:focus-visible{outline:1px dotted #000;outline-offset:-2px}}:host-context(body.theme-w95) *{overscroll-behavior:none}`;constructor(){super(),this.options=[],this.value=null,this.label=`Choose`,this.placeholder=`Choose`,this.disabled=!1,this._query=``,this._facet=null,this._open=!1,this._menuHeight=null,this._onViewport=()=>this._position()}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent(`tooltip-root-connected`,{bubbles:!0,composed:!0})),window.addEventListener(`resize`,this._onViewport),window.addEventListener(`scroll`,this._onViewport,!0),this._scrollRoots=[];for(let e=this.getRootNode();e.host;e=e.host.getRootNode())e.addEventListener(`scroll`,this._onViewport,!0),this._scrollRoots.push(e)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`resize`,this._onViewport),window.removeEventListener(`scroll`,this._onViewport,!0);for(let e of this._scrollRoots??[])e.removeEventListener(`scroll`,this._onViewport,!0);this._scrollRoots=[]}render(){let e=this.options.find(e=>e.value===this.value),t=this.choices(),n=[...t.pinned,...t.sections.flatMap(e=>e.options)].filter(e=>!e.disabled),r=n.find(e=>e.value===this.value)?.value??n[0]?.value;return g`<button type="button" class="trigger" popovertarget="selector-menu" aria-label="${this.label}" aria-haspopup="dialog" aria-expanded="${this._open}" ?disabled="${this.disabled}">${e?this.optionIcon(e):y}<span class="name" data-tooltip-truncated data-tooltip="${e?.label??y}">${e?.label??this.placeholder}</span>${e?.detail?g`<span class="detail" data-tooltip-truncated data-tooltip="${e.detail}">${e.detail}</span>`:y} <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg></button><div class="menu" id="selector-menu" popover="auto" role="dialog" aria-label="${this.label}" @beforetoggle="${this._beforeToggle}" @toggle="${this._toggle}" @keydown="${this._keyDown}"><div class="search"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><circle cx="7" cy="7" r="4.5"/><path d="m10.5 10.5 3.5 3.5"/></svg> <input type="search" placeholder="${`${this.searchLabel}\u2026`}" aria-label="${this.searchLabel}" aria-controls="selector-options" .value="${w(this._query)}" @input="${e=>{this._query=e.target.value}}"> <span class="count" role="status">${t.count}${t.count===t.total?``:` / ${t.total}`}</span></div><div class="body">${t.showFacets?g`<div class="facets" role="group" aria-label="${this.facetLabel}"><button type="button" class="org" aria-pressed="${t.activeFacet==null}" @click="${()=>this._filterFacet(null)}"><span class="name">${this.allFacetsLabel}</span><span class="count">${t.total}</span></button> ${t.facets.map(e=>g`<button type="button" class="org" aria-pressed="${t.activeFacet===e.value}" @click="${()=>this._filterFacet(e.value)}"><span class="name" data-tooltip-truncated data-tooltip="${e.name}">${e.name}</span><span class="count">${e.count}</span></button>`)}</div>`:y}<div class="results" id="selector-options" role="listbox" aria-label="${this.optionsLabel}">${t.pinned.length>0?g`<div class="pinned">${t.pinned.map(e=>this._option(e,!1,r))}</div>`:y} ${t.sections.map((e,t)=>g`<div class="group" role="group" aria-labelledby="${e.label?`selector-group-${t}`:y}">${e.label?g`<h3 class="heading" id="${`selector-group-${t}`}">${e.organization?g`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M3 14V3h6v11M9 7h4v7M1 14h14M5 6h2M5 9h2M5 12h2"/></svg>`:y}${e.label}</h3>`:y} ${e.options.map(t=>this._option(t,e.organization,r))}</div>`)} ${t.count?y:g`<p class="empty">${this.options.length>0?this.noMatchesLabel:this.emptyLabel}</p>`}</div></div></div>`}get menuWidth(){return 360}optionIcon(e){return e.initials?g`<span class="avatar" aria-hidden="true">${e.initials}</span>`:y}optionTooltip(e){return e.label}_option(e,t,n){let r=e.displayLabel??(t?e.name:e.label),i=this.optionTooltip(e);return g`<button type="button" class="option" role="option" ?data-reset="${e.reset}" ?disabled="${e.disabled}" aria-label="${e.label}" aria-selected="${e.value===this.value}" tabindex="${e.value===n?0:-1}" @click="${()=>this._pick(e.value)}"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m3 8 3 3 7-7"/></svg>${this.optionIcon(e)}<span class="option-copy"><span class="name" ?data-tooltip-truncated="${r===i}" data-tooltip="${i}">${r}</span>${e.secondary?g`<span class="${e.secondaryWarning?`secondary is-warning`:`secondary`}" ?data-tooltip-truncated="${!e.secondaryWarning}" data-tooltip="${e.secondaryWarning??e.secondary}">${e.secondary}</span>`:y}</span>${e.detail?g`<span class="detail">${e.detail}</span>`:y}</button>`}updated(e){this.disabled&&this._open&&this._close(!1),e.has(`options`)&&(this._menuHeight=null),this._position(),(e.has(`_query`)||e.has(`_facet`))&&(this.renderRoot.querySelector(`.results`).scrollTop=0)}_beforeToggle(e){this._open=e.newState===`open`,delete e.target.dataset.positioned,this._open&&(this._query=``,this._facet=null,this._menuHeight=null)}async _toggle(e){e.newState===`open`&&(await this.updateComplete,this._open&&this.isConnected&&(this._position(),this.renderRoot.querySelector(`input`).focus({preventScroll:!0})))}_position(){let e=this.renderRoot.querySelector(`.menu`);if(!e?.matches(`:popover-open`))return;let t=this.renderRoot.querySelector(`.trigger`).getBoundingClientRect(),n=e.querySelector(`.facets`)!=null,r=Math.min(Math.max(t.width,n?560:this.menuWidth),window.innerWidth-16),i=window.innerHeight-t.bottom-8-4,a=t.top-8-4;e.style.width=`${r}px`,this._menuHeight??=Math.min(480,e.querySelector(`.search`).offsetHeight+Math.max(e.querySelector(`.results`).scrollHeight,e.querySelector(`.facets`)?.scrollHeight??0)+2);let o=this._menuHeight,s=i<o&&a>i;e.style.maxHeight=`${Math.max(0,Math.min(o,s?a:i))}px`,e.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-r-8))}px`,e.style.top=`${Math.max(8,s?t.top-e.offsetHeight-4:t.bottom+4)}px`,e.dataset.positioned=``}_filterFacet(e){this._facet=e,this.renderRoot.querySelector(`input`).focus({preventScroll:!0})}_keyDown(e){if(e.stopPropagation(),e.key===`Escape`){e.preventDefault(),this._close();return}let t=this.renderRoot.querySelector(`input`),n=this.renderRoot.activeElement,r=[...this.renderRoot.querySelectorAll(`.option:not(:disabled)`)],i=r.indexOf(n);if(n!==t&&i<0)return;if(e.key===`Enter`&&n===t){e.preventDefault(),(this.renderRoot.querySelector(`.option:not([data-reset]):not(:disabled)`)??r[0])?.click();return}let a;if(n===t){if(e.key===`ArrowDown`)a=0;else if(e.key===`ArrowUp`)a=-1;else return}else if(e.key.startsWith(`Arrow`))a=Xt(r,i,e.key);else if(e.key===`Home`)a=0;else if(e.key===`End`)a=r.length-1;else if(e.key.length===1&&e.key!==` `&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault(),this._query+=e.key,t.focus();return}else return;e.preventDefault();for(let[e,t]of r.entries())t.tabIndex=e===a?0:-1;a<0?t.focus():r[a]?.focus()}_pick(e){this.disabled||!this.options.some(t=>t.value===e&&!t.disabled)||(this._close(),this.dispatchEvent(new CustomEvent(this.changeEvent,{detail:{value:e},bubbles:!0,composed:!0})))}_close(e=!0){this.renderRoot.querySelector(`.menu`).hidePopover(),this._open=!1,e&&this.renderRoot.querySelector(`.trigger`).focus({preventScroll:!0})}},Qt=class extends Zt{constructor(){super(),this.label=`Choose repository`,this.placeholder=`Choose repository`}get searchLabel(){return`Search repositories`}get optionsLabel(){return`Repositories`}get facetLabel(){return`Filter by organization`}get allFacetsLabel(){return`All organizations`}get noMatchesLabel(){return`No matching repositories`}get emptyLabel(){return`No repositories available`}get changeEvent(){return`repository-change`}choices(){return Yt(this.options,this._query,this._facet)}};customElements.get(`repository-selector`)||customElements.define(`repository-selector`,Qt);var $t=/(?![\t\n\r])\p{Cc}|[\u202A-\u202E\u2066-\u2069]/gu,en=/\P{ASCII}/u;function tn(e){if(typeof e!=`string`)return{kind:`binary`,controls:null};let t=new Map;for(let[n]of e.matchAll($t))t.set(n.codePointAt(0),(t.get(n.codePointAt(0))??0)+1);let n=e.search(en);if(n!==-1)for(let[r,i]of yn(e,n)??[])t.set(r,i);return{kind:n===-1?`ascii`:`utf8`,controls:t.size>0?t:null}}var nn=/(?=\p{Emoji})\p{Extended_Pictographic}(?:\u{FE0F}|[\u{1F3FB}-\u{1F3FF}])?$/u,rn=/^(?=\p{Emoji})\p{Extended_Pictographic}/u,an=/(?=\p{Emoji})\p{Extended_Pictographic}$/u,on=/^[\d#*]$/u,sn=e=>e>=917536&&e<=917631,cn=new Set([`gbeng`,`gbsct`,`gbwls`]),ln=(e,t,n)=>n-t===10?String.fromCodePoint(...Array.from({length:5},(n,r)=>e.codePointAt(t+2*r)-917504)):``;function un(e,t,n,r){if(n===13&&(e[t+1]===`
2
- `||r&&t+1===e.length)||n===8205&&nn.test(e.slice(Math.max(0,t-4),t))&&rn.test(e.slice(t+1,t+3))||(n===65038||n===65039)&&an.test(e.slice(Math.max(0,t-2),t))||n===65039&&on.test(e[t-1]??``)&&e[t+1]===`⃣`)return t+1;if(sn(n)&&!sn(e.codePointAt(t-2))){let n=t;for(;sn(e.codePointAt(n));)n+=2;if(e.codePointAt(t-2)===127988&&e.codePointAt(n-2)===917631&&cn.has(ln(e,t,n-2)))return n}return-1}var dn=/[\u115F\u1160\u3164\uFFA0\u{E0001}\u{E0020}-\u{E007F}]|[\uFE00-\uFE0F]|[\u{E0100}-\u{E01EF}]/u,k=/[\uFE00-\uFE0F\u115F\u1160\u3164\uFFA0\uDB40]/g,fn=e=>new Set(e.split(` `).flatMap(e=>{let[t,n=t]=e.split(`-`).map(e=>Number.parseInt(e,16));return Array.from({length:n-t+1},(e,n)=>t+n)})),pn=new Map([[65024,`30 1000 1002 1004 1010-1011 1015 1019-101a 101c-101d 1022 1031 1075 1078 107a 1080 2018-2019 201c-201d 210b 2110 2112 211b 212c 2130-2131 2133 2205 2229-222a 223d 2242-2243 2248 2268-2269 2272-2273 228a-228b 2293-2295 2297 229c 22cd 22da-22dd 29b7 2a3c-2a3d 2a6c 2a9d-2a9e 2aac-2aad 2acb-2acc 3001-3002 31c0 31c6 31c9 31cf-31d2 31d4-31d5 31d7 31db-31dd 31e5 a856 a85c a85e-a860 a868 aa60-aa66 aa6b-aa6c aa6f aa7a ff01 ff0c ff0e ff10 ff1a-ff1b ff1f 10ac5-10ac6 10ad6-10ad7 10ae1 13091 1310f 1311c 13121 13127 13139 131a0 131b1 131b8-131b9 131cb 131e0 131f9-131fa 1327b 1327f 13285 1328c 132aa 132cb 132dc 132e7 13307 1331b 13322 1333c 13377-13378 13399-1339a 133d3 133e4-133e5 133e7 133ee 133f2 133f5-133f6 13416 13419-1341a 13423 13443-13446 13be8-13bea 13f72 1d49c 1d49e-1d49f 1d4a2 1d4a5-1d4a6 1d4a9-1d4ac 1d4ae-1d4b5 1db10`],[65025,`2018-2019 201c-201d 210b 2110 2112 211b 212c 2130-2131 2133 3001-3002 31c6 31cf 31dd ff01 ff0c ff0e ff1a-ff1b ff1f 13093 13132 13139 13187 131b1 131ee 131f8-131fa 13257 1327f 1328b 132a4 13308 13312-13314 1331b 13321-13322 13331 133e8 13419 13f1f 14274 1d49c 1d49e-1d49f 1d4a2 1d4a5-1d4a6 1d4a9-1d4ac 1d4ae-1d4b5`],[65026,`2018-2019 201c-201d 13117 13139 13183 131a0 131ba 131ee 13216 1327b 132a4 132e7 132e9 132f8 132fd 13302-13303 13310-13314 1331c 13321 13331 1334a 13361 13373 1337d 13385 133af-133b0 133bf 133db 133dd 13419 1342c 1342e 14274 1d4cf`],[65027,`13012 130b8 130ba 1310f 1312f 13139 13184 1319c-1319d 1319f 131b1 131db 13205 13296 13338 13419`],[65028,`13139 1340d`],[65029,`13139 14274`],[65030,`1312f 13139 13184 131db 131ee 13205 132a4 132e9 1332b 13338 13370-13371 13419 14274`]].map(([e,t])=>[e,fn(t)])),mn=fn(`23 2a 30-39 a9 ae 203c 2049 2122 2139 2194-2199 21a9-21aa 231a-231b 2328 23cf 23e9-23f3 23f8-23fa 24c2 25aa-25ab 25b6 25c0 25fb-25fe 2600-2604 260e 2611 2614-2615 2618 261d 2620 2622-2623 2626 262a 262e-262f 2638-263a 2640 2642 2648-2653 265f-2660 2663 2665-2666 2668 267b 267e-267f 2692-2697 2699 269b-269c 26a0-26a1 26a7 26aa-26ab 26b0-26b1 26bd-26be 26c4-26c5 26c8 26ce-26cf 26d1 26d3-26d4 26e9-26ea 26f0-26f5 26f7-26fa 26fd 2702 2705 2708-270d 270f 2712 2714 2716 271d 2721 2728 2733-2734 2744 2747 274c 274e 2753-2755 2757 2763-2764 2795-2797 27a1 27b0 27bf 2934-2935 2b05-2b07 2b1b-2b1c 2b50 2b55 3030 303d 3297 3299 1f004 1f170-1f171 1f17e-1f17f 1f202 1f21a 1f22f 1f237 1f30d-1f30f 1f315 1f31c 1f321 1f324-1f32c 1f336 1f378 1f37d 1f393 1f396-1f397 1f399-1f39b 1f39e-1f39f 1f3a7 1f3ac-1f3ae 1f3c2 1f3c4 1f3c6 1f3ca-1f3ce 1f3d4-1f3e0 1f3ed 1f3f3 1f3f5 1f3f7 1f408 1f415 1f41f 1f426 1f43f 1f441-1f442 1f446-1f449 1f44d-1f44e 1f453 1f46a 1f47d 1f4a3 1f4b0 1f4b3 1f4bb 1f4bf 1f4cb 1f4da 1f4df 1f4e4-1f4e6 1f4ea-1f4ed 1f4f7 1f4f9-1f4fb 1f4fd 1f508 1f50d 1f512-1f513 1f549-1f54a 1f550-1f567 1f56f-1f570 1f573-1f579 1f587 1f58a-1f58d 1f590 1f5a5 1f5a8 1f5b1-1f5b2 1f5bc 1f5c2-1f5c4 1f5d1-1f5d3 1f5dc-1f5de 1f5e1 1f5e3 1f5e8 1f5ef 1f5f3 1f5fa 1f610 1f687 1f68d 1f691 1f694 1f698 1f6ad 1f6b2 1f6b9-1f6ba 1f6bc 1f6cb 1f6cd-1f6cf 1f6e0-1f6e5 1f6e9 1f6f0 1f6f3`),hn=[[65024,65039],[917760,917999]],gn=[[12593,12643],[12645,12686]];function _n(e,t){if(t===0)return;let n=t>=2?e.codePointAt(t-2):0;return n>65535?n:e.codePointAt(t-1)}var A=(e,...t)=>e!==void 0&&t.some(([t,n])=>e>=t&&e<=n);function vn(e,t,n){let r=t+(n>65535?2:1),i=e.codePointAt(r),a=_n(e,t);switch(n){case 4447:return A(i,[4449,4519],[55216,55238]);case 4448:return A(a,[4352,4446],[43360,43388]);case 12644:return A(a,...gn)||A(i,...gn);case 65440:return A(a,[65441,65500])||A(i,[65441,65500]);default:return(n===65038||n===65039?mn.has(a):pn.get(n)?.has(a))||hn.some(([i,a])=>n===i&&e[r]===`-`&&e.codePointAt(r+1)===a||n===a&&e[t-1]===`-`&&_n(e,t-1)===i)||(n===65038||n===65039)&&a===n&&an.test(e.slice(Math.max(0,t-3),t-1))}}function yn(e,t=0){let n=null;k.lastIndex=t;for(let t=k.exec(e);t;t=k.exec(e)){let r=t.index,i=e.codePointAt(r);if(!dn.test(String.fromCodePoint(i)))continue;let a=un(e,r,i,!1);a===-1?vn(e,r,i)||(n??=new Map,n.set(i,(n.get(i)??0)+1)):k.lastIndex=a}return n}var bn={stringOrComment:/((?=\/)(?<=(?:^|\.\.\.|[(,=:[!&|?{};>+\-*/%^<~]|(?<![\p{ID_Continue}$.#])(?:await|case|default|delete|do|else|extends|in|instanceof|new|of|return|throw|typeof|void|yield))[ \t]*)\/(?![/*])(?:[^/\\[\n]|\\.|\[(?:[^\]\\\n]|\\.)*(?:\]|(?=\\?$)))+(?:\/[a-z]*|(?=\\?$))|"(?:[^"\\\n]|\\(?:\r\n|[\s\S]))*(?:"|$)|'(?:[^'\\\n]|\\(?:\r\n|[\s\S]))*(?:'|$)|`(?:[^`\\]|\\(?:\r\n|[\s\S]))*(?:`|(?![\s\S])))|(?<![ \t])[ \t]*(?:\/\*[\s\S]*?(?:\*\/|(?![\s\S]))|\/\/.*|(?<![\s\S])\uFEFF?#!.*)[ \t]*/gmu,droppable:/(?<![\p{ID_Continue}$\\\u200C\u200D])[ \t]+|[ \t]+(?![\p{ID_Continue}$\\\u200C\u200D])/gu,needed:(e,t,n)=>`+-/`.includes(e[t-1])&&e[t+n.length]===e[t-1]||e[t-2]===``&&/[\p{ID_Continue}$\\\u200C\u200D]/u.test(e[t+n.length])},xn={stringOrComment:/("(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*')|[ \t]*\/\*[\s\S]*?\*\/[ \t]*/gu,droppable:/(?<=[{};,:>(])[ \t]+|[ \t]+(?=[{};,>)!])|(?<=[+~])[ \t]+|[ \t]+(?=[+~])/gu,needed:(e,t,n,r)=>/[+~]/u.test(e[t-1]+e[t+n.length])&&(r>0||/^\s*--[^:]*:/u.test(e.slice(Math.max(...[`{`,`;`,`}`].map(n=>e.lastIndexOf(n,t)))+1,t)))},Sn=bn.stringOrComment,Cn=(e,t=!1)=>/\.css$/iu.test(e)?xn:t||/\.[cm]?js$/iu.test(e)?bn:null,wn=4194304;function Tn(e,{stringOrComment:t,droppable:n,needed:r}){let i=(e.length>wn?e.slice(0,e.lastIndexOf(`
3
- `,wn)+1||wn):e).replaceAll(t,(e,t)=>(t===void 0?``:t[0]===`/`?`//`:`""`)+e.replaceAll(/[^\n]/gu,``)).replaceAll(/^[ \t]+/gmu,``).split(`
4
- `).filter(e=>e.trim()!==``),a=i.join(`
5
- `),o=a.length-(i.length-1),s=0,c=0,l=0;for(let{0:e,index:t}of a.matchAll(n)){for(;l<t;l++)s=Math.max(0,s+(a[l]===`(`?1:a[l]===`)`?-1:0));r(a,t,e,s)||(c+=e.length)}return i.length>0&&o>110*i.length&&c<.01*o?Math.round(o/i.length):0}var En=/\.[cm]?[jt]sx?$/iu,Dn=/^\uFEFF?#!.*\bnode\b/u,On=(e,t,n=!1)=>typeof t==`string`&&(n||En.test(e)||Dn.test(t)),kn=100,An=1024;function j(e){let t=null;return n=>{if(!t){t=[];for(let n=e.indexOf(`
6
- `),r=0;n!==-1;n=e.indexOf(`
7
- `,n+1),r++)r%An===0&&t.push(n)}let r=t.length,i=0;for(;i<r;){let e=i+r>>1;t[e]<n?i=e+1:r=e}if(i===0)return 1;let a=(i-1)*An+1;for(let r=e.indexOf(`
8
- `,t[i-1]+1);r!==-1&&r<n;r=e.indexOf(`
9
- `,r+1))a++;return a+1}}var jn=1e3,M=/(?:\.(?:md|markdown|mdown|mkdn|mdx|txt|rst|adoc|asciidoc|asc|textile|rdoc|org|creole|mediawiki|wiki|pod)|(?:^|\/)(?:licen[cs]e|copying|notice|authors|contributors|readme|changelog|changes|history)(?:-[^/.]*)?(?:\.\d[^/.]*)*)$/iu,Mn=/^\s*(?:\/\/|\/\*)[#@] sourceMappingURL=/u,Nn=/^\s*(?:\/\/|\/\*)[#@] sourceMappingURL=data:[^\s,]*,[\w+/=%.~-]*\s*(?:\*\/)?\s*$/u,Pn=/\.map$/iu,Fn=/\.min\.[^/.]+$/iu,In=/(?<![\p{ID_Continue}$])_0x[0-9a-f]{4,6}(?![\p{ID_Continue}$])/gu,Ln=20,Rn=/while\s*\(\s*!!\[\]\s*\)/u,zn=1e3;function Bn(e){let t=new Set;for(let[n]of e.matchAll(In))if(t.add(n),t.size===zn)break;let n=Rn.test(e);return t.size>=Ln||n?{names:t.size,loop:n}:null}var Vn=262144,Hn=/\.(?:[cm]?[jt]s|[jt]sx)$/iu,Un=/\.d\.[cm]?ts$/iu,Wn=(e,t,n=!1)=>typeof t==`number`&&t>=Vn&&(n||Hn.test(e)&&!Un.test(e));function Gn(e,t,n=!1){let r=tn(t);if(r.kind===`binary`)return{...r,category:`binary`,longest:0,longLines:0,average:0,inlineMap:0,obfuscation:null};let i=0,a=0,o=0,s=0;for(let e=0;e<=t.length;){let n=t.indexOf(`
10
- `,e),r=n===-1?t.length:n,c=r-e-+(t[r-1]===`\r`);Mn.test(t.slice(e,e+64))&&Nn.test(t.slice(e,r))?i+=c:(c>jn&&(o++,a+=c),s=Math.max(s,c)),e=r+1}let c=!n&&Pn.test(e),l=!n&&M.test(e),u=l||c?null:Bn(t),d={...r,longest:s,longLines:o,average:0,inlineMap:i,obfuscation:u};if(c)return{...d,category:`map`};if(l)return{...d,category:i>0?`inline-map`:r.kind};if(o===0){let a=Cn(e,n),o=a!==null&&s>110?Tn(t,a):0;return{...d,average:o,category:i>0?`inline-map`:o>0?`minified`:r.kind}}return a/(t.length-i)<.5&&!Fn.test(e)?{...d,category:`long`}:{...d,category:i>0?`inline-map`:`minified`}}var N=e=>e.category===`long`?e.kind:e.category;function Kn(e){let t=[...Xn(e.controls),...e.longLines>0&&[`long`,`minified`,`inline-map`].includes(e.category)?[`long`]:[]],n=N(e);return P.get(n).mark||t.length===0?[...t,n]:t}var qn=(e,t)=>t===`long`&&e.category!==`long`?`notice`:P.get(t).mark,P=new Map([[`binary`,{name:`Binary`,tag:`Binary`,mark:`warn`}],[`controls`,{name:`Control chars`,tag:`Controls`,mark:`warn`}],[`invisible`,{name:`Invisible chars`,tag:`Invisible`,mark:`warn`}],[`long`,{name:`Long lines`,tag:`Long lines`,mark:`warn`}],[`minified`,{name:`Minified`,tag:`Minified`,short:`Min`,mark:`notice`}],[`map`,{name:`Source maps`,tag:`Map`,mark:`notice`}],[`inline-map`,{name:`Inline source maps`,tag:`Inline map`,mark:`notice`}],[`utf8`,{name:`UTF-8`,tag:`UTF-8`,mark:null}],[`ascii`,{name:`ASCII`,tag:`ASCII`,mark:null}]]),Jn=new RegExp($t.source,`u`),Yn=(e,t)=>[...e??[]].filter(([e])=>Jn.test(String.fromCodePoint(e))===(t===`controls`)).toSorted((e,t)=>t[1]-e[1]||e[0]-t[0]),Xn=e=>e?[`controls`,`invisible`].filter(t=>Yn(e,t).length>0):[],Zn=1e3,Qn=String.raw`[\p{L}\p{N}](?:[\p{L}\p{N}-]*[\p{L}\p{N}])?`,$n=new RegExp(String.raw`\b(?:https?|wss?|ftp)\??:\/\/(?:[^\s/@'"\x60]*@)?(${Qn}(?:\.${Qn})+)(?![\p{L}\p{N}-]|\.[\p{L}\p{N}_$-])`,`giu`),er=/\.(?:\p{L}{2,}|xn--[a-z0-9-]+)$/u,tr=/^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)$/u,nr=/^(?:localhost|.+\.(?:localhost|local|test|invalid|example|internal)|(?:.+\.)?example\.(?:com|net|org)|127(?:\.\d+){3}|0\.0\.0\.0|(?:.+\.)?w3\.org)$/u,rr=/\\([/.])/gu,ir=new Set([`issues`,`pull`,`pulls`,`blob`,`tree`,`wiki`,`discussions`,`commit`,`commits`,`compare`,`blame`,`security`,`projects`,`labels`,`milestone`,`milestones`,`releases`,`tags`,`graphs`,`network`,`stargazers`]),ar=new Set([`sponsors`,`orgs`,`apps`,`marketplace`,`features`,`topics`,`collections`,`settings`,`login`,`search`,`explore`,`about`]),or=new Set([`blob`,`tree`,`blame`,`wiki`]),sr=/\.(?:patch|diff|atom)$/iu,cr=/\.git$/iu,lr=e=>{try{return decodeURIComponent(e)}catch{return e}};function ur(e){let t=null;try{t=new URL(e.replace(/^(\w+)\?:/u,`$1:`).replace(/[)\]}>.,;:!]+$/u,``))}catch{}if(!t)return`github.com/`;let n=t.pathname.split(`/`).slice(1).map(lr);n.length>1&&n.at(-1)===``&&n.pop();let[r,i=``,a,...o]=n,s=r!==``&&i!==``&&!cr.test(i)&&ir.has(a)&&!(a===`releases`&&o.includes(`download`))&&!(a===`blob`&&t.searchParams.has(`raw`))&&!(!or.has(a)&&sr.test(n.at(-1)));return t.hostname.replace(/\.$/u,``)===`github.com`&&(n.length===1||ar.has(r)||s)?`github.com`:`github.com/${r}/${i.replace(cr,``)}`.toLowerCase()}function dr(e,t,n=!1){if(!On(e,t,n)||!(t.includes(`://`)||t.includes(`:\\/\\/`)))return null;let r=new Map,i=j(t);for(let{1:e,index:n}of t.matchAll(Sn)){if(r.size>=Zn)break;let t=e?.startsWith(`/`)?e.replace(/\/[a-z]*$/u,``):e,a=t?.includes(`\\`)?t.replaceAll(rr,`$1`):t;if(a?.includes(`://`))for(let{1:e,index:t}of a.matchAll($n)){let o=e.toLowerCase(),s=o===`github.com`?ur(/^[^\s'"\u0060]*/u.exec(a.slice(t))[0]):o;if(!r.has(s)&&(er.test(o)||tr.test(o))&&!nr.test(o)&&r.set(s,i(n+t)),r.size>=Zn)break}}return r.size>0?r:null}var F=String.raw`[\p{L}\p{N}_-]`,I=(e,t=``)=>new RegExp(String.raw`(?<!${F})${e}${t}(?!\.?${F})`,`giu`),fr=e=>new RegExp(String.raw`(?<=(?:(?:^|[\s'"\x60(=,<>])(?:https?|wss?|ftp)\??:|['"\x60(=,])\\?\/\\?\/(?:[^\s/@'"\x60]*@)?(?:${F}+\.)*)${e}(?!\.?${F}|(?::[^\s/@'"\x60]*)?@)`,`giu`),L=new Map([[`Exfiltration`,`critical`],[`Remote`,`high`],[`IP lookup`,`moderate`]]),[R,z,B]=[...L.keys()].map(e=>({tag:e})),V=new Map([[`webhook-site`,{...R,name:`webhook.site`,pattern:I(String.raw`webhook\.site`)}],[`pipedream`,{...R,name:`Pipedream`,pattern:I(String.raw`pipedream\.net`)}],[`requestbin`,{...R,name:`RequestBin`,pattern:I(String.raw`(?:requestbin\.(?:net|com)|requestb\.in)`)}],[`requestcatcher`,{...R,name:`Request Catcher`,pattern:I(String.raw`requestcatcher\.com`)}],[`requestrepo`,{...R,name:`requestrepo`,pattern:I(String.raw`requestrepo\.com`)}],[`beeceptor`,{...R,name:`Beeceptor`,pattern:I(String.raw`beeceptor\.com`)}],[`oast`,{...R,name:`OAST`,pattern:I(String.raw`(?:interact\.sh|interactsh\.com|oast\.(?:pro|live|site|online|fun|me)|oastify\.com|burpcollaborator\.net)`)}],[`canarytokens`,{...R,name:`Canarytokens`,pattern:I(String.raw`canarytokens\.(?:com|org)`)}],[`dnslog`,{...R,name:`DNSLog`,pattern:I(String.raw`dnslog\.cn`)}],[`ceye`,{...R,name:`CEYE`,pattern:I(String.raw`ceye\.io`)}],[`telegram`,{...z,name:`Telegram`,pattern:I(String.raw`api\.telegram\.org`)}],[`discord`,{...z,name:`Discord webhook`,pattern:I(String.raw`discord(?:app)?\.com`,String.raw`/api(?:/v\d+)?/webhooks`)}],[`slack`,{...z,name:`Slack webhook`,pattern:I(String.raw`hooks\.slack\.com`,`/(?:services|workflows|triggers)`)}],[`pastebin`,{...z,name:`Pastebin`,pattern:I(String.raw`pastebin\.com`)}],[`paste-ee`,{...z,name:`paste.ee`,pattern:I(String.raw`paste\.ee`)}],[`transfer-sh`,{...z,name:`transfer.sh`,pattern:fr(String.raw`transfer\.sh`)}],[`file-io`,{...z,name:`file.io`,pattern:fr(String.raw`file\.io`)}],[`0x0`,{...z,name:`0x0.st`,pattern:I(String.raw`0x0\.st`)}],[`ngrok`,{...z,name:`ngrok`,pattern:I(String.raw`ngrok(?:-free)?\.(?:io|app|dev)`)}],[`localtunnel`,{...z,name:`localtunnel`,pattern:I(String.raw`loca\.lt`)}],[`cloudflare-tunnel`,{...z,name:`Cloudflare Tunnel`,pattern:I(String.raw`trycloudflare\.com`)}],[`serveo`,{...z,name:`Serveo`,pattern:I(String.raw`serveo\.net`)}],[`pipedream-api`,{...z,name:`Pipedream API`,pattern:I(String.raw`pipedream\.com`)}],[`bun`,{...z,name:`Bun install`,pattern:I(String.raw`bun\.(?:sh|com)`,`/install`)}],[`ipinfo`,{...B,name:`ipinfo`,pattern:I(String.raw`ipinfo\.io`)}],[`ipify`,{...B,name:`ipify`,pattern:I(String.raw`ipify\.org`)}],[`ifconfig-me`,{...B,name:`ifconfig.me`,pattern:I(String.raw`ifconfig\.me`)}],[`icanhazip`,{...B,name:`icanhazip`,pattern:I(String.raw`icanhazip\.com`)}],[`ip-api`,{...B,name:`ip-api`,pattern:I(String.raw`ip-api\.com`)}],[`ipapi`,{...B,name:`ipapi`,pattern:I(String.raw`ipapi\.com?`)}],[`checkip`,{...B,name:`checkip`,pattern:I(String.raw`checkip\.amazonaws\.com`)}]]),pr=new RegExp([...V.values()].map(({pattern:e})=>e.source).join(`|`),`iu`);function mr(e,t,n=!1){if(typeof t!=`string`||!n&&(M.test(e)||Pn.test(e))||!pr.test(t))return null;let r=new Map,i=j(t);for(let[e,{pattern:n}]of V){let a=new Set;for(let{index:e}of t.matchAll(n))if(a.add(i(e)).size>=kn)break;a.size>0&&r.set(e,[...a])}return r.size>0?r:null}function hr(e,t){let n=e&&new Map([...e].filter(([e])=>V.get(e).tag===t));return n?.size>0?n:null}var gr=e=>[...L.keys()].map(t=>[t,hr(e,t)]).filter(([,e])=>e);function _r(e,t,n){let r=[...L.values()],i=r.indexOf(L.get(e));return r[n!==void 0&&[...t.keys()].some(e=>!n?.has(e))?Math.max(0,i-1):i]}var H=String.raw`/\*(?:[^*]|\*(?!/)){0,100}\*/|//[^\n]{0,100}\n`,U=String.raw`(?:\s|${H})*`,W=String.raw`(?:${U}\??\.${U}(?:call|apply))?${U}(?:\?\.${U})?\(`,vr=String.raw`(?!${U}(?<quote>["'\u0060])\s*return\s+this\s*;?\s*\k<quote>${U}\))`,yr=String.raw`process${U}\.${U}env(?![\p{ID_Continue}$])(?!${U}(?:\??\.|\[))`,br=String.raw`${U}\)${U}\??\.${U}(?:filter|find|findLast|some|every|reduce)(?![\p{ID_Continue}$])`,xr=String.raw`(?:\{${U}\.\.\.${U})?`,Sr=String.raw`(?=JSON|Object|URLSearchParams)(?<![\p{ID_Continue}$.])(?:JSON${U}\.${U}stringify|URLSearchParams)${U}\(${U}${xr}${yr}`+String.raw`|(?=Object)(?<![\p{ID_Continue}$.])Object${U}\.${U}(?:values|entries)${U}\(${U}${xr}${yr}(?!${br})`,G=String.raw`(?:(?:ba|z|da|k|mk|c|tc|fi|a)?sh|pwsh|powershell)`,Cr=String.raw`(?:(?:\/[\w.-]{1,40}){0,8}\/)?(?:env(?:[^\S\n]+(?:-[\w-]{1,20}(?:=\S{0,100}|[^\S\n]+(?!-)[^\s=]{1,100})?|\w{1,40}=\S{0,100})){0,6}[^\S\n]+)?`,wr=String.raw`curl|wget|\|\s*(?:sudo|${Cr}${G})|powershell|pwsh|rundll32|osascript|mshta|certutil|bitsadmin|\/dev\/(?:tcp|udp)|iex|invoke-expression`+String.raw`|\$profile|profile\.ps1|config\.fish|conf\.d|bashrc|zshrc|zshenv|zlogin|bash_profile|bash_login|zprofile|\.profile|Launch(?:Agents|Daemons)|systemd|systemctl|\.claude|\.vscode|trufflehog|metadata\.google\.internal|["'\x60\/\\]gh(?:\.exe)?["'\x60]`,Tr=String.raw`auth(?:[^\S\n]|[\\^\x60]\r?\n)+token|169\.254\.169\.254|Runner\.Worker|\/proc\/`,Er=new RegExp(wr,`iu`),Dr=new RegExp(String.raw`eval|Function${W}|vm["'\x60]|_compile|child_process|\.(?:npmrc|ssh|aws)|_TOKEN|${Tr}|(?:stringify|values|entries|URLSearchParams)${U}\(${U}(?:\{${U}\.\.\.${U})?process${U}\.${U}env|publish|whoami|registry\.(?:npmjs\.org|yarnpkg\.com)`,`u`),Or={test:e=>Dr.test(e)||Er.test(e)},kr=`globalThis|window|global|self`,Ar=e=>String.raw`(?=${kr}|${e})(?<![\p{ID_Continue}$#])(?<!(?<!\.)\.${U})(?<!\bfunction${U})(?:(?:${kr})${U}\??\.${U})?${e}`,K=`(?:NPM|GITHUB)_TOKEN`,jr=String.raw`\s{0,4}=(?![=>])`,Mr=String.raw`\s{0,4}(?:\?:|:\s{0,4}(?:string|number|boolean|unknown|any)(?![\p{ID_Continue}$]))`,Nr=String.raw`\s{0,4}(?:(?:\)\s{0,4}){1,4}(?![\s)]{0,8}(?:[.[(]|\?\.))|&&|\|\||\?\?|\?(?!\.)|[;,:}\]]|$)`,Pr=String.raw`(?=NPM|GITHUB)(?<![\p{ID_Continue}$])(?<!\b(?:const|let|var)\s{1,4})`+String.raw`(?:(?<!(?:!|\bdelete\s)[\s(]{0,4}(?:[\p{ID_Continue}$]{1,64}\s{0,4}\??\.\s{0,4}){0,4})|(?!${K}${Nr}))`+String.raw`${K}(?![\p{ID_Continue}$])(?!${Mr})(?:(?!${jr})|(?<=[{,]\s{0,64}${K}))`,Fr=String.raw`(?<=[{,;]${U}eval)\s*:(?!${U}(?:true|!0)(?![\p{ID_Continue}$]))`+String.raw`(?![^{};]{0,200}\}${U}=${U}(?:${kr})(?![\p{ID_Continue}$]))`,Ir=new RegExp(String.raw`${Sn.source}|(?<eval>${Ar(`eval`)}(?![\p{ID_Continue}$])(?!\s*\?:)(?!${Fr}))|(?<function>${Ar(`Function`)}${W}${vr})`+String.raw`|(?<compile>\.${U}_compile(?:${W}|${U}=(?![=>])))|(?<tokens>${Pr})|(?<env>${Sr})|(?<put>\.${U}put${U}\()`,`gmu`),Lr=new RegExp(String.raw`\.(?:npmrc|ssh|aws)|_TOKEN|${Tr}|publish|whoami|registry\.`,`u`),Rr={test:e=>Lr.test(e)||Er.test(e)},zr=new RegExp(String.raw`^\s{0,4}\]${jr}`,`u`),Br=new RegExp(String.raw`^\s{0,4}\]${Nr}`,`mu`),Vr=/(?:!|\bdelete\s)[\s(]{0,4}(?:[\p{ID_Continue}$]{1,64}\s{0,4}\??\.\s{0,4}){0,4}[\p{ID_Continue}$]{1,64}\s{0,4}(?:\?\.\s{0,4})?\[\s{0,4}$/u,Hr=/\\(?:x([\da-f]{2})|u([\da-f]{4})|u\{([\da-f]{1,6})\}|([0-3][0-7]{0,2}|[4-7][0-7]?)|(\r\n|[^]))/giu,Ur=new Map([[`n`,`
11
- `],[`r`,`\r`],[`t`,` `],[`b`,`\b`],[`f`,`\f`],[`v`,`\v`]]),Wr=new Set([`
12
- `,`\r`,`\r
13
- `,`\u2028`,`\u2029`]),Gr=e=>e.replace(Hr,(e,t,n,r,i,a)=>{if(a!==void 0)return Wr.has(a)?``:Ur.get(a)??a;let o=i===void 0?Number.parseInt(t??n??r,16):Number.parseInt(i,8);return o<=1114111?String.fromCodePoint(o):e}),Kr=String.raw`registry\.(?:npmjs\.org|yarnpkg\.com)`,qr=new RegExp(String.raw`(?:[/\\]{2}|\bhttps?:[/\\]?)(?:[^/\\?#]{0,256}@)?${Kr}|^(["'\u0060])${Kr}(?=\1$|[/:?#])`,`iu`),Jr=/[\t\n\r]/gu,Yr=String.raw`[\\^\u0060]\r?\n`,Xr=String.raw`(?:[^\n;|&]|${Yr})`,Zr=String.raw`\u0060\r?\n`,Qr=String.raw`(?:[^\n;|&"']|${Yr}|"[^"\n]*"|'[^'\n]*'|"(?![^"\n]*")|'(?![^'\n]*'))`,q=String.raw`(?:[^\S\n]|${Yr})`,J=String.raw`(?:${q}+--?\w[\w-]*(?:=\S*|${q}+(?!-)\S+)?){0,6}?`,$r=String.raw`(?<![\w.-])(?:curl|wget)(?:\.exe)?${q}(?:(?!(?:curl|wget)(?![\w-]))${Qr}){0,2000}?["']?(?:https?|s?ftps?|scp):\\?\/\\?\/|(?<![|\\]|(?<![\w.\/-])${G}\s*)\|\s*(?:sudo${J}(?:${q}+--)?${q}+)?${Cr}${G}(?![\w)|$-])`+String.raw`|(?<![\w.-])(?:powershell|pwsh)(?:\.exe)?[^\S\n]+-\w|(?<![\w.-])(?:rundll32|osascript|mshta)(?:\.exe)?(?![\w-])`+String.raw`|(?<![\w.-])certutil(?:\.exe)?${q}${Xr}{0,100}?-urlcache|(?<![\w.-])bitsadmin(?:\.exe)?${q}${Xr}{0,100}?\/transfer|\/dev\/(?:tcp|udp)\/`+String.raw`|(?<![\w$.-])(?:iex|invoke-expression)(?![\w-])(?:[^\n;|&]|${Zr}){0,200}?(?:(?<![\w$.-])(?:iwr|irm|invoke-webrequest|invoke-restmethod)(?![\w-])|\.downloadstring\s*\()`+String.raw`|(?<![\w$.-])(?:iwr|irm|invoke-webrequest|invoke-restmethod)(?![\w-])(?:(?!(?:iwr|irm|invoke-webrequest|invoke-restmethod)(?![\w-]))(?:[^\n;|&]|${Zr})){0,2000}\|\s*(?:iex|invoke-expression)(?![\w-])`,Y=String.raw`(?:\\?\/|\\{1,2})`,ei=String.raw`(?<![\w.-])\.(?:bashrc|zshrc|zshenv|zlogin|bash_profile|bash_login|zprofile)(?![\w-])|(?<=[\/\\])(?<!\.[\w-]*[\/\\])\.profile(?![\w-])|(?<![\w-])Launch(?:Agents|Daemons)(?![\w-])|systemd${Y}user(?![\w-])|fish${Y}(?:config\.fish|conf\.d)(?![\w-])`+String.raw`|(?<![\w$])\$profile(?![\w-])|(?<![\w.-])Microsoft\.\w+_profile\.ps1(?![\w-])|(?:PowerShell|\$pshome)${Y}profile\.ps1(?![\w-])|systemctl${J}${q}+--user${J}${q}+enable(?![\w-])|systemctl${J}${q}+enable(?:${q}+[^\s;|&]+){0,6}?${q}+--user(?![\w-])|(?<![\w.-])\.claude${Y}settings(?:\.local)?\.json|(?<![\w.-])\.vscode${Y}tasks\.json`,ti=String.raw`(?<![\w.-])[gG][hH](?:\.[eE][xX][eE])?${q}+auth${q}+token(?![\w-])`,ni=String.raw`[\d*?[\]-]{1,20}|\$\{[^}\n]{0,100}\}|\$\([^)\n]{0,200}\)|\u0060[^\u0060\n]{0,200}\u0060|\$\w{1,64}|\{\w{0,64}\}|%d`,ri=String.raw`(?<![\w.-]|(?<![\/\\])\/|[\w.~%-](?:\\?\/){2})`,ii=String.raw`(?![\w-]|\.[\w-]|(?::[^\s\/@'"\x60]{0,64})?@)`,ai=String.raw`(?<![\p{ID_Continue}$-])trufflehog(?![\p{ID_Continue}$-])`,oi=[[`credential-files`,/(?<![\w$.-])\.(?:npmrc|ssh|aws)(?![\w-])/gu],[`tokens`,new RegExp(String.raw`^["'\u0060]${K}["'\u0060]$|(?:\$\{?|%)${K}(?![\p{ID_Continue}$])`,`gu`)],[`gh-token`,new RegExp(ti,`gu`)],[`cloud-metadata`,new RegExp(String.raw`${ri}169\.254\.169\.254${ii}(?!(?::\d{1,5})?\\?\/metadata\\?\/instance(?![\w-]))|${ri}metadata\.google\.internal${ii}`,`giu`)],[`runner-worker`,/(?<![\w$-])Runner\.Worker(?![\w$-])/gu],[`process-memory`,new RegExp(String.raw`\/proc\/(?:${ni})\/mem(?![\w-])`,`gu`)],[`trufflehog`,new RegExp(ai,`giu`)],[`publish`,/(?<![\w-])(?:npm|pnpm|yarn)(?:\s+-{1,2}\w[\w-]*(?:=\S*|\s+(?!-)\S+)?){0,8}?\s+publish(?![\w-])|\/-\/whoami(?![\w-])/gu],[`shell`,new RegExp($r,`giu`)],[`persistence`,new RegExp(ei,`giu`)]],si=new Set([`gh-token`,`runner-worker`,`process-memory`,`trufflehog`,`shell`,`persistence`]),ci=oi.filter(([e])=>si.has(e)),li=/(?:\.(?:sh|bash|zsh|ksh|mksh|dash|ash|csh|tcsh|fish|command|bat|cmd|ps1|psm1)|(?:^|[\\/])\.(?:bashrc|zshrc|zshenv|zlogin|bash_profile|bash_login|zprofile|profile))$/iu,ui=/^[ \t]*#.*$|^((?:[^'"\n#\\]|\\.|'[^'\n]*'|"(?:[^"\n\\]|\\.)*")*?[ \t;&|])#.*$/gmu,di=/\.psm?1$/iu,fi=/^\uFEFF?#!\s*\S*\/(?:env\s+(?:(?:-\S+|\w+=\S*)\s+)*)?pwsh(?![\w-])/u,pi=/^((?:[^'"\n#\u0060]|\u0060.|'[^'\n]*'|"(?:[^"\n\u0060]|\u0060.)*")*?)(?:(?<=^|[\s;({=,])<#[\s\S]*?(?:#>|(?![\s\S]))|(?<=^|[ \t;&|])#.*$)/gmu,mi=/\.(?:bat|cmd)$/iu,hi=/^[ \t]*@?(?:::|rem(?![\w-])).*$|(?<=&|\|\|)[ \t]*@?rem(?![\w-]).*$/gimu,gi=new RegExp(String.raw`^\uFEFF?#!\s*\S*\/(?:env\s+(?:(?:-\S+|\w+=\S*)\s+)*)?${G}(?![\w-])`,`u`),_i=[[`claude`,/^(["'\u0060])\.claude\1$/iu,/^(["'\u0060])settings(?:\.local)?\.json\1$/iu],[`vscode`,/^(["'\u0060])\.vscode\1$/iu,/^(["'\u0060])tasks\.json\1$/iu]],vi=/^(["'\u0060])\.profile\1$/iu,yi=/(?:homedir\s*\(\s*\)|\b(?:HOME|USERPROFILE)|(["'\u0060])~\1)\s*,\s*$/u,bi=[[`vm`,/^(["'\u0060])(?:node:)?vm\1$/u],[`child-process`,/^(["'\u0060])(?:node:)?child_process\1$/u],[`publish`,/^(["'\u0060])libnpmpublish\1$/u]],xi=/^(["'\u0060])(?:npm|pnpm|yarn)\1$/u,Si=/^(["'\u0060])publish\1$/u,Ci=/^(["'\u0060])-/u,wi=new RegExp(String.raw`^(?:[\s,[]|${H})*$`,`u`),Ti=/^(["'\u0060])put\1$/iu,Ei=new RegExp(String.raw`\bmethod["']?${U}[:=]${U}$`,`u`),Di=/^(["'\u0060])(?:\S*[\\/]|[a-z]:[\\/][^\n]*[\\/])?(?:curl|wget|certutil|bitsadmin|powershell|pwsh|systemctl|gh)(?:\.exe)?\1$/iu,Oi=/[;|&]/u,ki=new RegExp(String.raw`^(?:[\s,[\]\w$.?]|${H})*$`,`u`),Ai=new RegExp(ei,`iu`),ji=new RegExp(String.raw`(?:(?:require[\w$]*${U}(?:\?\.${U})?|\bimport${U})\(|\b(?:from|import))${U}$`,`u`),Mi=new RegExp(String.raw`\b(?:import|export)${U}type\b(?!${U}(?:from\b|=))[^;'"\x60]*(?:\bfrom|=${U}require${U}\()${U}$`,`u`),X={tag:`eval`,note:`Runs a string as code`},Z={tag:`credentials`,note:`Reaches for credentials`},Q=new Map([[`eval`,{...X,name:`eval`}],[`function`,{...X,name:`Function`}],[`vm`,{...X,name:`vm`}],[`compile`,{...X,name:`Module._compile`}],[`child-process`,{tag:`child_process`,note:`Runs other programs`,name:`child_process`}],[`credential-files`,{...Z,name:`.npmrc, .ssh or .aws`}],[`tokens`,{...Z,name:`NPM_TOKEN or GITHUB_TOKEN`}],[`gh-token`,{...Z,name:`gh auth token`}],[`cloud-metadata`,{...Z,name:`169.254.169.254 or metadata.google.internal`}],[`runner-worker`,{...Z,name:`Runner.Worker`}],[`process-memory`,{...Z,name:`/proc/<pid>/mem`}],[`trufflehog`,{...Z,name:`trufflehog`}],[`env`,{tag:`whole env`,note:`Reads out the whole environment`,name:`process.env, by JSON.stringify, Object.entries or values, URLSearchParams`,mark:`critical`}],[`publish`,{tag:`publish`,note:`Publishes to npm`,name:`npm publish, /-/whoami or a registry PUT`,mark:`critical`}],[`shell`,{tag:`shell`,note:`Runs shell commands fetching or handing off code`,name:`curl or wget a URL, | sh, powershell -…, iex, rundll32, osascript, /dev/tcp`}],[`persistence`,{tag:`persistence`,note:`Names a place code runs from again later`,name:`.bashrc, .zshrc, $PROFILE, LaunchAgents, systemd user units, .claude/settings.json, .vscode/tasks.json`,mark:`critical`}]]);function Ni(e,t,n=!1){let r=On(e,t,n),i=typeof t==`string`&&(li.test(e)||gi.test(t));if(!r&&!i)return null;let a=new Map,o=(e,t)=>{let n=a.get(e);n?n.length<kn&&n.push(t):a.set(e,[t])};if(r&&Pi(t,0,o),i&&Or.test(t)){let n=mi.test(e)?hi:di.test(e)||fi.test(t)?pi:ui,r=t.replace(n,(e,t=``)=>t+e.slice(t.length).replaceAll(/[^\n]/gu,` `));for(let[e,t]of ci)for(let{index:n}of r.matchAll(t))o(e,n)}if(a.has(`registry`))for(let e of a.get(`put`)??[])o(`publish`,e);for(let[e]of _i)if(a.has(`${e}-file`))for(let t of a.get(`${e}-dir`)??[])o(`persistence`,t);if(![...Q.keys()].some(e=>a.has(e)))return null;let s=j(t);return new Map([...Q.keys()].filter(e=>a.has(e)).map(e=>[e,[...new Set(a.get(e).map(s))].toSorted((e,t)=>e-t)]))}function Pi(e,t,n){if(!Or.test(e))return;let r=null,i=null,a=0,o=!1,s=!1;for(let{0:c,1:l,groups:u,index:d}of e.matchAll(Ir)){if(l===void 0){for(let e of Fi)u[e]&&n(e,t+d);continue}if(l[0]===`/`)continue;let f=l[0]==="`"&&Or.test(l)?Ri(l):[];for(let[e,r]of f)Pi(l.slice(e,r),t+d+e,n);let p=f.length===0?l:Li(l,f),m=()=>{let t=e.slice(d+c.length,d+c.length+20);return!zr.test(t)&&(!Br.test(t)||!Vr.test(e.slice(Math.max(0,d-300),d)))},h=Rr.test(p)?oi.flatMap(([e,t])=>p.search(t)===-1?[]:[...p.matchAll(t)].map(({index:t})=>[e,t])):[];for(let[e,r]of h)(e!==`tokens`||r>0||m())&&n(e,t+d+r);p.includes(`registry.`)&&qr.test(Gr(p).replace(Jr,``))&&n(`registry`,t+d);for(let[r,i]of bi)i.test(l)&&Ii(e,d)&&n(r,t+d);vi.test(l)&&yi.test(e.slice(Math.max(0,d-100),d))&&n(`persistence`,t+d);for(let[e,r,i]of _i)r.test(l)&&n(`${e}-dir`,t+d),i.test(l)&&n(`${e}-file`,t+d);if(s&&wi.test(e.slice(a,d))?(Si.test(l)&&n(`publish`,t+d),s=Ci.test(l)||o,o=Ci.test(l)):s=!1,xi.test(l)&&([s,o]=[!0,!1]),i&&i.arguments<20&&ki.test(e.slice(a,d))){let e=p.slice(1,-1);i.line+=` ${Oi.test(e)?`"${e.replaceAll(`"`,`'`)}"`:e}`,i.arguments++;let{line:t}=i,r=ci.find(([,e])=>t.search(e)!==-1);r&&(n(r[0],i.at),i=null)}else i=null;if(Di.test(l)&&(i={arguments:0,at:t+d,line:l.slice(1,-1)}),r&&r.text.length+p.length<200&&wi.test(e.slice(a,d))){let[e,t]=[r.text.slice(1,-1),p.slice(1,-1)];!Ai.test(e)&&!Ai.test(t)&&Ai.test(`${e}/${t}`)&&n(`persistence`,r.at)}r={text:p,at:t+d},Ti.test(l)&&Ei.test(e.slice(Math.max(0,d-300),d))&&n(`put`,t+d),a=d+c.length}}var Fi=[`eval`,`function`,`compile`,`tokens`,`env`,`put`];function Ii(e,t){let n=e.slice(Math.max(0,t-300),t);return ji.test(n)&&!Mi.test(n)}function Li(e,t){let n=[],r=0;for(let[i,a]of t)n.push(e.slice(r,i),` `.repeat(a-i)),r=a;return n.push(e.slice(r)),n.join(``)}function Ri(e){let t=[];for(let n=e.indexOf("${");n!==-1;n=e.indexOf("${",n)){let r=0;for(;e[n-1-r]===`\\`;)r++;if(r%2==1){n+=2;continue}let i=Bi(e,n+2);t.push([n+2,i]),n=i}return t}var zi=new RegExp(Sn.source,`muy`);function Bi(e,t){let n=0;for(let r=t;r<e.length;r++){let t=e[r];if(`"'\`/ `.includes(t)){zi.lastIndex=r;let t=zi.exec(e);if(t){r+=t[0].length-1;continue}}if(t===`{`)n++;else if(t===`}`&&n--===0)return r}return e.length}var Vi=e=>[...new Set([...Q].filter(([t])=>e.some(e=>e.has(t))).map(([,{tag:e}])=>e))].join(`, `);Z.tag;var Hi=e=>[...new Map([...e?.keys()??[]].map(e=>Q.get(e)).map(({tag:e,mark:t})=>[e,{name:e,severity:t??`high`}])).values()],Ui=[`critical`,`high`,`moderate`,`low`,`notice`],Wi=e=>e===`warn`?`high`:`notice`;function Gi({path:e,bytes:t,readability:n,runsCode:r,exfiltration:i,script:a}){let o=N(n),s=o!==`ascii`&&o!==`map`&&P.get(o).mark;return[...Hi(r),...gr(i).map(([e,t])=>({name:e,severity:_r(e,t)})),...Wn(e,t,a)?[{name:`Large`,severity:`notice`}]:[],...n.obfuscation?[{name:`Obfuscated`,severity:`high`}]:[],...Kn(n).filter(e=>e===`controls`||e===`long`).map(e=>({name:P.get(e).tag,severity:Wi(qn(n,e))})),...s?[{name:P.get(o).tag,severity:Wi(s)}]:[]]}function Ki(e,t,n,r=!1){let i=Gn(e,t,r),a=mr(e,t,r),o=Ni(e,t,r);return{readability:i,runsCode:o,exfiltration:a,hosts:dr(e,t,r),stamps:Gi({path:e,bytes:n,readability:i,runsCode:o,exfiltration:a,script:r})}}var qi=(e,t)=>new Date(Date.parse(e)+t*864e5);function Ji(e){let t=[];if(!e?.days)return t;for(let n=e.days.length-1;n>=6;n-=7){let r=0;for(let t=n-6;t<=n;t++)r+=e.days[t];t.push({from:qi(e.start,n-6),to:qi(e.start,n),total:r})}return t.toReversed()}function Yi(e){let t=[];if(!e?.days)return t;let n=Date.parse(e.start),r=null;e.days.forEach((e,i)=>{let a=new Date(n+i*864e5);a.getUTCDate()===1&&(r={from:a,to:a,total:0},t.push(r)),r&&(r.total+=e,r.to=a)});let i=t.at(-1);return i&&new Date(i.to.getTime()+864e5).getUTCDate()!==1&&t.pop(),t}var Xi=[[10,55e7],[20,405e6],[50,285e6],[100,225e6],[200,165e6],[500,95e6],[1e3,5e7],[2e3,2e7],[5e3,4e6],[1e4,85e4],[2e4,155e3],[5e4,18e3],[1e5,2e3],[1/0,0]];function Zi(e){let t=Ji(e).slice(-6);if(t.length===0)return null;let n=Math.max(...t.map(e=>e.total));return Xi.find(([,e])=>n>=e)[0]}var Qi=e=>e<=200?`is-solid`:e<=5e3?`is-top`:e<=2e4?`is-mid`:e<=1e5?`is-low`:`is-unpopular`,$i=e=>e>2e4,$=e=>e??y,ea=g`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><circle cx="8" cy="8" r="3"/><path d="M1 8h4m6 0h4"/></svg>`,ta=g`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg>`,na=[{kind:`branch`,label:`Branch`,icon:g`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><circle cx="4" cy="3" r="1.5"/><circle cx="4" cy="13" r="1.5"/><circle cx="12" cy="3" r="1.5"/><path d="M4 4.5v7m0-3h3a5 5 0 0 0 5-4"/></svg>`},{kind:`tag`,label:`Tag`,icon:g`<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round" aria-hidden="true"><path d="M2 2h5.5l6.5 6.5-5.5 5.5L2 7.5Z"/><circle cx="5" cy="5" r="1"/></svg>`},{kind:`commit`,label:`Commit SHA`,icon:ea}],ra=/^v?(\d+(?:\.(?:\d+|x))*)(?:[-+](.+))?$/iu;function ia(e){let t=ra.exec(e);return t?t[2]===void 0?`line`:`version`:`other`}function aa(e){let t=e.map(e=>{let t=ra.exec(e);return{name:e,parts:t?.[1].split(`.`).map(e=>e.toLowerCase()===`x`?1/0:Number(e)),suffix:t?.[2]??``}});return[...t.filter(e=>e.parts).toSorted((e,t)=>{if(!!e.suffix!=!!t.suffix)return e.suffix?1:-1;for(let n=0;n<Math.max(e.parts.length,t.parts.length);n++){let r=(t.parts[n]??1/0)-(e.parts[n]??1/0);if(r)return r}return e.suffix.localeCompare(t.suffix)}),...t.filter(e=>!e.parts)].map(e=>e.name)}function oa(e,t,n){let r=e=>e===n||!e.includes(`/`)?null:e.slice(0,e.indexOf(`/`)),i=Map.groupBy(e.filter(r),r),a=e.filter(e=>!(i.get(r(e))?.length>2)).map(e=>({name:e}));for(let[e,n]of i)n.length<=2||(a.push({prefix:e,count:n.length,expanded:t.has(e)}),t.has(e)&&a.push(...aa(n.map(t=>t.slice(e.length+1))).map(t=>({name:`${e}/${t}`,label:t,group:e}))));return a}var sa=class extends re{static properties={refs:{attribute:!1},kind:{type:String},name:{type:String},disabled:{type:Boolean},installTooltips:{attribute:!1},_open:{state:!0},_query:{state:!0},_active:{state:!0},_expanded:{state:!0},_keyboard:{state:!0}};static styles=ne`:host{display:block;min-width:0}:host,.revision-menu{-webkit-app-region:no-drag;app-region:no-drag}*{box-sizing:border-box}button,input{font:inherit;color:var(--text)}button{cursor:default;user-select:none}.revision{display:flex;align-items:center;min-width:0;height:2rem;margin:0;border:1px solid var(--border);border-radius:var(--ui-radius, 5px);background:var(--bg)}.revision.keyboard:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.revision-size{display:grid;grid-template-columns:minmax(0,1fr);flex:1 1 auto;align-self:stretch;min-width:0}.revision-size>input,.revision-size:after{grid-area:1 / 1}.revision-size>input{width:100%}.revision-size:after{content:attr(data-value);visibility:hidden;height:0;overflow:hidden;white-space:pre;min-width:8rem;padding:0 calc(.6rem + 2px) 0 .6rem;font-size:.76rem}.revision input{height:100%;min-height:0;padding:.3rem .6rem;min-width:0;border:0;border-radius:0;background:transparent;color:var(--text);font-size:.76rem}.revision input:focus-visible{outline:none}.revision-switch{display:flex;flex:none;align-self:stretch;padding:2px;gap:2px}.revision-switch button{position:relative;display:grid;place-items:center;width:1.8rem;padding:0;border:0;border-radius:var(--ui-radius, 3px);background:transparent;color:var(--muted)}.revision-switch button:hover:not(:disabled){color:var(--text);background:var(--surface-active)}.revision-switch button:focus-visible{outline-offset:-2px}.revision-switch button[aria-pressed=true]{color:var(--accent);background:var(--selected-icon-background, color-mix(in srgb, var(--accent) 15%, var(--bg)))}.revision-switch button[aria-pressed=true]:before{content:var(--selected-icon-ring-content, none);position:absolute;left:50%;top:50%;width:22px;height:22px;box-sizing:border-box;border:1px solid currentcolor;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}.revision-switch svg{width:1rem;height:1rem}.revision-expand{display:grid;place-items:center;align-self:stretch;flex:none;width:2rem;padding:0;border:0;border-radius:var(--ui-radius, 4px);color:var(--muted);background:transparent}.revision-expand svg{width:.9rem;height:.9rem}.revision-expand:hover:not(:disabled){color:var(--text)}.revision-expand:focus-visible{outline-offset:-2px}.revision-menu{visibility:hidden;position:fixed;inset:auto;margin:0;padding:.45rem;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--border);border-radius:var(--ui-radius, 8px);background:var(--surface-active);color:var(--text);box-shadow:0 .65rem 1.8rem #00000073}.revision-menu[data-positioned]{visibility:visible}.revision-options{display:flex;flex-direction:column;gap:.15rem}.revision-section{display:grid;grid-template-columns:repeat(var(--revision-columns, 1),minmax(0,1fr));gap:.15rem .5rem}.revision-section+.revision-section{padding-top:.15rem;border-top:1px solid var(--border)}.revision-options button{min-width:0;padding:.375rem .6rem;border:0;border-radius:var(--ui-radius, 4px);background:transparent;color:var(--text);text-align:left;font-size:.76rem}.revision-options button span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.revision-options button[aria-selected=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}.revision-options button:hover,.revision-options button[data-active]{background:color-mix(in srgb,var(--text) 8%,transparent)}.revision-options button[data-active]{outline:1px solid var(--accent);outline-offset:-1px}.revision-options .revision-group{display:flex;align-items:center;gap:.4rem}.revision-group svg{flex:none;width:.75rem;height:.75rem;color:var(--muted)}.revision-group[aria-expanded=false] svg{rotate:-90deg}.revision-options .revision-group .count{display:inline-flex;flex:none;min-width:1.1rem;padding:0 .35rem;background:transparent;font-size:.7rem}.revision-empty{margin:0;padding:.65rem;color:var(--muted);font-size:.75rem;cursor:default;user-select:none}button:disabled,input:disabled{opacity:.5}:host-context(body.theme-w95) *{overscroll-behavior:none}`;constructor(){super(),this.refs=null,this.kind=`branch`,this.name=``,this.disabled=!1,this._open=!1,this._query=``,this._active=-1,this._expanded=new Set,this._keyboard=!1,this._pointer=!1,this._onViewport=()=>this.position(),this._onKey=()=>{this._pointer=!1}}connectedCallback(){super.connectedCallback(),globalThis.addEventListener(`resize`,this._onViewport),globalThis.addEventListener(`scroll`,this._onViewport,!0),globalThis.addEventListener(`keydown`,this._onKey,!0)}disconnectedCallback(){globalThis.removeEventListener(`resize`,this._onViewport),globalThis.removeEventListener(`scroll`,this._onViewport,!0),globalThis.removeEventListener(`keydown`,this._onKey,!0),super.disconnectedCallback()}updated(e){e.has(`installTooltips`)&&this.installTooltips?.(this.renderRoot),e.has(`kind`)&&this.kind===`commit`&&this._open&&this.close(),this.position()}change(e,t,n){this.dispatchEvent(new CustomEvent(`revision-change`,{detail:{how:e,kind:t,name:n},bubbles:!0,composed:!0}))}suggestions(e=this.kind){let t=this.refs??{branches:[],tags:[]},n=e===`branch`?t.branches:e===`tag`?t.tags:[],r=e===`branch`?[...t.defaultBranch?[t.defaultBranch]:[],...aa(n.filter(e=>e!==t.defaultBranch))]:n,i=this._query.trim().toLowerCase();return r.filter(e=>e.toLowerCase().includes(i))}entries(e=this._expanded){let t=this.suggestions();return this.kind===`branch`&&!this._query.trim()?oa(t,e,this.refs?.defaultBranch):t.map(e=>({name:e}))}toggleGroup(e){let t=new Set(this._expanded);t.delete(e)||t.add(e),this._expanded=t}sections(e){let t=e=>e.group??(this.kind===`branch`?ia(e.name):`all`),n=e[1]?.prefix==null?e[1]:void 0,r=[];for(let[i,a]of e.entries()){if(a.prefix!=null){r.push({header:a,index:i});continue}let e=t(i===0&&a.name===this.refs?.defaultBranch&&n?n:a);r.at(-1)?.key===e?r.at(-1).items.push({entry:a,index:i}):r.push({key:e,items:[{entry:a,index:i}]})}return r}show({query:e=``,kind:t=this.kind}={}){t===`commit`||this.disabled||(this._open||(this._expanded=new Set(this.name.includes(`/`)?[this.name.slice(0,this.name.indexOf(`/`))]:[])),this._query=e,this._active=-1,this.renderRoot?.querySelector(`.revision-menu`)?.showPopover())}close(){this.renderRoot?.querySelector(`.revision-menu`)?.hidePopover(),this._open=!1,this._active=-1}focusName(){this.renderRoot?.querySelector(`.revision-name`)?.focus({preventScroll:!0})}pick(e){this.change(`pick`,this.kind,e),this.focusName(),this.close()}pickKind(e){e!==this.kind&&(this.close(),this.change(`kind`,e,e===`branch`&&this.refs?.defaultBranch||``)),this.focusName(),this.show({kind:e})}position(){if(!this._open)return;let e=this.renderRoot.querySelector(`.revision-menu`),t=e.querySelector(`.revision-options`),n=this.renderRoot.querySelector(`.revision-name`).getBoundingClientRect(),r=parseFloat(getComputedStyle(this).fontSize),i=document.createRange(),a=t.querySelector(`.revision-section > button`),o=a?parseFloat(getComputedStyle(a).paddingLeft)+parseFloat(getComputedStyle(a).paddingRight):0,s=[...t.querySelectorAll(`.revision-section`)].map(e=>{let t=0;for(let n of e.querySelectorAll(`button > span`))i.selectNodeContents(n),t=Math.max(t,i.getBoundingClientRect().width);return{section:e,count:e.children.length,columnWidth:Math.max(5*r,Math.min(15*r,Math.ceil(t+o)+1))}}),c=s.length>0&&parseFloat(getComputedStyle(s[0].section).columnGap)||0,l=e.offsetWidth-t.clientWidth,u=Math.min(window.innerWidth-16,Math.max(n.width,...s.map(({count:e,columnWidth:t})=>Math.min(3,Math.ceil(e/8))*(t+c)-c+l))),d=this.entries({has:()=>!0}).length<=8;for(let{section:e,count:t,columnWidth:n}of s){let r=Math.max(1,Math.floor((u-l+c)/(n+c)));e.style.setProperty(`--revision-columns`,d?1:Math.ceil(t/Math.ceil(t/r)))}e.style.width=`${u}px`,e.style.left=`${Math.max(8,Math.min(n.left,window.innerWidth-u-8))}px`;let f=window.innerHeight-n.bottom-6-8,p=n.top-6-8,m=f<Math.min(e.scrollHeight,320)&&p>f;e.style.maxHeight=`${Math.max(0,Math.min(420,m?p:f))}px`,e.style.top=`${Math.max(8,m?n.top-e.offsetHeight-6:n.bottom+6)}px`,e.dataset.positioned=``}async keyDown(e){if(e.key===`Escape`||e.key===`Tab`){e.key===`Escape`&&this._open&&(e.preventDefault(),e.stopPropagation()),this.close();return}if(e.key===`Enter`){let t=this.entries()[this._active];this._open&&t?.prefix!=null?(e.preventDefault(),this.toggleGroup(t.prefix)):this._open&&t!=null?(e.preventDefault(),this.pick(t.name)):this.close();return}if(this.kind===`commit`||![`ArrowDown`,`ArrowUp`].includes(e.key))return;e.preventDefault(),this._open||this.show();let t=this.entries().length;this._active=t===0?-1:e.key===`ArrowDown`?Math.min(this._active+1,t-1):this._active<=0?t-1:this._active-1,await this.updateComplete,this.renderRoot.querySelector(`[data-active]`)?.scrollIntoView({block:`nearest`})}render(){let e=this.entries(),t=this.kind===`commit`?`Commit SHA`:this.kind===`tag`?`Tag`:`Branch`,n=this.kind!==`commit`;return g`<form class="${this._keyboard?`revision keyboard`:`revision`}" @pointerdown="${()=>{this._pointer=!0,this._keyboard=!1}}" @focusin="${()=>{this._keyboard=!this._pointer}}" @focusout="${e=>{e.currentTarget.contains(e.relatedTarget)||(this._keyboard=!1,this.close())}}" @submit="${e=>{e.preventDefault(),this.change(`submit`,this.kind,this.name)}}"><div class="revision-switch" role="group" aria-label="Revision type">${na.map(({kind:e,label:t,icon:n})=>g`<button type="button" aria-label="${t}" data-tooltip="${t}" aria-pressed="${this.kind===e}" ?disabled="${this.disabled}" @click="${()=>this.pickKind(e)}">${n}</button>`)}</div><span class="revision-size" data-value="${this.name}"><input class="revision-name" type="text" size="1" aria-label="${t}" role="${$(n?`combobox`:void 0)}" aria-autocomplete="${$(n?`list`:void 0)}" aria-expanded="${$(n?String(this._open):void 0)}" aria-controls="${$(n?`revisions`:void 0)}" aria-activedescendant="${$(this._open&&this._active>=0?`revision-${this._active}`:void 0)}" autocomplete="off" spellcheck="false" placeholder="${n?`Choose or enter a ${this.kind}\u2026`:`Commit SHA…`}" .value="${w(this.name)}" ?disabled="${this.disabled}" @focus="${()=>this.show()}" @click="${()=>this.show()}" @keydown="${this.keyDown}" @input="${e=>{this.change(`input`,this.kind,e.target.value),this.show({query:e.target.value})}}"></span>${n?g`<button type="button" class="revision-expand" aria-label="${`Show ${this.kind} suggestions`}" aria-expanded="${this._open}" ?disabled="${this.disabled}" @mousedown="${e=>e.preventDefault()}" @click="${()=>{this._open?this.close():(this.focusName(),this.show())}}">${ta}</button>`:y}<div class="revision-menu" id="revisions" popover="auto" role="listbox" aria-label="${`${t} suggestions`}" @beforetoggle="${e=>{this._open=e.newState===`open`,delete e.target.dataset.positioned,this._open||(this._active=-1)}}"><div class="revision-options">${this.sections(e).map(({header:e,index:t,items:n})=>e?g`<button type="button" role="option" class="revision-group" id="${`revision-${t}`}" aria-selected="false" aria-expanded="${e.expanded}" ?data-active="${t===this._active}" tabindex="-1" @mousedown="${e=>e.preventDefault()}" @click="${()=>{this._active=-1,this.toggleGroup(e.prefix)}}">${ta}<span>${e.prefix}/</span><span class="count" aria-label="${`${e.count} branches`}">${e.count}</span></button>`:g`<div class="revision-section" role="none">${n.map(({entry:e,index:t})=>g`<button type="button" role="option" id="${`revision-${t}`}" aria-label="${$(e.label===void 0?void 0:e.name)}" aria-selected="${e.name===this.name}" ?data-active="${t===this._active}" tabindex="-1" @mousedown="${e=>e.preventDefault()}" @click="${()=>this.pick(e.name)}"><span data-tooltip-truncated data-tooltip="${e.name}">${e.label??e.name}</span></button>`)}</div>`)}</div>${e.length>0?y:g`<p class="revision-empty">${this._query?`No matching suggestions. Enter a revision name to browse.`:`No ${this.kind} suggestions available.`}</p>`}</div></form>`}};customElements.get(`revision-select`)||customElements.define(`revision-select`,sa);export{We as a,Ke as b,qe as c,Je as d,C as e,Ye as f,Xe as g,Ze as h,et as i,tt as j,nt as k,b as l,ae as m,oe as n,se as o,ce as p,le as q,ue as r,de as s,fe as t,pe as u,me as v,he as w,ge as x,_e as y,ve as z,ye as A,be as B,xe as C,Se as D,Ce as E,we as F,Te as G,Ee as H,De as I,Oe as J,ke as K,Ae as L,je as M,Me as N,Ne as O,Pe as P,Fe as Q,Ie as R,Le as S,Re as T,ze as U,Be as V,Ve as W,He as X,Ue as Y,un as Z,w as _,ct as $,ut as aa,bt as ba,xt as ca,St as da,Et as ea,E as fa,At as ga,Mt as ha,Nt as ia,On as ja,kn as ka,jn as la,M as ma,Ln as na,zn as oa,Gn as pa,N as qa,Kn as ra,qn as sa,P as ta,Yn as ua,L as va,V as wa,gr as xa,_r as ya,Q as za,Vi as Aa,Ui as Ba,Ki as Ca,qi as Da,Ji as Ea,Yi as Fa,Zi as Ga,Qi as Ha,$i as Ia,Zt as Ja,Pt as Ka,Ft as La,It as Ma,Lt as Na,D as Oa,Rt as Pa,zt as Qa,$ as Ra,ea as Sa,Bt as Ta,Ut as Ua,Gt as Va,Yt as Wa};
14
- /*!
15
- * PHP elephant adapted from Material Icon Theme:
16
- * https://github.com/material-extensions/vscode-material-icon-theme/blob/main/icons/php_elephant.svg
17
- * Copyright (c) 2025 Material Extensions
18
- *
19
- * Permission is hereby granted, free of charge, to any person obtaining a copy
20
- * of this software and associated documentation files (the "Software"), to deal
21
- * in the Software without restriction, including without limitation the rights
22
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
23
- * of the Software, and to permit persons to whom the Software is furnished to do
24
- * so, subject to the following conditions:
25
- *
26
- * The above copyright notice and this permission notice shall be included in all
27
- * copies or substantial portions of the Software.
28
- *
29
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
- * SOFTWARE.
36
- */
37
- /*! Bundled license information:
38
-
39
- lit-html/directives/live.js:
40
- (**
41
- * @license
42
- * Copyright 2020 Google LLC
43
- * SPDX-License-Identifier: BSD-3-Clause
44
- *)
45
-
46
- lit-html/directives/if-defined.js:
47
- (**
48
- * @license
49
- * Copyright 2018 Google LLC
50
- * SPDX-License-Identifier: BSD-3-Clause
51
- *)
52
- */
@@ -1 +0,0 @@
1
- function e(e=null){let t=[`anthropic/claude-opus-5.5`,`anthropic/claude-fable-5.1`,`anthropic/claude-sonnet-5.5`,`anthropic/claude-haiku-5.5`,`openai/gpt-6-astra`,`openai/gpt-6-astra-pro`,`openai/gpt-6.1-sol`,`openai/gpt-6.1-sol-pro`,`openai/gpt-6-luna`,`openai/gpt-6-luna-pro`,`moonshotai/kimi-k3`,`google/gemini-4-argon`,`google/gemma-4-31b-it`,`x-ai/grok-4.7`,`z-ai/glm-5.3`,`qwen/qwen3.8-max`,`deepseek/deepseek-v4.1-flash`,`deepseek/deepseek-v4-pro`,`mistralai/mistral-large-4-0`],n=e===`moonshot`?`moonshotai`:e,r=t.filter(t=>![`anthropic`,`openai`,`moonshot`].includes(e??``)||t.startsWith(`${n}/`)).map(e=>({id:e,efforts:[`low`,`medium`,`high`,`xhigh`,`max`]}));return{models:r,defaultModel:r[0].id}}export{e as a};
@@ -1,2 +0,0 @@
1
- import{e,f as t,g as n,k as r}from"./chunk-4HI2MSAV.js";import{j as i}from"./chunk-7VAWINQF.js";function a(e,t){return e?e.base===``?`${e.other}${t}`:t.startsWith(e.base)?t.slice(e.base.length):null:t}var o=(e,t)=>`${`../`.repeat(e.base.split(`/`).length-1)}${t}`;function s({root:e,paths:t},n,r){if(!e||n===`.`)return n;for(let e of r){let r=t.get(`${n}/${e}`);if(r?.endsWith(`/${e}`))return r.slice(0,-e.length-1)}let i=a(e,`${n}/`);return i===null?o(e,n):i.slice(0,-1)||`.`}function c(e,t){if(!e)return{prefix:t,from:null,to:null};let n=t.startsWith(e.other)?t:``;return{prefix:n,from:`./${e.base}${n.slice(e.other.length)}`,to:`./${n||e.other}`}}function l(...e){let t=new Set;for(let n of e){let e=i(n);for(let[r,i]of Object.entries(n?.bundle?.reason??{}))Array.isArray(i)&&i.some(t=>e.has(t))&&t.add(r)}let n=t=>e.some(e=>{if(e?.kind!==`stasis`)return!1;let n=i(e),r=e?.bundle?.reason?.[t];return new Set(Array.isArray(r)?r.filter(e=>n.has(e)):[]).size<n.size});return[...t].some(n)?[...t].toSorted().map(e=>({id:`reason:${e}`,label:e})):[]}function u(e,t=``){let n=i(e);if(!t||e?.kind!==`stasis`)return n;let r=e?.bundle?.reason?.[t.replace(/^reason:/u,``)],a=new Set(Array.isArray(r)?r:[]);return new Map([...n].filter(([e])=>a.has(e)))}function d(e,t,n,r){return JSON.stringify([e,t,n,r])}function f(e,t=``){let n=new Map;if(e?.kind!==`stasis`||!e.bundle)return n;let r=t?i(e):null,a=t?u(e,t):null;for(let[t,i]of e.bundle.imports)for(let[e,o]of i)for(let[i,s]of o){let o=typeof s==`string`?[[null,s]]:s;for(let[s,c]of o){if(a&&!a.has(e)&&(r.has(e)||!a.has(c)))continue;let o=d(e,i,t,s);n.set(o,{key:o,parent:e,specifier:i,conditions:t,platform:s,target:c})}}return n}var p=(e,{lo:t,start:n},r)=>e[n+(r-t)/2];function m(e,t,{low:n,high:r},i,a){return e===-t||e-1<n||e!==t&&e+1<=r&&p(i,a,e-1)<p(i,a,e+1)?e+1:e-1}function h(e,t,n,{first:r,n:i,m:a,d:o,...s}){e.a.fill(1,0,r).fill(1,i),e.b.fill(1,0,r).fill(1,a);let c=i,l=a;for(let r=o;r>0;r--){let i=c-l,a=m(i,r,s,t,n[r]),o=p(t,n[r],a);for(let t=a>i?o:o+1;t<c;t++)e.a[t]=e.b[t-i]=1;c=o,l=c-a}for(let t=r;t<c;t++)e.a[t]=e.b[t]=1}function g(e,t,n){let r=0,i=t.length,a=e.length,o=2*(a+i);for(;r<a&&r<i&&e[r]===t[r];)r++;for(;a>r&&i>r&&e[a-1]===t[i-1];)a--,i--;let s={high:a-r,low:r-i},c=[r],l=[{lo:1,start:0}];for(let u=0;u<=s.high-s.low;u++){let d=l[u],f=Math.min(u,s.high),g=Math.max(-u,s.low+(s.low+u&1));l.push({lo:g,start:c.length});for(let _=g;_<=f;_+=2){let f=m(_,u,s,c,d),g=p(c,d,f),v=f>_?g:g+1,y=v;for(;v<a&&v-_<i&&e[v]===t[v-_];)v++;if(o+=2+v-y,c.push(v),v>=a&&v-_>=i)return h(n,c,l,{first:r,n:a,m:i,d:u,...s}),o}}throw Error(`no edit script between two lines`)}var _=/[\p{L}\p{N}_$]+|\s+|[^\p{L}\p{N}_$\s]/gu,v=2e3,y=800,b=.6;function x(e,t){if(e.length>v)return null;let n=e.match(_)??[];return n.length>y?null:{line:e,tokens:n,words:n.map(e=>(t.has(e)||t.set(e,t.size),t.get(e)))}}function S({tokens:e,line:t},n){let r=[];for(let i=0,a=0;a<e.length;i+=e[a++].length){if(n[a])continue;let o=r.at(-1);o&&/^\s*$/u.test(t.slice(o[1],i))?o[1]=i+e[a].length:r.push([i,i+e[a].length])}return r}var C=(e,t)=>e.reduce((e,[t,n])=>e+n-t,0)/Math.max(1,t.length);function w(e,t){let n={a:e.words.map(()=>0),b:t.words.map(()=>0)},r=g(e.words,t.words,n),i={a:S(e,n.a),b:S(t,n.b)};return{ranges:i,share:n.a.includes(1)?Math.min(C(i.a,e.line),C(i.b,t.line)):1,steps:r}}function T(e,t){if(e===t)return{a:[],b:[]};let n=new Map,r=x(e,n),i=x(t,n);if(r===null||i===null)return null;let{ranges:a,share:o}=w(r,i);return o<=b?a:null}var E=200,D=5e6,O=6,k=60,A=3;function j(e){let t=new Map;for(let n of e?.tokens??[])t.set(n,(t.get(n)??0)+1);return t}function M(e,t){let n=new Map,r=[e,t].map(e=>e.map(e=>x(e,n))),i=r.map(e=>e.map(j)),a=0,o=(e,t,n)=>{let r=0;for(let[i,o]of e)if(a+=A,(r+=i.length*Math.max(0,o-(t.get(i)??0)))>b*n.length)return 1/0;return r/Math.max(1,n.length)},s=(n,a)=>r[0][n]===null||r[1][a]===null?1/0:Math.min(o(i[0][n],i[1][a],e[n]),o(i[1][a],i[0][n],t[a])),c=(e,t)=>{if(a+=k,s(e,t)===1/0)return 1/0;let{share:n,steps:i}=w(r[0][e],r[1][t]);return a+=i,n<=b?n:1/0},l=new Float64Array(e.length*t.length).fill(NaN);return{share:(n,r)=>{let i=n*t.length+r;return Number.isNaN(l[i])&&(l[i]=e[n]===t[r]?0:c(n,r)),l[i]},floor:s,spent:()=>a}}function N(e,t,{share:n,spent:r}){let i=Array.from({length:e+1},()=>new Float64Array(t+1)),a=(e,t)=>n(e,t)===1/0?-1/0:1e3-n(e,t)+i[e][t];for(let n=0;n<e;n++)for(let e=0;e<t;e++)if(i[n+1][e+1]=Math.max(i[n][e+1],i[n+1][e],a(n,e)),r()>D)return null;let o=[];for(let n=e,r=t;n>0&&r>0;)i[n][r]===i[n][r-1]?r--:i[n][r]===i[n-1][r]?n--:o.push([--n,--r]);return o.toReversed()}function P(e,t,{share:n,floor:r}){let i=[];for(let a=0,o=0;a<e&&o<t;a++){let e=null,s=1/0,c=Array.from({length:Math.min(t,o+O)-o},(e,t)=>[o+t,r(a,o+t)]);for(let[t,r]of c.toSorted((e,t)=>e[1]-t[1]||e[0]-t[0])){if(r>s)break;(n(a,t)<s||n(a,t)===s&&t<e)&&([e,s]=[t,n(a,t)])}e!==null&&(i.push([a,e]),o=e+1)}return i}function F(e,t){if(e.length>E||t.length>E)return[];let n=M(e,t);return N(e.length,t.length,n)??P(e.length,t.length,n)}var I=(e,n,r)=>t(e,n,{...r,discard:!1});function L(e){if(e===null)return``;let t=e.type===`symlink`?e.target:e.data;if(typeof t==`string`)return t.includes(`\0`)?void 0:t;if(!t.includes(0))try{return r(t)}catch{return}}var R=new Set([`none`,`all`,`change`,`trailing`]);function z({horizon:e=1/0,whitespace:t=`none`,ignoreCase:n=!1}={}){if(e!==1/0&&!(Number.isSafeInteger(e)&&e>=0))throw RangeError(`horizon must be a whole number or Infinity, not ${e}`);if(!R.has(t))throw RangeError(`whitespace must be 'none', 'all', 'change' or 'trailing', not ${t}`);if(typeof n!=`boolean`)throw TypeError(`ignoreCase must be a boolean, not ${typeof n}`);return{horizon:e,whitespace:t,ignoreCase:n}}var B=e=>e.reduce((e,{a0:t,a1:n,b0:r,b1:i})=>e+n-t+i-r,0),V=e=>e===``?[]:e.split(/(?<=\n)/u),H=e=>({...e,ignoreCase:!1,whitespace:`none`}),U=e=>(e.whitespace??`none`)!==`none`||!!e.ignoreCase;function W(t,r,i,a,o){let s=V(t),c=V(r),l=(e,t,n,r)=>({a0:e,a1:t,b0:n,b1:r,remove:s.slice(e,t),insert:c.slice(n,r)}),u=o.flatMap(({a0:e,a1:t,b0:n,b1:r})=>e===t||n===r?[l(e,t,n,r)]:I(s.slice(e,t).join(``),c.slice(n,r).join(``),i).map(t=>l(e+t.a0,e+t.a1,n+t.b0,n+t.b1))),d=B(u)<B(a)&&(a=>{try{return n(t,r,a,{format:`normal`,ignoreCase:i.ignoreCase,whitespace:i.whitespace}),!0}catch(t){if(t instanceof e)return!1;throw t}})(u)?u:a;return B(d)<B(o)?d:o}function G(e,t,n){let r=I(e,t,n);return U(n)?W(e,t,n,r,I(e,t,H(n))):r}function K(e,t,n){let r=L(e),i=L(t);if(r===void 0||i===void 0)return{binary:!0,blocks:[],insertions:null,deletions:null};let a=r===i?[]:G(r,i,n),o=(e,t)=>a.reduce((n,r)=>n+r[t]-r[e],0);return{binary:!1,blocks:a,insertions:o(`b0`,`b1`),deletions:o(`a0`,`a1`)}}function q(t,r,i,a){let{whitespace:o,ignoreCase:s}=z(a);try{return n(t,r,i,{format:`normal`,whitespace:o,ignoreCase:s}),!0}catch(t){if(t instanceof e)return!1;throw t}}var J=/[ \t\n\v\f\r]/u,Y=e=>{let t=e.split(`
2
- `);return t.at(-1)===``&&t.pop(),t};function X(e,t){for(let n=0,r=0;;n++,r++){let i=``,a=``;for(;n<e.length&&J.test(e[n]);)i+=e[n++];for(;r<t.length&&J.test(t[r]);)a+=t[r++];if(i!==a&&new Set(i+a).size>1)return!0;if(n>=e.length||r>=t.length)return!1}}function Z(e,t,n){try{if(!q(e,t,n,{whitespace:`all`}))return!0}catch{return!0}let r=Y(e),i=Y(t),a=0,o=0;for(let e=0;e<=n.length;e++){let t=e<n.length?n[e].a0:r.length;for(;a<t;a++,o++)if(r[a]!==i[o]&&X(r[a],i[o]))return!0;e<n.length&&({a1:a,b1:o}=n[e])}return!1}function Q(e,t,{extension:n=!0}={}){let r=e.split(`/`),i=t.split(`/`),a=0;for(;a<r.length-1&&a<i.length-1&&r[a]===i[a];)a++;let o=0;for(;o<r.length-a-1&&o<i.length-a-1&&r.at(-1-o)===i.at(-1-o);)o++;let s={head:a?`${r.slice(0,a).join(`/`)}/`:``,from:r.slice(a,r.length-o).join(`/`),to:i.slice(a,i.length-o).join(`/`),tail:o?`/${r.slice(-o).join(`/`)}`:``},c=s.from.lastIndexOf(`.`);return n&&!s.from.includes(`/`)&&!s.to.includes(`/`)&&c>0&&s.to.lastIndexOf(`.`)===c&&s.from.slice(0,c)===s.to.slice(0,c)?{...s,head:s.head+s.from.slice(0,c),from:s.from.slice(c),to:s.to.slice(c)}:s}export{T as a,F as b,L as c,z as d,K as e,Z as f,Q as g,a as h,o as i,s as j,c as k,l,u as m,d as n,f as o};