@visulima/vis 1.0.0 → 1.0.1
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.
- package/CHANGELOG.md +10 -0
- package/LICENSE.md +1 -1
- package/dashboard/dist/index.html +10 -10
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +3 -3
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +2 -2
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/group-tags.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +6 -6
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +41 -41
- package/dist/packem_chunks/handler73.js +2 -2
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +1 -1
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index3.js +1 -1
- package/dist/packem_chunks/index4.js +46 -46
- package/dist/packem_chunks/index5.js +22 -23
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/orchestrator.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/ts-loader.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_chunks/version-resolver.js +1 -1
- package/dist/packem_shared/{Table-CcVkyULl-DLWu6XHL.js → Table-BGIHvenQ-D2oJtNQj.js} +1 -1
- package/dist/packem_shared/{advisories-B76fBVL-.js → advisories-CaP4uNhD.js} +1 -1
- package/dist/packem_shared/{affected-shas-CCxG4tvm.js → affected-shas-BfO3PDJq.js} +1 -1
- package/dist/packem_shared/ai-analysis-CO7No4rt.js +68 -0
- package/dist/packem_shared/{ai-fix-CeGzAT9m.js → ai-fix-B4u2zlVG.js} +1 -1
- package/dist/packem_shared/{augment-DaSS2Lgs.js → augment-8z86AwtF.js} +1 -1
- package/dist/packem_shared/{bin-BlGVEhl8.js → bin-Cv8vsMEo.js} +1 -1
- package/dist/packem_shared/{build-scripts-q__dKE2y.js → build-scripts-D477Ou-x.js} +1 -1
- package/dist/packem_shared/{command-runtime-3FTGuUsK.js → command-runtime-EWjmSxPj.js} +1 -1
- package/dist/packem_shared/{cyclonedx-CmrYQ0vx.js → cyclonedx-CDWHbD9s.js} +1 -1
- package/dist/packem_shared/{dependency-scan-DpOFiZuI.js → dependency-scan-P52jY0pU.js} +1 -1
- package/dist/packem_shared/{docker-BYqiD711.js → docker-CD7o1D1o.js} +1 -1
- package/dist/packem_shared/{env-DdQRnEIy.js → env-Cpxa_7UE.js} +1 -1
- package/dist/packem_shared/{failure-log-CKMhqLWr.js → failure-log-MOhz-TBv.js} +1 -1
- package/dist/packem_shared/glob-DMbPwGSj-uzODoE-1.js +1 -0
- package/dist/packem_shared/index-BAUIIRZJ.js +1 -0
- package/dist/packem_shared/index-BVuCxe14.js +22 -0
- package/dist/packem_shared/{index-Cg71MisW.js → index-CdTXvj-V.js} +1 -1
- package/dist/packem_shared/{index-jJNulo5i.js → index-CgXLAAVI.js} +1 -1
- package/dist/packem_shared/{lifecycle-aDTZ8dW1.js → lifecycle-hzwghh5a.js} +1 -1
- package/dist/packem_shared/{lockfile-C1qCKGH6.js → lockfile-CWcVTdRc.js} +1 -1
- package/dist/packem_shared/{manifests-DSBr3-dw.js → manifests-CaPqgQxW.js} +1 -1
- package/dist/packem_shared/{min-release-age-C71MO72F.js → min-release-age-skpcnlpk.js} +1 -1
- package/dist/packem_shared/{missing-package-json-CTF71tE5.js → missing-package-json-_hOp4AW5.js} +1 -1
- package/dist/packem_shared/{native-config-sync-D-z2Uwqu.js → native-config-sync-CFi1iQNG.js} +1 -1
- package/dist/packem_shared/{osv-bloom-DMhXP184.js → osv-bloom-BAyJUnRx.js} +1 -1
- package/dist/packem_shared/{packument-aGzYwXKn.js → packument-CYxvm590.js} +1 -1
- package/dist/packem_shared/{pm-runner-CQcraCcu.js → pm-runner-mVFjedM6.js} +1 -1
- package/dist/packem_shared/{provenance-S7y0BRAt.js → provenance-CI_WQx7G.js} +1 -1
- package/dist/packem_shared/{readJsonSync-DuMMeB3s-ihoybKvs.js → readJsonSync-DuMMeB3s-Cx08VBQg.js} +1 -1
- package/dist/packem_shared/{registry-keys-CRnXATt2.js → registry-keys-AGlSEY6R.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-CJGazevw.js → resolve-explicit-DVE9cfkm.js} +1 -1
- package/dist/packem_shared/{resolve-runtime-QRaQucfL.js → resolve-runtime-CGHf-wHz.js} +1 -1
- package/dist/packem_shared/{run-file-DD7Ne23Z.js → run-file-Bs_E9O6O.js} +1 -1
- package/dist/packem_shared/{runtime-check-qnrPTlma.js → runtime-check-pS2XH4BO.js} +1 -1
- package/dist/packem_shared/{s1ngularity-BLj4Jy8z.js → s1ngularity-xmrq5T5r.js} +1 -1
- package/dist/packem_shared/{scan-progress-BDcl7Kty.js → scan-progress-DQ4TMXcb.js} +1 -1
- package/dist/packem_shared/{selectors-D4iCvITE.js → selectors-CRgS4bU9.js} +1 -1
- package/dist/packem_shared/{signatures-DoNG2hEr.js → signatures-Dp3th1DB.js} +1 -1
- package/dist/packem_shared/target-merge-D2eTghgd.js +11 -0
- package/dist/packem_shared/{target-options-CR0OuYJr.js → target-options-TM6ETDAS.js} +1 -1
- package/dist/packem_shared/{toolchain-Zb3VzZb4.js → toolchain-B5KwUZfq.js} +1 -1
- package/dist/packem_shared/{typosquats-C12CP_2G.js → typosquats-C0layQsP.js} +1 -1
- package/dist/packem_shared/{use-measured-height-CjS7Tks7.js → use-measured-height-Drobr4fe.js} +1 -1
- package/dist/packem_shared/{verify-DStfg3nb.js → verify-Cjo4EBFZ.js} +1 -1
- package/dist/packem_shared/{vis-update-app-BlocL713.js → vis-update-app-qIkyvrd1.js} +1 -1
- package/dist/packem_shared/{watch-BXNI7dC6.js → watch-BnE1TzYn.js} +1 -1
- package/dist/packem_shared/{watch-loop-BZudYfcl.js → watch-loop-Irf3Pm-1.js} +1 -1
- package/dist/runtime/preload.js +1 -1
- package/index.js +654 -570
- package/package.json +37 -37
- package/dist/packem_shared/ai-analysis-BpVdn20h.js +0 -68
- package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +0 -1
- package/dist/packem_shared/index-CE6MsgcV.js +0 -22
- package/dist/packem_shared/index-Cg0IHaFI.js +0 -1
- package/dist/packem_shared/target-merge-Dg25Izl5.js +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as ie}from"node:module";import{m as E,v as ue}from"./index-
|
|
1
|
+
import{createRequire as ie}from"node:module";import{m as E,v as ue}from"./index-BVuCxe14.js";import{r as le}from"./docker-CD7o1D1o.js";import{a as oe}from"./readJsonSync-DuMMeB3s-Cx08VBQg.js";import{e as fe}from"./license-t5KnNX6v.js";import{D as de}from"../packem_chunks/cli-main.js";import"./public-api-WqUCiyIe.js";import{u as he}from"./index-BAUIIRZJ.js";const ae=ie(import.meta.url),P=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,se=e=>{if(typeof P<"u"&&P.versions&&P.versions.node){const[n,t]=P.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return P.getBuiltinModule(e)}return ae(e)},{randomUUID:pe}=se("node:crypto"),{readdirSync:me}=se("node:fs"),X=e=>e.replaceAll(/[^\w.~-]/g,n=>`%${(n.codePointAt(0)??0).toString(16).toUpperCase().padStart(2,"0")}`),C=(e,n)=>{const t=e.toLowerCase();if(t.startsWith("@")){const s=t.indexOf("/");if(s>0){const r=t.slice(0,s),p=t.slice(s+1);return`pkg:npm/${X(r)}/${X(p)}@${X(n)}`}}return`pkg:npm/${X(t)}@${X(n)}`},m={ARRAY:"array",BOOLEAN:"boolean",DATE:"date",FUNCTION:"function",JSTOXML_OBJECT:"jstoxml-object",NULL:"null",NUMBER:"number",OBJECT:"object",STRING:"string"},_e=[m.STRING,m.NUMBER,m.BOOLEAN],ge='<?xml version="1.0" encoding="UTF-8"?>',ee=["_selfCloseTag","_attrs"],ye=(e="",n=0)=>e.repeat(n),Y=e=>Array.isArray(e)&&m.ARRAY||typeof e===m.OBJECT&&e!==null&&e._name&&m.JSTOXML_OBJECT||e instanceof Date&&m.DATE||e===null&&m.NULL||typeof e,re=e=>e.startsWith("<![CDATA["),ce=(e="",n={},t)=>{let s=e;if(typeof e===m.STRING){if(re(e))return e;const r=new RegExp(`(${Object.keys(n).join("|")})(?!(\\w|#)*;)`,"g");s=String(e).replace(r,(p,h)=>n[h]||"")}return typeof t=="function"?t(s):s},be=(e={},n,t,s)=>(Array.isArray(e)?e:Object.entries(e).map(([r,p])=>({[r]:p}))).reduce((r,p)=>{const h=Object.keys(p)[0],_=p[h];if(typeof t===m.FUNCTION&&t(h,_))return r;const y=n?ce(_,n):_,$=!s&&y===!0?"":`="${y}"`;return r.push(`${h}${$}`),r},[]),$e=(e={},n,t,s)=>{const r=be(e,n,t,s);return r.length===0?"":` ${r.join(" ")}`},Oe=(e={})=>Object.keys(e).map(n=>({_name:n,_content:e[n]})),ve=e=>_e.includes(Y(e)),je=e=>!e.match("<"),ke=({header:e,isOutputStart:n})=>e&&n?typeof e===m.BOOLEAN?ge:e:"",ne={"<":"<",">":">","&":"&",'"':"""},U=(e={},n={})=>{const{depth:t=0,indent:s,_isFirstItem:r,_isOutputStart:p=!0,header:h,attributeReplacements:_={},attributeFilter:y,attributeExplicitTrue:$=!1,contentReplacements:F={},contentMap:M,selfCloseTags:B=!0}=n,J=typeof _=="boolean"&&!_?{}:{...ne,..._},G=typeof F=="boolean"&&!F?{}:{...ne,...F},D=typeof s=="string",k=ye(s,t),W=Y(e),L=ke({header:h,isOutputStart:p}),N=p&&!L&&r&&t===0,R=D&&!N?`
|
|
2
2
|
`:"";let b="";switch(W){case m.JSTOXML_OBJECT:{const{_name:f,_content:u}=e;if(u===null&&typeof M!="function"){b=`${R}${k}${f}`;break}if(Array.isArray(u)&&u.every(ve))return u.map(j=>U({_name:f,_content:j},{...n,depth:t,_isOutputStart:!1})).join("");if(ee.includes(f))break;const g=U(u,{...n,depth:t+1,_isOutputStart:N}),w=Y(g),O=je(g),v=re(g),x=`${R}${k}`;if(f==="_comment"){b+=`${x}<!-- ${u} -->`;break}const H=w==="undefined"||g==="",c=B,o=e._selfCloseTag,a=typeof o===m.BOOLEAN?H&&o:H&&c,i=a?"/":"",l=$e(e._attrs,J,y,$),d=`<${f}${l}${i}>`,T=D&&!O&&!v?`
|
|
3
3
|
${k}`:"",S=a?"":`${g}${T}</${f}>`;b+=`${x}${d}${S}`;break}case m.OBJECT:{const f=Object.keys(e);b=f.map((u,g)=>{const w={...n,_isFirstItem:g===0,_isLastItem:g+1===f.length,_isOutputStart:N},O={_name:u};if(Y(e[u])===m.OBJECT&&(ee.forEach(v=>{const x=e[u][v];typeof x<"u"&&(O[v]=x,delete e[u][v])}),typeof e[u]._content<"u"&&Object.keys(e[u]).length>1)){const v=Object.assign({},e[u]);delete v._content,O._content=[...Oe(v),e[u]._content]}return typeof O._content>"u"&&(O._content=e[u]),U(O,w)},n).join("");break}case m.FUNCTION:{const f=e(n);b=U(f,n);break}case m.ARRAY:{b=e.map((f,u)=>{const g={...n,_isFirstItem:u===0,_isLastItem:u+1===e.length,_isOutputStart:N};return U(f,g)}).join("");break}default:{b=ce(e,G,M);break}}return`${L}${b}`},Q=e=>{try{return oe(e)}catch{return}},Te=e=>{if(e.length===0||e.includes("..")||e.startsWith(".")||e.includes("\0")||e.includes("\\"))return!1;if(e.startsWith("@")){const n=e.indexOf("/");return n>1&&!e.includes("/",n+1)}return!e.includes("/")},Se=e=>e.length>0&&!e.includes("/")&&!e.includes("\\")&&!e.includes("..")&&!e.includes("\0"),Ae=(e,n,t)=>{const s=`${n.replaceAll("/","+")}@${t}`,r=E(e,"node_modules",".pnpm"),p=Q(E(r,s,"node_modules",n,"package.json"));if(p)return p;let h;try{h=me(r)}catch{return}const _=`${s}_`;for(const y of h){if(!y.startsWith(_))continue;const $=Q(E(r,y,"node_modules",n,"package.json"));if($)return $}},we=(e,n,t)=>{const s=Q(E(e,"node_modules",n,"package.json"));return s?.version===t?s:void 0},xe=(e,n,t)=>{if(!(!Te(n)||!Se(t)))return Ae(e,n,t)??we(e,n,t)},De={sha256:"SHA-256",sha384:"SHA-384",sha512:"SHA-512"},Ne={sha256:64,sha384:96,sha512:128},Re=e=>{const n={name:e.name,version:e.version},{integrity:t}=e;return t&&t.hex.length===Ne[t.algorithm]&&(n.hash={alg:De[t.algorithm],content:t.hex}),e.dependencies&&(n.dependencies=e.dependencies),e.peerDependencies&&(n.peerDependencies=e.peerDependencies),e.optionalDependencies&&(n.optionalDependencies=e.optionalDependencies),n},Ce=[{file:"pnpm-lock.yaml",type:"pnpm"},{file:"npm-shrinkwrap.json",type:"npm"},{file:"package-lock.json",type:"npm"},{file:"yarn.lock",type:"yarn"},{file:"bun.lock",type:"bun"}],Ee=e=>{for(const{file:n,type:t}of Ce){let s;try{s=ue(E(e,n))}catch{continue}const r=new Map;for(const p of de(s,t))r.set(`${p.name}@${p.version}`,Re(p));return{packages:r,type:t}}},Me=e=>{const n=e.indexOf(":");return n<=0?e:e.slice(0,n)==="npm"?e.slice(n+1):e},V=(e,n,t)=>{const s=t.get(e);if(!s||s.size===0)return;if(s.has(n))return n;const r=Me(n);if(r!==n&&s.has(r))return r;const p=[...s];return he.maxSatisfying(p,r,{includePrerelease:!0})||p[0]},Be="1.7",Le="CycloneDX",Ie="http://cyclonedx.org/schema/bom-1.7.schema.json",Ue="@visulima/vis",te=e=>{try{return oe(e)}catch{return}},Fe=e=>{if(e){if(typeof e=="string")return e;if(typeof e=="object"&&e.name)return e.email?`${e.name} <${e.email}>`:e.name}},Je=e=>{if(e)return typeof e=="string"?e:e.url},qe=e=>{if(e)return typeof e=="string"?e:e.url},Pe=e=>{const n=[];e.homepage&&n.push({type:"website",url:e.homepage});const t=Je(e.repository);t&&n.push({type:"vcs",url:t});const s=qe(e.bugs);return s&&n.push({type:"issue-tracker",url:s}),n.length>0?n:void 0},Xe=e=>e==="application"||e==="service"||e==="tool"?"application":"library",K=(e,n)=>{if(!n)return;n.description&&(e.description=n.description);const t=Fe(n.author);t&&(e.author=t);const s=fe(n);s&&(e.licenses=s);const r=Pe(n);r&&(e.externalReferences=r)},tn=e=>{const{focus:n,generatorVersion:t,includeDev:s=!1,now:r=new Date,projectGraph:p,serialNumber:h,workspace:_,workspaceRoot:y}=e,$=n&&n.length>0?[...le(n,p)].sort():Object.keys(_.projects).sort(),F=new Set($),M=new Map;for(const c of $){const o=_.projects[c];o&&M.set(c,te(E(y,o.root,"package.json")))}const B=[],J=new Map;for(const c of $){const o=_.projects[c];if(!o)continue;const a=M.get(c),i=a?.version??"0.0.0",l=C(c,i);J.set(c,l);const d={"bom-ref":l,name:c,purl:l,type:Xe(o.projectType),version:i};K(d,a),B.push(d)}const G=Ee(y),D=new Map,k=new Map;if(G)for(const c of G.packages.values()){D.set(`${c.name}@${c.version}`,c);let o=k.get(c.name);o||(o=new Set,k.set(c.name,o)),o.add(c.version)}const W=[],L=[],N=new Map;for(const c of $){const o=M.get(c);if(!o)continue;const a=[o.dependencies,o.peerDependencies];s&&a.push(o.devDependencies);const i=new Set,l=(d,T)=>{if(T)for(const[S,j]of Object.entries(T)){if(F.has(S)){const I=J.get(S);I&&i.add(I);continue}const A=V(S,j,k);A&&(i.add(C(S,A)),d.push(`${S}@${A}`))}};for(const d of a)l(W,d);l(L,o.optionalDependencies),N.set(c,i)}const R=new Map,b=new Map,f=(c,o)=>{const a=[...c];for(;a.length>0;){const i=a.pop(),l=R.get(i);if(l==="required"||l==="optional"&&o==="optional")continue;R.set(i,o);const d=D.get(i);if(!d)continue;const T=b.get(i)??new Set,S=[d.dependencies,d.peerDependencies];for(const j of S)if(j)for(const[A,I]of Object.entries(j))for(const q of I){const z=V(A,q,k);z&&(T.add(C(A,z)),a.push(`${A}@${z}`))}if(d.optionalDependencies)for(const[j,A]of Object.entries(d.optionalDependencies))for(const I of A){const q=V(j,I,k);q&&(T.add(C(j,q)),L.push(`${j}@${q}`))}T.size>0&&b.set(i,T)}};f(W,"required"),f(L,"optional");const u=[],g=[...R.keys()].sort();for(const c of g){const o=D.get(c);if(!o)continue;const a=C(o.name,o.version),i={"bom-ref":a,name:o.name,purl:a,scope:R.get(c)??"required",type:"library",version:o.version};o.hash&&(i.hashes=[o.hash]),K(i,xe(y,o.name,o.version)),u.push(i)}const w=[];for(const[c,o]of N){const a=J.get(c);if(!a)continue;const i=[...o].sort();w.push(i.length>0?{dependsOn:i,ref:a}:{ref:a})}for(const c of g){const o=D.get(c);if(!o)continue;const a=C(o.name,o.version),i=b.get(c),l=i?[...i].sort():[];w.push(l.length>0?{dependsOn:l,ref:a}:{ref:a})}w.sort((c,o)=>c.ref.localeCompare(o.ref));const O=te(E(y,"package.json")),v=(()=>{if(n?.length===1){const l=B.find(d=>d.name===n[0]);if(l)return{"bom-ref":l["bom-ref"],name:l.name,purl:l.purl,type:l.type,version:l.version}}const c=O?.name??"workspace",o=O?.version??"0.0.0",a=C(c,o),i={"bom-ref":a,name:c,purl:a,type:"application",version:o};return K(i,O),i})(),x=v["bom-ref"],H=x?B.filter(c=>c["bom-ref"]!==x):B;return{$schema:Ie,bomFormat:Le,components:[...H,...u],dependencies:w,metadata:{component:v,lifecycles:[{phase:"build"}],timestamp:r.toISOString(),tools:{components:[{name:Ue,type:"application",...t?{version:t}:{}}]}},serialNumber:h??`urn:uuid:${pe()}`,specVersion:Be,version:1}},sn=e=>{const n={version:e.version??1,xmlns:"http://cyclonedx.org/schema/bom/1.7"};e.serialNumber&&(n.serialNumber=e.serialNumber);const t=[];return e.metadata&&t.push(Ge(e.metadata)),e.components&&e.components.length>0&&t.push({_content:e.components.map(s=>Z(s)),_name:"components"}),e.dependencies&&e.dependencies.length>0&&t.push({_content:e.dependencies.map(s=>He(s)),_name:"dependencies"}),`${U({_attrs:n,_content:t,_name:"bom"},{header:!0,indent:" ",selfCloseTags:!0})}
|
|
4
4
|
`},Ge=e=>{const n=[];return e.timestamp&&n.push({timestamp:e.timestamp}),e.lifecycles&&e.lifecycles.length>0&&n.push({_content:e.lifecycles.map(t=>{const s=[];return t.phase&&s.push({phase:t.phase}),t.name&&s.push({name:t.name}),t.description&&s.push({description:t.description}),{_content:s,_name:"lifecycle"}}),_name:"lifecycles"}),e.tools?.components&&n.push({_content:[{_content:e.tools.components.map(t=>Z(t)),_name:"components"}],_name:"tools"}),e.component&&n.push(Z(e.component)),{_content:n,_name:"metadata"}},Z=e=>{const n={type:e.type};e["bom-ref"]&&(n["bom-ref"]=e["bom-ref"]);const t=[];e.group&&t.push({group:e.group}),t.push({name:e.name}),e.version&&t.push({version:e.version}),e.description&&t.push({description:e.description}),e.author&&t.push({author:e.author}),e.hashes&&e.hashes.length>0&&t.push({_content:e.hashes.map(r=>({_attrs:{alg:r.alg},_content:r.content,_name:"hash"})),_name:"hashes"});const s=We(e.licenses);return s&&t.push(s),e.purl&&t.push({purl:e.purl}),e.scope&&t.push({scope:e.scope}),e.externalReferences&&e.externalReferences.length>0&&t.push({_content:e.externalReferences.map(r=>({_attrs:{type:r.type},_content:[{url:r.url}],_name:"reference"})),_name:"externalReferences"}),{_attrs:n,_content:t,_name:"component"}},We=e=>{if(!e||e.length===0)return;const n=[];for(const t of e){if("expression"in t){n.push({expression:t.expression});continue}const s=[];"id"in t.license&&t.license.id?s.push({id:t.license.id}):"name"in t.license&&t.license.name&&s.push({name:t.license.name}),n.push({_content:s,_name:"license"})}return{_content:n,_name:"licenses"}},He=e=>e.dependsOn&&e.dependsOn.length>0?{_attrs:{ref:e.ref},_content:e.dependsOn.map(n=>({_attrs:{ref:n},_name:"dependency"})),_name:"dependency"}:{_attrs:{ref:e.ref},_name:"dependency"};export{tn as b,sn as s,C as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as u,m as l,f as g}from"./index-
|
|
1
|
+
import{v as u,m as l,f as g}from"./index-BVuCxe14.js";import{D as d}from"../packem_chunks/cli-main.js";import"./public-api-WqUCiyIe.js";import{e as D,W as v}from"../packem_chunks/catalog.js";const w={bun:{file:"bun.lock",type:"bun"},npm:{aliases:["npm-shrinkwrap.json"],file:"package-lock.json",type:"npm"},pnpm:{file:"pnpm-lock.yaml",type:"pnpm"},yarn:{file:"yarn.lock",type:"yarn"}},j=o=>{const t=w[o];return t?[...t.aliases??[],t.file].map(e=>({file:e,type:t.type})):[]},m=(o,t)=>{const e=j(t);if(e.length!==0)return e.find(r=>g(l(o,r.file)))??e[e.length-1]},k=o=>{try{return JSON.parse(u(o))}catch{return}},y=o=>{const t=[],e=k(l(o,"package.json"));e&&t.push(e);const r=D(o);let c;if(r?c=r:e?.workspaces&&(Array.isArray(e.workspaces)?c=e.workspaces:e.workspaces.packages&&(c=e.workspaces.packages)),!c)return t;const a=v(o,c);for(const s of a){const n=k(l(o,s,"package.json"));n&&t.push(n)}return t},b=(o,t)=>{const e=new Set,r=[],c=new Map;for(const s of t){const n=c.get(s.name);n?n.push(s):c.set(s.name,[s])}const a=s=>{if(s)for(const n of Object.keys(s))e.has(n)||(e.add(n),r.push(n))};for(const s of y(o))a(s.dependencies),a(s.peerDependencies),a(s.optionalDependencies);for(;r.length>0;){const s=r.shift(),n=c.get(s);if(n){for(const i of n)for(const p of[i.dependencies,i.peerDependencies,i.optionalDependencies])if(p)for(const f of Object.keys(p))e.has(f)||(e.add(f),r.push(f))}}return e},A=(o,t,e={})=>{const r=m(o,t);if(!r)return[];let c;try{c=u(l(o,r.file))}catch{return[]}const a=d(c,r.type);if(a.length===0)return[];const s=e.includeDev??!0?void 0:b(o,a),n=new Set,i=[];for(const p of a){if(s&&!s.has(p.name))continue;const f=`${p.name}@${p.version}`;n.has(f)||(n.add(f),i.push({isDev:!1,name:p.name,version:p.version}))}return i},E=(o,t)=>{const e=m(o,t);if(!e)return[];let r;try{r=u(l(o,e.file))}catch{return[]}const c=d(r,e.type);if(c.length===0)return[];const a=new Map;for(const n of c)a.has(n.name)||a.set(n.name,new Set),a.get(n.name).add(n.version);const s=[];for(const[n,i]of a)i.size<=1||s.push({name:n,versions:[...i]});return s.sort((n,i)=>n.name.localeCompare(i.name))},M=(o,t)=>{const e=m(o,t);if(!e)return;let r;try{r=u(l(o,e.file))}catch{return}const c=d(r,e.type);if(c.length===0)return;const a=[],s=new Set;for(const n of y(o))for(const i of[n.dependencies,n.devDependencies,n.peerDependencies,n.optionalDependencies])if(i)for(const[p,f]of Object.entries(i)){const h=`${p}@${f}`;s.has(h)||(s.add(h),a.push({name:p,version:f}))}return{entries:c,roots:a}};export{w as L,M as a,E as f,A as l,m as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as Qo}from"node:module";import{m as Ie,f as ia,y as oa,H as jn,T as fi,a as aa}from"./index-
|
|
1
|
+
import{createRequire as Qo}from"node:module";import{m as Ie,f as ia,y as oa,H as jn,T as fi,a as aa}from"./index-BVuCxe14.js";import{h as sa,L as ua}from"./public-api-WqUCiyIe.js";import{a as ro}from"./readJsonSync-DuMMeB3s-Cx08VBQg.js";const ea=Qo(import.meta.url),zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ta=l=>{if(typeof zt<"u"&&zt.versions&&zt.versions.node){const[d,A]=zt.versions.node.split(".").map(Number);if(d>22||d===22&&A>=3||d===20&&A>=16)return zt.getBuiltinModule(l)}return ea(l)},{rmSync:_n,existsSync:eo,readFileSync:li,cpSync:to,lstatSync:ra,readdirSync:na}=ta("node:fs");class et extends Error{constructor(d){super(d),this.name="LockfilePruneError"}}const no=l=>{let d=l.startsWith("/")?l.slice(1):l;const A=d.indexOf("(");return A!==-1&&(d=d.slice(0,A)),d},ca=(l,d)=>{if(!(d.startsWith("link:")||d.startsWith("file:")||d.startsWith("workspace:")))return`${l}@${d}`},la=l=>{const d=[];for(const A of[l.dependencies,l.devDependencies,l.optionalDependencies])if(A)for(const[o,h]of Object.entries(A))h?.version&&d.push({name:o,version:h.version});return d},pi=l=>{const d=[];for(const A of[l.dependencies,l.optionalDependencies])if(A)for(const[o,h]of Object.entries(A))typeof h=="string"&&d.push({name:o,version:h});return d},hi=l=>{const d=new Map;if(!l)return d;for(const A of Object.keys(l)){const o=no(A),h=d.get(o);h?h.push(A):d.set(o,[A])}return d},io=l=>{const d=l.displayName??"pnpm-lock.yaml",A=typeof l.lockfileContent=="string"?l.lockfileContent:l.lockfileContent.toString("utf8");let o;try{o=sa(A)}catch(Z){throw new et(`${d}: parse failed — ${Z.message}`)}const h=Z=>Z.packages?Object.keys(Z.packages).length:0;let e;for(const Z of o){const[te]=Z.errors;if(te)throw new et(`${d}: parse failed — ${te.message}`);const q=Z.toJS();if(!q||typeof q!="object")continue;const ue=q;(e===void 0||h(ue)>h(e))&&(e=ue)}if(e===void 0)throw new et(`${d}: top-level value is not an object`);const g=e.importers??{},C=hi(e.packages),m=hi(e.snapshots),S=new Set(["."]);for(const Z of l.closure)S.add(Z.relativeRoot===""?".":Z.relativeRoot);const E={};for(const[Z,te]of Object.entries(g))S.has(Z)&&(E[Z]=te);const Y=new Set,y=new Set,b=[];for(const Z of Object.values(E))for(const te of la(Z))b.push(te);for(;b.length>0;){const{name:Z,version:te}=b.shift(),q=ca(Z,te);if(!q)continue;const ue=no(q),Ce=m.get(ue)??m.get(q)??[];for(const Ae of Ce){if(y.has(Ae))continue;y.add(Ae);const Ee=e.snapshots?.[Ae];if(Ee)for(const Oe of pi(Ee))b.push(Oe)}const ge=C.get(ue)??C.get(q)??[];for(const Ae of ge){if(Y.has(Ae))continue;Y.add(Ae);const Ee=e.packages?.[Ae];if(Ee&&!e.snapshots)for(const Oe of pi(Ee))b.push(Oe)}}const v={lockfileVersion:e.lockfileVersion};for(const Z of["settings","overrides","patchedDependencies","catalogs"])e[Z]!==void 0&&(v[Z]=e[Z]);if(v.importers=E,e.packages){const Z={};for(const te of Object.keys(e.packages))Y.has(te)&&(Z[te]=e.packages[te]);v.packages=Z}if(e.snapshots){const Z={};for(const te of Object.keys(e.snapshots))y.has(te)&&(Z[te]=e.snapshots[te]);v.snapshots=Z}const M=Object.keys(e.packages??{}).length,re=Object.keys(v.packages??{}).length,ae=M-re,x=Object.keys(g).length-Object.keys(E).length;return{content:ua(v,{lineWidth:0}),message:`${d}: kept ${re}/${M} packages and ${Object.keys(E).length} importers (dropped ${ae} packages, ${x} importers)`,status:"pruned"}},fa=l=>io({...l,displayName:l.displayName??"aube-lock.yaml"}),pa=l=>{let d="",A=!1,o=!1,h=!1;for(let e=0;e<l.length;e+=1){const g=l[e],C=l[e+1];if(o){g===`
|
|
2
2
|
`&&(o=!1,d+=g);continue}if(h){g==="*"&&C==="/"&&(h=!1,e+=1);continue}if(A){if(g==="\\"){d+=g,C!==void 0&&(d+=C,e+=1);continue}g==='"'&&(A=!1),d+=g;continue}if(g==='"'){A=!0,d+=g;continue}if(g==="/"&&C==="/"){o=!0,e+=1;continue}if(g==="/"&&C==="*"){h=!0,e+=1;continue}d+=g}return d},ha=l=>{const d=[];for(const A of[l.dependencies,l.devDependencies,l.optionalDependencies,l.peerDependencies])if(A)for(const[o,h]of Object.entries(A))typeof h=="string"&&d.push({name:o,spec:h});return d},da=l=>{for(const d of l)if(typeof d=="object"&&!Array.isArray(d))return d},ga=l=>{if(!l)return[];const d=[];for(const A of["dependencies","optionalDependencies","peerDependencies"]){const o=l[A];o!==null&&typeof o=="object"&&!Array.isArray(o)&&d.push(...Object.keys(o))}return d},ma=l=>{if(Buffer.isBuffer(l.lockfileContent))return{message:"bun.lockb is binary; run `bun install --save-text-lockfile` to regenerate as bun.lock, then rerun `vis docker scaffold`.",status:"skipped"};const d=pa(l.lockfileContent);let A;try{A=JSON.parse(d)}catch(M){throw new et(`bun.lock: parse failed — ${M.message}`)}if(!A||typeof A!="object")throw new et("bun.lock: top-level value is not an object");const o=A.workspaces??{},h=A.packages??{},e=new Set([""]);for(const M of l.closure)e.add(M.relativeRoot===""?"":M.relativeRoot);const g={},C=[];for(const[M,re]of Object.entries(o))e.has(M)&&(g[M]=re,C.push(...ha(re)));const m=new Set;for(const{name:M}of C)m.add(M);const S=[...m];for(;S.length>0;){const M=S.shift();for(const re of Object.keys(h)){if(re.split("/")[0]!==M&&re!==M)continue;const ae=da(h[re]);for(const x of ga(ae))m.has(x)||(m.add(x),S.push(x))}}const E={};for(const[M,re]of Object.entries(h)){const ae=M.split("/")[0];(m.has(ae)||m.has(M))&&(E[M]=re)}const Y={...A,packages:E,workspaces:g},y=Object.keys(h).length,b=Object.keys(E).length,v=y-b;return{content:`${JSON.stringify(Y,null,2)}
|
|
3
3
|
`,message:`bun.lock: kept ${b}/${y} packages (dropped ${v})`,status:"pruned"}},Vr="node_modules/",ya=(l,d,A)=>{let o=d;for(;;){const h=o===""?`${Vr}${A}`:`${o}/${Vr}${A}`;if(l[h]!==void 0)return h;if(o==="")return;const e=o.lastIndexOf(`/${Vr.slice(0,-1)}/`);o=e===-1?"":o.slice(0,e)}},va=l=>{const d=[];for(const A of[l.dependencies,l.devDependencies,l.optionalDependencies,l.peerDependencies])if(A)for(const o of Object.keys(A))d.push(o);return d},Aa=l=>{const d=l.displayName??"package-lock.json",A=typeof l.lockfileContent=="string"?l.lockfileContent:l.lockfileContent.toString("utf8");let o;try{o=JSON.parse(A)}catch(v){throw new et(`${d}: parse failed — ${v.message}`)}if(!o||typeof o!="object")throw new et(`${d}: top-level value is not an object`);const h=o.packages??{},e=new Set([""]);for(const v of l.closure)v.relativeRoot!==""&&e.add(v.relativeRoot);const g=new Set,C=[];for(const v of Object.keys(h))e.has(v)&&(g.add(v),C.push(v));for(const[v,M]of Object.entries(h))M.link===!0&&typeof M.resolved=="string"&&e.has(M.resolved)&&g.add(v);for(;C.length>0;){const v=C.shift(),M=h[v];if(M)for(const re of va(M)){const ae=ya(h,v,re);if(!ae||g.has(ae))continue;g.add(ae);const x=h[ae];x.link===!0&&typeof x.resolved=="string"&&h[x.resolved]!==void 0&&!g.has(x.resolved)?(g.add(x.resolved),C.push(x.resolved)):C.push(ae)}}const m={};for(const v of Object.keys(h))g.has(v)&&(m[v]=h[v]);const S=m[""];S&&Array.isArray(S.workspaces)&&(S.workspaces=S.workspaces.filter(v=>{if(typeof v!="string")return!1;const M=v.replace(/\/?\*+$/,"").replace(/\/$/,"");if(M===""||M==="*")return!0;for(const re of e)if(re===v||re===M||re.startsWith(`${M}/`))return!0;return!1}));const E={...o,packages:m};delete E.dependencies;const Y=Object.keys(h).length,y=Object.keys(m).length,b=Y-y;return{content:`${JSON.stringify(E,null,2)}
|
|
4
4
|
`,message:`${d}: kept ${y}/${Y} entries (dropped ${b})`,status:"pruned"}};var Kr={},xe={},Zr,di;function ba(){if(di)return Zr;di=1;function l(o,h){function e(){this.constructor=o}e.prototype=h.prototype,o.prototype=new e}function d(o,h,e,g){this.message=o,this.expected=h,this.found=e,this.location=g,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,d)}l(d,Error),d.buildMessage=function(o,h){var e={literal:function(y){return'"'+C(y.text)+'"'},class:function(y){var b="",v;for(v=0;v<y.parts.length;v++)b+=y.parts[v]instanceof Array?m(y.parts[v][0])+"-"+m(y.parts[v][1]):m(y.parts[v]);return"["+(y.inverted?"^":"")+b+"]"},any:function(y){return"any character"},end:function(y){return"end of input"},other:function(y){return y.description}};function g(y){return y.charCodeAt(0).toString(16).toUpperCase()}function C(y){return y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+g(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+g(b)})}function m(y){return y.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(b){return"\\x0"+g(b)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(b){return"\\x"+g(b)})}function S(y){return e[y.type](y)}function E(y){var b=new Array(y.length),v,M;for(v=0;v<y.length;v++)b[v]=S(y[v]);if(b.sort(),b.length>0){for(v=1,M=1;v<b.length;v++)b[v-1]!==b[v]&&(b[M]=b[v],M++);b.length=M}switch(b.length){case 1:return b[0];case 2:return b[0]+" or "+b[1];default:return b.slice(0,-1).join(", ")+", or "+b[b.length-1]}}function Y(y){return y?'"'+C(y)+'"':"end of input"}return"Expected "+E(o)+" but "+Y(h)+" found."};function A(o,h){h=h!==void 0?h:{};var e={},g={Start:Jn},C=Jn,m=function(t){return t||[]},S=function(t,i,a){return[{command:t,type:i}].concat(a||[])},E=function(t,i){return[{command:t,type:i||";"}]},Y=function(t){return t},y=";",b=ce(";",!1),v="&",M=ce("&",!1),re=function(t,i){return i?{chain:t,then:i}:{chain:t}},ae=function(t,i){return{type:t,line:i}},x="&&",Z=ce("&&",!1),te="||",q=ce("||",!1),ue=function(t,i){return i?{...t,then:i}:t},Ce=function(t,i){return{type:t,chain:i}},ge="|&",Ae=ce("|&",!1),Ee="|",Oe=ce("|",!1),Fe="=",Ue=ce("=",!1),ye=function(t,i){return{name:t,args:[i]}},Me=function(t){return{name:t,args:[]}},Ze="(",$e=ce("(",!1),ee=")",Ne=ce(")",!1),De=function(t,i){return{type:"subshell",subshell:t,args:i}},Re="{",qe=ce("{",!1),we="}",W=ce("}",!1),U=function(t,i){return{type:"group",group:t,args:i}},ie=function(t,i){return{type:"command",args:i,envs:t}},ve=function(t){return{type:"envs",envs:t}},Je=function(t){return t},ze=function(t){return t},Pe=/^[0-9]/,Ye=We([["0","9"]],!1,!1),tt=function(t,i,a){return{type:"redirection",subtype:i,fd:t!==null?parseInt(t):null,args:[a]}},rt=">>",Ct=ce(">>",!1),st=">&",ut=ce(">&",!1),wt=">",He=ce(">",!1),ht="<<<",Xe=ce("<<<",!1),Ve="<&",dt=ce("<&",!1),St="<",gt=ce("<",!1),r=function(t){return{type:"argument",segments:[].concat(...t)}},$=function(t){return t},j="$'",K=ce("$'",!1),P="'",u=ce("'",!1),w=function(t){return[{type:"text",text:t}]},O='""',R=ce('""',!1),N=function(){return{type:"text",text:""}},H='"',T=ce('"',!1),z=function(t){return t},G=function(t){return{type:"arithmetic",arithmetic:t,quoted:!0}},ne=function(t){return{type:"shell",shell:t,quoted:!0}},de=function(t){return{type:"variable",...t,quoted:!0}},le=function(t){return{type:"text",text:t}},_e=function(t){return{type:"arithmetic",arithmetic:t,quoted:!1}},kr=function(t){return{type:"shell",shell:t,quoted:!1}},Er=function(t){return{type:"variable",...t,quoted:!1}},nr=function(t){return{type:"glob",pattern:t}},Tt=/^[^']/,Lt=We(["'"],!0,!1),mt=function(t){return t.join("")},ir=/^[^$"]/,or=We(["$",'"'],!0,!1),Ht=`\\
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as et}from"node:module";import{m as ii,a as dt,f as mu}from"./index-
|
|
1
|
+
import{createRequire as et}from"node:module";import{m as ii,a as dt,f as mu}from"./index-BVuCxe14.js";import{a as rt}from"./readJsonSync-DuMMeB3s-Cx08VBQg.js";const nt=et(import.meta.url),vo=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zo=i=>{if(typeof vo<"u"&&vo.versions&&vo.versions.node){const[o,e]=vo.versions.node.split(".").map(Number);if(o>22||o===22&&e>=3||o===20&&e>=16)return vo.getBuiltinModule(i)}return nt(i)},{existsSync:at,rmSync:wu,writeFileSync:ut,readdirSync:ju,statSync:gt}=Zo("node:fs"),{spawn:$n}=Zo("node:child_process"),{createHash:tt}=Zo("node:crypto"),{homedir:st,platform:ht}=Zo("node:os"),{createRequire:fu}=Zo("node:module"),qe=()=>ii(st(),".vis"),lt=()=>ii(qe(),"cache"),yX=()=>ii(qe(),"state"),vt=i=>tt("sha256").update(i).digest("hex").slice(0,12),cX=i=>ii(qe(),"workspaces",vt(i)),yt=".vis",Ie=i=>ii(i,yt),bX="node_modules/.cache/vis",pX=i=>ii(Ie(i),"runs"),wX=i=>ii(Ie(i),"last-summary.json"),jX=i=>ii(Ie(i),"last-failures"),mX=i=>{const o=ht()==="win32";for(const e of[".task-runner",".task-runner-cache"]){const n=ii(i,e);if(at(n))try{const a=o?$n("cmd.exe",["/c","rmdir","/s","/q",n],{detached:!0,stdio:"ignore"}):$n("rm",["-rf",n],{detached:!0,stdio:"ignore"});a.on("error",()=>{}),a.unref()}catch{}}},ct={iec:[{long:"Bytes",short:"B"},{long:"Kibibytes",short:"KiB"},{long:"Mebibytes",short:"MiB"},{long:"Gibibytes",short:"GiB"},{long:"Tebibytes",short:"TiB"},{long:"Pebibytes",short:"PiB"},{long:"Exbibytes",short:"EiB"},{long:"Zebibytes",short:"ZiB"},{long:"Yobibytes",short:"YiB"}],iec_octet:[{long:"Octets",short:"o"},{long:"Kibioctets",short:"Kio"},{long:"Mebioctets",short:"Mio"},{long:"Gibioctets",short:"Gio"},{long:"Tebioctets",short:"Tio"},{long:"Pebioctets",short:"Pio"},{long:"Exbioctets",short:"Eio"},{long:"Zebioctets",short:"Zio"},{long:"Yobioctets",short:"Yio"}],metric:[{long:"Bytes",short:"Bytes"},{long:"Kilobytes",short:"KB"},{long:"Megabytes",short:"MB"},{long:"Gigabytes",short:"GB"},{long:"Terabytes",short:"TB"},{long:"Petabytes",short:"PB"},{long:"Exabytes",short:"EB"},{long:"Zettabytes",short:"ZB"},{long:"Yottabytes",short:"YB"}],metric_octet:[{long:"Octets",short:"o"},{long:"Kilo-octets",short:"ko"},{long:"Mega-octets",short:"Mo"},{long:"Giga-octets",short:"Go"},{long:"Tera-octets",short:"To"},{long:"Peta-octets",short:"Po"},{long:"Exa-octets",short:"Eo"},{long:"Zetta-octets",short:"Zo"},{long:"Yotta-octets",short:"Yo"}]},bt=[{long:"bits",short:"bit"},{long:"Kilobits",short:"kbit"},{long:"Megabits",short:"Mbit"},{long:"Gigabits",short:"Gbit"},{long:"Terabits",short:"Tbit"},{long:"Petabits",short:"Pbit"},{long:"Exabits",short:"Ebit"},{long:"Zettabits",short:"Zbit"},{long:"Yottabits",short:"Ybit"}],qn=new Map,In=(i,o)=>{const e=`${i}\0${JSON.stringify(o)}`;let n=qn.get(e);return n===void 0&&(n=new Intl.NumberFormat(i,o),qn.set(e,n)),n},pt=i=>{switch(i){case 2:return 1024;case 10:return 1e3;default:throw new Error("Unsupported base.")}},wt=(i,o,e)=>({maximumFractionDigits:i,minimumFractionDigits:i,...o,...e}),fX=(i,o)=>{if(typeof i!="number"||!Number.isFinite(i))throw new TypeError("Bytesize is not a number.");const{base:e,bits:n,decimals:a,locale:u,long:g,signed:d,unit:h,units:s,...l}={base:2,bits:!1,decimals:0,locale:"en-US",long:!1,signed:!1,units:"metric",...o},v=pt(e),r=n?i*8:i,c=Math.abs(r),y=o?.space??!0?" ":"",b=n?bt:ct[s],p=b.findIndex(B=>B.short===h),w=a<0?void 0:a,j=d?{signDisplay:"exceptZero"}:{};if(r===0){const B=p===-1?0:Math.min(p,b.length-1),K=b[B][g?"long":"short"];return In(u,{...j,...l}).format(0)+y+K}const Z=Math.max(0,Math.min(Math.floor(Math.log(c)/Math.log(v)),b.length-1)),X=p===-1?Z:p,A=b[X][g?"long":"short"],M=r/v**X;return In(u,wt(w,j,l)).format(M)+y+A},jt=(i,o,e,n,a,u,g,d,h,s,l,v,r,c)=>{const y={d:n,h:a,m:u,mo:o,ms:d,s:g,w:e,y:i};return y.future=h,y.past=s,y.decimal=l,v!==void 0&&(y.unitMap=v),y.groupSeparator=r,y.placeholderSeparator=c,y},mt={d:"d",day:"d",days:"d",h:"h",hour:"h",hours:"h",hr:"h",hrs:"h",m:"m",millisecond:"ms",milliseconds:"ms",min:"m",mins:"m",minute:"m",minutes:"m",mo:"mo",month:"mo",months:"mo",ms:"ms",s:"s",sec:"s",second:"s",seconds:"s",secs:"s",w:"w",week:"w",weeks:"w",y:"y",year:"y",years:"y",yr:"y",yrs:"y"},YX=jt(i=>`year${i===1?"":"s"}`,i=>`month${i===1?"":"s"}`,i=>`week${i===1?"":"s"}`,i=>`day${i===1?"":"s"}`,i=>`hour${i===1?"":"s"}`,i=>`minute${i===1?"":"s"}`,i=>`second${i===1?"":"s"}`,i=>`millisecond${i===1?"":"s"}`,"in %s","%s ago",".",mt,",","_"),ft="https://api.socket.dev/v0/purl?alerts=true",So=()=>ii(lt(),"socket-security"),Yt=3600*1e3,Yu=.4,Un=100,kt=i=>typeof i=="object"&&i!==null&&"id"in i&&"type"in i&&"name"in i&&"version"in i&&"alerts"in i&&"score"in i&&i.type==="npm",Lt=()=>{dt(So())},ku=(i,o)=>`${encodeURIComponent(i)}@${encodeURIComponent(o)}`,Zt=(i,o)=>{const e=ku(i,o),n=ii(So(),`${e}.json`);try{const a=rt(n);if(Date.now()-a.createdAt>a.ttlMs){wu(n,{force:!0});return}return a.report}catch{return}},St=(i,o,e,n)=>{const a=ku(i,o),u={createdAt:Date.now(),report:e,ttlMs:n};ut(ii(So(),`${a}.json`),JSON.stringify(u),"utf8")},Jt=i=>{const o=[i.license,i.maintenance,i.quality,i.supplyChain,i.vulnerability];return Number((o.reduce((e,n)=>e+n,0)/o.length).toFixed(2))},Ct=async(i,o={})=>{const{apiToken:e,cacheTtlMs:n=Yt,timeoutMs:a=15e3}=o,u=new Map;if(i.length===0||!e)return u;const g=[];for(const s of i){const l=Zt(s.name,s.version);l?u.set(`${s.name}@${s.version}`,l):g.push(s)}if(g.length===0)return u;const d=`Basic ${Buffer.from(`${e}:`).toString("base64")}`;Lt();const h=[];for(let s=0;s<g.length;s+=Un)h.push(g.slice(s,s+Un));for(const s of h){const l=s.map(c=>({purl:`pkg:npm/${c.name}@${c.version}`})),v=new AbortController,r=setTimeout(()=>{v.abort()},a);try{const c=await fetch(ft,{body:JSON.stringify({components:l}),headers:{Authorization:d,"Content-Type":"application/json","User-Agent":"@visulima/vis"},method:"POST",signal:v.signal});if(!c.ok)continue;const y=await c.text();Xt(y,s,u,n)}catch{}finally{clearTimeout(r)}}return u},Xt=(i,o,e,n)=>{const a=new Map;for(const g of o)a.set(`${g.name}@${g.version}`,g);const u=i.split(`}
|
|
2
2
|
`);for(const g of u){const d=g.trim();if(d)try{const h=JSON.parse(d.endsWith("}")?d:`${d}}`),s=`${h.namespace?`${h.namespace}/`:""}${h.name}`,l=`${s}@${h.version}`;if(!a.has(l))continue;const v=h.score.overall??Jt(h.score),r={alerts:h.alerts,author:h.author,id:h.id,license:h.license,name:h.name,score:{...h.score,overall:v},size:h.size,type:"npm",version:h.version};h.namespace&&(r.namespace=h.namespace),kt(r)&&(e.set(l,r),St(s,h.version,r,n))}catch{}}},Ht=i=>i.namespace?`${i.namespace}/${i.name}`:i.name,kX=i=>i>=.8?"excellent":i>=.6?"good":i>=.4?"fair":i>=.2?"poor":"critical",LX=i=>i>=.6?"green":i>=.4?"yellow":"red",ZX=i=>{const o=Ht(i),e=`score: ${String(Math.round(i.score.overall*100))}%`,n=i.alerts.length,a=n>0?`${String(n)} alert${n===1?"":"s"}`:"no alerts";return`${o}@${i.version} (${e}, ${a})`},SX=(i,o=Yu)=>{if(i.size===0)return"";let e=0,n=0,a=0,u=0,g=0,d=0;for(const s of i.values()){for(const l of s.alerts)switch(e++,l.severity){case"critical":{n++;break}case"high":{a++;break}case"medium":{u++;break}default:g++}s.score.overall<o&&d++}const h=[`Socket.dev: scanned ${String(i.size)} package${i.size===1?"":"s"}`];if(e>0){const s=[];n>0&&s.push(`${String(n)} critical`),a>0&&s.push(`${String(a)} high`),u>0&&s.push(`${String(u)} medium`),g>0&&s.push(`${String(g)} low`),h.push(` Alerts: ${String(e)} total (${s.join(", ")})`)}else h.push(" No security alerts found.");if(d>0){const s=Math.round(o*100);h.push(` ${String(d)} package${d===1?"":"s"} with low security score (<${String(s)}%)`)}return h.join(`
|
|
3
3
|
`)},Dt=()=>{const i=So();if(!mu(i))return 0;const o=ju(i).filter(e=>e.endsWith(".json"));for(const e of o)wu(ii(i,e),{force:!0});return o.length},Tt=()=>{const i=So();if(!mu(i))return{entries:0,newestEntry:void 0,oldestEntry:void 0,totalSizeBytes:0};const o=ju(i).filter(u=>u.endsWith(".json"));let e=0,n,a;for(const u of o){const g=gt(ii(i,u));e+=g.size;const{mtimeMs:d}=g;(n===void 0||d<n)&&(n=d),(a===void 0||d>a)&&(a=d)}return{entries:o.length,newestEntry:a,oldestEntry:n,totalSizeBytes:e}},Bt=(i,o)=>i?.enabled?{apiToken:i.apiToken??process.env.VIS_SOCKET_TOKEN,cacheTtlMs:i.cacheTtlMs,minimumScore:o??Yu,timeoutMs:i.timeoutMs}:void 0,JX=(i,o,e,n)=>{if(!e)return;const a=Date.now(),u=d=>{if(d.expiresAt){const h=Date.parse(d.expiresAt);if(!Number.isNaN(h)&&h<a)return!1}return!(n&&d.policies&&!d.policies.includes(n))},g=`${i}@${o}`;if(e[g]&&u(e[g]))return e[g];if(e[i]&&u(e[i]))return e[i];for(const[d,h]of Object.entries(e))if(d.endsWith("*")&&i.startsWith(d.slice(0,-1))&&u(h))return h},CX=(i,o,e,n)=>[" // Add to security.acceptedRisks in vis.config.ts:",` ${`"${i}"`}: {`,` reason: "${n}",`,` acceptedAt: "${new Date().toISOString()}",`,` acceptedScore: ${String(e)},`,' policies: ["score"],'," },"].join(`
|
|
4
4
|
`),XX=(i,o={})=>{const e=Bt(i,o.minimumScore);if(e)return{clearCache:Dt,displayName:"Socket.dev",fetchReports:n=>Ct(n,e),getCacheStats:Tt,id:"socket"}},Mt=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Qt=12288,Gt=65510,xt=[12288,12288,65281,65376,65504,65510],Nt=8361,Wt=65518,Pt=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ft=32,Kt=10630,Rt=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],At=4352,_t=262141,Lu=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],Jo=(i,o)=>{let e=0,n=Math.floor(i.length/2)-1;for(;e<=n;){const a=Math.floor((e+n)/2),u=a*2;if(o<i[u])n=a-1;else if(o>i[u+1])e=a+1;else return!0}return!1},Vn=19968,[Ot,zt]=Et(Lu);function Et(i){let o=i[0],e=i[1];for(let n=0;n<i.length;n+=2){const a=i[n],u=i[n+1];if(Vn>=a&&Vn<=u)return[a,u];u-a>e-o&&(o=a,e=u)}return[o,e]}const $t=i=>i<161||i>1114109?!1:Jo(Mt,i),qt=i=>i<Qt||i>Gt?!1:Jo(xt,i),It=i=>i<Nt||i>Wt?!1:Jo(Pt,i),Ut=i=>i<Ft||i>Kt?!1:Jo(Rt,i),Vt=i=>i>=Ot&&i<=zt?!0:i<At||i>_t?!1:Jo(Lu,i);function is(i){return $t(i)?"ambiguous":qt(i)?"fullwidth":It(i)?"halfwidth":Ut(i)?"narrow":Vt(i)?"wide":"neutral"}function os(i){if(!Number.isSafeInteger(i))throw new TypeError(`Expected a code point, got \`${typeof i}\`.`)}function Zu(i){return os(i),is(i)}const Su=String.raw,ia=Su`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,es=()=>new RegExp(Su`\p{RI}{2}|(?)${ia}(?:\u200D${ia})*`,"gu"),HX=new Set(["\x1B",""]),ns="\x07",as="[",DX="m",us="]8;;",TX=39,BX=/[\u200B\uFEFF\u2060-\u2064]/g,MX=new RegExp(`(?:\\${as}(?<code>\\d+)m|\\${us}(?<uri>.*)${ns})`),QX=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),gs=/^[ \t]*(?:\r\n|\r|\n)/,ds=/(?:\r\n|\r|\n)[ \t]*$/,ts=/^(?:[\r\n]|$)/,ss=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,hs=/^[ \t]*[\r\n][ \t\r\n]*$/,rs=/\r\n|\n|\r/g,yo=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,GX=/\u001B\[[\d;]*m[^\u001B]*(?:\u001B\[[\d;]*m|$)/g,xX=/\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)[^\u001B]*\u001B\]8;;(?:\u0007|\u001B\\)/g,Qo=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,ci=es(),ls=/[-_./\s]+/g,we=/(\u001B\[[0-9;]*[a-z])/i,oa=new RegExp("\\p{Script=Arabic}","u"),vs=new RegExp("\\p{Script=Bengali}","u"),qi=new RegExp("\\p{Script=Cyrillic}","u"),ys=new RegExp("\\p{Script=Devanagari}","u"),cs=new RegExp("\\p{Script=Ethiopic}","u"),je=new RegExp("\\p{Script=Greek}","u"),ea=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),bs=new RegExp("\\p{Script=Gujarati}","u"),ps=new RegExp("\\p{Script=Gurmukhi}","u"),na=new RegExp("\\p{Script=Hangul}","u"),aa=new RegExp("\\p{Script=Hebrew}","u"),ws=new RegExp("\\p{Script=Hiragana}","u"),ua=new RegExp("\\p{Script=Han}","u"),js=new RegExp("\\p{Script=Kannada}","u"),ms=new RegExp("\\p{Script=Katakana}","u"),fs=new RegExp("\\p{Script=Khmer}","u"),Ys=new RegExp("\\p{Script=Lao}","u"),U=new RegExp("\\p{Script=Latin}","u"),ks=new RegExp("\\p{Script=Malayalam}","u"),Ls=new RegExp("\\p{Script=Myanmar}","u"),Zs=new RegExp("\\p{Script=Oriya}","u"),Ss=new RegExp("\\p{Script=Sinhala}","u"),Js=new RegExp("\\p{Script=Tamil}","u"),Cs=new RegExp("\\p{Script=Telugu}","u"),Xs=new RegExp("\\p{Script=Thai}","u"),Hs=new RegExp("\\p{Script=Tibetan}","u"),ga=/[\u02BB\u02BC\u0027]/u,Ds=i=>i.replace(ci,""),da=new Map,Ts=i=>[i.ambiguousIsNarrow?1:0,i.control,i.fullWidth,i.regular,i.wide].join("|"),Bs=i=>{const o=Ts(i.width);let e=da.get(o);return e||(e=new Map,da.set(o,e)),e},Go=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,Ju=i=>i>=32&&i<=126?"latin":i===8203||i===8204||i===8205||i===8288?"zero":i<=31||i>=127&&i<=159?"control":i>=160&&i<=255||i>=9472&&i<=9599?"latin":i>=4352&&i<=4607||i>=11904&&i<=40959||i>=44032&&i<=55215||i>=63744&&i<=64255||i>=65280&&i<=65519&&!(i>=65377&&i<=65439)||i>=12352&&i<=12543?"wide":i===8230?"latin":"other",Ms=(i,o)=>{const e=Bs(o),n=Math.floor(i/65536),a=i%65536;let u=e.get(n);if(u||(u=new Map,e.set(n,u)),u.has(a))return u.get(a);let g;switch(Ju(i)){case"control":{g=o.width.control;break}case"latin":{g=o.width.regular;break}case"wide":{g=o.width.wide;break}case"zero":{g=0;break}default:switch(Zu(i)){case"ambiguous":{g=o.width.ambiguousIsNarrow?o.width.regular:o.width.wide;break}case"fullwidth":{g=o.width.fullWidth;break}case"wide":{g=o.width.wide;break}default:g=o.width.regular}}return u.set(a,g),g},Qs=i=>i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071||i>=917760&&i<=917999||i>=65024&&i<=65039||i>=3633&&i<=3642||i>=3655&&i<=3662||i>=3761&&i<=3769||i>=3771&&i<=3772||i>=3784&&i<=3789||i>=2304&&i<=2307||i>=2362&&i<=2383||i>=2385&&i<=2391||i>=2402&&i<=2403||i>=2433&&i<=2435||i>=2492&&i<=2500||i>=2509&&i<=2509||i>=2561&&i<=2563||i>=2620&&i<=2637||i>=1611&&i<=1631||i>=1648&&i<=1648||i>=1750&&i<=1773||i>=2276&&i<=2302||i>=1425&&i<=1469||i>=1471&&i<=1471||i>=1473&&i<=1474||i>=1476&&i<=1477||i>=1479&&i<=1479||i>=3893&&i<=3893||i>=3895&&i<=3895||i>=3897&&i<=3897||i>=3953&&i<=3966||i>=3968&&i<=3972||i>=3974&&i<=3975?!0:i>=768&&i<=777||i>=803&&i<=803,Qe=(i,o={})=>{if(!i||i.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const e={truncation:{countAnsiEscapeCodes:o.countAnsiEscapeCodes??!1,ellipsis:o.ellipsis??"",ellipsisWidth:o.ellipsisWidth??(o.ellipsis?Qe(o.ellipsis,{...o,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:o.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:o.ambiguousIsNarrow??!1,ansi:o.ansiWidth??0,control:o.controlWidth??0,emoji:o.emojiWidth??2,fullWidth:o.fullWidth??2,halfWidth:o.halfWidth??1,regular:o.regularWidth??1,tab:o.tabWidth??8,wide:o.wideWidth??2}},n=Math.max(0,e.truncation.limit-e.truncation.ellipsisWidth),{length:a}=i,u=a>1e4;let g=0,d=0,h=a,s=!1;const l=i.includes("\x1B")||i.includes("");for(;g<a;){if(l&&(i[g]==="\x1B"||i[g]==="")){if(i.startsWith("\x1B]8;;",g)){const p="\x1B]8;;\x07",w=p.length,j=i.indexOf("\x07",g+5);if(j!==-1){const Z=i.indexOf(p,j+1);if(Z!==-1){const X=Z+w,A=i.slice(j+1,Z).replace(yo,""),M=Qe(A,{ambiguousIsNarrow:e.width.ambiguousIsNarrow,ansiWidth:e.width.ansi,controlWidth:e.width.control,countAnsiEscapeCodes:!1,ellipsis:e.truncation.ellipsis,ellipsisWidth:e.truncation.ellipsisWidth,emojiWidth:e.width.emoji,fullWidth:e.width.fullWidth,halfWidth:e.width.halfWidth,limit:Math.max(0,n-d),regularWidth:e.width.regular,tabWidth:e.width.tab,wideWidth:e.width.wide}),B=M.width;if(M.truncated)s=!0,h=Math.min(h,g);else if(d+B>n&&(h=Math.min(h,g),s=!0,d+B>e.truncation.limit))break;if(d+=B,g=X,s&&d>=e.truncation.limit)break;continue}}}if(yo.lastIndex=g,yo.test(i)){const p=yo.lastIndex-g,w=e.truncation.countAnsiEscapeCodes?p:e.width.ansi;if(d+w>n&&(h=Math.min(h,g),d+w>e.truncation.limit)){s=!0;break}d+=w,g=yo.lastIndex;continue}}const c=i.codePointAt(g);if(c===8203||c===65279||c>=8288&&c<=8292){g+=1;continue}if(c===9){if(d+e.width.tab>n&&(h=Math.min(h,g),d+e.width.tab>e.truncation.limit)){s=!0;break}d+=e.width.tab,g+=1;continue}if(Go.lastIndex=g,Go.test(i)){const p=(Go.lastIndex-g)*e.width.regular;if(d+p>n){const w=Math.floor((n-d)/e.width.regular);if(h=Math.min(h,g+w),d+p>e.truncation.limit){s=!0;break}}d+=p,g=Go.lastIndex;continue}if((c<=31||c>=127&&c<=159)&&(Qo.lastIndex=g,Qo.test(i))){const p=(Qo.lastIndex-g)*e.width.control;if(d+p>n&&(h=Math.min(h,g+Math.floor((n-d)/e.width.control)),d+p>e.truncation.limit)){s=!0;break}d+=p,g=Qo.lastIndex;continue}if(ci.lastIndex=g,ci.test(i)){if(d+e.width.emoji>n&&(h=Math.min(h,g),d+e.width.emoji>e.truncation.limit)){s=!0;break}d+=e.width.emoji,g=ci.lastIndex;continue}const y=i.codePointAt(g)??0;if(Qs(y)){g+=y>65535?2:1;continue}let b;if(u)b=Ms(y,e);else switch(Ju(y)){case"control":{b=e.width.control;break}case"latin":{b=e.width.regular;break}case"wide":{b=e.width.wide;break}case"zero":{b=0;break}default:switch(Zu(y)){case"ambiguous":{b=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{b=e.width.fullWidth;break}case"wide":{b=e.width.wide;break}default:b=e.width.regular}}if(d+b>n&&(h=Math.min(h,g),d+b>e.truncation.limit)){s=!0;break}d+=b,g+=y>65535?2:1}let v=d,r=!1;return s&&e.truncation.limit>=e.truncation.ellipsisWidth&&(v=e.truncation.limit,r=!0),{ellipsed:r,index:s?h:a,truncated:s,width:v}},NX=(i,o={})=>Qe(i,{...o,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width;class Gs{capacity;cache;constructor(o){this.capacity=o,this.cache=new Map}get(o){if(!this.cache.has(o))return;const e=this.cache.get(o);return this.cache.delete(o),this.cache.set(o,e),e}has(o){return this.cache.has(o)}set(o,e){if(this.cache.has(o))this.cache.delete(o);else if(this.cache.size>=this.capacity){const n=this.cache.keys().next().value;n!==void 0&&this.cache.delete(n)}this.cache.set(o,e)}delete(o){this.cache.delete(o)}clear(){this.cache.clear()}size(){return this.cache.size}}const xs=fu(import.meta.url),co=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ns=i=>{if(typeof co<"u"&&co.versions&&co.versions.node){const[o,e]=co.versions.node.split(".").map(Number);if(o>22||o===22&&e>=3||o===20&&e>=16)return co.getBuiltinModule(i)}return xs(i)},{stripVTControlCharacters:Ws}=Ns("node:util"),me=new Gs(1e3),Ps=/[.*+?^${}()|[\]\\]/g,Fs=i=>{const o=i.join("");if(me.has(o)){const a=me.get(o);return a.lastIndex=0,a}const e=i.map(a=>a.replaceAll(Ps,String.raw`\$&`)).join("|"),n=new RegExp(e,"g");return me.set(o,n),n},Ks=i=>{const o=[];let e=0,n;for(ci.lastIndex=0;(n=ci.exec(i))!==null;)n.index>e&&o.push(i.slice(e,n.index)),o.push(n[0]),e=ci.lastIndex;return e<i.length&&o.push(i.slice(e)),o.filter(Boolean)},Rs=/[ČŠŽĐ]/i,Cu=new Uint8Array(128),Xu=new Uint8Array(128),Hu=new Uint8Array(128);for(let i=0;i<128;i++)Cu[i]=i>=65&&i<=90?1:0,Xu[i]=i>=97&&i<=122?1:0,Hu[i]=i>=48&&i<=57?1:0;const fe=i=>Cu[i],ta=i=>Xu[i],Ye=i=>Hu[i],Bi=(i,o,e,n,a)=>{if(i.length===0)return[];let u=!1;const g=Object.values(o);for(const c of g)if(c(i[0])){u=!0;break}if(!u&&!e)return[i];const d=[...i],h=[];let s=d[0],l="other";const v=Object.entries(o);for(const c of v){const[y,b]=c;if(b(d[0])){l=y;break}}let r=e&&n?d[0]===d[0].toLocaleUpperCase(n):!1;for(let c=1;c<d.length;c++){const y=d[c];let b="other";for(const j of v){const[Z,X]=j;if(X(y)){b=Z;break}}const p=e&&n?y===y.toLocaleUpperCase(n):!1;let w=!1;a?w=a(l,b,r,p,y,c,d):(l!==b&&l!=="other"&&b!=="other"&&(w=!0),e&&b!=="other"&&!r&&p&&(w=!0)),w?(h.push(s),s=y):s+=y,l=b,e&&(r=p)}return s&&s.length>0&&h.push(s),h.length>0?h:[i]},As=(i,o,e,n)=>{if(e.size===0)return o;for(const a of e)if(i.startsWith(a,o))return n.push(a),o+a.length;return o},Du=(i,o=new Set)=>{if(i.length===0)return[];if(i.toUpperCase()===i)return[i];let e=0;const n=[],a=i.length;for(let u=1;u<a;u++){const g=As(i,e,o,n);if(g!==e){e=g,u=e-1;continue}const d=i.codePointAt(u-1),h=i.codePointAt(u),s=d&&d<128&&fe(d),l=h&&h<128&&fe(h),v=d&&d<128&&ta(d),r=d&&d<128&&Ye(d),c=h&&h<128&&Ye(h);if(v&&l){n.push(i.slice(e,u)),e=u;continue}if(r&&!c||!r&&c){n.push(i.slice(e,u)),e=u;continue}if(c&&!r){let y=!1,b=!1;if(u+1<a){const p=i.codePointAt(u+1);y=p&&p<128&&fe(p),b=p&&p<128&&Ye(p)}if(!b&&y){n.push(i.slice(e,u),i.slice(u,u+1)),e=u+1;continue}}if(u+1<a){const y=i.codePointAt(u+1),b=y&&y<128&&ta(y);if(s&&l&&b){const p=i.slice(e,u+1);o.has(p)||(n.push(i.slice(e,u)),e=u)}}}return e<a&&n.push(i.slice(e)),n.filter(u=>u!=="")},Tu=(i,o,e)=>{if(i.length===0)return[];const n=i===i.toLocaleUpperCase(o);if(o.startsWith("de")){if(!n&&i.replaceAll("ß","SS")===i.toLocaleUpperCase(o))return[i];const s=[...i],l=s.length,v=[];let r=s[0],c=s[0]===s[0].toLocaleUpperCase(o),y=c,b=c?0:-1;for(let p=1;p<l;p++){const w=s[p],j=w===w.toLocaleUpperCase(o);if(j===c)r+=w;else if(j)r&&r.length>0&&(v.push(r),r=w),y=!0,b=p;else{if(y&&p-b>1){const Z=s[p-1],X=r.slice(0,-1);X&&X.length>0&&v.push(X),r=Z+w}else r+=w;y=!1,b=-1}c=j}return r&&r.length>0&&v.push(r),v}if(o.startsWith("uk")||o.startsWith("ru")||o.startsWith("bg")||o.startsWith("sr")||o.startsWith("mk")||o.startsWith("be")){if(!qi.test(i)&&!U.test(i))return[i];const s=[...i],l=s.length,v=[];let r=s[0];const c=s[0];let y;qi.test(c)?y=1:U.test(c)?y=2:y=0;let b=c===c.toLocaleUpperCase(o);for(let w=1;w<l;w++){const j=s[w];let Z;qi.test(j)?Z=1:U.test(j)?Z=2:Z=0;const X=j===j.toLocaleUpperCase(o);y!==Z&&(y===1||y===2)&&(Z===1||Z===2)||Z===y&&!b&&X?(v.push(r),r=j):r+=j,y=Z,b=X}r&&r.length>0&&v.push(r);const p=[];for(let w=0;w<v.length;w++)w<v.length-1&&v[w].length===1&&U.test(v[w])&&qi.test(v[w+1][0])?(p.push(v[w]+v[w+1]),w+=1):p.push(v[w]);return p}if(o.startsWith("el")){if(!je.test(i)&&!U.test(i))return[i];const s=[];ea.lastIndex=0;let l;for(;(l=ea.exec(i))!==null;)s.push(l[0]);s.length===0&&s.push(i);const v=[];if(s.length===1){const r=s[0];if(!r||!je.test(r[0])||r.length===1)return[r??i]}for(const r of s){if(!r)continue;if(!je.test(r[0])||r.length===1){v.push(r);continue}const c=r.length;let y=r[0],b=r[0]===r[0].toLocaleUpperCase(o);for(let p=1;p<c;p++){const w=r[p],j=w===w.toLocaleUpperCase(o);!b&&j?(v.push(y),y=w):y+=w,b=j}y&&v.push(y)}return v}if(o.startsWith("ja")||o.startsWith("ko")){const s=o.startsWith("ja"),l=s?{hiragana:r=>ws.test(r),kanji:r=>ua.test(r),katakana:r=>ms.test(r),latin:r=>U.test(r)}:{hangul:r=>na.test(r),latin:r=>U.test(r)},v=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(s){const r=Bi(i,l,!1,o,(y,b)=>y==="hiragana"&&b==="katakana"||y==="katakana"&&b==="hiragana"||y==="hiragana"&&b==="latin"||y==="katakana"&&b==="latin"||y==="kanji"&&b==="latin"||y==="latin"&&(b==="hiragana"||b==="katakana"||b==="kanji")),c=[];for(const y of r){const b=y;b.length===1&&v.has(b)&&c.length>0?c[c.length-1]=c.at(-1)+b:c.push(b)}return c.length>0?c:[i]}return Bi(i,l,!1,o,(r,c)=>r==="hangul"&&c==="latin"||r==="latin"&&c==="hangul")}if(o.startsWith("sl")){const s=[...i],l=s.length,v=[];let r=s[0],c=s[0]===s[0].toLocaleUpperCase(o);for(let y=1;y<l;y++){const b=s[y],p=b===b.toLocaleUpperCase(o),w=Rs.test(b),j=y<l-1&&s[y+1]===s[y+1].toLocaleUpperCase(o);!c&&p||w&&j?(v.push(r),r=b,w&&j&&(v.push(r),r="")):r+=b,c=p}return r&&r.length>0&&v.push(r),v}if(o.startsWith("zh"))return Bi(i,{han:s=>ua.test(s),latin:s=>U.test(s)},!1,o);if(["ar","fa","he","ur"].includes(o.split("-")[0])){const s=l=>aa.test(l)||oa.test(l);return Bi(i,{latin:l=>U.test(l),rtl:l=>s(l)},!1,o)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(o.split("-")[0])){const s=l=>ys.test(l)||vs.test(l)||bs.test(l)||ps.test(l)||js.test(l)||Js.test(l)||Cs.test(l)||ks.test(l)||Ss.test(l)||Xs.test(l)||Ys.test(l)||Hs.test(l)||Ls.test(l)||cs.test(l)||fs.test(l)||Zs.test(l);return Bi(i,{indic:l=>s(l),latin:l=>U.test(l)},!1,o)}if(["be","bg","ru","sr","uk"].includes(o))return Bi(i,{cyrillic:s=>qi.test(s),latin:s=>U.test(s)},!0,o);if(["ar","fa","he"].includes(o))return Bi(i,{latin:s=>U.test(s),rtl:s=>aa.test(s)||oa.test(s)},!1,o);if(o.startsWith("ko"))return Bi(i,{hangul:s=>na.test(s),latin:s=>U.test(s)},!1,o);if(o.startsWith("uz")){if(!qi.test(i)&&!U.test(i))return[i];const s=[...i],l=s.length,v=[];let r=s[0],c=s[0]===s[0].toLocaleUpperCase(o);for(let y=1;y<l;y++){const b=s[y],p=b===b.toLocaleUpperCase(o);if(ga.test(b)||ga.test(s[y-1])){r+=b;continue}!c&&p?(v.push(r),r=b):r+=b,c=p}return r&&r.length>0&&v.push(r),v}const a=[...i],u=a.length,g=[];let d=a[0],h=a[0]===a[0].toLocaleUpperCase(o);for(const s of e)if(i.startsWith(s)){g.push(s),d=a[s.length],h=d===d.toLocaleUpperCase(o);break}for(let s=1;s<u;s++){const l=a[s],v=l===l.toLocaleUpperCase(o);let r=0;for(const c of e)if(i.startsWith(c,s)){g.push(d,c),r=c.length,d="";const y=c.at(-1);y&&(h=y===y.toLocaleUpperCase(o));break}if(r>0){s+=r-1;continue}!h&&v?(g.push(d),d=l):d+=l,h=v}return d&&g.push(d),g},_s=(i,o,e)=>{const n=[],a=we.test(i)?i.split(we).filter(Boolean):[i];for(const u of a){const g=u;if(we.test(g))n.push(g);else{ci.lastIndex=0;const d=ci.test(g)?Ks(g).filter(Boolean):[g];for(const h of d)if(ci.lastIndex=0,ci.test(h))n.push(h);else if(o){const s=o.toLowerCase().split("-")[0];n.push(...Tu(h,s,e))}else n.push(...Du(h,e))}}return n},WX=(i,o={})=>{if(!i||typeof i!="string")return[];const{handleAnsi:e=!1,handleEmoji:n=!1,knownAcronyms:a=[],locale:u,normalize:g=!1,separators:d,stripAnsi:h=!1,stripEmoji:s=!1}=o,l=new Set([...a].toSorted((w,j)=>j.length-w.length));let v=i;h&&(v=Ws(v)),s&&(v=Ds(v));let r;Array.isArray(d)?r=Fs(d):d instanceof RegExp?r=d:r=ls;const c=[];let y=v;const b=r.flags.includes("g")?r:new RegExp(r.source,`${r.flags}g`);for(;y.length>0;){const w=b.exec(y);if(!w){y===".."?c.push(".."):y==="."?c.push("."):y.length>0&&c.push(y);break}const j=w.index,Z=w[0],X=Z.length,A=y.slice(0,j),M=y.slice(j+X);if(Z.startsWith("../"))c.push(".."),y=y.slice(j+3);else if(Z.startsWith("./"))c.push("."),y=y.slice(j+2);else if(j===0&&Z==="..")c.push(".."),y=y.slice(2);else if(j===0&&Z===".")c.push("."),y=y.slice(1);else{A.length>0&&c.push(A);let B=0;for(;(B=Z.indexOf("../",B))!==-1;)c.push(".."),B+=3;for(B=0;(B=Z.indexOf("./",B))!==-1;)(B===0||Z[B-1]!==".")&&c.push("."),B+=2;let K=M;for(;K.startsWith("../");)c.push(".."),K=K.slice(3);for(;K.startsWith("./");)c.push("."),K=K.slice(2);if(K===".."){c.push("..");break}else if(K==="."){c.push(".");break}else y=K}b.lastIndex=0}if(c.length===0){const w=v.split(r).filter(Boolean);c.push(...w)}let p=[];for(const w of c)e||n?p.push(..._s(w,u,l)):u?p.push(...Tu(w,u,l)):p.push(...Du(w,l));return g&&(p=p.map(w=>l.has(w)?w:u&&w===w.toLocaleUpperCase(u)?w[0]+w.slice(1).toLocaleLowerCase(u):w.toUpperCase()===w&&!l.has(w)?w.slice(0,1)+w.slice(1).toLowerCase():w)),p},Os=fu(import.meta.url),bo=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zs=i=>{if(typeof bo<"u"&&bo.versions&&bo.versions.node){const[o,e]=bo.versions.node.split(".").map(Number);if(o>22||o===22&&e>=3||o===20&&e>=16)return bo.getBuiltinModule(i)}return Os(i)};zs("node:util");function Es(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ke,sa;function $s(){if(sa)return ke;sa=1,ke=o;function i(n){return n instanceof Buffer?Buffer.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function o(n){if(n=n||{},n.circles)return e(n);const a=new Map;if(a.set(Date,s=>new Date(s)),a.set(Map,(s,l)=>new Map(g(Array.from(s),l))),a.set(Set,(s,l)=>new Set(g(Array.from(s),l))),n.constructorHandlers)for(const s of n.constructorHandlers)a.set(s[0],s[1]);let u=null;return n.proto?h:d;function g(s,l){const v=Object.keys(s),r=new Array(v.length);for(let c=0;c<v.length;c++){const y=v[c],b=s[y];typeof b!="object"||b===null?r[y]=b:b.constructor!==Object&&(u=a.get(b.constructor))?r[y]=u(b,l):ArrayBuffer.isView(b)?r[y]=i(b):r[y]=l(b)}return r}function d(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return g(s,d);if(s.constructor!==Object&&(u=a.get(s.constructor)))return u(s,d);const l={};for(const v in s){if(Object.hasOwnProperty.call(s,v)===!1)continue;const r=s[v];typeof r!="object"||r===null?l[v]=r:r.constructor!==Object&&(u=a.get(r.constructor))?l[v]=u(r,d):ArrayBuffer.isView(r)?l[v]=i(r):l[v]=d(r)}return l}function h(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return g(s,h);if(s.constructor!==Object&&(u=a.get(s.constructor)))return u(s,h);const l={};for(const v in s){const r=s[v];typeof r!="object"||r===null?l[v]=r:r.constructor!==Object&&(u=a.get(r.constructor))?l[v]=u(r,h):ArrayBuffer.isView(r)?l[v]=i(r):l[v]=h(r)}return l}}function e(n){const a=[],u=[],g=new Map;if(g.set(Date,v=>new Date(v)),g.set(Map,(v,r)=>new Map(h(Array.from(v),r))),g.set(Set,(v,r)=>new Set(h(Array.from(v),r))),n.constructorHandlers)for(const v of n.constructorHandlers)g.set(v[0],v[1]);let d=null;return n.proto?l:s;function h(v,r){const c=Object.keys(v),y=new Array(c.length);for(let b=0;b<c.length;b++){const p=c[b],w=v[p];if(typeof w!="object"||w===null)y[p]=w;else if(w.constructor!==Object&&(d=g.get(w.constructor)))y[p]=d(w,r);else if(ArrayBuffer.isView(w))y[p]=i(w);else{const j=a.indexOf(w);j!==-1?y[p]=u[j]:y[p]=r(w)}}return y}function s(v){if(typeof v!="object"||v===null)return v;if(Array.isArray(v))return h(v,s);if(v.constructor!==Object&&(d=g.get(v.constructor)))return d(v,s);const r={};a.push(v),u.push(r);for(const c in v){if(Object.hasOwnProperty.call(v,c)===!1)continue;const y=v[c];if(typeof y!="object"||y===null)r[c]=y;else if(y.constructor!==Object&&(d=g.get(y.constructor)))r[c]=d(y,s);else if(ArrayBuffer.isView(y))r[c]=i(y);else{const b=a.indexOf(y);b!==-1?r[c]=u[b]:r[c]=s(y)}}return a.pop(),u.pop(),r}function l(v){if(typeof v!="object"||v===null)return v;if(Array.isArray(v))return h(v,l);if(v.constructor!==Object&&(d=g.get(v.constructor)))return d(v,l);const r={};a.push(v),u.push(r);for(const c in v){const y=v[c];if(typeof y!="object"||y===null)r[c]=y;else if(y.constructor!==Object&&(d=g.get(y.constructor)))r[c]=d(y,l);else if(ArrayBuffer.isView(y))r[c]=i(y);else{const b=a.indexOf(y);b!==-1?r[c]=u[b]:r[c]=l(y)}}return a.pop(),u.pop(),r}}return ke}var qs=$s();const Bu=Es(qs);Bu();var Mu=typeof global=="object"&&global&&global.Object===Object&&global,Is=typeof self=="object"&&self&&self.Object===Object&&self,_=Mu||Is||Function("return this")(),E=_.Symbol,Qu=Object.prototype,Us=Qu.hasOwnProperty,Vs=Qu.toString,po=E?E.toStringTag:void 0;function ih(i){var o=Us.call(i,po),e=i[po];try{i[po]=void 0;var n=!0}catch{}var a=Vs.call(i);return n&&(o?i[po]=e:delete i[po]),a}var oh=Object.prototype,eh=oh.toString;function nh(i){return eh.call(i)}var ah="[object Null]",uh="[object Undefined]",ha=E?E.toStringTag:void 0;function q(i){return i==null?i===void 0?uh:ah:ha&&ha in Object(i)?ih(i):nh(i)}function P(i){return i!=null&&typeof i=="object"}var gh="[object Symbol]";function ai(i){return typeof i=="symbol"||P(i)&&q(i)==gh}var dh=NaN;function ra(i){return typeof i=="number"?i:ai(i)?dh:+i}function N(i,o){for(var e=-1,n=i==null?0:i.length,a=Array(n);++e<n;)a[e]=o(i[e],e,i);return a}var L=Array.isArray,la=E?E.prototype:void 0,va=la?la.toString:void 0;function ui(i){if(typeof i=="string")return i;if(L(i))return N(i,ui)+"";if(ai(i))return va?va.call(i):"";var o=i+"";return o=="0"&&1/i==-1/0?"-0":o}function zo(i,o){return function(e,n){var a;if(e===void 0&&n===void 0)return o;if(e!==void 0&&(a=e),n!==void 0){if(a===void 0)return n;typeof e=="string"||typeof n=="string"?(e=ui(e),n=ui(n)):(e=ra(e),n=ra(n)),a=i(e,n)}return a}}var th=zo(function(i,o){return i+o},0),sh=/\s/;function Gu(i){for(var o=i.length;o--&&sh.test(i.charAt(o)););return o}var hh=/^\s+/;function xu(i){return i&&i.slice(0,Gu(i)+1).replace(hh,"")}function W(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}var ya=NaN,rh=/^[-+]0x[0-9a-f]+$/i,lh=/^0b[01]+$/i,vh=/^0o[0-7]+$/i,yh=parseInt;function si(i){if(typeof i=="number")return i;if(ai(i))return ya;if(W(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=W(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=xu(i);var e=lh.test(i);return e||vh.test(i)?yh(i.slice(2),e?2:8):rh.test(i)?ya:+i}var ca=1/0,ch=17976931348623157e292;function Si(i){if(!i)return i===0?i:0;if(i=si(i),i===ca||i===-ca){var o=i<0?-1:1;return o*ch}return i===i?i:0}function S(i){var o=Si(i),e=o%1;return o===o?e?o-e:o:0}var bh="Expected a function";function ph(i,o){if(typeof o!="function")throw new TypeError(bh);return i=S(i),function(){if(--i<1)return o.apply(this,arguments)}}function oi(i){return i}var wh="[object AsyncFunction]",jh="[object Function]",mh="[object GeneratorFunction]",fh="[object Proxy]";function Ji(i){if(!W(i))return!1;var o=q(i);return o==jh||o==mh||o==wh||o==fh}var Wo=_["__core-js_shared__"],ba=(function(){var i=/[^.]+$/.exec(Wo&&Wo.keys&&Wo.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function Yh(i){return!!ba&&ba in i}var kh=Function.prototype,Lh=kh.toString;function Oi(i){if(i!=null){try{return Lh.call(i)}catch{}try{return i+""}catch{}}return""}var Zh=/[\\^$.*+?()[\]{}|]/g,Sh=/^\[object .+?Constructor\]$/,Jh=Function.prototype,Ch=Object.prototype,Xh=Jh.toString,Hh=Ch.hasOwnProperty,Dh=RegExp("^"+Xh.call(Hh).replace(Zh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nu(i){if(!W(i)||Yh(i))return!1;var o=Ji(i)?Dh:Sh;return o.test(Oi(i))}function Th(i,o){return i?.[o]}function zi(i,o){var e=Th(i,o);return Nu(e)?e:void 0}var mo=zi(_,"WeakMap"),Ro=mo&&new mo,Wu=Ro?function(i,o){return Ro.set(i,o),i}:oi,pa=Object.create,no=(function(){function i(){}return function(o){if(!W(o))return{};if(pa)return pa(o);i.prototype=o;var e=new i;return i.prototype=void 0,e}})();function fo(i){return function(){var o=arguments;switch(o.length){case 0:return new i;case 1:return new i(o[0]);case 2:return new i(o[0],o[1]);case 3:return new i(o[0],o[1],o[2]);case 4:return new i(o[0],o[1],o[2],o[3]);case 5:return new i(o[0],o[1],o[2],o[3],o[4]);case 6:return new i(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new i(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var e=no(i.prototype),n=i.apply(e,o);return W(n)?n:e}}var Bh=1;function Mh(i,o,e){var n=o&Bh,a=fo(i);function u(){var g=this&&this!==_&&this instanceof u?a:i;return g.apply(n?e:this,arguments)}return u}function gi(i,o,e){switch(e.length){case 0:return i.call(o);case 1:return i.call(o,e[0]);case 2:return i.call(o,e[0],e[1]);case 3:return i.call(o,e[0],e[1],e[2])}return i.apply(o,e)}var Qh=Math.max;function Pu(i,o,e,n){for(var a=-1,u=i.length,g=e.length,d=-1,h=o.length,s=Qh(u-g,0),l=Array(h+s),v=!n;++d<h;)l[d]=o[d];for(;++a<g;)(v||a<u)&&(l[e[a]]=i[a]);for(;s--;)l[d++]=i[a++];return l}var Gh=Math.max;function Fu(i,o,e,n){for(var a=-1,u=i.length,g=-1,d=e.length,h=-1,s=o.length,l=Gh(u-d,0),v=Array(l+s),r=!n;++a<l;)v[a]=i[a];for(var c=a;++h<s;)v[c+h]=o[h];for(;++g<d;)(r||a<u)&&(v[c+e[g]]=i[a++]);return v}function xh(i,o){for(var e=i.length,n=0;e--;)i[e]===o&&++n;return n}function Eo(){}var Nh=4294967295;function C(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nh,this.__views__=[]}C.prototype=no(Eo.prototype);C.prototype.constructor=C;function Ue(){}var Ve=Ro?function(i){return Ro.get(i)}:Ue,Vi={},Wh=Object.prototype,Ph=Wh.hasOwnProperty;function Po(i){for(var o=i.name+"",e=Vi[o],n=Ph.call(Vi,o)?e.length:0;n--;){var a=e[n],u=a.func;if(u==null||u==i)return a.name}return o}function ri(i,o){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=void 0}ri.prototype=no(Eo.prototype);ri.prototype.constructor=ri;function V(i,o){var e=-1,n=i.length;for(o||(o=Array(n));++e<n;)o[e]=i[e];return o}function Ku(i){if(i instanceof C)return i.clone();var o=new ri(i.__wrapped__,i.__chain__);return o.__actions__=V(i.__actions__),o.__index__=i.__index__,o.__values__=i.__values__,o}var Fh=Object.prototype,Kh=Fh.hasOwnProperty;function t(i){if(P(i)&&!L(i)&&!(i instanceof C)){if(i instanceof ri)return i;if(Kh.call(i,"__wrapped__"))return Ku(i)}return new ri(i)}t.prototype=Eo.prototype;t.prototype.constructor=t;function Ge(i){var o=Po(i),e=t[o];if(typeof e!="function"||!(o in C.prototype))return!1;if(i===e)return!0;var n=Ve(e);return!!n&&i===n[0]}var Rh=800,Ah=16,_h=Date.now;function Ru(i){var o=0,e=0;return function(){var n=_h(),a=Ah-(n-e);if(e=n,a>0){if(++o>=Rh)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}var Au=Ru(Wu),Oh=/\{\n\/\* \[wrapped with (.+)\] \*/,zh=/,? & /;function Eh(i){var o=i.match(Oh);return o?o[1].split(zh):[]}var $h=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function qh(i,o){var e=o.length;if(!e)return i;var n=e-1;return o[n]=(e>1?"& ":"")+o[n],o=o.join(e>2?", ":" "),i.replace($h,`{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as m}from"node:module";import{m as _}from"./index-
|
|
1
|
+
import{createRequire as m}from"node:module";import{m as _}from"./index-BVuCxe14.js";import{a as F}from"./env-Cpxa_7UE.js";const p=m(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=r=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,e]=o.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return o.getBuiltinModule(r)}return p(r)},{mkdirSync:f,writeFileSync:h,readdirSync:g}=c("node:fs"),{readFile:y}=c("node:fs/promises"),n=r=>F(r),a=(r,t)=>_(n(r),`${encodeURIComponent(t)}.json`);class S{#t;#e;constructor(t,e){this.#t=t,this.#e=e}printTaskTerminalOutput(t,e,s){if(e!=="failure")return;const i=n(this.#t);try{f(i,{recursive:!0})}catch{return}const u=t.overrides.command,d=t.projectRoot,l={command:u,cwd:d,exitCode:void 0,hash:t.hash,runId:this.#e,status:e,taskId:t.id,terminalOutput:s,timestamp:new Date().toISOString()};try{h(a(this.#t,t.id),`${JSON.stringify(l,void 0,2)}
|
|
2
2
|
`,"utf8")}catch{}}}const I=async(r,t)=>{const e=a(r,t);try{const s=await y(e,"utf8");return JSON.parse(s)}catch{return}},O=r=>{const t=n(r);let e;try{e=g(t)}catch{return[]}const s=[];for(const i of e)if(i.endsWith(".json"))try{s.push(decodeURIComponent(i.slice(0,-5)))}catch{}return s};export{S as F,I as a,O as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as o}from"./index-BVuCxe14.js";const r=async(s,a)=>await o(s,a);export{r as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as Zr}from"./_commonjsHelpers-B5Y90VFO.js";var k={exports:{}},se,er;function x(){return er||(er=1,se={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}),se}var ie,rr;function H(){return rr||(rr=1,ie=process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...l)=>console.error("SEMVER",...l):()=>{}),ie}var tr;function B(){return tr||(tr=1,(function(a,l){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:t,MAX_LENGTH:s}=x(),E=H();l=a.exports={};const o=l.re=[],p=l.safeRe=[],r=l.src=[],R=l.safeSrc=[],e=l.t={};let i=0;const u="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",s],[u,t]],L=S=>{for(const[w,M]of m)S=S.split(`${w}*`).join(`${w}{0,${M}}`).split(`${w}+`).join(`${w}{1,${M}}`);return S},h=(S,w,M)=>{const y=L(w),D=i++;E(S,D,w),e[S]=D,r[D]=w,R[D]=y,o[D]=new RegExp(w,M?"g":void 0),p[D]=new RegExp(y,M?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),h("MAINVERSION",`(${r[e.NUMERICIDENTIFIER]})\\.(${r[e.NUMERICIDENTIFIER]})\\.(${r[e.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${r[e.NUMERICIDENTIFIERLOOSE]})\\.(${r[e.NUMERICIDENTIFIERLOOSE]})\\.(${r[e.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${r[e.NONNUMERICIDENTIFIER]}|${r[e.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${r[e.NONNUMERICIDENTIFIER]}|${r[e.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${r[e.PRERELEASEIDENTIFIER]}(?:\\.${r[e.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${r[e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${r[e.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${u}+`),h("BUILD",`(?:\\+(${r[e.BUILDIDENTIFIER]}(?:\\.${r[e.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${r[e.MAINVERSION]}${r[e.PRERELEASE]}?${r[e.BUILD]}?`),h("FULL",`^${r[e.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${r[e.MAINVERSIONLOOSE]}${r[e.PRERELEASELOOSE]}?${r[e.BUILD]}?`),h("LOOSE",`^${r[e.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${r[e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${r[e.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${r[e.XRANGEIDENTIFIER]})(?:\\.(${r[e.XRANGEIDENTIFIER]})(?:\\.(${r[e.XRANGEIDENTIFIER]})(?:${r[e.PRERELEASE]})?${r[e.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${r[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[e.XRANGEIDENTIFIERLOOSE]})(?:${r[e.PRERELEASELOOSE]})?${r[e.BUILD]}?)?)?`),h("XRANGE",`^${r[e.GTLT]}\\s*${r[e.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${r[e.GTLT]}\\s*${r[e.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${r[e.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",r[e.COERCEPLAIN]+`(?:${r[e.PRERELEASE]})?(?:${r[e.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",r[e.COERCE],!0),h("COERCERTLFULL",r[e.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${r[e.LONETILDE]}\\s+`,!0),l.tildeTrimReplace="$1~",h("TILDE",`^${r[e.LONETILDE]}${r[e.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${r[e.LONETILDE]}${r[e.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${r[e.LONECARET]}\\s+`,!0),l.caretTrimReplace="$1^",h("CARET",`^${r[e.LONECARET]}${r[e.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${r[e.LONECARET]}${r[e.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${r[e.GTLT]}\\s*(${r[e.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${r[e.GTLT]}\\s*(${r[e.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${r[e.GTLT]}\\s*(${r[e.LOOSEPLAIN]}|${r[e.XRANGEPLAIN]})`,!0),l.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${r[e.XRANGEPLAIN]})\\s+-\\s+(${r[e.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${r[e.XRANGEPLAINLOOSE]})\\s+-\\s+(${r[e.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(k,k.exports)),k.exports}var ne,sr;function We(){if(sr)return ne;sr=1;const a=Object.freeze({loose:!0}),l=Object.freeze({});return ne=t=>t?typeof t!="object"?a:t:l,ne}var ae,ir;function Hr(){if(ir)return ae;ir=1;const a=/^[0-9]+$/,l=(t,s)=>{if(typeof t=="number"&&typeof s=="number")return t===s?0:t<s?-1:1;const E=a.test(t),o=a.test(s);return E&&o&&(t=+t,s=+s),t===s?0:E&&!o?-1:o&&!E?1:t<s?-1:1};return ae={compareIdentifiers:l,rcompareIdentifiers:(t,s)=>l(s,t)},ae}var oe,nr;function G(){if(nr)return oe;nr=1;const a=H(),{MAX_LENGTH:l,MAX_SAFE_INTEGER:n}=x(),{safeRe:t,t:s}=B(),E=We(),{compareIdentifiers:o}=Hr(),p=(R,e)=>{const i=e.split(".");if(i.length>R.length)return!1;for(let u=0;u<i.length;u++)if(o(R[u],i[u])!==0)return!1;return!0};class r{constructor(e,i){if(i=E(i),e instanceof r){if(e.loose===!!i.loose&&e.includePrerelease===!!i.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>l)throw new TypeError(`version is longer than ${l} characters`);a("SemVer",e,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const u=e.trim().match(i.loose?t[s.LOOSE]:t[s.FULL]);if(!u)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(m=>{if(/^[0-9]+$/.test(m)){const L=+m;if(L>=0&&L<n)return L}return m}):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(a("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let i=0;do{const u=this.prerelease[i],m=e.prerelease[i];if(a("prerelease compare",i,u,m),u===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(u===void 0)return-1;if(u!==m)return o(u,m)}while(++i)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let i=0;do{const u=this.build[i],m=e.build[i];if(a("build compare",i,u,m),u===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(u===void 0)return-1;if(u!==m)return o(u,m)}while(++i)}inc(e,i,u){if(e.startsWith("pre")){if(!i&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const m=`-${i}`.match(this.options.loose?t[s.PRERELEASELOOSE]:t[s.PRERELEASE]);if(!m||m[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,u),this.inc("pre",i,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,u),this.inc("pre",i,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const m=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[m];else{let L=this.prerelease.length;for(;--L>=0;)typeof this.prerelease[L]=="number"&&(this.prerelease[L]++,L=-2);if(L===-1){if(i===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(m)}}if(i){let L=[i,m];if(u===!1&&(L=[i]),p(this.prerelease,i)){const h=this.prerelease[i.split(".").length];isNaN(h)&&(this.prerelease=L)}else this.prerelease=L}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return oe=r,oe}var ue,ar;function j(){if(ar)return ue;ar=1;const a=G();return ue=(n,t,s=!1)=>{if(n instanceof a)return n;try{return new a(n,t)}catch(E){if(!s)return null;throw E}},ue}var le,or;function Jr(){if(or)return le;or=1;const a=j();return le=(n,t)=>{const s=a(n,t);return s?s.version:null},le}var ce,ur;function Kr(){if(ur)return ce;ur=1;const a=j();return ce=(n,t)=>{const s=a(n.trim().replace(/^[=v]+/,""),t);return s?s.version:null},ce}var pe,lr;function Qr(){if(lr)return pe;lr=1;const a=G();return pe=(n,t,s,E,o)=>{typeof s=="string"&&(o=E,E=s,s=void 0);try{return new a(n instanceof a?n.version:n,s).inc(t,E,o).version}catch{return null}},pe}var he,cr;function et(){if(cr)return he;cr=1;const a=j();return he=(n,t)=>{const s=a(n,null,!0),E=a(t,null,!0),o=s.compare(E);if(o===0)return null;const p=o>0,r=p?s:E,R=p?E:s,e=!!r.prerelease.length;if(R.prerelease.length&&!e){if(!R.patch&&!R.minor)return"major";if(R.compareMain(r)===0)return R.minor&&!R.patch?"minor":"patch"}const i=e?"pre":"";return s.major!==E.major?i+"major":s.minor!==E.minor?i+"minor":s.patch!==E.patch?i+"patch":"prerelease"},he}var Ee,pr;function rt(){if(pr)return Ee;pr=1;const a=G();return Ee=(n,t)=>new a(n,t).major,Ee}var fe,hr;function tt(){if(hr)return fe;hr=1;const a=G();return fe=(n,t)=>new a(n,t).minor,fe}var me,Er;function st(){if(Er)return me;Er=1;const a=G();return me=(n,t)=>new a(n,t).patch,me}var Re,fr;function it(){if(fr)return Re;fr=1;const a=j();return Re=(n,t)=>{const s=a(n,t);return s&&s.prerelease.length?s.prerelease:null},Re}var ve,mr;function F(){if(mr)return ve;mr=1;const a=G();return ve=(n,t,s)=>new a(n,s).compare(new a(t,s)),ve}var $e,Rr;function nt(){if(Rr)return $e;Rr=1;const a=F();return $e=(n,t,s)=>a(t,n,s),$e}var de,vr;function at(){if(vr)return de;vr=1;const a=F();return de=(n,t)=>a(n,t,!0),de}var Ie,$r;function ze(){if($r)return Ie;$r=1;const a=G();return Ie=(n,t,s)=>{const E=new a(n,s),o=new a(t,s);return E.compare(o)||E.compareBuild(o)},Ie}var Le,dr;function ot(){if(dr)return Le;dr=1;const a=ze();return Le=(n,t)=>n.sort((s,E)=>a(s,E,t)),Le}var ge,Ir;function ut(){if(Ir)return ge;Ir=1;const a=ze();return ge=(n,t)=>n.sort((s,E)=>a(E,s,t)),ge}var Ne,Lr;function Y(){if(Lr)return Ne;Lr=1;const a=F();return Ne=(n,t,s)=>a(n,t,s)>0,Ne}var Se,gr;function Ze(){if(gr)return Se;gr=1;const a=F();return Se=(n,t,s)=>a(n,t,s)<0,Se}var Oe,Nr;function Yr(){if(Nr)return Oe;Nr=1;const a=F();return Oe=(n,t,s)=>a(n,t,s)===0,Oe}var Ae,Sr;function Wr(){if(Sr)return Ae;Sr=1;const a=F();return Ae=(n,t,s)=>a(n,t,s)!==0,Ae}var Te,Or;function Je(){if(Or)return Te;Or=1;const a=F();return Te=(n,t,s)=>a(n,t,s)>=0,Te}var qe,Ar;function Ke(){if(Ar)return qe;Ar=1;const a=F();return qe=(n,t,s)=>a(n,t,s)<=0,qe}var we,Tr;function zr(){if(Tr)return we;Tr=1;const a=Yr(),l=Wr(),n=Y(),t=Je(),s=Ze(),E=Ke();return we=(p,r,R,e)=>{switch(r){case"===":return typeof p=="object"&&(p=p.version),typeof R=="object"&&(R=R.version),p===R;case"!==":return typeof p=="object"&&(p=p.version),typeof R=="object"&&(R=R.version),p!==R;case"":case"=":case"==":return a(p,R,e);case"!=":return l(p,R,e);case">":return n(p,R,e);case">=":return t(p,R,e);case"<":return s(p,R,e);case"<=":return E(p,R,e);default:throw new TypeError(`Invalid operator: ${r}`)}},we}var Pe,qr;function lt(){if(qr)return Pe;qr=1;const a=G(),l=j(),{safeRe:n,t}=B();return Pe=(E,o)=>{if(E instanceof a)return E;if(typeof E=="number"&&(E=String(E)),typeof E!="string")return null;o=o||{};let p=null;if(!o.rtl)p=E.match(o.includePrerelease?n[t.COERCEFULL]:n[t.COERCE]);else{const m=o.includePrerelease?n[t.COERCERTLFULL]:n[t.COERCERTL];let L;for(;(L=m.exec(E))&&(!p||p.index+p[0].length!==E.length);)(!p||L.index+L[0].length!==p.index+p[0].length)&&(p=L),m.lastIndex=L.index+L[1].length+L[2].length;m.lastIndex=-1}if(p===null)return null;const r=p[2],R=p[3]||"0",e=p[4]||"0",i=o.includePrerelease&&p[5]?`-${p[5]}`:"",u=o.includePrerelease&&p[6]?`+${p[6]}`:"";return l(`${r}.${R}.${e}${i}${u}`,o)},Pe}var Ce,wr;function ct(){if(wr)return Ce;wr=1;const a=j(),l=x(),n=G(),t=(p,r,R)=>{if(!l.RELEASE_TYPES.includes(r))return null;const e=s(p,R);return e&&E(e,r)},s=(p,r)=>{const R=p instanceof n?p.version:p;return a(R,r)},E=(p,r)=>{if(o(r))return p.version;switch(p.prerelease=[],r){case"major":p.minor=0,p.patch=0;break;case"minor":p.patch=0;break}return p.format()},o=p=>p.startsWith("pre");return Ce=t,Ce}var _e,Pr;function pt(){if(Pr)return _e;Pr=1;class a{constructor(){this.max=1e3,this.map=new Map}get(n){const t=this.map.get(n);if(t!==void 0)return this.map.delete(n),this.map.set(n,t),t}delete(n){return this.map.delete(n)}set(n,t){if(!this.delete(n)&&t!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(n,t)}return this}}return _e=a,_e}var Me,Cr;function b(){if(Cr)return Me;Cr=1;const a=/\s+/g;class l{constructor(c,$){if($=s($),c instanceof l)return c.loose===!!$.loose&&c.includePrerelease===!!$.includePrerelease?c:new l(c.raw,$);if(c instanceof E)return this.raw=c.value,this.set=[[c]],this.formatted=void 0,this;if(this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease,this.raw=c.trim().replace(a," "),this.set=this.raw.split("||").map(d=>this.parseRange(d.trim())).filter(d=>d.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const d=this.set[0];if(this.set=this.set.filter(N=>!w(N[0])),this.set.length===0)this.set=[d];else if(this.set.length>1){for(const N of this.set)if(N.length===1&&M(N[0])){this.set=[N];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let c=0;c<this.set.length;c++){c>0&&(this.formatted+="||");const $=this.set[c];for(let d=0;d<$.length;d++)d>0&&(this.formatted+=" "),this.formatted+=$[d].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(c){c=c.replace(S,"");const $=((this.options.includePrerelease&&L)|(this.options.loose&&h))+":"+c,d=t.get($);if(d)return d;const N=this.options.loose,v=N?r[e.HYPHENRANGELOOSE]:r[e.HYPHENRANGE];c=c.replace(v,re(this.options.includePrerelease)),o("hyphen replace",c),c=c.replace(r[e.COMPARATORTRIM],i),o("comparator trim",c),c=c.replace(r[e.TILDETRIM],u),o("tilde trim",c),c=c.replace(r[e.CARETTRIM],m),o("caret trim",c);let I=c.split(" ").map(C=>D(C,this.options)).join(" ").split(/\s+/).map(C=>ee(C,this.options));N&&(I=I.filter(C=>(o("loose invalid filter",C,this.options),!!C.match(r[e.COMPARATORLOOSE])))),o("range list",I);const A=new Map,q=I.map(C=>new E(C,this.options));for(const C of q){if(w(C))return[C];A.set(C.value,C)}A.size>1&&A.has("")&&A.delete("");const T=[...A.values()];return t.set($,T),T}intersects(c,$){if(!(c instanceof l))throw new TypeError("a Range is required");return this.set.some(d=>y(d,$)&&c.set.some(N=>y(N,$)&&d.every(v=>N.every(I=>v.intersects(I,$)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new p(c,this.options)}catch{return!1}for(let $=0;$<this.set.length;$++)if(te(this.set[$],c,this.options))return!0;return!1}}Me=l;const n=pt(),t=new n,s=We(),E=W(),o=H(),p=G(),{safeRe:r,src:R,t:e,comparatorTrimReplace:i,tildeTrimReplace:u,caretTrimReplace:m}=B(),{FLAG_INCLUDE_PRERELEASE:L,FLAG_LOOSE:h}=x(),S=new RegExp(R[e.BUILD],"g"),w=f=>f.value==="<0.0.0-0",M=f=>f.value==="",y=(f,c)=>{let $=!0;const d=f.slice();let N=d.pop();for(;$&&d.length;)$=d.every(v=>N.intersects(v,c)),N=d.pop();return $},D=(f,c)=>(f=f.replace(r[e.BUILD],""),o("comp",f,c),f=X(f,c),o("caret",f),f=_(f,c),o("tildes",f),f=J(f,c),o("xrange",f),f=Q(f,c),o("stars",f),f),O=f=>!f||f.toLowerCase()==="x"||f==="*",P=(f,c,$)=>O(f)&&!O(c)||O(c)&&$&&!O($),_=(f,c)=>f.trim().split(/\s+/).map($=>g($,c)).join(" "),g=(f,c)=>{const $=c.loose?r[e.TILDELOOSE]:r[e.TILDE],d=c.includePrerelease?"-0":"";return f.replace($,(N,v,I,A,q)=>{o("tilde",f,N,v,I,A,q);let T;return O(v)?T="":O(I)?T=`>=${v}.0.0${d} <${+v+1}.0.0-0`:O(A)?T=`>=${v}.${I}.0${d} <${v}.${+I+1}.0-0`:q?(o("replaceTilde pr",q),T=`>=${v}.${I}.${A}-${q} <${v}.${+I+1}.0-0`):T=`>=${v}.${I}.${A} <${v}.${+I+1}.0-0`,o("tilde return",T),T})},X=(f,c)=>f.trim().split(/\s+/).map($=>Z($,c)).join(" "),Z=(f,c)=>{o("caret",f,c);const $=c.loose?r[e.CARETLOOSE]:r[e.CARET],d=c.includePrerelease?"-0":"";return f.replace($,(N,v,I,A,q)=>{o("caret",f,N,v,I,A,q);let T;return O(v)?T="":O(I)?T=`>=${v}.0.0${d} <${+v+1}.0.0-0`:O(A)?v==="0"?T=`>=${v}.${I}.0${d} <${v}.${+I+1}.0-0`:T=`>=${v}.${I}.0${d} <${+v+1}.0.0-0`:q?(o("replaceCaret pr",q),v==="0"?I==="0"?T=`>=${v}.${I}.${A}-${q} <${v}.${I}.${+A+1}-0`:T=`>=${v}.${I}.${A}-${q} <${v}.${+I+1}.0-0`:T=`>=${v}.${I}.${A}-${q} <${+v+1}.0.0-0`):(o("no pr"),v==="0"?I==="0"?T=`>=${v}.${I}.${A} <${v}.${I}.${+A+1}-0`:T=`>=${v}.${I}.${A} <${v}.${+I+1}.0-0`:T=`>=${v}.${I}.${A} <${+v+1}.0.0-0`),o("caret return",T),T})},J=(f,c)=>(o("replaceXRanges",f,c),f.split(/\s+/).map($=>K($,c)).join(" ")),K=(f,c)=>{f=f.trim();const $=c.loose?r[e.XRANGELOOSE]:r[e.XRANGE];return f.replace($,(d,N,v,I,A,q)=>{if(o("xRange",f,d,N,v,I,A,q),P(v,I,A))return f;const T=O(v),C=T||O(I),U=C||O(A),V=U;return N==="="&&V&&(N=""),q=c.includePrerelease?"-0":"",T?N===">"||N==="<"?d="<0.0.0-0":d="*":N&&V?(C&&(I=0),A=0,N===">"?(N=">=",C?(v=+v+1,I=0,A=0):(I=+I+1,A=0)):N==="<="&&(N="<",C?v=+v+1:I=+I+1),N==="<"&&(q="-0"),d=`${N+v}.${I}.${A}${q}`):C?d=`>=${v}.0.0${q} <${+v+1}.0.0-0`:U&&(d=`>=${v}.${I}.0${q} <${v}.${+I+1}.0-0`),o("xRange return",d),d})},Q=(f,c)=>(o("replaceStars",f,c),f.trim().replace(r[e.STAR],"")),ee=(f,c)=>(o("replaceGTE0",f,c),f.trim().replace(r[c.includePrerelease?e.GTE0PRE:e.GTE0],"")),re=f=>(c,$,d,N,v,I,A,q,T,C,U,V)=>(O(d)?$="":O(N)?$=`>=${d}.0.0${f?"-0":""}`:O(v)?$=`>=${d}.${N}.0${f?"-0":""}`:I?$=`>=${$}`:$=`>=${$}${f?"-0":""}`,O(T)?q="":O(C)?q=`<${+T+1}.0.0-0`:O(U)?q=`<${T}.${+C+1}.0-0`:V?q=`<=${T}.${C}.${U}-${V}`:f?q=`<${T}.${C}.${+U+1}-0`:q=`<=${q}`,`${$} ${q}`.trim()),te=(f,c,$)=>{for(let d=0;d<f.length;d++)if(!f[d].test(c))return!1;if(c.prerelease.length&&!$.includePrerelease){for(let d=0;d<f.length;d++)if(o(f[d].semver),f[d].semver!==E.ANY&&f[d].semver.prerelease.length>0){const N=f[d].semver;if(N.major===c.major&&N.minor===c.minor&&N.patch===c.patch)return!0}return!1}return!0};return Me}var De,_r;function W(){if(_r)return De;_r=1;const a=Symbol("SemVer ANY");class l{static get ANY(){return a}constructor(e,i){if(i=n(i),e instanceof l){if(e.loose===!!i.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),o("comparator",e,i),this.options=i,this.loose=!!i.loose,this.parse(e),this.semver===a?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(e){const i=this.options.loose?t[s.COMPARATORLOOSE]:t[s.COMPARATOR],u=e.match(i);if(!u)throw new TypeError(`Invalid comparator: ${e}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new p(u[2],this.options.loose):this.semver=a}toString(){return this.value}test(e){if(o("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if(typeof e=="string")try{e=new p(e,this.options)}catch{return!1}return E(e,this.operator,this.semver,this.options)}intersects(e,i){if(!(e instanceof l))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new r(e.value,i).test(this.value):e.operator===""?e.value===""?!0:new r(this.value,i).test(e.semver):(i=n(i),i.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!i.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||E(this.semver,"<",e.semver,i)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||E(this.semver,">",e.semver,i)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}De=l;const n=We(),{safeRe:t,t:s}=B(),E=zr(),o=H(),p=G(),r=b();return De}var Ge,Mr;function z(){if(Mr)return Ge;Mr=1;const a=b();return Ge=(n,t,s)=>{try{t=new a(t,s)}catch{return!1}return t.test(n)},Ge}var ye,Dr;function ht(){if(Dr)return ye;Dr=1;const a=b();return ye=(n,t)=>new a(n,t).set.map(s=>s.map(E=>E.value).join(" ").trim().split(" ")),ye}var Fe,Gr;function Et(){if(Gr)return Fe;Gr=1;const a=G(),l=b();return Fe=(t,s,E)=>{let o=null,p=null,r=null;try{r=new l(s,E)}catch{return null}return t.forEach(R=>{r.test(R)&&(!o||p.compare(R)===-1)&&(o=R,p=new a(o,E))}),o},Fe}var be,yr;function ft(){if(yr)return be;yr=1;const a=G(),l=b();return be=(t,s,E)=>{let o=null,p=null,r=null;try{r=new l(s,E)}catch{return null}return t.forEach(R=>{r.test(R)&&(!o||p.compare(R)===1)&&(o=R,p=new a(o,E))}),o},be}var je,Fr;function mt(){if(Fr)return je;Fr=1;const a=G(),l=b(),n=Y();return je=(s,E)=>{s=new l(s,E);let o=new a("0.0.0");if(s.test(o)||(o=new a("0.0.0-0"),s.test(o)))return o;o=null;for(let p=0;p<s.set.length;++p){const r=s.set[p];let R=null;r.forEach(e=>{const i=new a(e.semver.version);switch(e.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!R||n(i,R))&&(R=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),R&&(!o||n(o,R))&&(o=R)}return o&&s.test(o)?o:null},je}var Ue,br;function Rt(){if(br)return Ue;br=1;const a=b();return Ue=(n,t)=>{try{return new a(n,t).range||"*"}catch{return null}},Ue}var Xe,jr;function Qe(){if(jr)return Xe;jr=1;const a=G(),l=W(),{ANY:n}=l,t=b(),s=z(),E=Y(),o=Ze(),p=Ke(),r=Je();return Xe=(e,i,u,m)=>{e=new a(e,m),i=new t(i,m);let L,h,S,w,M;switch(u){case">":L=E,h=p,S=o,w=">",M=">=";break;case"<":L=o,h=r,S=E,w="<",M="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,i,m))return!1;for(let y=0;y<i.set.length;++y){const D=i.set[y];let O=null,P=null;if(D.forEach(_=>{_.semver===n&&(_=new l(">=0.0.0")),O=O||_,P=P||_,L(_.semver,O.semver,m)?O=_:S(_.semver,P.semver,m)&&(P=_)}),O.operator===w||O.operator===M||(!P.operator||P.operator===w)&&h(e,P.semver)||P.operator===M&&S(e,P.semver))return!1}return!0},Xe}var Ve,Ur;function vt(){if(Ur)return Ve;Ur=1;const a=Qe();return Ve=(n,t,s)=>a(n,t,">",s),Ve}var xe,Xr;function $t(){if(Xr)return xe;Xr=1;const a=Qe();return xe=(n,t,s)=>a(n,t,"<",s),xe}var Be,Vr;function dt(){if(Vr)return Be;Vr=1;const a=b();return Be=(n,t,s)=>(n=new a(n,s),t=new a(t,s),n.intersects(t,s)),Be}var ke,xr;function It(){if(xr)return ke;xr=1;const a=z(),l=F();return ke=(n,t,s)=>{const E=[];let o=null,p=null;const r=n.sort((u,m)=>l(u,m,s));for(const u of r)a(u,t,s)?(p=u,o||(o=u)):(p&&E.push([o,p]),p=null,o=null);o&&E.push([o,null]);const R=[];for(const[u,m]of E)u===m?R.push(u):!m&&u===r[0]?R.push("*"):m?u===r[0]?R.push(`<=${m}`):R.push(`${u} - ${m}`):R.push(`>=${u}`);const e=R.join(" || "),i=typeof t.raw=="string"?t.raw:String(t);return e.length<i.length?e:t},ke}var He,Br;function Lt(){if(Br)return He;Br=1;const a=b(),l=W(),{ANY:n}=l,t=z(),s=F(),E=(i,u,m={})=>{if(i===u)return!0;i=new a(i,m),u=new a(u,m);let L=!1;e:for(const h of i.set){for(const S of u.set){const w=r(h,S,m);if(L=L||w!==null,w)continue e}if(L)return!1}return!0},o=[new l(">=0.0.0-0")],p=[new l(">=0.0.0")],r=(i,u,m)=>{if(i===u)return!0;if(i.length===1&&i[0].semver===n){if(u.length===1&&u[0].semver===n)return!0;m.includePrerelease?i=o:i=p}if(u.length===1&&u[0].semver===n){if(m.includePrerelease)return!0;u=p}const L=new Set;let h,S;for(const g of i)g.operator===">"||g.operator===">="?h=R(h,g,m):g.operator==="<"||g.operator==="<="?S=e(S,g,m):L.add(g.semver);if(L.size>1)return null;let w;if(h&&S&&(w=s(h.semver,S.semver,m),w>0||w===0&&(h.operator!==">="||S.operator!=="<=")))return null;for(const g of L){if(h&&!t(g,String(h),m)||S&&!t(g,String(S),m))return null;for(const X of u)if(!t(g,String(X),m))return!1;return!0}let M,y,D,O,P=S&&!m.includePrerelease&&S.semver.prerelease.length?S.semver:!1,_=h&&!m.includePrerelease&&h.semver.prerelease.length?h.semver:!1;P&&P.prerelease.length===1&&S.operator==="<"&&P.prerelease[0]===0&&(P=!1);for(const g of u){if(O=O||g.operator===">"||g.operator===">=",D=D||g.operator==="<"||g.operator==="<=",h){if(_&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===_.major&&g.semver.minor===_.minor&&g.semver.patch===_.patch&&(_=!1),g.operator===">"||g.operator===">="){if(M=R(h,g,m),M===g&&M!==h)return!1}else if(h.operator===">="&&!g.test(h.semver))return!1}if(S){if(P&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===P.major&&g.semver.minor===P.minor&&g.semver.patch===P.patch&&(P=!1),g.operator==="<"||g.operator==="<="){if(y=e(S,g,m),y===g&&y!==S)return!1}else if(S.operator==="<="&&!g.test(S.semver))return!1}if(!g.operator&&(S||h)&&w!==0)return!1}return!(h&&D&&!S&&w!==0||S&&O&&!h&&w!==0||_||P)},R=(i,u,m)=>{if(!i)return u;const L=s(i.semver,u.semver,m);return L>0?i:L<0||u.operator===">"&&i.operator===">="?u:i},e=(i,u,m)=>{if(!i)return u;const L=s(i.semver,u.semver,m);return L<0?i:L>0||u.operator==="<"&&i.operator==="<="?u:i};return He=E,He}var Ye,kr;function gt(){if(kr)return Ye;kr=1;const a=B(),l=x(),n=G(),t=Hr(),s=j(),E=Jr(),o=Kr(),p=Qr(),r=et(),R=rt(),e=tt(),i=st(),u=it(),m=F(),L=nt(),h=at(),S=ze(),w=ot(),M=ut(),y=Y(),D=Ze(),O=Yr(),P=Wr(),_=Je(),g=Ke(),X=zr(),Z=lt(),J=ct(),K=W(),Q=b(),ee=z(),re=ht(),te=Et(),f=ft(),c=mt(),$=Rt(),d=Qe(),N=vt(),v=$t(),I=dt(),A=It(),q=Lt();return Ye={parse:s,valid:E,clean:o,inc:p,diff:r,major:R,minor:e,patch:i,prerelease:u,compare:m,rcompare:L,compareLoose:h,compareBuild:S,sort:w,rsort:M,gt:y,lt:D,eq:O,neq:P,gte:_,lte:g,cmp:X,coerce:Z,truncate:J,Comparator:K,Range:Q,satisfies:ee,toComparators:re,maxSatisfying:te,minSatisfying:f,minVersion:c,validRange:$,outside:d,gtr:N,ltr:v,intersects:I,simplifyRange:A,subset:q,SemVer:n,re:a.re,src:a.src,tokens:a.t,SEMVER_SPEC_VERSION:l.SEMVER_SPEC_VERSION,RELEASE_TYPES:l.RELEASE_TYPES,compareIdentifiers:t.compareIdentifiers,rcompareIdentifiers:t.rcompareIdentifiers},Ye}var Nt=gt();const Ot=Zr(Nt);export{Kr as a,Jr as r,Nt as s,Ot as u};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{createRequire as Pr}from"node:module";const Ir=Pr(import.meta.url),Et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fr=t=>{if(typeof Et<"u"&&Et.versions&&Et.versions.node){const[e,r]=Et.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Et.getBuiltinModule(t)}return Ir(t)},{createRequire:B}=Fr("node:module"),ke=0,Gr=4,Ur=Symbol("findUpStop"),eu=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,jr=/^[A-Z]:\//i,$t=(t="")=>t&&t.replaceAll("\\","/").replace(jr,e=>e.toUpperCase()),zr=/^[/\\]{2}/,Wr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,pr=/^[A-Z]:$/i,He=/^\/([A-Z]:)?$/i,qr=/.(\.[^./]+)$/,Xr=/^[/\\]|^[a-z]:[/\\]/i,Kr=/\/$/,Qr=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",ru="/",fr=(t,e)=>{let r="",o=0,n=-1,s=0,i;for(let u=0;u<=t.length;++u){if(u<t.length)i=t[u];else{if(i==="/")break;i="/"}if(i==="/"){if(!(n===u-1||s===1))if(s===2){if(r.length<2||o!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const a=r.lastIndexOf("/");a===-1?(r="",o=0):(r=r.slice(0,a),o=r.length-1-r.lastIndexOf("/")),n=u,s=0;continue}else if(r.length>0){r="",o=0,n=u,s=0;continue}}e&&(r+=r.length>0?"/..":"..",o=2)}else r.length>0?r+=`/${t.slice(n+1,u)}`:r=t.slice(n+1,u),o=u-n-1;n=u,s=0}else i==="."&&s!==-1?++s:s=-1}return r},bt=t=>Wr.test(t),ce=function(t){if(t.length===0)return".";t=$t(t);const e=zr.exec(t),r=bt(t),o=t.at(-1)==="/";return t=fr(t,!r),t.length===0?r?"/":o?"./":".":(o&&(t+="/"),pr.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!bt(t)?`/${t}`:t)},Zr=(...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const o=e.at(-1)==="/",n=r[0]==="/";o&&n?e+=r.slice(1):e+=o||n?r:`/${r}`}else e+=r;return ce(e)},vt=function(...t){t=t.map(o=>$t(o));let e="",r=!1;for(let o=t.length-1;o>=-1&&!r;o--){const n=o>=0?t[o]:Qr();!n||n.length===0||(e=`${n}/${e}`,r=bt(n))}return e=fr(e,!r),r&&!bt(e)?`/${e}`:e.length>0?e:"."},su=function(t){return $t(t)},Vr=function(t){return qr.exec($t(t))?.[1]??""},ou=function(t,e){const r=vt(t).replace(He,"$1").split("/"),o=vt(e).replace(He,"$1").split("/");if(o[0][1]===":"&&r[0][1]===":"&&r[0]!==o[0])return o.join("/");const n=Math.min(r.length,o.length);let s=0;for(;s<n&&r[s]===o[s];)s+=1;const i=r.length-s;return[...Array.from({length:i}).fill(".."),...o.slice(s)].join("/")},Ce=t=>{const e=$t(t).replace(Kr,""),r=e.lastIndexOf("/");if(r===-1)return bt(t)?"/":".";const o=e.slice(0,r);return pr.test(o)?`${o}/`:o||(bt(t)?"/":".")},hr=(t,e)=>{const r=$t(t),o=r.slice(r.lastIndexOf("/")+1);if(e&&o.endsWith(e)){if(e===r)return"";const n=o.slice(0,-e.length);if(n.length>0)return n}return o},Yr=function(t){const e=Xr.exec(t)?.[0]?.replaceAll("\\","/")??"",r=hr(t),o=Vr(r);return{base:r,dir:Ce(t),ext:o,name:r.slice(0,r.length-o.length),root:e}},Jr=B(import.meta.url),At=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ts=t=>{if(typeof At<"u"&&At.versions&&At.versions.node){const[e,r]=At.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return At.getBuiltinModule(t)}return Jr(t)},{fileURLToPath:es}=ts("node:url");function rs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Be,Me;function ss(){return Me||(Me=1,Be=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Be}var os=ss();const ns=rs(os);new Set(ns);const is=/^(?:\.?\.[/\\]|\.\.\B)/,nu=t=>is.test(t)||t==="..",ct=t=>$t(t instanceof URL?es(t):t);let us=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const pt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},ls=B(import.meta.url),xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=t=>{if(typeof xt<"u"&&xt.versions&&xt.versions.node){const[e,r]=xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return xt.getBuiltinModule(t)}return ls(t)};as("node:fs/promises");const cs=B(import.meta.url),St=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=t=>{if(typeof St<"u"&&St.versions&&St.versions.node){const[e,r]=St.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return St.getBuiltinModule(t)}return cs(t)};ps("node:fs");const pe=t=>{if(t.isFile())return"file";if(t.isDirectory())return"dir";if(t.isSymbolicLink())return"symlink"},fs=B(import.meta.url),wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hs=t=>{if(typeof wt<"u"&&wt.versions&&wt.versions.node){const[e,r]=wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return wt.getBuiltinModule(t)}return fs(t)},{lstat:De,mkdir:gs}=hs("node:fs/promises"),uu=async t=>{pt(t);try{const e=await De(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pe(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await gs(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=await De(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pe(r))}'`,{cause:e})}},ds=B(import.meta.url),Tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ys=t=>{if(typeof Tt<"u"&&Tt.versions&&Tt.versions.node){const[e,r]=Tt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Tt.getBuiltinModule(t)}return ds(t)},{lstatSync:Pe,mkdirSync:ms}=ys("node:fs"),lu=t=>{pt(t);try{const e=Pe(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pe(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{ms(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=Pe(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pe(r))}'`,{cause:e})}},bs=B(import.meta.url),Rt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$s=t=>{if(typeof Rt<"u"&&Rt.versions&&Rt.versions.node){const[e,r]=Rt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Rt.getBuiltinModule(t)}return bs(t)};$s("node:fs/promises");const vs=B(import.meta.url),_t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Es=t=>{if(typeof _t<"u"&&_t.versions&&_t.versions.node){const[e,r]=_t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return _t.getBuiltinModule(t)}return vs(t)};Es("node:fs");const As=B(import.meta.url),kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xs=t=>{if(typeof kt<"u"&&kt.versions&&kt.versions.node){const[e,r]=kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return kt.getBuiltinModule(t)}return As(t)};xs("node:fs/promises");const Ss=B(import.meta.url),Ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ws=t=>{if(typeof Ct<"u"&&Ct.versions&&Ct.versions.node){const[e,r]=Ct.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ct.getBuiltinModule(t)}return Ss(t)};ws("node:fs");const Ts=B(import.meta.url),Ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=t=>{if(typeof Ot<"u"&&Ot.versions&&Ot.versions.node){const[e,r]=Ot.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ot.getBuiltinModule(t)}return Ts(t)};Rs("node:fs/promises");const _s=B(import.meta.url),Nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ks=t=>{if(typeof Nt<"u"&&Nt.versions&&Nt.versions.node){const[e,r]=Nt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Nt.getBuiltinModule(t)}return _s(t)};ks("node:fs");B(import.meta.url);let Ie=class extends Error{root;constructor(e,r){super(`${e instanceof Error?e.message:String(e)} for path "${r}"`),this.cause=e,this.root=r}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const Fe=t=>{const e=t.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(r){throw new Error(`Invalid glob pattern: ${t}`,{cause:r})}};let Cs=class{name;path;#t;constructor(e,r,o){this.#t=e,this.name=r,this.path=o}isDirectory(){return this.#t.isDirectory()}isFile(){return this.#t.isFile()}isSymbolicLink(){return this.#t.isSymbolicLink()}};const Te=(t,e,r)=>new Cs(t,e,r),ae=(t,e,r,o)=>{if(Array.isArray(e)&&e.length>0&&!e.some(s=>t.endsWith(s)))return!1;const n=t.includes("\\")?t.replaceAll("\\","/"):t;return r&&!r.some(s=>s.test(n))?!1:!o?.some(s=>s.test(n))},Os=B(import.meta.url),Lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ns=t=>{if(typeof Lt<"u"&&Lt.versions&&Lt.versions.node){const[e,r]=Lt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Lt.getBuiltinModule(t)}return Os(t)};Ns("node:fs/promises");const Ls=B(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hs=t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return Ls(t)},{readdirSync:Bs,realpathSync:Ms,statSync:gr}=Hs("node:fs"),Ds=t=>{const e=ce(t),r=gr(e);return Te(r,hr(e),e)};function*Ps(t,e={}){const{extensions:r,followSymlinks:o=!1,includeDirs:n=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:u,maxDepth:a=Number.POSITIVE_INFINITY,skip:m}=e;if(pt(t),a<0)return;const h=e.visited??new Set,y=u?u.map(g=>typeof g=="string"?Fe(g):g):void 0,A=m?m.map(g=>typeof g=="string"?Fe(g):g):void 0;if(t=vt(ct(t)),n&&ae(t,r,y,A)&&(yield Ds(t)),!(a<1||!ae(t,void 0,void 0,A)))try{const g=Bs(t,{withFileTypes:!0});for(const $ of g){let _=Zr(t,$.name),R=$.isDirectory(),L=$.isFile();if($.isSymbolicLink())if(o){const H=Ms(_);if(h.has(H))continue;_=H;const d=gr(H);R=d.isDirectory(),L=d.isFile()}else if(i&&ae(_,r,y,A)){yield Te($,$.name,ce(_));continue}else continue;R?(o&&h.add(_),yield*Ps(_,{extensions:r,followSymlinks:o,includeDirs:n,includeFiles:s,includeSymlinks:i,match:y,maxDepth:a-1,skip:A,visited:h})):L&&s&&ae(_,r,y,A)&&(yield Te($,$.name,ce(_)))}}catch(g){throw g instanceof Ie?g:new Ie(g,t)}}const Is=B(import.meta.url),Bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fs=t=>{if(typeof Bt<"u"&&Bt.versions&&Bt.versions.node){const[e,r]=Bt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Bt.getBuiltinModule(t)}return Is(t)};Fs("node:fs/promises");const Gs=B(import.meta.url),Mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Us=t=>{if(typeof Mt<"u"&&Mt.versions&&Mt.versions.node){const[e,r]=Mt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Mt.getBuiltinModule(t)}return Gs(t)},{statSync:js,lstatSync:zs}=Us("node:fs"),pu=(t,e={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=e.cwd?ct(e.cwd):process.cwd();let o=vt(r);const{root:n}=Yr(o),s=ct(e.stopAt??n),i=vt(o,s),u=e.type??"file",a=function(h){return typeof t=="function"?[t(h)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};e.allowSymlinks??=!0;const m=e.allowSymlinks?js:zs;for(;o&&o!==i&&o!==n;){for(let h of a(o)){if(h===Ur)return;if(h===void 0)continue;Buffer.isBuffer(h)?h=h.toString():h instanceof URL&&(h=ct(h));const y=bt(h)?h:vt(o,h);try{const A=m(y);if(u==="file"&&A.isFile()||u==="directory"&&A.isDirectory())return y}catch{}}o=Ce(o)}};function Oe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ge={},de,Ue;function fe(){if(Ue)return de;Ue=1;const t="[^\\\\/]",e=Symbol("unignore"),r="\\.",o="\\+",n="\\?",s="\\/",i="(?=.)",u="[^/]",a=`(?:${s}|$)`,m=`(?:^|${s})`,h=`${r}{1,2}${a}`,y=`(?!${r})`,A=`(?!${m}${h})`,g=`(?!${r}{0,1}${a})`,$=`(?!${h})`,_=`[^.${s}]`,R=`${u}*?`,L="/",H={DOT_LITERAL:r,PLUS_LITERAL:o,QMARK_LITERAL:n,SLASH_LITERAL:s,ONE_CHAR:i,QMARK:u,END_ANCHOR:a,DOTS_SLASH:h,NO_DOT:y,NO_DOTS:A,NO_DOT_SLASH:g,NO_DOTS_SLASH:$,QMARK_NO_DOT:_,STAR:R,START_ANCHOR:m,SEP:L},d={...H,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},E={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return de={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:E,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(l){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${l.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(l){return l===!0?d:H}},de}var je;function he(){return je||(je=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:n}=fe();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>o.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(n,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(r,i=>i==="\\"?"":i),t.escapeLast=(s,i,u)=>{const a=s.lastIndexOf(i,u);return a===-1?s:s[a-1]==="\\"?t.escapeLast(s,i,a-1):`${s.slice(0,a)}\\${s.slice(a)}`},t.removePrefix=(s,i={})=>{let u=s;return u.startsWith("./")&&(u=u.slice(2),i.prefix="./"),u},t.wrapOutput=(s,i={},u={})=>{const a=u.contains?"":"^",m=u.contains?"":"$";let h=`${a}(?:${s})${m}`;return i.negated===!0&&(h=`(?:^(?!${h}).*$)`),h},t.basename=(s,{windows:i}={})=>{const u=s.split(i?/[\\/]/:"/"),a=u[u.length-1];return a===""?u[u.length-2]:a}})(Ge)),Ge}var ye,ze;function Ws(){if(ze)return ye;ze=1;const t=he(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:n,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:m,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:y,CHAR_QUESTION_MARK:A,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:$,CHAR_RIGHT_SQUARE_BRACKET:_}=fe(),R=H=>H===u||H===o,L=H=>{H.isPrefix!==!0&&(H.depth=H.isGlobstar?1/0:1)};return ye=(H,d)=>{const E=d||{},l=H.length-1,T=E.parts===!0||E.scanToEnd===!0,C=[],S=[],w=[];let x=H,D=-1,G=0,J=0,at=!1,tt=!1,q=!1,et=!1,ft=!1,ot=!1,rt=!1,z=!1,nt=!1,Q=!1,ht=0,Z,k,P={value:"",depth:0,isGlob:!1};const K=()=>D>=l,f=()=>x.charCodeAt(D+1),U=()=>(Z=k,x.charCodeAt(++D));for(;D<l;){k=U();let V;if(k===o){rt=P.backslashes=!0,k=U(),k===a&&(ot=!0);continue}if(ot===!0||k===a){for(ht++;K()!==!0&&(k=U());){if(k===o){rt=P.backslashes=!0,U();continue}if(k===a){ht++;continue}if(ot!==!0&&k===s&&(k=U())===s){if(at=P.isBrace=!0,q=P.isGlob=!0,Q=!0,T===!0)continue;break}if(ot!==!0&&k===n){if(at=P.isBrace=!0,q=P.isGlob=!0,Q=!0,T===!0)continue;break}if(k===g&&(ht--,ht===0)){ot=!1,at=P.isBrace=!0,Q=!0;break}}if(T===!0)continue;break}if(k===u){if(C.push(D),S.push(P),P={value:"",depth:0,isGlob:!1},Q===!0)continue;if(Z===s&&D===G+1){G+=2;continue}J=D+1;continue}if(E.noext!==!0&&(k===y||k===r||k===e||k===A||k===i)&&f()===m){if(q=P.isGlob=!0,et=P.isExtglob=!0,Q=!0,k===i&&D===G&&(nt=!0),T===!0){for(;K()!==!0&&(k=U());){if(k===o){rt=P.backslashes=!0,k=U();continue}if(k===$){q=P.isGlob=!0,Q=!0;break}}continue}break}if(k===e){if(Z===e&&(ft=P.isGlobstar=!0),q=P.isGlob=!0,Q=!0,T===!0)continue;break}if(k===A){if(q=P.isGlob=!0,Q=!0,T===!0)continue;break}if(k===h){for(;K()!==!0&&(V=U());){if(V===o){rt=P.backslashes=!0,U();continue}if(V===_){tt=P.isBracket=!0,q=P.isGlob=!0,Q=!0;break}}if(T===!0)continue;break}if(E.nonegate!==!0&&k===i&&D===G){z=P.negated=!0,G++;continue}if(E.noparen!==!0&&k===m){if(q=P.isGlob=!0,T===!0){for(;K()!==!0&&(k=U());){if(k===m){rt=P.backslashes=!0,k=U();continue}if(k===$){Q=!0;break}}continue}break}if(q===!0){if(Q=!0,T===!0)continue;break}}E.noext===!0&&(et=!1,q=!1);let F=x,gt="",c="";G>0&&(gt=x.slice(0,G),x=x.slice(G),J-=G),F&&q===!0&&J>0?(F=x.slice(0,J),c=x.slice(J)):q===!0?(F="",c=x):F=x,F&&F!==""&&F!=="/"&&F!==x&&R(F.charCodeAt(F.length-1))&&(F=F.slice(0,-1)),E.unescape===!0&&(c&&(c=t.removeBackslashes(c)),F&&rt===!0&&(F=t.removeBackslashes(F)));const p={prefix:gt,input:H,start:G,base:F,glob:c,isBrace:at,isBracket:tt,isGlob:q,isExtglob:et,isGlobstar:ft,negated:z,negatedExtglob:nt};if(E.tokens===!0&&(p.maxDepth=0,R(k)||S.push(P),p.tokens=S),E.parts===!0||E.tokens===!0){let V;for(let M=0;M<C.length;M++){const st=V?V+1:G,it=C[M],Y=H.slice(st,it);E.tokens&&(M===0&&G!==0?(S[M].isPrefix=!0,S[M].value=gt):S[M].value=Y,L(S[M]),p.maxDepth+=S[M].depth),(M!==0||Y!=="")&&w.push(Y),V=it}if(V&&V+1<H.length){const M=H.slice(V+1);w.push(M),E.tokens&&(S[S.length-1].value=M,L(S[S.length-1]),p.maxDepth+=S[S.length-1].depth)}p.slashes=C,p.parts=w}return p},ye}var me,We;function qs(){if(We)return me;We=1;const t=fe(),e=he(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,u=(d,E)=>typeof E.expandRange=="function"?E.expandRange(...d,E):(d.sort(),`[${d.join("-")}]`),a=(d,E)=>`Missing ${d}: "${E}" - use "\\\\${E}" to match literal characters`,m=d=>{const E=[];let l=0,T=0,C=0,S="",w=!1;for(const x of d){if(w===!0){S+=x,w=!1;continue}if(x==="\\"){S+=x,w=!0;continue}if(x==='"'){C=C===1?0:1,S+=x;continue}if(C===0){if(x==="[")l++;else if(x==="]"&&l>0)l--;else if(l===0){if(x==="(")T++;else if(x===")"&&T>0)T--;else if(x==="|"&&T===0){E.push(S),S="";continue}}}S+=x}return E.push(S),E},h=d=>{let E=!1;for(const l of d){if(E===!0){E=!1;continue}if(l==="\\"){E=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},y=d=>{let E=d.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(E)&&(E=E.slice(2,-1),l=!0);if(h(E))return E.replace(/\\(.)/g,"$1")},A=d=>{const E=d.map(y).filter(Boolean);for(let l=0;l<E.length;l++)for(let T=l+1;T<E.length;T++){const C=E[l],S=E[T],w=C[0];if(!(!w||C!==w.repeat(C.length)||S!==w.repeat(S.length))&&(C===S||C.startsWith(S)||S.startsWith(C)))return!0}return!1},g=(d,E=!0)=>{if(d[0]!=="+"&&d[0]!=="*"||d[1]!=="(")return;let l=0,T=0,C=0,S=!1;for(let w=1;w<d.length;w++){const x=d[w];if(S===!0){S=!1;continue}if(x==="\\"){S=!0;continue}if(x==='"'){C=C===1?0:1;continue}if(C!==1){if(x==="["){l++;continue}if(x==="]"&&l>0){l--;continue}if(!(l>0)){if(x==="("){T++;continue}if(x===")"&&(T--,T===0))return E===!0&&w!==d.length-1?void 0:{type:d[0],body:d.slice(2,w),end:w}}}}},$=d=>`${d.length===1?e.escapeRegex(d[0]):`[${d.map(E=>e.escapeRegex(E)).join("")}]`}*`,_=d=>{let E=0;const l=[];for(;E<d.length;){const T=g(d.slice(E),!1);if(!T||T.type!=="*")return;const C=m(T.body).map(w=>w.trim());if(C.length!==1)return;const S=y(C[0]);if(!S||S.length!==1)return;l.push(S),E+=T.end+1}if(!(l.length<1))return l},R=d=>{let E=0,l=d.trim(),T=g(l);for(;T;)E++,l=T.body.trim(),T=g(l);return E},L=(d,E)=>{if(E.maxExtglobRecursion===!1)return{risky:!1};const l=typeof E.maxExtglobRecursion=="number"?E.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,T=m(d).map(x=>x.trim());if(T.length>1&&(T.some(x=>x==="")||T.some(x=>/^[*?]+$/.test(x))||A(T)))return{risky:!0};const C=[];let S=!1,w=!0;for(const x of T){const D=_(x);if(D){S=!0,C.push(...D);continue}const G=y(x);if(G&&G.length===1){C.push(G);continue}if(w=!1,R(x)>l)return{risky:!0}}return S?w?{risky:!0,safeOutput:$([...new Set(C)])}:{risky:!0}:{risky:!1}},H=(d,E)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=i[d]||d;const l={...E},T=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r;let C=d.length;if(C>T)throw new SyntaxError(`Input length: ${C}, exceeds maximum allowed length: ${T}`);const S={type:"bos",value:"",output:l.prepend||""},w=[S],x=l.capture?"":"?:",D=t.globChars(l.windows),G=t.extglobChars(D),{DOT_LITERAL:J,PLUS_LITERAL:at,SLASH_LITERAL:tt,ONE_CHAR:q,DOTS_SLASH:et,NO_DOT:ft,NO_DOT_SLASH:ot,NO_DOTS_SLASH:rt,QMARK:z,QMARK_NO_DOT:nt,STAR:Q,START_ANCHOR:ht}=D,Z=v=>`(${x}(?:(?!${ht}${v.dot?et:J}).)*?)`,k=l.dot?"":ft,P=l.dot?z:nt;let K=l.bash===!0?Z(l):Q;l.capture&&(K=`(${K})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const f={input:d,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:w};d=e.removePrefix(d,f),C=d.length;const U=[],F=[],gt=[];let c=S,p;const V=()=>f.index===C-1,M=f.peek=(v=1)=>d[f.index+v],st=f.advance=()=>d[++f.index]||"",it=()=>d.slice(f.index+1),Y=(v="",j=0)=>{f.consumed+=v,f.index+=j},ie=v=>{f.output+=v.output!=null?v.output:v.value,Y(v.value)},Mr=()=>{let v=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)st(),f.start++,v++;return v%2===0?!1:(f.negated=!0,f.start++,!0)},ue=v=>{f[v]++,gt.push(v)},dt=v=>{f[v]--,gt.pop()},O=v=>{if(c.type==="globstar"){const j=f.braces>0&&(v.type==="comma"||v.type==="brace"),b=v.extglob===!0||U.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!j&&!b&&(f.output=f.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=K,f.output+=c.output)}if(U.length&&v.type!=="paren"&&(U[U.length-1].inner+=v.value),(v.value||v.output)&&ie(v),c&&c.type==="text"&&v.type==="text"){c.output=(c.output||c.value)+v.value,c.value+=v.value;return}v.prev=c,w.push(v),c=v},le=(v,j)=>{const b={...G[j],conditions:1,inner:""};b.prev=c,b.parens=f.parens,b.output=f.output,b.startIndex=f.index,b.tokensIndex=w.length;const N=(l.capture?"(":"")+b.open;ue("parens"),O({type:v,value:j,output:f.output?"":q}),O({type:"paren",extglob:!0,value:st(),output:N}),U.push(b)},Dr=v=>{const j=d.slice(v.startIndex,f.index+1),b=d.slice(v.startIndex+2,f.index),N=L(b,l);if((v.type==="plus"||v.type==="star")&&N.risky){const I=N.safeOutput?(v.output?"":q)+(l.capture?`(${N.safeOutput})`:N.safeOutput):void 0,ut=w[v.tokensIndex];ut.type="text",ut.value=j,ut.output=I||e.escapeRegex(j);for(let lt=v.tokensIndex+1;lt<w.length;lt++)w[lt].value="",w[lt].output="",delete w[lt].suffix;f.output=v.output+ut.output,f.backtrack=!0,O({type:"paren",extglob:!0,value:p,output:""}),dt("parens");return}let W=v.close+(l.capture?")":""),X;if(v.type==="negate"){let I=K;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(I=Z(l)),(I!==K||V()||/^\)+$/.test(it()))&&(W=v.close=`)$))${I}`),v.inner.includes("*")&&(X=it())&&/^\.[^\\/.]+$/.test(X)){const ut=H(X,{...E,fastpaths:!1}).output;W=v.close=`)${ut})${I})`}v.prev.type==="bos"&&(f.negatedExtglob=!0)}O({type:"paren",extglob:!0,value:p,output:W}),dt("parens")};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let v=!1,j=d.replace(s,(b,N,W,X,I,ut)=>X==="\\"?(v=!0,b):X==="?"?N?N+X+(I?z.repeat(I.length):""):ut===0?P+(I?z.repeat(I.length):""):z.repeat(W.length):X==="."?J.repeat(W.length):X==="*"?N?N+X+(I?K:""):K:N?b:`\\${b}`);return v===!0&&(l.unescape===!0?j=j.replace(/\\/g,""):j=j.replace(/\\+/g,b=>b.length%2===0?"\\\\":b?"\\":"")),j===d&&l.contains===!0?(f.output=d,f):(f.output=e.wrapOutput(j,f,E),f)}for(;!V();){if(p=st(),p==="\0")continue;if(p==="\\"){const b=M();if(b==="/"&&l.bash!==!0||b==="."||b===";")continue;if(!b){p+="\\",O({type:"text",value:p});continue}const N=/^\\+/.exec(it());let W=0;if(N&&N[0].length>2&&(W=N[0].length,f.index+=W,W%2!==0&&(p+="\\")),l.unescape===!0?p=st():p+=st(),f.brackets===0){O({type:"text",value:p});continue}}if(f.brackets>0&&(p!=="]"||c.value==="["||c.value==="[^")){if(l.posix!==!1&&p===":"){const b=c.value.slice(1);if(b.includes("[")&&(c.posix=!0,b.includes(":"))){const N=c.value.lastIndexOf("["),W=c.value.slice(0,N),X=c.value.slice(N+2),I=o[X];if(I){c.value=W+I,f.backtrack=!0,st(),!S.output&&w.indexOf(c)===1&&(S.output=q);continue}}}(p==="["&&M()!==":"||p==="-"&&M()==="]")&&(p=`\\${p}`),p==="]"&&(c.value==="["||c.value==="[^")&&(p=`\\${p}`),l.posix===!0&&p==="!"&&c.value==="["&&(p="^"),c.value+=p,ie({value:p});continue}if(f.quotes===1&&p!=='"'){p=e.escapeRegex(p),c.value+=p,ie({value:p});continue}if(p==='"'){f.quotes=f.quotes===1?0:1,l.keepQuotes===!0&&O({type:"text",value:p});continue}if(p==="("){ue("parens"),O({type:"paren",value:p});continue}if(p===")"){if(f.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const b=U[U.length-1];if(b&&f.parens===b.parens+1){Dr(U.pop());continue}O({type:"paren",value:p,output:f.parens?")":"\\)"}),dt("parens");continue}if(p==="["){if(l.nobracket===!0||!it().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));p=`\\${p}`}else ue("brackets");O({type:"bracket",value:p});continue}if(p==="]"){if(l.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){O({type:"text",value:p,output:`\\${p}`});continue}if(f.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));O({type:"text",value:p,output:`\\${p}`});continue}dt("brackets");const b=c.value.slice(1);if(c.posix!==!0&&b[0]==="^"&&!b.includes("/")&&(p=`/${p}`),c.value+=p,ie({value:p}),l.literalBrackets===!1||e.hasRegexChars(b))continue;const N=e.escapeRegex(c.value);if(f.output=f.output.slice(0,-c.value.length),l.literalBrackets===!0){f.output+=N,c.value=N;continue}c.value=`(${x}${N}|${c.value})`,f.output+=c.value;continue}if(p==="{"&&l.nobrace!==!0){ue("braces");const b={type:"brace",value:p,output:"(",outputIndex:f.output.length,tokensIndex:f.tokens.length};F.push(b),O(b);continue}if(p==="}"){const b=F[F.length-1];if(l.nobrace===!0||!b){O({type:"text",value:p,output:p});continue}let N=")";if(b.dots===!0){const W=w.slice(),X=[];for(let I=W.length-1;I>=0&&(w.pop(),W[I].type!=="brace");I--)W[I].type!=="dots"&&X.unshift(W[I].value);N=u(X,l),f.backtrack=!0}if(b.comma!==!0&&b.dots!==!0){const W=f.output.slice(0,b.outputIndex),X=f.tokens.slice(b.tokensIndex);b.value=b.output="\\{",p=N="\\}",f.output=W;for(const I of X)f.output+=I.output||I.value}O({type:"brace",value:p,output:N}),dt("braces"),F.pop();continue}if(p==="|"){U.length>0&&U[U.length-1].conditions++,O({type:"text",value:p});continue}if(p===","){let b=p;const N=F[F.length-1];N&>[gt.length-1]==="braces"&&(N.comma=!0,b="|"),O({type:"comma",value:p,output:b});continue}if(p==="/"){if(c.type==="dot"&&f.index===f.start+1){f.start=f.index+1,f.consumed="",f.output="",w.pop(),c=S;continue}O({type:"slash",value:p,output:tt});continue}if(p==="."){if(f.braces>0&&c.type==="dot"){c.value==="."&&(c.output=J);const b=F[F.length-1];c.type="dots",c.output+=p,c.value+=p,b.dots=!0;continue}if(f.braces+f.parens===0&&c.type!=="bos"&&c.type!=="slash"){O({type:"text",value:p,output:J});continue}O({type:"dot",value:p,output:J});continue}if(p==="?"){if(!(c&&c.value==="(")&&l.noextglob!==!0&&M()==="("&&M(2)!=="?"){le("qmark",p);continue}if(c&&c.type==="paren"){const b=M();let N=p;(c.value==="("&&!/[!=<:]/.test(b)||b==="<"&&!/<([!=]|\w+>)/.test(it()))&&(N=`\\${p}`),O({type:"text",value:p,output:N});continue}if(l.dot!==!0&&(c.type==="slash"||c.type==="bos")){O({type:"qmark",value:p,output:nt});continue}O({type:"qmark",value:p,output:z});continue}if(p==="!"){if(l.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){le("negate",p);continue}if(l.nonegate!==!0&&f.index===0){Mr();continue}}if(p==="+"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){le("plus",p);continue}if(c&&c.value==="("||l.regex===!1){O({type:"plus",value:p,output:at});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||f.parens>0){O({type:"plus",value:p});continue}O({type:"plus",value:at});continue}if(p==="@"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){O({type:"at",extglob:!0,value:p,output:""});continue}O({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const b=n.exec(it());b&&(p+=b[0],f.index+=b[0].length),O({type:"text",value:p});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=p,c.output=K,f.backtrack=!0,f.globstar=!0,Y(p);continue}let v=it();if(l.noextglob!==!0&&/^\([^?]/.test(v)){le("star",p);continue}if(c.type==="star"){if(l.noglobstar===!0){Y(p);continue}const b=c.prev,N=b.prev,W=b.type==="slash"||b.type==="bos",X=N&&(N.type==="star"||N.type==="globstar");if(l.bash===!0&&(!W||v[0]&&v[0]!=="/")){O({type:"star",value:p,output:""});continue}const I=f.braces>0&&(b.type==="comma"||b.type==="brace"),ut=U.length&&(b.type==="pipe"||b.type==="paren");if(!W&&b.type!=="paren"&&!I&&!ut){O({type:"star",value:p,output:""});continue}for(;v.slice(0,3)==="/**";){const lt=d[f.index+4];if(lt&<!=="/")break;v=v.slice(3),Y("/**",3)}if(b.type==="bos"&&V()){c.type="globstar",c.value+=p,c.output=Z(l),f.output=c.output,f.globstar=!0,Y(p);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&!X&&V()){f.output=f.output.slice(0,-(b.output+c.output).length),b.output=`(?:${b.output}`,c.type="globstar",c.output=Z(l)+(l.strictSlashes?")":"|$)"),c.value+=p,f.globstar=!0,f.output+=b.output+c.output,Y(p);continue}if(b.type==="slash"&&b.prev.type!=="bos"&&v[0]==="/"){const lt=v[1]!==void 0?"|$":"";f.output=f.output.slice(0,-(b.output+c.output).length),b.output=`(?:${b.output}`,c.type="globstar",c.output=`${Z(l)}${tt}|${tt}${lt})`,c.value+=p,f.output+=b.output+c.output,f.globstar=!0,Y(p+st()),O({type:"slash",value:"/",output:""});continue}if(b.type==="bos"&&v[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${tt}|${Z(l)}${tt})`,f.output=c.output,f.globstar=!0,Y(p+st()),O({type:"slash",value:"/",output:""});continue}if(I&&v[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${tt}|${Z(l)}${tt})`,f.output+=c.output,f.globstar=!0,Y(p+st()),O({type:"slash",value:"/",output:""});continue}f.output=f.output.slice(0,-c.output.length),c.type="globstar",c.output=Z(l),c.value+=p,f.output+=c.output,f.globstar=!0,Y(p);continue}const j={type:"star",value:p,output:K};if(l.bash===!0){j.output=".*?",(c.type==="bos"||c.type==="slash")&&(j.output=k+j.output),O(j);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&l.regex===!0){j.output=p,O(j);continue}(f.index===f.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(f.output+=ot,c.output+=ot):l.dot===!0?(f.output+=rt,c.output+=rt):(f.output+=k,c.output+=k),M()!=="*"&&(f.output+=q,c.output+=q)),O(j)}for(;f.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));f.output=e.escapeLast(f.output,"["),dt("brackets")}for(;f.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));f.output=e.escapeLast(f.output,"("),dt("parens")}for(;f.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));f.output=e.escapeLast(f.output,"{"),dt("braces")}if(l.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&O({type:"maybe_slash",value:"",output:`${tt}?`}),f.backtrack===!0){f.output="";for(const v of f.tokens)f.output+=v.output!=null?v.output:v.value,v.suffix&&(f.output+=v.suffix)}return f};return H.fastpaths=(d,E)=>{const l={...E},T=typeof l.maxLength=="number"?Math.min(r,l.maxLength):r,C=d.length;if(C>T)throw new SyntaxError(`Input length: ${C}, exceeds maximum allowed length: ${T}`);d=i[d]||d;const{DOT_LITERAL:S,SLASH_LITERAL:w,ONE_CHAR:x,DOTS_SLASH:D,NO_DOT:G,NO_DOTS:J,NO_DOTS_SLASH:at,STAR:tt,START_ANCHOR:q}=t.globChars(l.windows),et=l.dot?J:G,ft=l.dot?at:G,ot=l.capture?"":"?:",rt={negated:!1,prefix:""};let z=l.bash===!0?".*?":tt;l.capture&&(z=`(${z})`);const nt=k=>k.noglobstar===!0?z:`(${ot}(?:(?!${q}${k.dot?D:S}).)*?)`,Q=k=>{switch(k){case"*":return`${et}${x}${z}`;case".*":return`${S}${x}${z}`;case"*.*":return`${et}${z}${S}${x}${z}`;case"*/*":return`${et}${z}${w}${x}${ft}${z}`;case"**":return et+nt(l);case"**/*":return`(?:${et}${nt(l)}${w})?${ft}${x}${z}`;case"**/*.*":return`(?:${et}${nt(l)}${w})?${ft}${z}${S}${x}${z}`;case"**/.*":return`(?:${et}${nt(l)}${w})?${S}${x}${z}`;default:{const P=/^(.*?)\.(\w+)$/.exec(k);if(!P)return;const K=Q(P[1]);return K?K+S+P[2]:void 0}}},ht=e.removePrefix(d,rt);let Z=Q(ht);return Z&&l.strictSlashes!==!0&&(Z+=`${w}?`),Z},me=H,me}var be,qe;function Xs(){if(qe)return be;qe=1;const t=Ws(),e=qs(),r=he(),o=fe(),n=i=>i&&typeof i=="object"&&!Array.isArray(i),s=(i,u,a=!1)=>{if(Array.isArray(i)){const R=i.map(L=>s(L,u,a));return L=>{for(const H of R){const d=H(L);if(d)return d}return!1}}const m=n(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!m)throw new TypeError("Expected pattern to be a non-empty string");const h=u||{},y=h.windows,A=m?s.compileRe(i,u):s.makeRe(i,u,!1,!0),g=A.state;delete A.state;let $=()=>!1;if(h.ignore){const R={...u,ignore:null,onMatch:null,onResult:null};$=s(h.ignore,R,a)}const _=(R,L=!1)=>{const{isMatch:H,match:d,output:E}=s.test(R,A,u,{glob:i,posix:y}),l={glob:i,state:g,regex:A,posix:y,input:R,output:E,match:d,isMatch:H};if(typeof h.onResult=="function"&&h.onResult(l),H===!1)return l.isMatch=!1,L?l:!1;t:if($(R)){if(typeof h.onIgnore=="function"&&h.onIgnore(l)===o.UNIGNORE){l.isMatch=!0;break t}return l.isMatch=!1,L?l:!1}return typeof h.onMatch=="function"&&h.onMatch(l),L?l:!0};return a&&(_.state=g),_};return s.test=(i,u,a,{glob:m,posix:h}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const y=a||{},A=y.format||(h?r.toPosixSlashes:null);let g=i===m,$=g&&A?A(i):i;return g===!1&&($=A?A(i):i,g=$===m),(g===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?g=s.matchBase(i,u,a,h):g=u.exec($)),{isMatch:!!g,match:g,output:$}},s.matchBase=(i,u,a,m=a&&a.windows)=>(u instanceof RegExp?u:s.makeRe(u,a)).test(r.basename(i,{windows:m})),s.isMatch=(i,u,a)=>s(u,a)(i),s.parse=(i,u)=>Array.isArray(i)?i.map(a=>s.parse(a,u)):e(i,{...u,fastpaths:!1}),s.scan=(i,u)=>t(i,u),s.compileRe=(i,u,a=!1,m=!1)=>{if(a===!0)return i.output;const h=u||{},y=h.contains?"":"^",A=h.contains?"":"$";let g=`${y}(?:${i.output})${A}`;i&&i.negated===!0&&(g=`^(?!${g}).*$`);const $=s.toRegex(g,u);return m===!0&&($.state=i),$},s.makeRe=(i,u={},a=!1,m=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let h={negated:!1,fastpaths:!0};return u.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(h.output=e.fastpaths(i,u)),h.output||(h=e(i,u)),s.compileRe(h,u,a,m)},s.toRegex=(i,u)=>{try{const a=u||{};return new RegExp(i,a.flags||(a.nocase?"i":""))}catch(a){if(u&&u.debug===!0)throw a;return/$^/}},s.constants=o,be=s,be}var $e,Xe;function Ks(){if(Xe)return $e;Xe=1;const t=Xs(),e=he();function r(o,n,s=!1){return n&&(n.windows===null||n.windows===void 0)&&(n={...n,windows:e.isWindows()}),t(o,n,s)}return Object.assign(r,t),$e=r,$e}var Qs=Ks();const yt=Oe(Qs),Zs=B(import.meta.url),Dt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oe=t=>{if(typeof Dt<"u"&&Dt.versions&&Dt.versions.node){const[e,r]=Dt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Dt.getBuiltinModule(t)}return Zs(t)},Ke=oe("fs"),Vs={...Ke,default:Ke},{statSync:Ys,stat:Js,realpathSync:to,realpath:eo,readdirSync:ro,readdir:so}=oe("fs"),{sep:dr,basename:oo,dirname:Re,resolve:yr,normalize:no,relative:io,posix:mt,isAbsolute:uo}=oe("path"),{fileURLToPath:lo}=oe("url"),{createRequire:ao}=oe("module");var Qe=ao(import.meta.url);function co(t){let e=no(t);return e.length>1&&e[e.length-1]===dr&&(e=e.substring(0,e.length-1)),e}const po=/[\\/]/g;function mr(t,e){return t.replace(po,e)}const fo=/^[a-z]:[\\/]$/i;function ho(t){return t==="/"||fo.test(t)}function ve(t,e){const{resolvePaths:r,normalizePath:o,pathSeparator:n}=e,s=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(r&&(t=yr(t)),(o||s)&&(t=co(t)),t===".")return"";const i=t[t.length-1]!==n;return mr(i?t+n:t,n)}function br(t,e){return e+t}function go(t,e){return function(r,o){return o.startsWith(t)?o.slice(t.length)+r:mr(io(t,o),e.pathSeparator)+e.pathSeparator+r}}function yo(t){return t}function mo(t,e,r){return e+t+r}function bo(t,e){const{relativePaths:r,includeBasePath:o}=e;return r&&t?go(t,e):o?br:yo}function $o(t){return function(e,r){r.push(e.substring(t.length)||".")}}function vo(t){return function(e,r,o){const n=e.substring(t.length)||".";o.every(s=>s(n,!0))&&r.push(n)}}const Eo=(t,e)=>{e.push(t||".")},Ao=(t,e,r)=>{const o=t||".";r.every(n=>n(o,!0))&&e.push(o)},xo=()=>{};function So(t,e){const{includeDirs:r,filters:o,relativePaths:n}=e;return r?n?o&&o.length?vo(t):$o(t):o&&o.length?Ao:Eo:xo}const wo=(t,e,r,o)=>{o.every(n=>n(t,!1))&&r.files++},To=(t,e,r,o)=>{o.every(n=>n(t,!1))&&e.push(t)},Ro=(t,e,r,o)=>{r.files++},_o=(t,e)=>{e.push(t)},ko=()=>{};function Co(t){const{excludeFiles:e,filters:r,onlyCounts:o}=t;return e?ko:r&&r.length?o?wo:To:o?Ro:_o}const Oo=t=>t,No=()=>[""].slice(0,0);function Lo(t){return t.group?No:Oo}const Ho=(t,e,r)=>{t.push({directory:e,files:r,dir:e})},Bo=()=>{};function Mo(t){return t.group?Ho:Bo}const Do=function(t,e,r){const{queue:o,fs:n,options:{suppressErrors:s}}=e;o.enqueue(),n.realpath(t,(i,u)=>{if(i)return o.dequeue(s?null:i,e);n.stat(u,(a,m)=>{if(a)return o.dequeue(s?null:a,e);if(m.isDirectory()&&$r(t,u,e))return o.dequeue(null,e);r(m,u),o.dequeue(null,e)})})},Po=function(t,e,r){const{queue:o,fs:n,options:{suppressErrors:s}}=e;o.enqueue();try{const i=n.realpathSync(t),u=n.statSync(i);if(u.isDirectory()&&$r(t,i,e))return;r(u,i)}catch(i){if(!s)throw i}};function Io(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?Po:Do}function $r(t,e,r){if(r.options.useRealPaths)return Fo(e,r);let o=Re(t),n=1;for(;o!==r.root&&n<2;){const s=r.symlinks.get(o);s&&(s===e||s.startsWith(e)||e.startsWith(s))?n++:o=Re(o)}return r.symlinks.set(t,e),n>1}function Fo(t,e){return e.visited.includes(t+e.options.pathSeparator)}const Go=t=>t.counts,Uo=t=>t.groups,jo=t=>t.paths,zo=t=>t.paths.slice(0,t.options.maxFiles),Wo=(t,e,r)=>(ge(e,r,t.counts,t.options.suppressErrors),null),qo=(t,e,r)=>(ge(e,r,t.paths,t.options.suppressErrors),null),Xo=(t,e,r)=>(ge(e,r,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),Ko=(t,e,r)=>(ge(e,r,t.groups,t.options.suppressErrors),null);function ge(t,e,r,o){e(t&&!o?t:null,r)}function Qo(t,e){const{onlyCounts:r,group:o,maxFiles:n}=t;return r?e?Go:Wo:o?e?Uo:Ko:n?e?zo:Xo:e?jo:qo}const vr={withFileTypes:!0},Zo=(t,e,r,o,n)=>{if(t.queue.enqueue(),o<0)return t.queue.dequeue(null,t);const{fs:s}=t;t.visited.push(e),t.counts.directories++,s.readdir(e||".",vr,(i,u=[])=>{n(u,r,o),t.queue.dequeue(t.options.suppressErrors?null:i,t)})},Vo=(t,e,r,o,n)=>{const{fs:s}=t;if(o<0)return;t.visited.push(e),t.counts.directories++;let i=[];try{i=s.readdirSync(e||".",vr)}catch(u){if(!t.options.suppressErrors)throw u}n(i,r,o)};function Yo(t){return t?Vo:Zo}var Jo=class{count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},tn=class{_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},en=class{aborted=!1;abort(){this.aborted=!0}},Er=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,r,o){this.isSynchronous=!o,this.callbackInvoker=Qo(r,this.isSynchronous),this.root=ve(e,r),this.state={root:ho(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new tn,options:r,queue:new Jo((n,s)=>this.callbackInvoker(s,n,o)),symlinks:new Map,visited:[""].slice(0,0),controller:new en,fs:r.fs||Vs},this.joinPath=bo(this.root,r),this.pushDirectory=So(this.root,r),this.pushFile=Co(r),this.getArray=Lo(r),this.groupFiles=Mo(r),this.resolveSymlink=Io(r,this.isSynchronous),this.walkDirectory=Yo(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,r,o)=>{const{paths:n,options:{filters:s,resolveSymlinks:i,excludeSymlinks:u,exclude:a,maxFiles:m,signal:h,useRealPaths:y,pathSeparator:A},controller:g}=this.state;if(g.aborted||h&&h.aborted||m&&n.length>m)return;const $=this.getArray(this.state.paths);for(let _=0;_<e.length;++_){const R=e[_];if(R.isFile()||R.isSymbolicLink()&&!i&&!u){const L=this.joinPath(R.name,r);this.pushFile(L,$,this.state.counts,s)}else if(R.isDirectory()){let L=mo(R.name,r,this.state.options.pathSeparator);if(a&&a(R.name,L))continue;this.pushDirectory(L,n,s),this.walkDirectory(this.state,L,L,o-1,this.walk)}else if(this.resolveSymlink&&R.isSymbolicLink()){let L=br(R.name,r);this.resolveSymlink(L,this.state,(H,d)=>{if(H.isDirectory()){if(d=ve(d,this.state.options),a&&a(R.name,y?d:L+A))return;this.walkDirectory(this.state,d,y?d:L+A,o-1,this.walk)}else{d=y?d:L;const E=oo(d),l=ve(Re(d),this.state.options);d=this.joinPath(E,l),this.pushFile(d,$,this.state.counts,s)}})}}this.groupFiles(this.state.groups,r,$)}};function rn(t,e){return new Promise((r,o)=>{Ar(t,e,(n,s)=>{if(n)return o(n);r(s)})})}function Ar(t,e,r){new Er(t,e,r).start()}function sn(t,e){return new Er(t,e).start()}var Ze=class{constructor(e,r){this.root=e,this.options=r}withPromise(){return rn(this.root,this.options)}withCallback(e){Ar(this.root,this.options,e)}sync(){return sn(this.root,this.options)}};let xr=null;try{Qe.resolve("picomatch"),xr=Qe("picomatch")}catch{}var on=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:dr,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new Ze(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new Ze(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const r=this.globFunction||xr;if(!r)throw new Error("Please specify a glob function to use glob matching.");var o=this.globCache[t.join("\0")];return o||(o=r(t,...e),this.globCache[t.join("\0")]=o),this.options.filters.push(n=>o(n)),this}};const nn=Array.isArray,Sr=/\\/g,un=/^[A-Za-z]:$/,wr=process.platform==="win32",ln=/^(\/?\.\.)+$/;function Ve(t,e={}){const r=t.length,o=Array(r),n=Array(r);let s,i;for(s=0;s<r;s++){const u=Tr(t[s]);o[s]=u;const a=u.length,m=Array(a);for(i=0;i<a;i++)m[i]=yt(u[i],e);n[s]=m}return u=>{const a=u.split("/");if(a[0]===".."&&ln.test(u))return!0;for(s=0;s<r;s++){const m=o[s],h=n[s],y=a.length,A=Math.min(y,m.length);for(i=0;i<A;){const g=m[i];if(g.includes("/"))return!0;if(!h[i](a[i]))break;if(!e.noglobstar&&g==="**")return!0;i++}if(i===y)return!0}return!1}}const an=/^[A-Z]:\/$/i,cn=wr?t=>an.test(t):t=>t==="/";function Ye(t,e,r){if(t===e||e.startsWith(`${t}/`)){if(r){const n=t.length+ +!cn(t);return(s,i)=>s.slice(n,i?-1:void 0)||"."}const o=e.slice(t.length+1);return o?(n,s)=>{if(n===".")return o;const i=`${o}/${n}`;return s?i.slice(0,-1):i}:(n,s)=>s&&n!=="."?n.slice(0,-1):n}return r?o=>mt.relative(t,o)||".":o=>mt.relative(t,`${e}/${o}`)||"."}function pn(t,e){if(e.startsWith(`${t}/`)){const r=e.slice(t.length+1);return o=>`${r}/${o}`}return r=>{const o=mt.relative(t,`${e}/${r}`);return r[r.length-1]==="/"&&o!==""?`${o}/`:o||"."}}function Je(t){return t.replace(un,e=>`${e}/`)}const fn={parts:!0};function Tr(t){var e;const r=yt.scan(t,fn);return!((e=r.parts)===null||e===void 0)&&e.length?r.parts:[t]}const hn=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,gn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,dn=t=>t.replace(hn,"\\$&"),yn=t=>t.replace(gn,"\\$&"),mn=wr?yn:dn;function bn(t,e){const r=yt.scan(t);return r.isGlob||r.negated}function se(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function Rr(t){return typeof t=="string"?[t]:t??[]}const $n=/^(\/?\.\.)+/,vn=/\\(?=[()[\]{}!*+?@|])/g;function Ee(t,e,r,o){var n;const s=e.cwd;let i=t;t[t.length-1]==="/"&&(i=t.slice(0,-1));const u=i.lastIndexOf("/"),a=(u===-1?i:i.slice(u+1)).startsWith("!(");i[i.length-1]!=="*"&&!a&&e.expandDirectories&&(i+="/**");const m=mn(s);i=uo(i.replace(vn,""))?mt.relative(m,i):mt.normalize(i);const h=(n=$n.exec(i))===null||n===void 0?void 0:n[0],y=Tr(i);if(h){const g=(h.length+1)/3;let $=0;const _=m.split("/");for(;$<g&&y[$+g]===_[_.length+$-g];)i=i.slice(0,(g-$-1)*3)+i.slice((g-$)*3+y[$+g].length+1)||".",$++;const R=mt.join(s,h.slice($*3));R[0]!=="."&&r.root.length>R.length&&(r.root=Je(R),r.depthOffset=-g+$)}if(!o&&r.depthOffset>=0){var A;(A=r.commonPath)!==null&&A!==void 0||(r.commonPath=y);const g=[],$=Math.min(r.commonPath.length,y.length);for(let _=0;_<$;_++){const R=y[_];if(R==="**"&&!y[_+1]){g.pop();break}if(_===y.length-1||R!==r.commonPath[_]||bn(R))break;g.push(R)}r.depthOffset=g.length,r.commonPath=g,r.root=Je(g.length>0?mt.join(s,...g):s)}return i}function En(t,e,r){const o=[],n=[],s=[];for(const i of t.ignore)i&&(i[0]!=="!"||i[1]==="("?n.push(Ee(i,t,r,!0)):s.push(i.slice(1)));for(const i of e)i&&(i[0]!=="!"||i[1]==="("?o.push(Ee(i,t,r,!1)):(i[1]!=="!"||i[2]==="(")&&n.push(Ee(i.slice(1),t,r,!0)));return{match:o,ignore:n,unignore:s}}function An(t,e){const r=t.cwd,o={root:r,depthOffset:0},n=En(t,e,o);t.debug&&se("internal processing patterns:",n);const{absolute:s,caseSensitiveMatch:i,debug:u,dot:a,followSymbolicLinks:m,onlyDirectories:h}=t,y=o.root.replace(Sr,""),A={dot:a,nobrace:t.braceExpansion===!1,nocase:!i,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},g=n.unignore.length>0,$=g?yt(n.unignore,A):void 0,_=g?Ve(n.unignore,A):void 0,R=yt(n.match,{...A,ignore:n.ignore,onIgnore:$?w=>$(w.output)&&yt.constants.UNIGNORE:void 0}),L=yt(n.ignore,A),H=Ve(n.match,A),d=Ye(r,y,s),E=s?d:Ye(r,y,!0),l=n.match.length>0&&n.match.every(w=>w==="**"||w==="**/*"),T=n.ignore.length>0||g||!l?(w,x)=>{const D=E(x,!0);return D==="."||_&&_(D)?!1:!H(D)||L(D)}:void 0;let C;t.deep!==void 0&&(C=Math.round(t.deep-o.depthOffset));const S=new on({filters:[u?(w,x)=>{const D=d(w,x),G=R(D);return G&&se(`matched ${D}`),G}:(w,x)=>{const D=d(w,x);return R(D)}],exclude:u&&T?(w,x)=>{const D=T(w,x);return se(`${D?"skipped":"crawling"} ${x}`),D}:T,fs:t.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:m,excludeSymlinks:!m,excludeFiles:h,includeDirs:h||!t.onlyFiles,maxDepth:C,signal:t.signal}).crawl(y);return t.debug&&se("internal properties:",{...o,root:y}),[S,r!==y&&!s&&pn(r,y)]}function xn(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]=e(t[r]);return t}const tr={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Sn(t){const e=Object.assign({},t);for(const r in tr)e[r]===void 0&&Object.assign(e,{[r]:tr[r]});return e.cwd=(e.cwd instanceof URL?lo(e.cwd):yr(e.cwd||process.cwd())).replace(Sr,"/"),e.ignore=Rr(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||so,readdirSync:e.fs.readdirSync||ro,realpath:e.fs.realpath||eo,realpathSync:e.fs.realpathSync||to,stat:e.fs.stat||Js,statSync:e.fs.statSync||Ys}),e.debug&&se("globbing with options:",e),e}function wn(t,e={}){var r;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const o=nn(t)||typeof t=="string",n=Rr((r=o?t:t.patterns)!==null&&r!==void 0?r:"**/*"),s=Sn(o?e:t);return n.length>0?An(s,n):[]}async function gu(t,e){const[r,o]=wn(t,e);return r?xn(await r.withPromise(),o):[]}var Ae,er;function Tn(){if(er)return Ae;er=1;/*!
|
|
2
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
+
* Licensed under the MIT License.
|
|
6
|
+
*/return Ae=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},Ae}var xe,rr;function _r(){if(rr)return xe;rr=1;/*!
|
|
7
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
+
* Released under the MIT License.
|
|
11
|
+
*/var t=Tn(),e={"{":"}","(":")","[":"]"},r=function(n){if(n[0]==="!")return!0;for(var s=0,i=-2,u=-2,a=-2,m=-2,h=-2;s<n.length;){if(n[s]==="*"||n[s+1]==="?"&&/[\].+)]/.test(n[s])||u!==-1&&n[s]==="["&&n[s+1]!=="]"&&(u<s&&(u=n.indexOf("]",s)),u>s&&(h===-1||h>u||(h=n.indexOf("\\",s),h===-1||h>u)))||a!==-1&&n[s]==="{"&&n[s+1]!=="}"&&(a=n.indexOf("}",s),a>s&&(h=n.indexOf("\\",s),h===-1||h>a))||m!==-1&&n[s]==="("&&n[s+1]==="?"&&/[:!=]/.test(n[s+2])&&n[s+3]!==")"&&(m=n.indexOf(")",s),m>s&&(h=n.indexOf("\\",s),h===-1||h>m))||i!==-1&&n[s]==="("&&n[s+1]!=="|"&&(i<s&&(i=n.indexOf("|",s)),i!==-1&&n[i+1]!==")"&&(m=n.indexOf(")",i),m>i&&(h=n.indexOf("\\",i),h===-1||h>m))))return!0;if(n[s]==="\\"){var y=n[s+1];s+=2;var A=e[y];if(A){var g=n.indexOf(A,s);g!==-1&&(s=g+1)}if(n[s]==="!")return!0}else s++}return!1},o=function(n){if(n[0]==="!")return!0;for(var s=0;s<n.length;){if(/[*?{}()[\]]/.test(n[s]))return!0;if(n[s]==="\\"){var i=n[s+1];s+=2;var u=e[i];if(u){var a=n.indexOf(u,s);a!==-1&&(s=a+1)}if(n[s]==="!")return!0}else s++}return!1};return xe=function(n,s){if(typeof n!="string"||n==="")return!1;if(t(n))return!0;var i=r;return s&&s.strict===!1&&(i=o),i(n)},xe}const Rn=B(import.meta.url),Pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kr=t=>{if(typeof Pt<"u"&&Pt.versions&&Pt.versions.node){const[e,r]=Pt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Pt.getBuiltinModule(t)}return Rn(t)},_n=kr("path"),kn=kr("os");var Se,sr;function Cn(){if(sr)return Se;sr=1;var t=_r(),e=_n.posix.dirname,r=kn.platform()==="win32",o="/",n=/\\/g,s=/\\([!*?|[\](){}])/g;Se=function(a,m){var h=Object.assign({flipBackslashes:!0},m);h.flipBackslashes&&r&&a.indexOf(o)<0&&(a=a.replace(n,o)),i(a)&&(a+=o),a+="a";do a=e(a);while(u(a));return a.replace(s,"$1")};function i(a){var m=a.slice(-1),h;switch(m){case"}":h="{";break;case"]":h="[";break;default:return!1}var y=a.indexOf(h);return y<0?!1:a.slice(y+1,-1).includes(o)}function u(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:t(a)}return Se}var On=Cn();Oe(On);const Nn=B(import.meta.url),It=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ln=t=>{if(typeof It<"u"&&It.versions&&It.versions.node){const[e,r]=It.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return It.getBuiltinModule(t)}return Nn(t)},{access:Hn}=Ln("node:fs/promises");async function du(t,e=ke){pt(t),t=ct(t);try{return await Hn(t,e),!0}catch{return!1}}const Bn=B(import.meta.url),Ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Mn=t=>{if(typeof Ft<"u"&&Ft.versions&&Ft.versions.node){const[e,r]=Ft.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ft.getBuiltinModule(t)}return Bn(t)},{accessSync:Dn}=Mn("node:fs");function _e(t,e=ke){pt(t),t=ct(t);try{return Dn(t,e),!0}catch{return!1}}var Pn=_r();Oe(Pn);const In=B(import.meta.url),Gt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cr=t=>{if(typeof Gt<"u"&&Gt.versions&&Gt.versions.node){const[e,r]=Gt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Gt.getBuiltinModule(t)}return In(t)};Cr("node:fs/promises");Cr("node:fs");let Fn=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},Gn=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Or=(t,e)=>{const r=t?.code;return r==="ENOENT"?new Fn(`no such file or directory, open '${e}'`):r==="EACCES"||r==="EPERM"?new Gn(`unable to read the non-readable file: ${e}`):t},Un=B(import.meta.url),Ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nr=t=>{if(typeof Ut<"u"&&Ut.versions&&Ut.versions.node){const[e,r]=Ut.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ut.getBuiltinModule(t)}return Un(t)},{readFile:jn}=Nr("node:fs/promises"),{unzip:zn,brotliDecompress:Wn}=Nr("node:zlib"),qn={brotli:Wn,gzip:zn,none:(t,e)=>{e(null,t)}},bu=async(t,e)=>{pt(t),t=ct(t);const{buffer:r,compression:o,encoding:n,flag:s}=e??{};let i;try{i=await jn(t,s?{flag:s}:{})}catch(u){throw Or(u,t)}return await new Promise((u,a)=>{qn[o??"none"](i,(m,h)=>{m?a(m):u(r?h:h.toString(n??"utf8"))})})},Xn=B(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Lr=t=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[e,r]=jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return jt.getBuiltinModule(t)}return Xn(t)},{readFileSync:Kn}=Lr("node:fs"),{unzipSync:Qn,brotliDecompressSync:Zn}=Lr("node:zlib"),Vn={brotli:Zn,gzip:Qn,none:t=>t},$u=(t,e)=>{pt(t),t=ct(t);const{buffer:r,compression:o,encoding:n,flag:s}=e??{};let i;try{i=Kn(t,s?{flag:s}:{})}catch(m){throw Or(m,t)}const u=Vn[o??"none"],a=u(i);return r?a:a.toString(n??"utf8")},Yn=B(import.meta.url),zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jn=t=>{if(typeof zt<"u"&&zt.versions&&zt.versions.node){const[e,r]=zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return zt.getBuiltinModule(t)}return Yn(t)},{createRequire:Hr}=Jn("node:module"),ti=globalThis.process??Object.create(null),or={versions:{}},nr=new Proxy(ti,{get(t,e){if(e in t)return t[e];if(e in or)return or[e]}}),ei=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
12
|
+
`),ri=(t,e,r,o)=>{const n={column:0,line:-1,...t.start},s={...n,...t.end},i=n.line,u=n.column,a=s.line,m=s.column;let h=Math.max(i-(r+1),0),y=Math.min(e.length,a+o);i===-1&&(h=0),a===-1&&(y=e.length);const A=a-i,g={};if(A)for(let $=0;$<=A;$++){const _=$+i;if(!u)g[_]=!0;else if($===0){const R=e[_-1]?.length;g[_]=[u,(R??0)-u+1]}else if($===A)g[_]=[0,m];else{const R=e[_-$]?.length;g[_]=[0,R]}}else u===m?g[i]=u?[u,0]:!0:g[i]=[u,(m??0)-(u??0)];return{end:y,markerLines:g,start:h}},si=nr.platform==="win32"&&!nr.env?.WT_SESSION?">":"❯",vu=(t,e,r)=>{const o={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:$=>$,marker:$=>$,message:$=>$,...r?.color}},n=typeof e.start.column=="number";let s=(t.includes("\r")?ei(t):t).split(`
|
|
13
|
+
`);typeof o.tabWidth=="number"&&t.includes(" ")&&(s=s.map($=>$.replaceAll(" "," ".repeat(o.tabWidth))));const{end:i,markerLines:u,start:a}=ri(e,s,o.linesAbove,o.linesBelow),m=String(i).length,{gutter:h,marker:y,message:A}=o.color;let g=s.slice(a,i).map(($,_)=>{const R=a+1+_,L=u[R],H=String(R).padStart(m),d=!u[R+1],E=` ${H}${o.showGutter?" |":""}`;if(L){let l="";if(Array.isArray(L)){const T=$.replaceAll(/[^\t]/g," ").slice(0,Math.max(L[0]-1,0)),C=L[1]||1;l=[`
|
|
14
|
+
`,o.prefix+h(E.replaceAll(/\d/g," "))," ",T,y("^").repeat(C)].join(""),d&&o.message&&(l+=` ${A(o.message)}`)}return[o.prefix+y(si),h(E),$.length>0?` ${$}`:"",l].join("")}return`${o.prefix} ${h(E)}${$.length>0?` ${$}`:""}`}).join(`
|
|
15
|
+
`);return o.message&&!n&&(g=`${o.prefix+" ".repeat(m+1)+o.message}
|
|
16
|
+
${g}`),g},ir=(t,e)=>{let r=0,o=e.length-2;for(;r<o;){const n=r+(o-r>>1);if(t<e[n])o=n-1;else if(t>=e[n+1])r=n+1;else{r=n;break}}return r},oi=/\n|\r(?!\n)/,ni=t=>t.split(oi).reduce((e,r)=>(e.push(e.at(-1)+r.length+1),e),[0]),Eu=(t,e,r)=>{if(!Array.isArray(t)&&typeof t!="string"||(typeof t=="string"||Array.isArray(t))&&t.length===0)return{column:0,line:0};if(typeof e!="number"||typeof t=="string"&&e>=t.length||Array.isArray(t)&&e+1>=t.at(-1))return{column:0,line:0};if(typeof t=="string"){const n=ni(t),s=ir(e,n);return{column:e-n[s]+1,line:s+1}}const o=ir(e,t);return{column:e-t[o]+1,line:o+1}},ii=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&ii.set("AggregateError",AggregateError);const ui=Hr(import.meta.url),Wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,li=t=>{if(typeof Wt<"u"&&Wt.versions&&Wt.versions.node){const[e,r]=Wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Wt.getBuiltinModule(t)}return ui(t)};li("node:util");const ai=Hr(import.meta.url),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ne=t=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[e,r]=qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return qt.getBuiltinModule(t)}return ai(t)};Ne("node:fs");Ne("node:path");Ne("node:url");let Au=class extends Error{fileName;codeFrame;name="JSONError";#t;constructor(e){super(),this.#t=e}get message(){return`${this.#t}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
17
|
+
|
|
18
|
+
${this.codeFrame}
|
|
19
|
+
`:""}`}set message(e){this.#t=e}};const ci=t=>{const e={force:!0,recursive:!0};return t?.maxRetries!==void 0&&(e.maxRetries=t.maxRetries),t?.retryDelay!==void 0&&(e.retryDelay=t.retryDelay),e},pi=B(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Br=t=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[e,r]=Xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Xt.getBuiltinModule(t)}return pi(t)};Br("node:fs");Br("node:fs/promises");const fi=B(import.meta.url),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hi=t=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[e,r]=Kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Kt.getBuiltinModule(t)}return fi(t)};hi("node:fs");const gi=B(import.meta.url),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=t=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[e,r]=Qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Qt.getBuiltinModule(t)}return gi(t)};di("node:fs/promises");const yi=B(import.meta.url),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mi=t=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[e,r]=Zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Zt.getBuiltinModule(t)}return yi(t)},{rmSync:bi}=mi("node:fs"),Su=(t,e={})=>{pt(t),bi(t,ci(e))};B(import.meta.url);const $i=t=>{if(typeof t!="string"&&!(t instanceof ArrayBuffer)&&!ArrayBuffer.isView(t))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},vi=B(import.meta.url),Vt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ei=t=>{if(typeof Vt<"u"&&Vt.versions&&Vt.versions.node){const[e,r]=Vt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Vt.getBuiltinModule(t)}return vi(t)},{randomBytes:Ai}=Ei("node:crypto"),xi=t=>`${t}.${process.pid.toString(36)}.${Ai(6).toString("hex")}.tmp`,Si=new TextEncoder,wi=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return Si.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},Ti=B(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ri=t=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[e,r]=Yt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Yt.getBuiltinModule(t)}return Ti(t)};Ri("node:fs/promises");const _i=B(import.meta.url),Jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ki=t=>{if(typeof Jt<"u"&&Jt.versions&&Jt.versions.node){const[e,r]=Jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Jt.getBuiltinModule(t)}return _i(t)},{mkdirSync:Ci,writeFileSync:Oi,statSync:Ni,renameSync:ur,chownSync:Li,chmodSync:Hi,unlinkSync:Bi}=ki("node:fs"),Mi=(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},pt(t),$i(e),t=ct(t);const o=_e(t,ke);if(o&&!r.overwrite)throw new us(`file already exists, open '${t}'`);const n=xi(t);try{!o&&r.recursive&&Ci(Ce(t),{recursive:!0});let s;if(Oi(n,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):wi(e),{flag:"wx"}),o&&r.backup&&(s=Ni(t),r.chown??={gid:s.gid,uid:s.uid},ur(t,`${t}.bak`)),r.chown)try{Li(n,r.chown.uid,r.chown.gid)}catch{}Hi(n,s&&!r.mode?s.mode:r.mode??438),ur(n,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{_e(n)&&Bi(n)}},Di=/^(?:( )+|\t+)/,ne="space";function lr(t,e,r){return t&&e===ne&&r===1}function ar(t,e){const r=new Map;let o=0,n,s;for(const i of t.split(/\n/g)){if(!i)continue;const u=i.match(Di);if(u===null)o=0,n="";else{const a=u[0].length,m=u[1]?ne:"tab";if(lr(e,m,a))continue;m!==n&&(o=0),n=m;let h=1,y=0;const A=a-o;if(o=a,A===0)h=0,y=1;else{const $=Math.abs(A);if(lr(e,m,$))continue;s=Pi(m,$)}const g=r.get(s);r.set(s,g===void 0?[1,0]:[g[0]+h,g[1]+y])}}return r}function Pi(t,e){return(t===ne?"s":"t")+String(e)}function Ii(t){const e=t[0]==="s"?ne:"tab",r=Number(t.slice(1));return{type:e,amount:r}}function Fi(t){let e,r=0,o=0;for(const[n,[s,i]]of t)(s>r||s===r&&i>o)&&(r=s,o=i,e=n);return e}function Gi(t,e){return(t===ne?" ":" ").repeat(e)}function Ui(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=ar(t,!0);e.size===0&&(e=ar(t,!1));const r=Fi(e);let o,n=0,s="";return r!==void 0&&({type:o,amount:n}=Ii(r),s=Gi(o,n)),{amount:n,type:o,indent:s}}const ji=B(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zi=t=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,r]=te.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return te.getBuiltinModule(t)}return ji(t)};zi("node:fs/promises");const Wi=B(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qi=t=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,r]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ee.getBuiltinModule(t)}return Wi(t)},{readFileSync:Xi}=qi("node:fs"),wu=(t,e,r={})=>{const{detectIndent:o,indent:n,replacer:s,stringify:i=JSON.stringify,...u}={indent:" ",...r};let a=n,m=`
|
|
20
|
+
`;if(_e(t,Gr))try{const y=Xi(t,"utf8");if(o){const{indent:A}=Ui(y);a=A}m=y.endsWith(`
|
|
21
|
+
`)?`
|
|
22
|
+
`:""}catch(y){if(y.code!=="ENOENT")throw y}const h=i(e,s,a);Mi(t,`${h}${m}`,u)},Ki=B(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Le=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,r]=re.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return re.getBuiltinModule(t)}return Ki(t)},Qi=Le("fs"),Zi=Le("os"),Vi=Le("path");var we={},cr;function Yi(){if(cr)return we;cr=1;var t=Object.defineProperty,e=(h,y)=>t(h,"name",{value:y,configurable:!0}),r=Qi,o=Zi,n=Vi;const s=e(h=>{let y="";for(let A=0;A<h.length;A+=1){const g=h[A],$=g.toUpperCase();y+=g===$?g.toLowerCase():$}return y},"invertCase"),i=new Map,u=e((h,y)=>{const A=n.join(h,`.is-fs-case-sensitive-test-${process.pid}`);try{return y.writeFileSync(A,""),!y.existsSync(s(A))}finally{try{y.unlinkSync(A)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((h,y,A)=>{try{return u(h,A)}catch(g){if(y===void 0)return u(o.tmpdir(),A);throw g}},"checkDirectoryCaseWithFallback"),m=e((h,y=r,A=!0)=>{const g=h??process.cwd();if(A&&i.has(g))return i.get(g);let $;const _=s(g);return _!==g&&y.existsSync(g)?$=!y.existsSync(_):$=a(g,h,y),A&&i.set(g,$),$},"isFsCaseSensitive");return we.isFsCaseSensitive=m,we}var Ji=Yi();const Tu=Ji.isFsCaseSensitive;export{bt as A,vt as B,pu as F,Ce as H,Ps as I,hr as J,ct as L,wu as O,Mi as T,vu as U,gu as W,lu as a,du as b,bu as c,uu as d,Fn as e,_e as f,ce as g,nu as h,eu as i,Yr as j,Tu as k,Su as l,Zr as m,ru as o,Au as s,$u as v,su as w,ou as y,Eu as z};
|