@visulima/vis 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +1 -1
  4. package/dist/packem_chunks/bloom-sync.js +1 -1
  5. package/dist/packem_chunks/catalog2.js +1 -1
  6. package/dist/packem_chunks/cli-exec.js +1 -1
  7. package/dist/packem_chunks/cli-main.js +1 -1
  8. package/dist/packem_chunks/fix.js +1 -1
  9. package/dist/packem_chunks/git.js +8 -5
  10. package/dist/packem_chunks/handler10.js +1 -1
  11. package/dist/packem_chunks/handler12.js +1 -1
  12. package/dist/packem_chunks/handler13.js +1 -1
  13. package/dist/packem_chunks/handler14.js +1 -1
  14. package/dist/packem_chunks/handler15.js +1 -1
  15. package/dist/packem_chunks/handler19.js +1 -1
  16. package/dist/packem_chunks/handler2.js +1 -1
  17. package/dist/packem_chunks/handler20.js +1 -1
  18. package/dist/packem_chunks/handler21.js +1 -1
  19. package/dist/packem_chunks/handler23.js +1 -1
  20. package/dist/packem_chunks/handler24.js +1 -1
  21. package/dist/packem_chunks/handler25.js +1 -1
  22. package/dist/packem_chunks/handler26.js +1 -1
  23. package/dist/packem_chunks/handler28.js +1 -1
  24. package/dist/packem_chunks/handler3.js +1 -1
  25. package/dist/packem_chunks/handler32.js +1 -1
  26. package/dist/packem_chunks/handler4.js +1 -1
  27. package/dist/packem_chunks/handler46.js +1 -1
  28. package/dist/packem_chunks/handler49.js +1 -1
  29. package/dist/packem_chunks/handler5.js +1 -1
  30. package/dist/packem_chunks/handler50.js +1 -1
  31. package/dist/packem_chunks/handler51.js +1 -1
  32. package/dist/packem_chunks/handler52.js +1 -1
  33. package/dist/packem_chunks/handler54.js +1 -1
  34. package/dist/packem_chunks/handler55.js +1 -1
  35. package/dist/packem_chunks/handler56.js +4 -4
  36. package/dist/packem_chunks/handler58.js +1 -1
  37. package/dist/packem_chunks/handler59.js +1 -1
  38. package/dist/packem_chunks/handler6.js +1 -1
  39. package/dist/packem_chunks/handler60.js +1 -1
  40. package/dist/packem_chunks/handler61.js +1 -1
  41. package/dist/packem_chunks/handler62.js +1 -1
  42. package/dist/packem_chunks/handler63.js +1 -1
  43. package/dist/packem_chunks/handler64.js +1 -1
  44. package/dist/packem_chunks/handler65.js +1 -1
  45. package/dist/packem_chunks/handler66.js +1 -1
  46. package/dist/packem_chunks/handler67.js +1 -1
  47. package/dist/packem_chunks/handler68.js +1 -1
  48. package/dist/packem_chunks/handler69.js +1 -1
  49. package/dist/packem_chunks/handler7.js +1 -1
  50. package/dist/packem_chunks/handler70.js +1 -1
  51. package/dist/packem_chunks/handler71.js +1 -1
  52. package/dist/packem_chunks/handler72.js +1 -1
  53. package/dist/packem_chunks/handler73.js +1 -1
  54. package/dist/packem_chunks/handler74.js +1 -1
  55. package/dist/packem_chunks/handler75.js +1 -1
  56. package/dist/packem_chunks/handler76.js +1 -1
  57. package/dist/packem_chunks/handler77.js +1 -1
  58. package/dist/packem_chunks/handler78.js +1 -1
  59. package/dist/packem_chunks/handler79.js +1 -1
  60. package/dist/packem_chunks/handler8.js +1 -1
  61. package/dist/packem_chunks/heal.js +1 -1
  62. package/dist/packem_chunks/help-command.js +1 -1
  63. package/dist/packem_chunks/index2.js +3 -3
  64. package/dist/packem_chunks/index7.js +1 -1
  65. package/dist/packem_chunks/keys-refresh.js +1 -1
  66. package/dist/packem_chunks/list.js +1 -1
  67. package/dist/packem_chunks/prune.js +1 -1
  68. package/dist/packem_chunks/status.js +1 -1
  69. package/dist/packem_chunks/success-walk.js +7 -7
  70. package/dist/packem_chunks/sync.js +1 -1
  71. package/dist/packem_chunks/sync2.js +1 -1
  72. package/dist/packem_chunks/tripwire.js +1 -1
  73. package/dist/packem_chunks/verify-lockfile.js +1 -1
  74. package/dist/packem_shared/{ReleaseClient-DXlaCQuQ.js → ReleaseClient-1hH9OIcb.js} +1 -1
  75. package/dist/packem_shared/{advisories-DvmoRKco.js → advisories-DyHTz-me.js} +1 -1
  76. package/dist/packem_shared/{affected-selection-BCYW97-p.js → affected-selection-C3eYhoTa.js} +1 -1
  77. package/dist/packem_shared/{ai-analysis-C7JT_zkS.js → ai-analysis-y1glEwHU.js} +1 -1
  78. package/dist/packem_shared/{ai-cache-B-3KMpa9.js → ai-cache-Bq3dQd87.js} +1 -1
  79. package/dist/packem_shared/{ai-fix-PRDGLhGn.js → ai-fix-BQUNIOMp.js} +1 -1
  80. package/dist/packem_shared/apply-DA-Dv8Pq.js +8 -0
  81. package/dist/packem_shared/{bin-Bi_j0gXS.js → bin-DEQ52GkZ.js} +1 -1
  82. package/dist/packem_shared/{build-scripts-Bc8dOvdA.js → build-scripts-wF0ykoin.js} +1 -1
  83. package/dist/packem_shared/{dependency-scan-YbYZyLNf.js → dependency-scan-BNqHSRaA.js} +1 -1
  84. package/dist/packem_shared/{detect-clCqXvt_.js → detect-B9mLzG9L.js} +1 -1
  85. package/dist/packem_shared/{docker-hegwl1I6.js → docker-CpJj7VQ6.js} +1 -1
  86. package/dist/packem_shared/{ecosystem-gate-C9GmY9oJ.js → ecosystem-gate-DI5TKrtm.js} +1 -1
  87. package/dist/packem_shared/{env-DDmZsWBr.js → env-CsENUmRe.js} +1 -1
  88. package/dist/packem_shared/{env-consistency-Bn8a_NXB.js → env-consistency-HvLV2yQ6.js} +1 -1
  89. package/dist/packem_shared/{failure-log-D-YtsYF3.js → failure-log-C8Vh0Vtk.js} +1 -1
  90. package/dist/packem_shared/glob-Cyk1H9ZL-ChoYoZKK.js +1 -0
  91. package/dist/packem_shared/{index-C297jo7X.js → index-CFglig6K.js} +1 -1
  92. package/dist/packem_shared/{index-BRrpyvTT.js → index-CLcQ8Xe4.js} +1 -1
  93. package/dist/packem_shared/{interface.d-CrHOtJc1.d.ts → interface.d-Bb_1pid9.d.ts} +1 -1
  94. package/dist/packem_shared/{interface.d-CRqRz4jt.d.ts → interface.d-BlaMrDqd.d.ts} +7 -0
  95. package/dist/packem_shared/{lifecycle-BBEFEzfq.js → lifecycle-DNz4d7ND.js} +1 -1
  96. package/dist/packem_shared/{manifests-Caf3hlIO.js → manifests-CgyI-i-c.js} +1 -1
  97. package/dist/packem_shared/{min-release-age-BysoCN79.js → min-release-age-BpvYMZuT.js} +1 -1
  98. package/dist/packem_shared/{missing-package-json-Cvjhtrwa.js → missing-package-json-Bg72nt4h.js} +1 -1
  99. package/dist/packem_shared/{multi-eco-lockfiles-g-vAXRj7.js → multi-eco-lockfiles-BCGfTwHy.js} +1 -1
  100. package/dist/packem_shared/{native-config-sync-Bm9PtGpG.js → native-config-sync-em22UAUQ.js} +1 -1
  101. package/dist/packem_shared/{osv-9k7R7LU3.js → osv-CjtVHCRP.js} +1 -1
  102. package/dist/packem_shared/{package-version-CNjr03oy.js → package-version-BzkcrNVE.js} +1 -1
  103. package/dist/packem_shared/{packument-D_qCUp6X.js → packument-BvTjAHsy.js} +1 -1
  104. package/dist/packem_shared/{project-name-filter-D7cvTZtS.js → project-name-filter-DKFmLbwE.js} +1 -1
  105. package/dist/packem_shared/{provenance-DSeGe6vU.js → provenance-DFN3qbB3.js} +1 -1
  106. package/dist/packem_shared/publish-missing-MxqARUPC.js +35 -0
  107. package/dist/packem_shared/{registry-Mb5e6Tf4.js → registry-CIfr2njA.js} +1 -1
  108. package/dist/packem_shared/{registry-keys-CQxcAR-Z.js → registry-keys-Cq92YoCx.js} +1 -1
  109. package/dist/packem_shared/{renderToString-DR0zDUjh-DPXtZSQK.js → renderToString-DR0zDUjh-BUpUCnJt.js} +1 -1
  110. package/dist/packem_shared/{resolve-explicit-YbCvwu7l.js → resolve-explicit-CZlkR05q.js} +1 -1
  111. package/dist/packem_shared/{run-summary-utils-B0K6xaLZ.js → run-summary-utils-BYPm6bUE.js} +1 -1
  112. package/dist/packem_shared/{runtime-check-DDPs78Zv.js → runtime-check-DUxn-Idd.js} +1 -1
  113. package/dist/packem_shared/{s1ngularity-CCkRFMDX.js → s1ngularity-CPXsMMnh.js} +1 -1
  114. package/dist/packem_shared/{scaffold-files-Xt6zE44I.js → scaffold-files-ojq9leuZ.js} +1 -1
  115. package/dist/packem_shared/{scan-progress-BbxXKvTV.js → scan-progress-DBaFUryq.js} +1 -1
  116. package/dist/packem_shared/{selectors-CwKjRLHo.js → selectors-aT_XJTrh.js} +1 -1
  117. package/dist/packem_shared/{signatures-DDD9Iaer.js → signatures-C2HaWfZn.js} +1 -1
  118. package/dist/packem_shared/{spinner-BItORXCk.js → spinner-C23pifwn.js} +1 -1
  119. package/dist/packem_shared/{table-DsmWzLWy.js → table-CAjUuSN2.js} +1 -1
  120. package/dist/packem_shared/{tabs-D61j1uvE.js → tabs-CogGAIWQ.js} +1 -1
  121. package/dist/packem_shared/{toolchain-Z0l12EQs.js → toolchain-BF6NEQJ2.js} +1 -1
  122. package/dist/packem_shared/{typosquats-Da4w5sjI.js → typosquats-MPA4DNWt.js} +1 -1
  123. package/dist/packem_shared/{use-measured-height-UU40gqT7.js → use-measured-height-BHJ8aL73.js} +1 -1
  124. package/dist/packem_shared/{vis-update-app-Bin63opa.js → vis-update-app--aolEPqW.js} +1 -1
  125. package/dist/packem_shared/{vis-user-error-wkTUvlyX.js → vis-user-error-DUyARIaA.js} +1 -1
  126. package/dist/packem_shared/{watch-loop-CGBVtTBl.js → watch-loop-C7VCU587.js} +1 -1
  127. package/dist/release/core/changelog/index.d.ts +1 -1
  128. package/dist/release/core/package-managers/index.d.ts +2 -2
  129. package/dist/release/core/version-actions/index.d.ts +3 -3
  130. package/dist/release/index.js +1 -1
  131. package/dist/release/plugin-sdk.d.ts +3 -3
  132. package/dist/release/types.d.ts +31 -0
  133. package/index.js +26 -26
  134. package/package.json +9 -9
  135. package/schemas/vis-config.schema.json +16 -0
  136. package/schemas/vis-release-config.schema.json +16 -0
  137. package/dist/packem_shared/apply-DBU-Gu24.js +0 -6
  138. package/dist/packem_shared/glob-Cyk1H9ZL-BjuiUjNv.js +0 -1
  139. package/dist/packem_shared/publish-missing-DwaM7zcX.js +0 -35
@@ -1,4 +1,4 @@
1
1
  import{createRequire as ct}from"node:module";import{r as mt,f as Lt,T as gt,z as R,C as St,k as be,m as te,a as vt,g as Ct,c as Pt}from"./index-0dnGN3GP.js";import{L as De}from"./index-BisalDCf.js";import{a as ie,g as yt}from"./_commonjsHelpers-DTfxOvZk.js";import{r as bt,a as Dt}from"./clean-DRiLimTx.js";let ht;const ut=h=>(ht??=ct(import.meta.url))(h),F=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=h=>{if(typeof F<"u"&&F.versions&&F.versions.node){const[e,t]=F.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return F.getBuiltinModule(h)}return ut(h)},{dirname:pt}=T("node:path"),Pe=T("node:url"),{fileURLToPath:ft}=Pe,ye=T("node:module"),{createRequire:dt}=ye,At=T("util"),Bi=h=>"Bun"in h,Ti=()=>process.argv,Ri=()=>process.cwd(),Ii=()=>process.env,Ui=()=>process.execArgv,Mi=()=>process.execPath,ki=()=>process.platform,_i=()=>process.arch,Wi=(h=0)=>{process.exit(h)},Hi=(h,e)=>{const t=process;return t.on(h,e),()=>{t.removeListener(h,e)}},wt=h=>String.raw`\u{${h.codePointAt(0).toString(16)}}`,xt=(h,e,t)=>gt(h,{start:e},{tabWidth:!1,...t}),Et=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Ot=(h,e)=>{const t=Et.exec(e);if(!t)return;const[,n,i,r]=t;if(i&&r)return{column:Number(r),line:Number(i)};let o=Number(n);return o===h.length&&(o=h.length-1),Lt(h,o)},Nt=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Ft=h=>h.replace(Nt,(e,t,n)=>`"${n}"(${wt(n)})`);function Gt(h,e,t,n){let i;try{return JSON.parse(h,e)}catch(l){i=l.message}let r;h?(r=Ot(h,i),i=Ft(i)):i+=" while parsing empty string";const o=new mt(i);throw o.fileName=t,r&&(o.codeFrame=xt(h,r,n)),o}function $t(h,e,t){const n=R(h,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:r,color:o}={};return typeof r=="function"&&(i=r(i)),Gt(i,e,St(h),{color:o})}var U,ne;function Ae(){return ne||(ne=1,U=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","ALGLIB-Documentation","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Advanced-Cryptics-Dictionary","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BOLA-1.1","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-Tso","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Mark-Modifications","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","Buddy","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CAPEC-tou","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","ESA-PL-permissive-2.4","ESA-PL-strong-copyleft-2.4","ESA-PL-weak-copyleft-2.4","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-SMC","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HPND-sell-variant-critical-systems","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ISO-permission","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-STK","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MMPL-1.0.1","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-TNT","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSC-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OSSP","OpenMDW-1.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","ParaType-Free-Font-1.3","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGMLUG-PM","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TekHVC","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","UnRAR","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","Vixie-Cron","W3C","W3C-19980720","W3C-20150513","WTFNMFPL","WTFPL","Watcom-1.0","Widget-Workshop","WordNet","Wsuipa","X11","X11-distribute-modifications-variant","X11-no-permit-persons","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","hyphen-bulgarian","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]),U}var M,se;function Bt(){return se||(se=1,M=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]),M}var k,oe;function Tt(){return oe||(oe=1,k=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]),k}var _,ae;function Rt(){if(ae)return _;ae=1;var h=[].concat(Ae()).concat(Bt()),e=Tt();return _=function(t){var n=0;function i(){return n<t.length}function r(g){if(g instanceof RegExp){var c=t.slice(n),L=c.match(g);if(L)return n+=L[0].length,L[0]}else if(t.indexOf(g,n)===n)return n+=g.length,g}function o(){r(/[ ]*/)}function l(){for(var g,c=["WITH","AND","OR","(",")",":","+"],L=0;L<c.length&&(g=r(c[L]),!g);L++);if(g==="+"&&n>1&&t[n-2]===" ")throw new Error("Space before `+`");return g&&{type:"OPERATOR",string:g}}function a(){return r(/[A-Za-z0-9-.]+/)}function u(){var g=a();if(!g)throw new Error("Expected idstring at offset "+n);return g}function f(){if(r("DocumentRef-")){var g=u();return{type:"DOCUMENTREF",string:g}}}function S(){if(r("LicenseRef-")){var g=u();return{type:"LICENSEREF",string:g}}}function b(){var g=n,c=a();if(h.indexOf(c)!==-1)return{type:"LICENSE",string:c};if(e.indexOf(c)!==-1)return{type:"EXCEPTION",string:c};n=g}function v(){return l()||f()||S()||b()}for(var C=[];i()&&(o(),!!i());){var m=v();if(!m)throw new Error("Unexpected `"+t[n]+"` at offset "+n);C.push(m)}return C},_}var W,le;function It(){return le||(le=1,W=function(h){var e=0;function t(){return e<h.length}function n(){return t()?h[e]:null}function i(){if(!t())throw new Error;e++}function r(m){var g=n();if(g&&g.type==="OPERATOR"&&m===g.string)return i(),g.string}function o(){if(r("WITH")){var m=n();if(m&&m.type==="EXCEPTION")return i(),m.string;throw new Error("Expected exception after `WITH`")}}function l(){var m=e,g="",c=n();if(c.type==="DOCUMENTREF"&&(i(),g+="DocumentRef-"+c.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(c=n(),c.type==="LICENSEREF")return i(),g+="LicenseRef-"+c.string,{license:g};e=m}function a(){var m=n();if(m&&m.type==="LICENSE"){i();var g={license:m.string};r("+")&&(g.plus=!0);var c=o();return c&&(g.exception=c),g}}function u(){var m=r("(");if(m){var g=v();if(!r(")"))throw new Error("Expected `)`");return g}}function f(){return u()||l()||a()}function S(m,g){return function c(){var L=g();if(L){if(!r(m))return L;var y=c();if(!y)throw new Error("Expected expression");return{left:L,conjunction:m.toLowerCase(),right:y}}}}var b=S("AND",f),v=S("OR",b),C=v();if(!C||t())throw new Error("Syntax error");return C}),W}var H,ce;function we(){if(ce)return H;ce=1;var h=Rt(),e=It();return H=function(t){return e(h(t))},H}var j,he;function Ut(){if(he)return j;he=1;var h=we(),e=Ae();function t(c){try{return h(c),!0}catch{return!1}}function n(c,L){var y=L[0].length-c[0].length;return y!==0?y:c[0].toUpperCase().localeCompare(L[0].toUpperCase())}var i=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(n),r=0,o=1,l=[function(c){return c.toUpperCase()},function(c){return c.trim()},function(c){return c.replace(/\./g,"")},function(c){return c.replace(/\s+/g,"")},function(c){return c.replace(/\s+/g,"-")},function(c){return c.replace("v","-")},function(c){return c.replace(/,?\s*(\d)/,"-$1")},function(c){return c.replace(/,?\s*(\d)/,"-$1.0")},function(c){return c.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(c){return c.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(c){return c[0].toUpperCase()+c.slice(1)},function(c){return c.replace("/","-")},function(c){return c.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(c){return c.indexOf("3.0")!==-1?c+"-or-later":c+"-only"},function(c){return c+"only"},function(c){return c.replace(/(\d)$/,"-$1.0")},function(c){return c.replace(/(-| )?(\d)$/,"-$2-Clause")},function(c){return c.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(c){return c.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(c){return c.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(c){return c.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(c){return c.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(c){return c.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(c){return"CC-"+c},function(c){return"CC-"+c+"-4.0"},function(c){return c.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(c){return"CC-"+c.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],a=e.map(function(c){var L=/^(.*)-\d+\.\d+$/.exec(c);return L?[L[0],L[1]]:[c,null]}).reduce(function(c,L){var y=L[1];return c[y]=c[y]||[],c[y].push(L[0]),c},{}),u=Object.keys(a).map(function(L){return[L,a[L]]}).filter(function(L){return L[1].length===1&&L[0]!==null&&L[0]!=="APL"}).map(function(L){return[L[0],L[1][0]]});a=void 0;var f=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(u).sort(n),S=0,b=1,v=function(c){for(var L=0;L<l.length;L++){var y=l[L](c).trim();if(y!==c&&t(y))return y}return null},C=function(c){for(var L=c.toUpperCase(),y=0;y<f.length;y++){var s=f[y];if(L.indexOf(s[S])>-1)return s[b]}return null},m=function(c,L){for(var y=0;y<i.length;y++){var s=i[y],p=s[r];if(c.indexOf(p)>-1){var d=c.replace(p,s[o]),P=L(d);if(P!==null)return P}}return null};j=function(c,L){L=L||{};var y=L.upgrade===void 0?!0:!!L.upgrade;function s(D){return y?g(D):D}var p=typeof c=="string"&&c.trim().length!==0;if(!p)throw Error("Invalid argument. Expected non-empty string.");if(c=c.trim(),t(c))return s(c);var d=c.replace(/\+$/,"").trim();if(t(d))return s(d);var P=v(c);return P!==null||(P=m(c,function(D){return t(D)?D:v(D)}),P!==null)||(P=C(c),P!==null)||(P=m(c,C),P!==null)?s(P):null};function g(c){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(c)!==-1?c+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(c)!==-1?c.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(c)!==-1?c+"-or-later":c}return j}var z,ue;function Mt(){if(ue)return z;ue=1;var h=we(),e=Ut(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',n=/^SEE LICEN[CS]E IN (.+)$/;function i(o,l){return l.slice(0,o.length)===o}function r(o){if(o.hasOwnProperty("license")){var l=o.license;return i("LicenseRef",l)||i("DocumentRef",l)}else return r(o.left)||r(o.right)}return z=function(o){var l;try{l=h(o)}catch{var a;if(o==="UNLICENSED"||o==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(a=n.exec(o))return{validForOldPackages:!0,validForNewPackages:!0,inFile:a[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(o.trim().length!==0){var f=e(o);f&&u.warnings.push('license is similar to the valid expression "'+f+'"')}return u}return r(l)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},z}var xe={hasSubscribers:!1},A=xe,N=xe;import("node:diagnostics_channel").then(h=>{A=h.channel("lru-cache:metrics"),N=h.tracingChannel("lru-cache")}).catch(()=>{});var kt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=()=>A.hasSubscribers||N.hasSubscribers,Ee=new Set,pe=process||{},_t=(h,e,t,n)=>{typeof pe.emitWarning=="function"?pe.emitWarning(h,e,t,n):console.error(`[${t}] ${e}: ${h}`)},Wt=h=>!Ee.has(h),O=h=>!!h&&h===Math.floor(h)&&h>0&&isFinite(h),Oe=h=>O(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?B:null:null,B=class extends Array{constructor(e){super(e),this.fill(0)}},Ht=class ${heap;length;static#n=!1;static create(e){let t=Oe(e);if(!t)return[];$.#n=!0;let n=new $(e,t);return $.#n=!1,n}constructor(e,t){if(!$.#n)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},jt=class Ne{#n;#c;#t;#O;#g;#T;#R;#S;get perf(){return this.#S}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#o;#v;#s;#r;#e;#u;#f;#h;#a;#C;#l;#P;#y;#d;#m;#b;#I;#p;#N;static unsafeExposeInternals(e){return{starts:e.#y,ttls:e.#d,autopurgeTimers:e.#m,sizes:e.#P,keyMap:e.#s,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#f,get head(){return e.#h},get tail(){return e.#a},free:e.#C,isBackgroundFetch:t=>e.#i(t),backgroundFetch:(t,n,i,r)=>e.#k(t,n,i,r),moveToTail:t=>e.#B(t),indexes:t=>e.#D(t),rindexes:t=>e.#A(t),isStale:t=>e.#L(t)}}get max(){return this.#n}get maxSize(){return this.#c}get calculatedSize(){return this.#v}get size(){return this.#o}get fetchMethod(){return this.#T}get memoMethod(){return this.#R}get dispose(){return this.#t}get onInsert(){return this.#O}get disposeAfter(){return this.#g}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:a,dispose:u,onInsert:f,disposeAfter:S,noDisposeOnSet:b,noUpdateTTL:v,maxSize:C=0,maxEntrySize:m=0,sizeCalculation:g,fetchMethod:c,memoMethod:L,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:s,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:P,backgroundFetchSize:D=1,perf:w}=e;if(this.backgroundFetchSize=D,w!==void 0&&typeof w?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=w??kt,t!==0&&!O(t))throw new TypeError("max option must be a nonnegative integer");let x=t?Oe(t):Array;if(!x)throw new Error("invalid max value: "+t);if(this.#n=t,this.#c=C,this.maxEntrySize=m||this.#c,this.sizeCalculation=g,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(L!==void 0&&typeof L!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=L,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#T=c,this.#I=!!c,this.#s=new Map,this.#r=Array.from({length:t}).fill(void 0),this.#e=Array.from({length:t}).fill(void 0),this.#u=new x(t),this.#f=new x(t),this.#h=0,this.#a=0,this.#C=Ht.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),typeof f=="function"&&(this.#O=f),typeof S=="function"?(this.#g=S,this.#l=[]):(this.#g=void 0,this.#l=void 0),this.#b=!!this.#t,this.#N=!!this.#O,this.#p=!!this.#g,this.noDisposeOnSet=!!b,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!d,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#c!==0&&!O(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!O(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!s,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=O(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=n||0,this.ttl){if(!O(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#_()}if(this.#n===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#n&&!this.#c){let I="LRU_CACHE_UNBOUNDED";Wt(I)&&(Ee.add(I),_t("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,Ne))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#_(){let e=new B(this.#n),t=new B(this.#n);this.#d=e,this.#y=t;let n=this.ttlAutopurge?Array.from({length:this.#n}):void 0;this.#m=n,this.#W=(a,u,f=this.#S.now())=>{t[a]=u!==0?f:0,e[a]=u,i(a,u)},this.#F=a=>{t[a]=e[a]!==0?this.#S.now():0,i(a,e[a])};let i=this.ttlAutopurge?(a,u)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),u&&u!==0&&n){let f=setTimeout(()=>{this.#L(a)?(this.#w(this.#r[a],"expire"),n[a]=void 0):i(a,l(a))},u+1);f.unref&&f.unref(),n[a]=f}}:()=>{};this.#x=(a,u)=>{if(e[u]){let f=e[u],S=t[u];if(!f||!S)return;a.ttl=f,a.start=S,a.now=r||o();let b=a.now-S;a.remainingTTL=f-b}};let r=0,o=()=>{let a=this.#S.now();if(this.ttlResolution>0){r=a;let u=setTimeout(()=>r=0,this.ttlResolution);u.unref&&u.unref()}return a};this.getRemainingTTL=a=>{let u=this.#s.get(a);return u===void 0?0:l(u)};let l=a=>{let u=e[a],f=t[a];if(!u||!f)return 1/0;let S=(r||o())-f;return u-S};this.#L=a=>{let u=t[a],f=e[a];return!!f&&!!u&&(r||o())-u>f}}#F=()=>{};#x=()=>{};#W=()=>{};#L=()=>!1;#V(){let e=new B(this.#n);this.#v=0,this.#P=e,this.#G=t=>{this.#v-=e[t],e[t]=0},this.#H=(t,n,i,r)=>{if(!O(i)){if(this.#i(n))return this.backgroundFetchSize;if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(n,t),!O(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#U=(t,n,i)=>{if(e[t]=n,this.#c){let r=this.#c-e[t];for(;this.#v>r;)this.#M(!0)}this.#v+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#v)}}#G=e=>{};#U=(e,t,n)=>{};#H=(e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#D({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#a;this.#j(t)&&((e||!this.#L(t))&&(yield t),t!==this.#h);)t=this.#f[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#j(t)&&((e||!this.#L(t))&&(yield t),t!==this.#a);)t=this.#u[t]}#j(e){return e!==void 0&&this.#s.get(this.#r[e])===e}*entries(){for(let e of this.#D())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*rentries(){for(let e of this.#A())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*keys(){for(let e of this.#D()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*values(){for(let e of this.#D())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#A())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#D()){let i=this.#e[n],r=this.#i(i)?i.__staleWhileFetching:i;if(r!==void 0&&e(r,this.#r[n],this))return this.#$(this.#r[n],t)}}forEach(e,t=this){for(let n of this.#D()){let i=this.#e[n],r=this.#i(i)?i.__staleWhileFetching:i;r!==void 0&&e.call(t,r,this.#r[n],this)}}rforEach(e,t=this){for(let n of this.#A()){let i=this.#e[n],r=this.#i(i)?i.__staleWhileFetching:i;r!==void 0&&e.call(t,r,this.#r[n],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#L(t)&&(this.#w(this.#r[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let n=this.#e[t],i=this.#i(n)?n.__staleWhileFetching:n;if(i===void 0)return;let r={value:i};if(this.#d&&this.#y){let o=this.#d[t],l=this.#y[t];if(o&&l){let a=o-(this.#S.now()-l);r.ttl=a,r.start=Date.now()}}return this.#P&&(r.size=this.#P[t]),r}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let n=this.#r[t],i=this.#e[t],r=this.#i(i)?i.__staleWhileFetching:i;if(r===void 0||n===void 0)continue;let o={value:r};if(this.#d&&this.#y){o.ttl=this.#d[t];let l=this.#S.now()-this.#y[t];o.start=Math.floor(Date.now()-l)}this.#P&&(o.size=this.#P[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#S.now()-i}this.#E(t,n.value,n)}}set(e,t,n={}){let{status:i=A.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,t!==void 0&&(i.value=t),i.cache=this);let r=this.#E(e,t,n);return i&&A.hasSubscribers&&A.publish(i),r}#E(e,t,n,i){let{ttl:r=this.ttl,start:o,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=n,f=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:S=this.noUpdateTTL}=n;u&&!f&&(u.value=t);let b=this.#H(e,t,n.size||0,a,u);if(this.maxEntrySize&&b>this.maxEntrySize)return this.#w(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let v=this.#o===0?void 0:this.#s.get(e);if(v===void 0)v=this.#o===0?this.#a:this.#C.length!==0?this.#C.pop():this.#o===this.#n?this.#M(!1):this.#o,this.#r[v]=e,this.#e[v]=t,this.#s.set(e,v),this.#u[this.#a]=v,this.#f[v]=this.#a,this.#a=v,this.#o++,this.#U(v,b,u),u&&(u.set="add"),S=!1,this.#N&&!f&&this.#O?.(t,e,"add");else{this.#B(v);let C=this.#e[v];if(t!==C){if(!l)if(this.#i(C)){C!==i&&C.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=C;m!==void 0&&m!==t&&(this.#b&&this.#t?.(m,e,"set"),this.#p&&this.#l?.push([m,e,"set"]))}else this.#b&&this.#t?.(C,e,"set"),this.#p&&this.#l?.push([C,e,"set"]);if(this.#G(v),this.#U(v,b,u),this.#e[v]=t,!f){let m=C&&this.#i(C)?C.__staleWhileFetching:C,g=m===void 0?"add":t!==m?"replace":"update";u&&(u.set=g,m!==void 0&&(u.oldValue=m)),this.#N&&this.onInsert?.(t,e,g)}}else f||(u&&(u.set="update"),this.#N&&this.onInsert?.(t,e,"update"))}if(r!==0&&!this.#d&&this.#_(),this.#d&&(S||this.#W(v,r,o),u&&this.#x(u,v)),!l&&this.#p&&this.#l){let C=this.#l,m;for(;m=C?.shift();)this.#g?.(...m)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#h];if(this.#M(!0),this.#i(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#l){let e=this.#l,t;for(;t=e?.shift();)this.#g?.(...t)}}}#M(e){let t=this.#h,n=this.#r[t],i=this.#e[t],r=this.#i(i);r&&i.__abortController.abort(new Error("evicted"));let o=r?i.__staleWhileFetching:i;return(this.#b||this.#p)&&o!==void 0&&(this.#b&&this.#t?.(o,n,"evict"),this.#p&&this.#l?.push([o,n,"evict"])),this.#G(t),this.#m?.[t]&&(clearTimeout(this.#m[t]),this.#m[t]=void 0),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#C.push(t)),this.#o===1?(this.#h=this.#a=0,this.#C.length=0):this.#h=this.#u[t],this.#s.delete(n),this.#o--,t}has(e,t={}){let{status:n=A.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#K(e,t);return A.hasSubscribers&&A.publish(n),i}#K(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,r=this.#s.get(e);if(r!==void 0){let o=this.#e[r];if(this.#i(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#L(r))i&&(i.has="stale",this.#x(i,r));else return n&&this.#F(r),i&&(i.has="hit",this.#x(i,r)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:n=Y()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#J(e,t);return A.hasSubscribers&&A.publish(n),i}#J(e,t){let{status:n,allowStale:i=this.allowStale}=t,r=this.#s.get(e);if(r===void 0||!i&&this.#L(r)){n&&(n.peek=r===void 0?"miss":"stale");return}let o=this.#e[r],l=this.#i(o)?o.__staleWhileFetching:o;return n&&(l!==void 0?(n.peek="hit",n.value=l):n.peek="miss"),l}#k(e,t,n,i){let r=t===void 0?void 0:this.#e[t];if(this.#i(r))return r;let o=new AbortController,{signal:l}=n;l?.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let a={signal:o.signal,options:n,context:i},u=(m,g=!1)=>{let{aborted:c}=o.signal,L=n.ignoreFetchAbort&&m!==void 0,y=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&m!==void 0);if(n.status&&(c&&!g?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,L&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),c&&!L&&!g)return S(o.signal.reason,y);let s=v,p=this.#e[t];return(p===v||p===void 0&&L&&g)&&(m===void 0?s.__staleWhileFetching!==void 0?this.#e[t]=s.__staleWhileFetching:this.#w(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#E(e,m,a.options,s))),m},f=m=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=m),S(m,!1)),S=(m,g)=>{let{aborted:c}=o.signal,L=c&&n.allowStaleOnFetchAbort,y=L||n.allowStaleOnFetchRejection,s=y||n.noDeleteOnFetchRejection,p=v;if(this.#e[t]===v&&(!s||!g&&p.__staleWhileFetching===void 0?this.#w(e,"fetch"):L||(this.#e[t]=p.__staleWhileFetching)),y)return n.status&&p.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw m},b=(m,g)=>{let c=this.#T?.(e,r,a);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(m(void 0),n.allowStaleOnFetchAbort&&(m=L=>u(L,!0)))}),c&&c instanceof Promise?c.then(L=>m(L===void 0?void 0:L),g):c!==void 0&&m(c)};n.status&&(n.status.fetchDispatched=!0);let v=new Promise(b).then(u,f),C=Object.assign(v,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.#E(e,C,{...a.options,status:void 0}),t=this.#s.get(e)):this.#e[t]=C,C}#i(e){if(!this.#I)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=N.hasSubscribers,{status:i=Y()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let r=this.#z(e,t);return i&&n&&(i.trace=!0,N.tracePromise(()=>r,i).catch(()=>{})),r}async#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:S=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:m,forceRefresh:g=!1,status:c,signal:L}=t;if(c&&(c.op="fetch",c.key=e,g&&(c.forceRefresh=!0),c.cache=this),!this.#I)return c&&(c.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:c});let y={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:l,size:a,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:C,ignoreFetchAbort:v,status:c,signal:L},s=this.#s.get(e);if(s===void 0){c&&(c.fetch="miss");let p=this.#k(e,s,y,m);return p.__returned=p}else{let p=this.#e[s];if(this.#i(p)){let w=n&&p.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",w&&(c.returnedStale=!0)),w?p.__staleWhileFetching:p.__returned=p}let d=this.#L(s);if(!g&&!d)return c&&(c.fetch="hit"),this.#B(s),i&&this.#F(s),c&&this.#x(c,s),p;let P=this.#k(e,s,y,m),D=P.__staleWhileFetching!==void 0&&n;return c&&(c.fetch=d?"stale":"refresh",D&&d&&(c.returnedStale=!0)),D?P.__staleWhileFetching:P.__returned=P}}forceFetch(e,t={}){let n=N.hasSubscribers,{status:i=Y()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let r=this.#X(e,t);return i&&n&&(i.trace=!0,N.tracePromise(()=>r,i).catch(()=>{})),r}async#X(e,t={}){let n=await this.#z(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=A.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let i=this.#Z(e,t);return n&&(n.value=i),A.hasSubscribers&&A.publish(n),i}#Z(e,t={}){let n=this.#R;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:r,forceRefresh:o,...l}=t;r&&o&&(r.forceRefresh=!0);let a=this.#$(e,l),u=o||a===void 0;if(r&&(r.memo=u?"miss":"hit",u||(r.value=a)),!u)return a;let f=n(e,a,{options:l,context:i});return r&&(r.value=f),this.#E(e,f,l),f}get(e,t={}){let{status:n=A.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#$(e,t);return n&&(i!==void 0&&(n.value=i),A.hasSubscribers&&A.publish(n)),i}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,l=this.#s.get(e);if(l===void 0){o&&(o.get="miss");return}let a=this.#e[l],u=this.#i(a);return o&&this.#x(o,l),this.#L(l)?u?(o&&(o.get="stale-fetching"),n&&a.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),a.__staleWhileFetching):void 0):(r||this.#w(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),a):void 0):(o&&(o.get=u?"fetching":"hit"),this.#B(l),i&&this.#F(l),u?a.__staleWhileFetching:a)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#B(e){e!==this.#a&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#a,e),this.#a=e)}delete(e){return this.#w(e,"delete")}#w(e,t){A.hasSubscribers&&A.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#o!==0){let i=this.#s.get(e);if(i!==void 0)if(this.#m?.[i]&&(clearTimeout(this.#m[i]),this.#m[i]=void 0),n=!0,this.#o===1)this.#q(t);else{this.#G(i);let r=this.#e[i];if(this.#i(r)?r.__abortController.abort(new Error("deleted")):(this.#b||this.#p)&&(this.#b&&this.#t?.(r,e,t),this.#p&&this.#l?.push([r,e,t])),this.#s.delete(e),this.#r[i]=void 0,this.#e[i]=void 0,i===this.#a)this.#a=this.#f[i];else if(i===this.#h)this.#h=this.#u[i];else{let o=this.#f[i];this.#u[o]=this.#u[i];let l=this.#u[i];this.#f[l]=this.#f[i]}this.#o--,this.#C.push(i)}}if(this.#p&&this.#l?.length){let i=this.#l,r;for(;r=i?.shift();)this.#g?.(...r)}return n}clear(){return this.#q("delete")}#q(e){for(let t of this.#A({allowStale:!0})){let n=this.#e[t];if(this.#i(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#r[t];this.#b&&this.#t?.(n,i,e),this.#p&&this.#l?.push([n,i,e])}}if(this.#s.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#y){this.#d.fill(0),this.#y.fill(0);for(let t of this.#m??[])t!==void 0&&clearTimeout(t);this.#m?.fill(void 0)}if(this.#P&&this.#P.fill(0),this.#h=0,this.#a=0,this.#C.length=0,this.#v=0,this.#o=0,this.#p&&this.#l){let t=this.#l,n;for(;n=t?.shift();)this.#g?.(...n)}}};const zt=Object.defineProperty({__proto__:null,LRUCache:jt},Symbol.toStringTag,{value:"Module"}),Yt=ie(zt);var q,fe;function qt(){if(fe)return q;fe=1;const h=(...r)=>r.every(o=>o)?r.join(""):"",e=r=>r?encodeURIComponent(r):"",t=r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),n={sshtemplate:({domain:r,user:o,project:l,committish:a})=>`git@${r}:${o}/${l}.git${h("#",a)}`,sshurltemplate:({domain:r,user:o,project:l,committish:a})=>`git+ssh://git@${r}/${o}/${l}.git${h("#",a)}`,edittemplate:({domain:r,user:o,project:l,committish:a,editpath:u,path:f})=>`https://${r}/${o}/${l}${h("/",u,"/",e(a||"HEAD"),"/",f)}`,browsetemplate:({domain:r,user:o,project:l,committish:a,treepath:u})=>`https://${r}/${o}/${l}${h("/",u,"/",e(a))}`,browsetreetemplate:({domain:r,user:o,project:l,committish:a,treepath:u,path:f,fragment:S,hashformat:b})=>`https://${r}/${o}/${l}/${u}/${e(a||"HEAD")}/${f}${h("#",b(S||""))}`,browseblobtemplate:({domain:r,user:o,project:l,committish:a,blobpath:u,path:f,fragment:S,hashformat:b})=>`https://${r}/${o}/${l}/${u}/${e(a||"HEAD")}/${f}${h("#",b(S||""))}`,docstemplate:({domain:r,user:o,project:l,treepath:a,committish:u})=>`https://${r}/${o}/${l}${h("/",a,"/",e(u))}#readme`,httpstemplate:({auth:r,domain:o,user:l,project:a,committish:u})=>`git+https://${h(r,"@")}${o}/${l}/${a}.git${h("#",u)}`,filetemplate:({domain:r,user:o,project:l,committish:a,path:u})=>`https://${r}/${o}/${l}/raw/${e(a||"HEAD")}/${u}`,shortcuttemplate:({type:r,user:o,project:l,committish:a})=>`${r}:${o}/${l}${h("#",a)}`,pathtemplate:({user:r,project:o,committish:l})=>`${r}/${o}${h("#",l)}`,bugstemplate:({domain:r,user:o,project:l})=>`https://${r}/${o}/${l}/issues`,hashformat:t},i={};i.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:o,project:l,committish:a,path:u})=>`https://${h(r,"@")}raw.githubusercontent.com/${o}/${l}/${e(a||"HEAD")}/${u}`,gittemplate:({auth:r,domain:o,user:l,project:a,committish:u})=>`git://${h(r,"@")}${o}/${l}/${a}.git${h("#",u)}`,tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://codeload.${r}/${o}/${l}/tar.gz/${e(a||"HEAD")}`,extract:r=>{let[,o,l,a,u]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(u=r.hash.slice(1)),l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!o||!l)))return{user:o,project:l,committish:u}}},i.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:o,project:l,committish:a,treepath:u,path:f,editpath:S})=>`https://${r}/${o}/${l}${h("/",u,"/",e(a||"HEAD"),"/",f,S)}`,tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/${o}/${l}/get/${e(a||"HEAD")}.tar.gz`,extract:r=>{let[,o,l,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!o||!l)))return{user:o,project:l,committish:r.hash.slice(1)}}},i.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/api/v4/projects/${e(o+"/"+l)}/repository/archive.tar.gz?sha=${e(a||"HEAD")}`,extract:r=>{const o=r.pathname.slice(1);if(o.includes("/-/")||o.includes("/archive.tar.gz"))return;const l=o.split("/");let a=l.pop();a.endsWith(".git")&&(a=a.slice(0,-4));const u=l.join("/");if(!(!u||!a))return{user:u,project:a,committish:r.hash.slice(1)}}},i.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:o,committish:l})=>`git@${r}:${o}.git${h("#",l)}`,sshurltemplate:({domain:r,project:o,committish:l})=>`git+ssh://git@${r}/${o}.git${h("#",l)}`,edittemplate:({domain:r,user:o,project:l,committish:a,editpath:u})=>`https://${r}/${o}/${l}${h("/",e(a))}/${u}`,browsetemplate:({domain:r,project:o,committish:l})=>`https://${r}/${o}${h("/",e(l))}`,browsetreetemplate:({domain:r,project:o,committish:l,path:a,hashformat:u})=>`https://${r}/${o}${h("/",e(l))}${h("#",u(a))}`,browseblobtemplate:({domain:r,project:o,committish:l,path:a,hashformat:u})=>`https://${r}/${o}${h("/",e(l))}${h("#",u(a))}`,docstemplate:({domain:r,project:o,committish:l})=>`https://${r}/${o}${h("/",e(l))}`,httpstemplate:({domain:r,project:o,committish:l})=>`git+https://${r}/${o}.git${h("#",l)}`,filetemplate:({user:r,project:o,committish:l,path:a})=>`https://gist.githubusercontent.com/${r}/${o}/raw${h("/",e(l))}/${a}`,shortcuttemplate:({type:r,project:o,committish:l})=>`${r}:${o}${h("#",l)}`,pathtemplate:({project:r,committish:o})=>`${r}${h("#",o)}`,bugstemplate:({domain:r,project:o})=>`https://${r}/${o}`,gittemplate:({domain:r,project:o,committish:l})=>`git://${r}/${o}.git${h("#",l)}`,tarballtemplate:({project:r,committish:o})=>`https://codeload.github.com/gist/${r}/tar.gz/${e(o||"HEAD")}`,extract:r=>{let[,o,l,a]=r.pathname.split("/",4);if(a!=="raw"){if(!l){if(!o)return;l=o,o=null}return l.endsWith(".git")&&(l=l.slice(0,-4)),{user:o,project:l,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+t(r)}},i.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:o,project:l,committish:a,path:u})=>`https://${r}/${o}/${l}/blob/${e(a)||"HEAD"}/${u}`,httpstemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/${o}/${l}${h("#",a)}`,tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/${o}/${l}/archive/${e(a)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:r=>{let[,o,l,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!o||!l)))return{user:o,project:l,committish:r.hash.slice(1)}}};for(const[r,o]of Object.entries(i))i[r]=Object.assign({},n,o);return q=i,q}var V,de;function Fe(){if(de)return V;de=1;const h=(i,r,o)=>{const l=i.indexOf(o);return i.lastIndexOf(r,l>-1?l:1/0)},e=i=>{try{return new URL(i)}catch{}},t=(i,r)=>{const o=i.indexOf(":"),l=i.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(r,l)||i.substr(o,3)==="://")return i;const a=i.indexOf("@");return a>-1?a>o?`git+ssh://${i}`:i:`${i.slice(0,o+1)}//${i.slice(o+1)}`},n=i=>{const r=h(i,"@","#"),o=h(i,":","#");return o>r&&(i=i.slice(0,o)+"/"+i.slice(o+1)),h(i,":","#")===-1&&i.indexOf("//")===-1&&(i=`git+ssh://${i}`),i};return V=(i,r)=>{const o=r?t(i,r):i;return e(o)||e(n(o))},V}var K,me;function Vt(){if(me)return K;me=1;const h=Fe(),e=t=>{const n=t.indexOf("#"),i=t.indexOf("/"),r=t.indexOf("/",i+1),o=t.indexOf(":"),l=/\s/.exec(t),a=t.indexOf("@"),u=!l||n>-1&&l.index>n,f=a===-1||n>-1&&a>n,S=o===-1||n>-1&&o>n,b=r===-1||n>-1&&r>n,v=i>0,C=n>-1?t[n-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return u&&v&&C&&m&&f&&S&&b};return K=(t,n,{gitHosts:i,protocols:r})=>{if(!t)return;const o=e(t)?`github:${t}`:t,l=h(o,r);if(!l)return;const a=i.byShortcut[l.protocol],u=i.byDomain[l.hostname.startsWith("www.")?l.hostname.slice(4):l.hostname],f=a||u;if(!f)return;const S=i[a||u];let b=null;r[l.protocol]?.auth&&(l.username||l.password)&&(b=`${l.username}${l.password?":"+l.password:""}`);let v=null,C=null,m=null,g=null;try{if(a){let c=l.pathname.startsWith("/")?l.pathname.slice(1):l.pathname;const L=c.indexOf("@");L>-1&&(c=c.slice(L+1));const y=c.lastIndexOf("/");y>-1?(C=decodeURIComponent(c.slice(0,y)),C||(C=null),m=decodeURIComponent(c.slice(y+1))):m=decodeURIComponent(c),m.endsWith(".git")&&(m=m.slice(0,-4)),l.hash&&(v=decodeURIComponent(l.hash.slice(1))),g="shortcut"}else{if(!S.protocols.includes(l.protocol))return;const c=S.extract(l);if(!c)return;C=c.user&&decodeURIComponent(c.user),m=decodeURIComponent(c.project),v=decodeURIComponent(c.committish),g=r[l.protocol]?.name||l.protocol.slice(0,-1)}}catch(c){if(c instanceof URIError)return;throw c}return[f,C,b,m,v,g,n]},K}var J,Le;function Kt(){if(Le)return J;Le=1;const{LRUCache:h}=Yt,e=qt(),t=Vt(),n=Fe(),i=new h({max:1e3});function r(l){try{const{protocol:a,hostname:u,pathname:f}=new URL(l);if(!u)return null;const S=/(?:git\+)http:$/.test(a)?"http:":"https:",b=f.replace(/\.git$/,"");return`${S}//${u}${b}`}catch{return null}}class o{constructor(a,u,f,S,b,v,C={}){Object.assign(this,o.#n[a],{type:a,user:u,auth:f,project:S,committish:b,default:v,opts:C})}static#n={byShortcut:{},byDomain:{}};static#c={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(a,u){o.#n[a]=u,o.#n.byDomain[u.domain]=a,o.#n.byShortcut[`${a}:`]=a,o.#c[`${a}:`]={name:a}}static fromUrl(a,u){if(typeof a!="string")return;const f=a+JSON.stringify(u||{});if(!i.has(f)){const S=t(a,u,{gitHosts:o.#n,protocols:o.#c});i.set(f,S?new o(...S):void 0)}return i.get(f)}static fromManifest(a,u={}){if(!a||typeof a!="object")return;const f=a.repository,S=f&&(typeof f=="string"?f:typeof f=="object"&&typeof f.url=="string"?f.url:null);if(!S)throw new Error("no repository");const b=S&&o.fromUrl(S.replace(/^git\+/,""),u)||null;if(b)return b;const v=r(S);return o.fromUrl(v,u)||v}static parseUrl(a){return n(a)}#t(a,u){if(typeof a!="function")return null;const f={...this,...this.opts,...u};f.path||(f.path=""),f.path.startsWith("/")&&(f.path=f.path.slice(1)),f.noCommittish&&(f.committish=null);const S=a(f);return f.noGitPlus&&S.startsWith("git+")?S.slice(4):S}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#t(this.sshtemplate,a)}sshurl(a){return this.#t(this.sshurltemplate,a)}browse(a,...u){return typeof a!="string"?this.#t(this.browsetemplate,a):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:a}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:a})}browseFile(a,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:a}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:a})}docs(a){return this.#t(this.docstemplate,a)}bugs(a){return this.#t(this.bugstemplate,a)}https(a){return this.#t(this.httpstemplate,a)}git(a){return this.#t(this.gittemplate,a)}shortcut(a){return this.#t(this.shortcuttemplate,a)}path(a){return this.#t(this.pathtemplate,a)}tarball(a){return this.#t(this.tarballtemplate,{...a,noCommittish:!1})}file(a,u){return this.#t(this.filetemplate,{...u,path:a})}edit(a,u){return this.#t(this.edittemplate,{...u,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}}for(const[l,a]of Object.entries(e))o.addHost(l,a);return J=o,J}var X,ge;function Jt(){if(ge)return X;ge=1,X=h;function h(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
2
2
  `);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;const n=e.length;let i=t+1;for(;i<n&&e[i].trim();)i++;return e.slice(t,i).join(" ").trim()}return X}var Ge={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},$e={web:"url",name:"url"},Be={server:"start",tests:"test"};const Xt={topLevel:Ge,bugs:$e,script:Be},Zt=Object.defineProperty({__proto__:null,bugs:$e,default:Xt,script:Be,topLevel:Ge},Symbol.toStringTag,{value:"Module"}),Qt=ie(Zt);var Z,Se;function ei(){if(Se)return Z;Se=1;var{URL:h}=Pe,e=bt(),t=Dt(),n=Mt(),i=Kt(),{isBuiltin:r}=ye,o=["dependencies","devDependencies","optionalDependencies"],l=Jt(),a=Qt,u=s=>s.includes("@")&&s.indexOf("@")<s.lastIndexOf(".");Z={warn:function(){},fixRepositoryField:function(s){if(s.repositories&&(this.warn("repositories"),s.repository=s.repositories[0]),!s.repository)return this.warn("missingRepository");typeof s.repository=="string"&&(s.repository={type:"git",url:s.repository});var p=s.repository.url||"";if(p){var d=i.fromUrl(p);d&&(p=s.repository.url=d.getDefaultRepresentation()==="shortcut"?d.https():d.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(s){Object.keys(a.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(s,p)&&this.warn("typo",p,a.topLevel[p])},this)},fixScriptsField:function(s){if(s.scripts){if(typeof s.scripts!="object"){this.warn("nonObjectScripts"),delete s.scripts;return}Object.keys(s.scripts).forEach(function(p){typeof s.scripts[p]!="string"?(this.warn("nonStringScript"),delete s.scripts[p]):a.script[p]&&!s.scripts[a.script[p]]&&this.warn("typo",p,a.script[p],"scripts")},this)}},fixFilesField:function(s){var p=s.files;p&&!Array.isArray(p)?(this.warn("nonArrayFiles"),delete s.files):s.files&&(s.files=s.files.filter(function(d){return!d||typeof d!="string"?(this.warn("invalidFilename",d),!1):!0},this))},fixBinField:function(s){if(s.bin&&typeof s.bin=="string"){var p={},d;(d=s.name.match(/^@[^/]+[/](.*)$/))?p[d[1]]=s.bin:p[s.name]=s.bin,s.bin=p}},fixManField:function(s){s.man&&typeof s.man=="string"&&(s.man=[s.man])},fixBundleDependenciesField:function(s){var p="bundledDependencies",d="bundleDependencies";s[p]&&!s[d]&&(s[d]=s[p],delete s[p]),s[d]&&!Array.isArray(s[d])?(this.warn("nonArrayBundleDependencies"),delete s[d]):s[d]&&(s[d]=s[d].filter(function(P){return!P||typeof P!="string"?(this.warn("nonStringBundleDependency",P),!1):(s.dependencies||(s.dependencies={}),Object.prototype.hasOwnProperty.call(s.dependencies,P)||(this.warn("nonDependencyBundleDependency",P),s.dependencies[P]="*"),!0)},this))},fixDependencies:function(s){L(s,this.warn),g(s,this.warn),this.fixBundleDependenciesField(s),["dependencies","devDependencies"].forEach(function(p){if(p in s){if(!s[p]||typeof s[p]!="object"){this.warn("nonObjectDependencies",p),delete s[p];return}Object.keys(s[p]).forEach(function(d){var P=s[p][d];typeof P!="string"&&(this.warn("nonStringDependency",d,JSON.stringify(P)),delete s[p][d]);var D=i.fromUrl(s[p][d]);D&&(s[p][d]=D.toString())},this)}},this)},fixModulesField:function(s){s.modules&&(this.warn("deprecatedModules"),delete s.modules)},fixKeywordsField:function(s){typeof s.keywords=="string"&&(s.keywords=s.keywords.split(/,\s+/)),s.keywords&&!Array.isArray(s.keywords)?(delete s.keywords,this.warn("nonArrayKeywords")):s.keywords&&(s.keywords=s.keywords.filter(function(p){return typeof p!="string"||!p?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(s,p){var d=!p;if(!s.version)return s.version="",!0;if(!e(s.version,d))throw new Error('Invalid version: "'+s.version+'"');return s.version=t(s.version,d),!0},fixPeople:function(s){v(s,C),v(s,m)},fixNameField:function(s,p){typeof p=="boolean"?p={strict:p}:typeof p>"u"&&(p={});var d=p.strict;if(!s.name&&!d){s.name="";return}if(typeof s.name!="string")throw new Error("name field must be a string.");d||(s.name=s.name.trim()),b(s.name,d,p.allowLegacyCase),r(s.name)&&this.warn("conflictingName",s.name)},fixDescriptionField:function(s){s.description&&typeof s.description!="string"&&(this.warn("nonStringDescription"),delete s.description),s.readme&&!s.description&&(s.description=l(s.readme)),s.description===void 0&&delete s.description,s.description||this.warn("missingDescription")},fixReadmeField:function(s){s.readme||(this.warn("missingReadme"),s.readme="ERROR: No README data found!")},fixBugsField:function(s){if(!s.bugs&&s.repository&&s.repository.url){var p=i.fromUrl(s.repository.url);p&&p.bugs()&&(s.bugs={url:p.bugs()})}else if(s.bugs){if(typeof s.bugs=="string")u(s.bugs)?s.bugs={email:s.bugs}:h.canParse(s.bugs)?s.bugs={url:s.bugs}:this.warn("nonEmailUrlBugsString");else{y(s.bugs,this.warn);var d=s.bugs;s.bugs={},d.url&&(h.canParse(d.url)?s.bugs.url=d.url:this.warn("nonUrlBugsUrlField")),d.email&&(typeof d.email=="string"&&u(d.email)?s.bugs.email=d.email:this.warn("nonEmailBugsEmailField"))}!s.bugs.email&&!s.bugs.url&&(delete s.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(s){if(!s.homepage&&s.repository&&s.repository.url){var p=i.fromUrl(s.repository.url);p&&p.docs()&&(s.homepage=p.docs())}if(s.homepage){if(typeof s.homepage!="string")return this.warn("nonUrlHomepage"),delete s.homepage;h.canParse(s.homepage)||(s.homepage="http://"+s.homepage)}},fixLicenseField:function(s){const p=s.license||s.licence;if(!p)return this.warn("missingLicense");if(typeof p!="string"||p.length<1||p.trim()==="")return this.warn("invalidLicense");if(!n(p).validForNewPackages)return this.warn("invalidLicense")}};function f(s){if(s.charAt(0)!=="@")return!1;var p=s.slice(1).split("/");return p.length!==2?!1:p[0]&&p[1]&&p[0]===encodeURIComponent(p[0])&&p[1]===encodeURIComponent(p[1])}function S(s){return!s.match(/[/@\s+%:]/)&&s===encodeURIComponent(s)}function b(s,p,d){if(s.charAt(0)==="."||!(f(s)||S(s))||p&&!d&&s!==s.toLowerCase()||s.toLowerCase()==="node_modules"||s.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(s))}function v(s,p){return s.author&&(s.author=p(s.author)),["maintainers","contributors"].forEach(function(d){Array.isArray(s[d])&&(s[d]=s[d].map(p))}),s}function C(s){if(typeof s=="string")return s;var p=s.name||"",d=s.url||s.web,P=d?" ("+d+")":"",D=s.email||s.mail,w=D?" <"+D+">":"";return p+w+P}function m(s){if(typeof s!="string")return s;var p=s.match(/^([^(<]+)/),d=s.match(/\(([^()]+)\)/),P=s.match(/<([^<>]+)>/),D={};return p&&p[0].trim()&&(D.name=p[0].trim()),P&&(D.email=P[1]),d&&(D.url=d[1]),D}function g(s){var p=s.optionalDependencies;if(p){var d=s.dependencies||{};Object.keys(p).forEach(function(P){d[P]=p[P]}),s.dependencies=d}}function c(s,p,d){if(!s)return{};if(typeof s=="string"&&(s=s.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(s))return s;d("deprecatedArrayDependencies",p);var P={};return s.filter(function(D){return typeof D=="string"}).forEach(function(D){D=D.trim().split(/(:?[@\s><=])/);var w=D.shift(),x=D.join("");x=x.trim(),x=x.replace(/^@/,""),P[w]=x}),P}function L(s,p){o.forEach(function(d){s[d]&&(s[d]=c(s[d],d,p))})}function y(s,p){s&&Object.keys(s).forEach(function(d){a.bugs[d]&&(p("typo",d,a.bugs[d],"bugs"),s[a.bugs[d]]=s[d],delete s[d])})}return Z}var Te="'repositories' (plural) Not supported. Please pick one as the 'repository' field",Re="No repository field.",Ie="Probably broken git url: %s",Ue="scripts must be an object",Me="script values must be string commands",ke="Invalid 'files' member",_e="Invalid filename in 'files' list: %s",We="Invalid 'bundleDependencies' list. Must be array of package names",He="Invalid bundleDependencies member: %s",je="Non-dependency in bundleDependencies: %s",ze="%s field must be an object",Ye="Invalid dependency: %s %s",qe="specifying %s as array is deprecated",Ve="modules field is deprecated",Ke="keywords should be an array of strings",Je="keywords should be an array of strings",Xe="%s is also the name of a node core module.",Ze="'description' field should be a string",Qe="No description",et="No README data",tt="No license field.",it="Bug string field must be url, email, or {email,url}",rt="bugs.url field must be a string url. Deleted.",nt="bugs.email field must be a string email. Deleted.",st="Normalized value of bugs field is an empty object. Deleted.",ot="homepage field must be a string url. Deleted.",at="license should be a valid SPDX license expression",lt="%s should probably be %s.";const ti={repositories:Te,missingRepository:Re,brokenGitUrl:Ie,nonObjectScripts:Ue,nonStringScript:Me,nonArrayFiles:ke,invalidFilename:_e,nonArrayBundleDependencies:We,nonStringBundleDependency:He,nonDependencyBundleDependency:je,nonObjectDependencies:ze,nonStringDependency:Ye,deprecatedArrayDependencies:qe,deprecatedModules:Ve,nonArrayKeywords:Ke,nonStringKeyword:Je,conflictingName:Xe,nonStringDescription:Ze,missingDescription:Qe,missingReadme:et,missingLicense:tt,nonEmailUrlBugsString:it,nonUrlBugsUrlField:rt,nonEmailBugsEmailField:nt,emptyNormalizedBugs:st,nonUrlHomepage:ot,invalidLicense:at,typo:lt},ii=Object.defineProperty({__proto__:null,brokenGitUrl:Ie,conflictingName:Xe,default:ti,deprecatedArrayDependencies:qe,deprecatedModules:Ve,emptyNormalizedBugs:st,invalidFilename:_e,invalidLicense:at,missingDescription:Qe,missingLicense:tt,missingReadme:et,missingRepository:Re,nonArrayBundleDependencies:We,nonArrayFiles:ke,nonArrayKeywords:Ke,nonDependencyBundleDependency:je,nonEmailBugsEmailField:nt,nonEmailUrlBugsString:it,nonObjectDependencies:ze,nonObjectScripts:Ue,nonStringBundleDependency:He,nonStringDependency:Ye,nonStringDescription:Ze,nonStringKeyword:Je,nonStringScript:Me,nonUrlBugsUrlField:rt,nonUrlHomepage:ot,repositories:Te,typo:lt},Symbol.toStringTag,{value:"Module"}),ri=ie(ii);var Q,ve;function ni(){if(ve)return Q;ve=1;var h=At,e=ri;Q=function(){var n=Array.prototype.slice.call(arguments,0),i=n.shift();if(i==="typo")return t.apply(null,n);var r=e[i]?e[i]:i+": '%s'";return n.unshift(r),h.format.apply(null,n)};function t(n,i,r){return r&&(n=r+"['"+n+"']",i=r+"['"+i+"']"),h.format(e.typo,n,i)}return Q}var ee,Ce;function si(){if(Ce)return ee;Ce=1,ee=r;var h=ei();r.fixer=h;var e=ni(),t=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],n=["dependencies","people","typos"],i=t.map(function(l){return o(l)+"Field"});i=i.concat(n);function r(l,a,u){a===!0&&(a=null,u=!0),u||(u=!1),(!a||l.private)&&(a=function(){}),l.scripts&&l.scripts.install==="node-gyp rebuild"&&!l.scripts.preinstall&&(l.gypfile=!0),h.warn=function(){a(e.apply(null,arguments))},i.forEach(function(f){h["fix"+o(f)](l,u)}),l._id=l.name+"@"+l.version}function o(l){return l.charAt(0).toUpperCase()+l.slice(1)}return ee}var oi=si();const ai=yt(oi),li=(h,e,t)=>{const n=te(h),i=te(e),r=i===n?".":vt(n,i);return t.some(o=>{const l=o.startsWith("./")?o.slice(2):o,a=r.startsWith("./")?r.slice(2):r;if(l==="."&&a===".")return!0;if(l.endsWith("/**")){const u=l.slice(0,-3);return a===u||a.startsWith(`${u}/`)}if(l.endsWith("/*")){const u=l.slice(0,-2);return u===""?a!=="."&&!a.includes("/"):a.startsWith(`${u}/`)||a===u}return a===l||a.startsWith(`${l}/`)})},ci=h=>{const e=be("pnpm-workspace.yaml",{cwd:te(h),type:"file"});if(!e)return;const t=De(R(e)),n=Array.isArray(t.packages)?t.packages:[];if(!li(e,h,n))return;const i={};return t.catalog&&typeof t.catalog=="object"&&(i.catalog=t.catalog),t.catalogs&&typeof t.catalogs=="object"&&(i.catalogs=t.catalogs),Object.keys(i).length>0?i:void 0},hi=(h,e,t)=>{if(e==="catalog:")return t.catalog?.[h];if(e.startsWith("catalog:")){const n=e.slice(8);return t.catalogs?.[n]?.[h]}},ui=(h,e)=>{for(const[t,n]of Object.entries(h)){if(typeof n!="string")continue;const i=hi(t,n,e);i&&(h[t]=i)}},pi=(h,e)=>{const t=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const n of t){if(!h[n]||typeof h[n]!="object")continue;const i=h[n];ui(i,e)}};let fi;const di=h=>(fi??=dt(import.meta.url))(h),G=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,re=h=>{if(typeof G<"u"&&G.versions&&G.versions.node){const[e,t]=G.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return G.getBuiltinModule(h)}return di(h)},{existsSync:zi}=re("node:fs"),{createInterface:Yi}=re("node:readline"),{styleText:qi}=re("node:util"),mi=new Set(["__proto__","prototype","constructor"]);Math.max(...[...mi].map(h=>h.length));typeof process.stdout<"u"&&globalThis.window;const Li=/, ([^,]*)$/,gi=new Map,Si=(h,e={})=>{const t=e.strict&&e.ignoreWarnings?e.ignoreWarnings.map(String).toSorted((n,i)=>n.localeCompare(i)).join(","):"";return`${h}|s${String(e.strict?1:0)}|c${String(e.resolveCatalogs?1:0)}|j${String(e.json5===!1?0:1)}|y${String(e.yaml===!1?0:1)}|w${t}`};class vi extends Error{constructor(e){super(`The following warnings were encountered while normalizing package data:
3
3
  - ${e.join(`
4
- - `)}`),this.name="PackageJsonValidationError"}}const Ci=(h,e,t=[])=>{const n=[];if(ai(h,i=>{n.push(i)},e),e&&n.length>0){const i=n.filter(r=>!t.some(o=>o instanceof RegExp?o.test(r):o===r));if(i.length>0)throw new vi(i)}return h},Pi=h=>{const e=R(h);return De(e)},yi=h=>{const e=R(h);return Pt.parse(e)},bi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?Pi(h):e?.json5!==!1&&h.endsWith(".json5")?yi(h):$t(h),Di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");const i=be(n,t);if(!i)throw new Ct(`No such file or directory, for ${n.join(", ").replace(Li," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:gi,o=Si(i,e);if(e.cache&&r.has(o))return r.get(o);const l=bi(i,e);if(e.resolveCatalogs){const u=ci(i);u&&pi(l,u)}Ci(l,e.strict??!1,e.ignoreWarnings);const a={packageJson:l,path:i};return e.cache&&r.set(o,a),a};var Ai="6.2.0";const wi={version:Ai},xi=wi.version,Ei="@visulima/vis";let E;const Vi=()=>{if(E!==void 0)return E;const h=process.env.VIS_VERSION;if(h)return E=h,E;try{const{packageJson:e}=Di(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===Ei&&typeof e.version=="string")return E=e.version,E}catch{}return E=xi,E};export{Gt as N,Hi as P,Ui as a,ki as b,Ti as c,_i as d,Vi as g,Mi as i,Ri as n,$t as p,Bi as r,Ii as t,Wi as u};
4
+ - `)}`),this.name="PackageJsonValidationError"}}const Ci=(h,e,t=[])=>{const n=[];if(ai(h,i=>{n.push(i)},e),e&&n.length>0){const i=n.filter(r=>!t.some(o=>o instanceof RegExp?o.test(r):o===r));if(i.length>0)throw new vi(i)}return h},Pi=h=>{const e=R(h);return De(e)},yi=h=>{const e=R(h);return Pt.parse(e)},bi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?Pi(h):e?.json5!==!1&&h.endsWith(".json5")?yi(h):$t(h),Di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");const i=be(n,t);if(!i)throw new Ct(`No such file or directory, for ${n.join(", ").replace(Li," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:gi,o=Si(i,e);if(e.cache&&r.has(o))return r.get(o);const l=bi(i,e);if(e.resolveCatalogs){const u=ci(i);u&&pi(l,u)}Ci(l,e.strict??!1,e.ignoreWarnings);const a={packageJson:l,path:i};return e.cache&&r.set(o,a),a};var Ai="6.3.0";const wi={version:Ai},xi=wi.version,Ei="@visulima/vis";let E;const Vi=()=>{if(E!==void 0)return E;const h=process.env.VIS_VERSION;if(h)return E=h,E;try{const{packageJson:e}=Di(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===Ei&&typeof e.version=="string")return E=e.version,E}catch{}return E=xi,E};export{Gt as N,Hi as P,Ui as a,ki as b,Ti as c,_i as d,Vi as g,Mi as i,Ri as n,$t as p,Bi as r,Ii as t,Wi as u};
@@ -1 +1 @@
1
- import{createRequire as b}from"node:module";import{e as p}from"./index-0dnGN3GP.js";import{a as j}from"./index--eV4qIz5.js";import{h as S,g as U}from"./env-DDmZsWBr.js";import{y as E}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{p as R}from"./package-version-CNjr03oy.js";let _;const T=t=>(_??=b(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,s]=d.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return d.getBuiltinModule(t)}return T(t)},{rmSync:u,writeFileSync:C}=k("node:fs"),g=3,F=1800*1e3,A=15e3,v=()=>p(U(),"packuments"),y=t=>p(v(),`${encodeURIComponent(t)}.json`),M=t=>{const e=y(t);if(E(e))try{const s=R(e);if(s.cacheVersion!==g){u(e,{force:!0});return}if(Date.now()-s.createdAt>s.ttlMs){u(e,{force:!0});return}return s.packument}catch{u(e,{force:!0});return}},w=(t,e,s)=>{S(v());const o={cacheVersion:g,createdAt:Date.now(),packument:e,ttlMs:s};C(y(t),JSON.stringify(o),"utf8")},P=t=>{const e={},s=t.versions??{};for(const[a,r]of Object.entries(s)){const i=r.dist,n={version:a};if(r._npmUser!==void 0&&(n._npmUser=r._npmUser),r.maintainers!==void 0&&(n.maintainers=r.maintainers),r.bin!==void 0&&(n.bin=r.bin),i!==void 0){const c={};i.signatures!==void 0&&(c.signatures=i.signatures),i.attestations!==void 0&&(c.attestations=i.attestations),typeof i.integrity=="string"&&(c.integrity=i.integrity),typeof i.tarball=="string"&&(c.tarball=i.tarball),typeof i.unpackedSize=="number"&&Number.isFinite(i.unpackedSize)&&i.unpackedSize>=0&&(c.unpackedSize=i.unpackedSize),typeof i.fileCount=="number"&&Number.isInteger(i.fileCount)&&i.fileCount>=0&&(c.fileCount=i.fileCount),n.dist=c}r.repository!==void 0&&(n.repository=r.repository),r.license!==void 0&&(n.license=r.license),typeof r.readme=="string"&&(n.readme=r.readme),typeof r.readmeFilename=="string"&&(n.readmeFilename=r.readmeFilename),typeof r.private=="boolean"&&(n.private=r.private),typeof r.deprecated=="string"&&(n.deprecated=r.deprecated),r.scripts!==void 0&&typeof r.scripts=="object"&&(n.scripts=r.scripts),e[a]=n}const o={name:typeof t.name=="string"?t.name:"",versions:e};return t["dist-tags"]!==void 0&&(o["dist-tags"]=t["dist-tags"]),t.time!==void 0&&(o.time=t.time),typeof t.readme=="string"&&(o.readme=t.readme),o},D=t=>{const e={Accept:"application/json"};return t!==void 0&&t!==""&&(e.Authorization=`Bearer ${t}`),e},N=async(t,e)=>{if(e.registryUrl!==void 0)return{authToken:e.authToken,url:e.registryUrl};if(e.workspaceRoot!==void 0){const{getRegistryForPackage:s,loadNpmrc:o}=await import("../packem_chunks/catalog2.js"),a=o(e.workspaceRoot),{token:r,url:i}=s(t,a);return{authToken:e.authToken??r,url:i}}return{authToken:e.authToken,url:"https://registry.npmjs.org"}},I=async(t,e={})=>{const s=e.cacheTtlMs??F,o=M(t);if(o!==void 0)return o;if(e.offline)return;const a=await N(t,e),i=`${a.url.endsWith("/")?a.url.slice(0,-1):a.url}/${t.replace("/","%2f")}`,n=new AbortController,c=setTimeout(()=>{n.abort()},A),l=()=>{n.abort()};e.signal?.addEventListener("abort",l,{once:!0});try{const f=await fetch(i,{headers:D(a.authToken),signal:n.signal});if(f.status===404)return;if(!f.ok)throw new Error(`Registry returned ${String(f.status)} for ${t}`);const h=await f.json(),m=P(h);return w(t,m,s),m}finally{clearTimeout(c),e.signal?.removeEventListener("abort",l)}},x=(t,e)=>{const s=Object.keys(t.versions);if(s.length===0)return;if(e===void 0||e===""||e==="latest")return t["dist-tags"]?.latest??s.at(-1);const o=t["dist-tags"]?.[e];return o!==void 0?o:Object.hasOwn(t.versions,e)?e:j.maxSatisfying(s,e)??void 0};export{I as g,x as r};
1
+ import{createRequire as b}from"node:module";import{e as p}from"./index-0dnGN3GP.js";import{a as j}from"./index--eV4qIz5.js";import{h as S,g as U}from"./env-CsENUmRe.js";import{y as E}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{p as R}from"./package-version-BzkcrNVE.js";let _;const T=t=>(_??=b(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,s]=d.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return d.getBuiltinModule(t)}return T(t)},{rmSync:u,writeFileSync:C}=k("node:fs"),g=3,F=1800*1e3,A=15e3,v=()=>p(U(),"packuments"),y=t=>p(v(),`${encodeURIComponent(t)}.json`),M=t=>{const e=y(t);if(E(e))try{const s=R(e);if(s.cacheVersion!==g){u(e,{force:!0});return}if(Date.now()-s.createdAt>s.ttlMs){u(e,{force:!0});return}return s.packument}catch{u(e,{force:!0});return}},w=(t,e,s)=>{S(v());const o={cacheVersion:g,createdAt:Date.now(),packument:e,ttlMs:s};C(y(t),JSON.stringify(o),"utf8")},P=t=>{const e={},s=t.versions??{};for(const[a,r]of Object.entries(s)){const i=r.dist,n={version:a};if(r._npmUser!==void 0&&(n._npmUser=r._npmUser),r.maintainers!==void 0&&(n.maintainers=r.maintainers),r.bin!==void 0&&(n.bin=r.bin),i!==void 0){const c={};i.signatures!==void 0&&(c.signatures=i.signatures),i.attestations!==void 0&&(c.attestations=i.attestations),typeof i.integrity=="string"&&(c.integrity=i.integrity),typeof i.tarball=="string"&&(c.tarball=i.tarball),typeof i.unpackedSize=="number"&&Number.isFinite(i.unpackedSize)&&i.unpackedSize>=0&&(c.unpackedSize=i.unpackedSize),typeof i.fileCount=="number"&&Number.isInteger(i.fileCount)&&i.fileCount>=0&&(c.fileCount=i.fileCount),n.dist=c}r.repository!==void 0&&(n.repository=r.repository),r.license!==void 0&&(n.license=r.license),typeof r.readme=="string"&&(n.readme=r.readme),typeof r.readmeFilename=="string"&&(n.readmeFilename=r.readmeFilename),typeof r.private=="boolean"&&(n.private=r.private),typeof r.deprecated=="string"&&(n.deprecated=r.deprecated),r.scripts!==void 0&&typeof r.scripts=="object"&&(n.scripts=r.scripts),e[a]=n}const o={name:typeof t.name=="string"?t.name:"",versions:e};return t["dist-tags"]!==void 0&&(o["dist-tags"]=t["dist-tags"]),t.time!==void 0&&(o.time=t.time),typeof t.readme=="string"&&(o.readme=t.readme),o},D=t=>{const e={Accept:"application/json"};return t!==void 0&&t!==""&&(e.Authorization=`Bearer ${t}`),e},N=async(t,e)=>{if(e.registryUrl!==void 0)return{authToken:e.authToken,url:e.registryUrl};if(e.workspaceRoot!==void 0){const{getRegistryForPackage:s,loadNpmrc:o}=await import("../packem_chunks/catalog2.js"),a=o(e.workspaceRoot),{token:r,url:i}=s(t,a);return{authToken:e.authToken??r,url:i}}return{authToken:e.authToken,url:"https://registry.npmjs.org"}},I=async(t,e={})=>{const s=e.cacheTtlMs??F,o=M(t);if(o!==void 0)return o;if(e.offline)return;const a=await N(t,e),i=`${a.url.endsWith("/")?a.url.slice(0,-1):a.url}/${t.replace("/","%2f")}`,n=new AbortController,c=setTimeout(()=>{n.abort()},A),l=()=>{n.abort()};e.signal?.addEventListener("abort",l,{once:!0});try{const f=await fetch(i,{headers:D(a.authToken),signal:n.signal});if(f.status===404)return;if(!f.ok)throw new Error(`Registry returned ${String(f.status)} for ${t}`);const h=await f.json(),m=P(h);return w(t,m,s),m}finally{clearTimeout(c),e.signal?.removeEventListener("abort",l)}},x=(t,e)=>{const s=Object.keys(t.versions);if(s.length===0)return;if(e===void 0||e===""||e==="latest")return t["dist-tags"]?.latest??s.at(-1);const o=t["dist-tags"]?.[e];return o!==void 0?o:Object.hasOwn(t.versions,e)?e:j.maxSatisfying(s,e)??void 0};export{I as g,x as r};
@@ -1,4 +1,4 @@
1
- import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-wkTUvlyX.js";let g;const m=e=>(g??=p(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,n]=c.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return c.getBuiltinModule(e)}return m(e)},{createInterface:j}=h("node:readline"),y=e=>{const s=new Set;for(const n of Object.values(e.projects))for(const t of Object.keys(n.targets??{}))s.add(t);return[...s].sort()},b=e=>{const s=new Map;for(const n of e.values())for(const[t,o]of Object.entries(n))for(const r of o.aliases??[])s.has(r)||s.set(r,t);return s},$=(e,s)=>s.get(e)??e,w=(e,s)=>{if(e.length===0)return s.length;if(s.length===0)return e.length;const n=[];for(let t=0;t<=s.length;t++)n[t]=[t];for(let t=0;t<=e.length;t++)n[0][t]=t;for(let t=1;t<=s.length;t++)for(let o=1;o<=e.length;o++){const r=s[t-1]===e[o-1]?0:1;n[t][o]=Math.min(n[t-1][o]+1,n[t][o-1]+1,n[t-1][o-1]+r)}return n[s.length][e.length]},v=(e,s,n=3)=>f(e,s,1,n)[0],f=(e,s,n=3,t=3)=>{const o=[];for(const r of s){const i=w(e.toLowerCase(),r.toLowerCase());i<=t&&o.push({distance:i,name:r})}return o.sort((r,i)=>r.distance-i.distance||r.name.localeCompare(i.name)),o.slice(0,n).map(r=>r.name)},M=e=>e.length===0?" (no targets found)":e.map(s=>` - ${s}`).join(`
1
+ import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-DUyARIaA.js";let g;const m=e=>(g??=p(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,n]=c.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return c.getBuiltinModule(e)}return m(e)},{createInterface:j}=h("node:readline"),y=e=>{const s=new Set;for(const n of Object.values(e.projects))for(const t of Object.keys(n.targets??{}))s.add(t);return[...s].sort()},b=e=>{const s=new Map;for(const n of e.values())for(const[t,o]of Object.entries(n))for(const r of o.aliases??[])s.has(r)||s.set(r,t);return s},$=(e,s)=>s.get(e)??e,w=(e,s)=>{if(e.length===0)return s.length;if(s.length===0)return e.length;const n=[];for(let t=0;t<=s.length;t++)n[t]=[t];for(let t=0;t<=e.length;t++)n[0][t]=t;for(let t=1;t<=s.length;t++)for(let o=1;o<=e.length;o++){const r=s[t-1]===e[o-1]?0:1;n[t][o]=Math.min(n[t-1][o]+1,n[t][o-1]+1,n[t-1][o-1]+r)}return n[s.length][e.length]},v=(e,s,n=3)=>f(e,s,1,n)[0],f=(e,s,n=3,t=3)=>{const o=[];for(const r of s){const i=w(e.toLowerCase(),r.toLowerCase());i<=t&&o.push({distance:i,name:r})}return o.sort((r,i)=>r.distance-i.distance||r.name.localeCompare(i.name)),o.slice(0,n).map(r=>r.name)},M=e=>e.length===0?" (no targets found)":e.map(s=>` - ${s}`).join(`
2
2
  `),S=async e=>{if(e.length===0||!process.stdin.isTTY||!process.stdout.isTTY)return;const s=j({input:process.stdin,output:process.stdout});try{process.stdout.write(`Available targets:
3
3
  `);for(const[r,i]of e.entries())process.stdout.write(` ${String(r+1).padStart(2," ")}. ${i}
4
4
  `);process.stdout.write(`
@@ -1 +1 @@
1
- import{a as i}from"./index--eV4qIz5.js";import{g as u}from"./packument-D_qCUp6X.js";import{c as d}from"../packem_chunks/cli-main.js";const v=8,h=async(r,e,o)=>{if(r.length===0)return[];const t=Math.max(1,Math.min(e,r.length)),s=Array.from({length:r.length});let n=0;const c=async()=>{for(;n<r.length;){const a=n;n+=1;const l=r[a];s[a]=await o(l,a)}};return await Promise.all(Array.from({length:t},()=>c())),s},f=(r,e)=>r.versions[e]?.dist?.attestations?.provenance!==void 0,p=(r,e)=>i.valid(e)?Object.keys(r.versions).filter(t=>i.valid(t)!==null&&i.lt(t,e)).filter(t=>i.satisfies(t,"*",{includePrerelease:!1})).filter(t=>f(r,t)).sort((t,s)=>i.lt(t,s)?1:-1)[0]:void 0,m=async(r,e={})=>{if(d("provenance"))return[];const o=new Set(e.allowlist),t=e.concurrency??v;return(await h(r,t,async({name:n,version:c})=>{if(o.has(n))return;const a=await u(n,{workspaceRoot:e.workspaceRoot});if(a===void 0||f(a,c))return;const l=p(a,c);if(l!==void 0)return{packageName:n,priorVersionWithProvenance:l,version:c}})).filter(n=>n!==void 0)};export{v as D,p as f,h as m,m as r};
1
+ import{a as i}from"./index--eV4qIz5.js";import{g as u}from"./packument-BvTjAHsy.js";import{c as d}from"../packem_chunks/cli-main.js";const v=8,h=async(r,e,o)=>{if(r.length===0)return[];const t=Math.max(1,Math.min(e,r.length)),s=Array.from({length:r.length});let n=0;const c=async()=>{for(;n<r.length;){const a=n;n+=1;const l=r[a];s[a]=await o(l,a)}};return await Promise.all(Array.from({length:t},()=>c())),s},f=(r,e)=>r.versions[e]?.dist?.attestations?.provenance!==void 0,p=(r,e)=>i.valid(e)?Object.keys(r.versions).filter(t=>i.valid(t)!==null&&i.lt(t,e)).filter(t=>i.satisfies(t,"*",{includePrerelease:!1})).filter(t=>f(r,t)).sort((t,s)=>i.lt(t,s)?1:-1)[0]:void 0,m=async(r,e={})=>{if(d("provenance"))return[];const o=new Set(e.allowlist),t=e.concurrency??v;return(await h(r,t,async({name:n,version:c})=>{if(o.has(n))return;const a=await u(n,{workspaceRoot:e.workspaceRoot});if(a===void 0||f(a,c))return;const l=p(a,c);if(l!==void 0)return{packageName:n,priorVersionWithProvenance:l,version:c}})).filter(n=>n!==void 0)};export{v as D,p as f,h as m,m as r};
@@ -0,0 +1,35 @@
1
+ import{s as I}from"./index--eV4qIz5.js";import{c as D,d as W,D as L}from"../packem_chunks/version-resolver.js";import{createTag as U,pushTags as K,resolveReleaseSource as z,renderTagPattern as J,defaultTagFor as Y}from"../packem_chunks/git.js";import{createShellRunner as _}from"../packem_chunks/shell-runner.js";import{DEFAULT_CHANGES_DIR as E}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{r as B,b as q}from"./apply-DA-Dv8Pq.js";import{parseCatalogs as X}from"../packem_chunks/catalog.js";import{c as Q}from"../packem_chunks/index3.js";import{a as Z}from"../packem_chunks/context.js";import{escapeMarkdown as x}from"../packem_chunks/security.js";import{VisReleaseError as F}from"./VisReleaseError-DZtgcKf8.js";const ee=/\{(name|version|previousVersion|date|repo|contributors)\}/g,se=(e,s)=>e.replaceAll(ee,(a,c)=>s[c]??""),ae=(e,s={})=>{const a=new Set;for(const o of s.internalAuthors??[]){const p=o.trim().toLowerCase().replace(/^@/,"");p.length>0&&a.add(p)}const c=new Set,t=[];for(const o of e){const p=o.meta?.author;if(p)for(const n of p.split(",")){const i=n.trim();if(!i)continue;const g=i.replace(/^@/,"");if(g.length===0)continue;const r=g.toLowerCase();c.has(r)||a.has(r)||(c.add(r),t.push(x(i)))}}return t.length===0?"":t.map(o=>`- ${o}`).join(`
2
+ `)},ie=e=>e.length===0?"":`## Related releases
3
+
4
+ ${e.map(a=>`- [${a.name}](${a.url})`).join(`
5
+ `)}`,re=(e,s,a)=>{if(!s||!s.header&&!s.footer)return e;const c=o=>se(o,{contributors:a.contributors??"",date:a.date,name:a.name,previousVersion:a.previousVersion,repo:a.repo,version:a.version}).replaceAll(/\n{3,}/g,`
6
+
7
+ `).replace(/\s+$/,""),t=[];if(s.header){const o=c(s.header);o.length>0&&t.push(o)}if(t.push(e),s.footer){const o=c(s.footer);o.length>0&&t.push(o)}return t.join(`
8
+
9
+ `)},te=e=>{if(!Array.isArray(e))return;const[s,a]=e;if(s!=="github"||typeof a!="object"||a===null)return;const{internalAuthors:c}=a;if(Array.isArray(c))return c.filter(t=>typeof t=="string")},ne=e=>(e.config.publish?.publishArgs??[]).includes("--provenance")&&e.pm.id!=="bun",oe=async(e,s)=>{const{options:a,persistState:c,releases:t,result:o,state:p}=s,{removePendingStages:n,upsertPendingStages:i}=await import("../packem_chunks/staged-registry.js"),g=await e.pm.readCatalogYaml(e.cwd),r=X(g),u=e.depGraph.topologicalSort(t.map(l=>l.name)),w=new Map(t.map(l=>[l.name,l])),m=new Set,$=new Map;for(const l of e.plan.releases){const y=e.depGraph.getPackage(l.name);y&&$.set(l.name,{...y.manifest,version:l.newVersion})}const P={config:e.config,cwd:e.cwd},k=e.config.plugins?.length?await import("../packem_chunks/defineReleasePlugin.js"):void 0;for(const l of u){const y=w.get(l);if(!y){o.skipped.push({name:l,reason:"topo-sort returned a name not in the release plan (internal bug)"});continue}const b=e.depGraph.getPackage(l);if(!b)continue;const v=[...new Set(e.depGraph.getDependencies(l).filter(h=>h.kind!=="devDependencies"&&m.has(h.name)).map(h=>h.name))];if(v.length>0){o.skipped.push({name:l,reason:`dependency-failed: not published because ${v.join(", ")} failed to publish (publishing would orphan this package's dependency range)`}),m.add(l);continue}const d=e.perPackageConfig.get(l)??{},C=Z(b,d),R=a.publishActionsOverride??Q(C),f=a.tag??e.channel?.tag;if(k){const h=await k.runWillPublishHooks(P,{dir:b.dir,name:l,oldVersion:y.oldVersion,version:y.newVersion});if(h.skip){o.skipped.push({name:l,reason:`plugin-skipped${h.by?` by "${h.by}"`:""}`}),m.add(l);continue}}const T=s.stagedRegistry.pending.find(h=>h.name===l&&h.version===y.newVersion);try{const h=await R.publish({catalogs:r,cleanPackageJsonConfig:e.config.publish?.cleanPackageJson,dryRun:a.dryRun,otp:a.otp,perPackageConfig:d,pkg:b,pm:e.pm,provenance:ne(e),registry:d.registry,release:y,resumeStageId:T?.id,tag:f,versionedManifestByName:$,workspaceConfig:e.config});if(h.published||h.alreadyPublished){const S=s.stagedRegistry.pending.filter(A=>A.name===l&&A.version===y.newVersion).map(A=>A.id);S.length>0&&(s.stagedRegistry=n(s.stagedRegistry,S))}if(h.published)o.published.push({name:l,stageId:h.stageId,tarball:h.tarball,version:y.newVersion}),p.published.push(`${l}@${y.newVersion}`),k&&await k.runAfterPublishHooks(P,{dir:b.dir,name:l,oldVersion:y.oldVersion,version:y.newVersion});else if(h.alreadyPublished)o.skipped.push({name:l,reason:"already-published"}),p.published.push(`${l}@${y.newVersion}`);else if(o.skipped.push({name:l,reason:h.output??"skipped"}),h.stageId){const S=(h.output??"").startsWith("stage-rejected")?"rejected":"timeout";s.stagedRegistry=i(s.stagedRegistry,[{id:h.stageId,name:l,reason:S,stagedAt:new Date().toISOString(),tag:f??"latest",version:y.newVersion}])}await c()}catch(h){o.failed.push({name:l,reason:h.message}),m.add(l)}}k&&await k.runAfterPublishAllHooks(P,{failed:o.failed.map(l=>({name:l.name,reason:l.reason})),published:o.published.map(l=>({name:l.name,version:l.version})),skipped:o.skipped.map(l=>({name:l.name,reason:l.reason}))})},ge=async(e,s,a,c)=>{const{createRemoteClient:t,detectRemoteProvider:o}=await import("../packem_chunks/detect.js"),p=await o(e.cwd,a,e.config.provider),n=t(p,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}),i=await n.detectRepoSlug(e.cwd,a);if(!i)return;const g=typeof e.config.aggregateRelease=="object"?e.config.aggregateRelease:{enabled:e.config.aggregateRelease===!0},r=e.config.publish?.draftRelease===!0,u=e.config.publish?.discussionCategory,w=e.config.publish?.addReleases;if(g.enabled){const d=new Date().toISOString().slice(0,10),R=(g.title??"Release {date}").replaceAll("{date}",d),f=`release-${d}`,T=s.published.map(h=>`- \`${h.name}\` → ${h.version}`).join(`
10
+ `);try{const h=await n.createRelease(a,{body:T,cwd:e.cwd,discussionCategory:u,draft:r,repo:i,tag:f,title:R});if(h?.url)for(const S of s.published)S.url=h.url}catch{}return}const{defaultTagFor:m,renderTagPattern:$}=await import("../packem_chunks/git.js"),P=e.config.releaseTagPattern,k=e.channel?.tag,l=e.config.publish?.releaseAssets??{},y=new Date().toISOString().slice(0,10),b=te(e.config.changelog),v=ae(e.plan.consumedChangeFiles??[],{internalAuthors:b});for(const d of c.groups){const C=d.members.map(R=>`- \`${R}\` → ${s.published.find(f=>f.name===R)?.version??d.version}`).join(`
11
+ `);try{const R=await n.createRelease(a,{body:C,cwd:e.cwd,discussionCategory:u,draft:r,prerelease:d.version.includes("-"),repo:i,tag:d.tag,title:`${d.name} ${d.version}`});if(R?.url)for(const f of s.published)d.members.includes(f.name)&&(f.url=R.url)}catch(R){console.warn(`createRelease failed for group ${d.name} (tag ${d.tag}): ${R.message}`)}}for(const d of s.published){if(c.grouped.has(d.name))continue;const R=e.perPackageConfig.get(d.name)?.releaseTagPattern??P,f=R?$(R,{channel:k,name:d.name,version:d.version}):m(d.name,d.version),T=d.version.includes("-");let h=`Release of ${d.name}@${d.version}.`;if(d.stageId&&(h=`${h}
12
+
13
+ > ⏳ **Staged — not yet installable.** Approve via \`vis release stage approve ${d.stageId}\` or the npmjs.com web UI.`),l.stampHashes&&d.tarball&&(h=`${h}
14
+
15
+ ### Tarball integrity
16
+
17
+ - size: \`${d.tarball.size}\` bytes
18
+ - sha256: \`${d.tarball.sha256}\`
19
+ - sha512: \`${d.tarball.sha512}\``),w!==void 0&&w!==!1)try{const H=f.lastIndexOf("@"),N=H>0?f.slice(0,H+1):"",V=await n.listRecentReleases(a,{cwd:e.cwd,excludeTag:f,limit:5,repo:i,tagPrefix:N}),G=ie(V);G&&(h=w==="top"?`${G}
20
+
21
+ ${h}`:`${h}
22
+
23
+ ${G}`)}catch{}const{releaseNoteTemplate:S}=e.config;if(S){const N=e.plan.releases.find(V=>V.name===d.name)?.oldVersion??"";h=re(h,S,{contributors:v,date:y,name:d.name,previousVersion:N,repo:i,version:d.version})}const A=[];l.uploadTarball&&d.tarball&&A.push(d.tarball.path);try{const H=await n.createRelease(a,{assets:A.length>0?A:void 0,body:h,cwd:e.cwd,discussionCategory:u,draft:r,prerelease:T,repo:i,tag:f,title:`${d.name} v${d.version}`});H?.url&&(d.url=H.url)}catch(H){console.warn(`createRelease failed for ${d.name}@${d.version} (tag ${f}): ${H.message}`)}}},ce=async(e,s,a)=>{const{changesDir:c,options:t,persistState:o,result:p,runner:n,state:i}=s,{writeStagedRegistry:g}=await import("../packem_chunks/staged-registry.js");if(!t.dryRun&&p.published.length>0&&p.tagsPushed){e.config.publish?.noRelease!==!0&&await ge(e,p,n,a);try{const{walkSuccessfulRelease:r}=await import("../packem_chunks/success-walk.js"),{createRemoteClient:u,detectRemoteProvider:w}=await import("../packem_chunks/detect.js"),{resolveFormatter:m}=await import("../packem_chunks/resolveFormatter.js"),$=await w(e.cwd,n,e.config.provider),P=u($,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}),k=await P.detectRepoSlug(e.cwd,n),l=await m(e.config.changelog,e.cwd),{recordRecentlyWalked:y}=await import("../packem_chunks/staged-registry.js"),b=new Set([...i.walked??[],...(s.stagedRegistry.recentlyWalked??[]).map(C=>C.key)]),v={...p,published:p.published.filter(C=>!b.has(`${C.name}@${C.version}`))},d=v.published.length>0?await r(e,v,n,{client:P,formatter:l,repo:k}):void 0;if(d?.ran===!0){const C=v.published.map(R=>`${R.name}@${R.version}`);i.walked=[...i.walked??[],...C],await o(),s.stagedRegistry=y(s.stagedRegistry,C),d.warnings.length>0&&e.plan.warnings.push(...d.warnings)}}catch(r){e.plan.warnings.push(`successWalk: could not run post-release walk: ${r.message}`)}if(e.config.notifications)try{const{dispatchNotifications:r}=await import("../packem_chunks/interface.js"),{createRemoteClient:u,detectRemoteProvider:w}=await import("../packem_chunks/detect.js"),m=await w(e.cwd,n,e.config.provider),P=await u(m,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,n);let k;try{const b=`${e.cwd}/package.json`,v=await import("node:fs/promises");k=JSON.parse(await v.readFile(b,"utf8")).name}catch{}const l=new Set([...i.notified??[],...(s.stagedRegistry.recentlyNotified??[]).map(b=>b.key)]),y=p.published.filter(b=>!l.has(`${b.name}@${b.version}`));if(y.length>0){const b=await r(e.config.notifications,{channel:e.channel?.tag,completedAt:new Date().toISOString(),...k===void 0?{}:{monorepoName:k},published:y.map(v=>({name:v.name,tag:e.channel?.tag,...v.url===void 0?{}:{url:v.url},version:v.version})),...P===void 0?{}:{repo:P},skipped:p.skipped.map(v=>({name:v.name,reason:v.reason}))},{warn:v=>e.plan.warnings.push(v)});if(b.succeeded.length>0){const v=y.map(C=>`${C.name}@${C.version}`);i.notified=[...i.notified??[],...v],await o();const{recordRecentlyNotified:d}=await import("../packem_chunks/staged-registry.js");s.stagedRegistry=d(s.stagedRegistry,v)}if(b.failed.length>0||b.succeeded.length>0){const v=b.succeeded.length+b.failed.length;if(b.failed.length>0){e.plan.warnings.push(`[notifications] dispatched ${b.succeeded.length}/${v} channels${b.succeeded.length>0?` (succeeded: ${b.succeeded.join(", ")})`:""}; ${b.failed.length} failed.`);for(const d of b.failed)e.plan.warnings.push(`[notifications:${d.id}] ${d.error}`)}}}}catch(r){e.plan.warnings.push(`notifications: dispatch failed: ${r.message}`)}if(!t.dryRun)try{const r=await g(e.cwd,c,s.stagedRegistry);if(r.changed){const{stageAndCommitFile:u}=await import("../packem_chunks/git.js");try{await u({cwd:e.cwd,runner:n},r.path,"chore(release): record cross-runner notify/walk dedupe [skip ci]",{author:e.config.gitUser,push:!t.noPush&&!t.noBranchPush,sign:e.config.gitSignCommits===!0})}catch(w){process.stderr.write(`[vis release] Warning: could not commit ${r.path} (notify/walk dedupe): ${w.message}
24
+ `)}}}catch(r){process.stderr.write(`[vis release] Warning: could not update cross-runner dedupe registry: ${r.message}
25
+ `)}}},le=async e=>{const{defaultTagFor:s,floatingMajorTagFor:a,renderTagPattern:c}=await import("../packem_chunks/git.js"),{resolveSyncTagGroups:t}=await import("../packem_chunks/group-tags.js"),o=e.plan.releases.filter(r=>e.depGraph.getPackage(r.name)?.manifest?.private!==!0).map(r=>({name:r.name,version:r.newVersion})),p=t(e.config,o),n=p.groups.map(r=>r.tag),i=[],g=!!e.channel?.prerelease||!!e.preMode;for(const{name:r,version:u}of o){if(p.grouped.has(r))continue;const w=e.perPackageConfig.get(r),m=w?.releaseTagPattern??e.config.releaseTagPattern;if(n.push(m?c(m,{channel:e.channel?.tag,name:r,version:u}):s(r,u)),e.config.floatingMajorTag===!0&&!g&&!m?.includes("{major}")&&w?.skipNpmPublish!==!0){const $=a(r,u);$!==void 0&&i.push($)}}return{created:n,updated:i}},de=async(e,s,a)=>{if((await s.run("git",["remote","get-url","--push","origin"],{cwd:e.cwd,silent:!0})).exitCode!==0)return;const{getCurrentBranch:t,resolvePushCredentials:o,verifyPushAccess:p}=await import("../packem_chunks/git.js"),n={cwd:e.cwd,runner:s},i=await p(n);if(i!==void 0)return`Cannot push to origin, nothing was published. Set VIS_GH_TOKEN (or GITHUB_TOKEN / GITLAB_TOKEN) with write access, or pass --no-push. git said: ${i}`;const{createRemoteClient:g,detectRemoteProvider:r}=await import("../packem_chunks/detect.js");let u;try{u=await r(e.cwd,s,e.config.provider)}catch{return}if(u!=="github")return;const m=await g(u,{githubHost:e.config.githubHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,s);if(!m)return;const $=await o(n),P={...process.env};$!==void 0&&(P.GH_TOKEN=$.token),e.config.githubHost&&(P.GH_HOST=e.config.githubHost),e.config.httpProxy&&(P.HTTPS_PROXY=e.config.httpProxy,P.HTTP_PROXY=e.config.httpProxy);const{checkGithubPushRules:k}=await import("../packem_chunks/github-push-rules.js"),l=a.noTag?{created:[],updated:[]}:await le(e),y=await k(s,{branch:await t(n),createdTags:l.created,cwd:e.cwd,env:P,repo:m,signedCommits:e.config.gitSignCommits===!0,updatedTags:l.updated});for(const b of y.warnings)process.stderr.write(`[vis release] Warning: ${b}
26
+ `);if(y.blocked.length>0)return`GitHub push rules would reject this release, nothing was published:
27
+ - ${y.blocked.join(`
28
+ - `)}
29
+ Grant the pushing token a bypass, adjust the ruleset, or pass --no-push / --no-tag.`},pe=async(e,s,a,c)=>{if(!a.dryRun&&e.channel?.mode==="version-pr"){const{createRemoteClient:t,detectRemoteProvider:o}=await import("../packem_chunks/detect.js");let p;try{const i=await o(e.cwd,s,e.config.provider);p=await t(i,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,s)}catch(i){return c.failed.push({name:"_preflight",reason:`Could not read the remote to check for an open release PR: ${i.message}`}),!0}const n=e.config.versionPr?.branch??"vis-release/version-packages";if(p)try{const i=await s.run("gh",["pr","list","--head",n,"--state","open","--json","number"],{cwd:e.cwd,silent:!0});if(i.exitCode===0&&i.stdout.trim()&&i.stdout.trim()!=="[]"){const g=JSON.parse(i.stdout);if(g[0])return c.failed.push({name:"_preflight",reason:`Open release PR #${g[0].number} exists. Merge or close it before publishing locally. (Override: --no-push then \`git push --tags\` manually.)`}),!0}}catch{}}if(!a.dryRun&&e.config.prePublishCommand)try{await B(e.cwd,e.config.prePublishCommand,"prePublishCommand")}catch(t){return c.failed.push({name:"_prePublishCommand",reason:t.message}),!0}if(!a.dryRun&&!a.noPush){let t;try{t=await de(e,s,{noTag:a.noTag===!0})}catch(o){return c.failed.push({name:"_preflight",reason:`Could not verify the release pushes: ${o.message}`}),!0}if(t!==void 0)return c.failed.push({name:"_pushAccess",reason:t}),!0}return!1},ue=async(e,s)=>{const{changesDir:a,options:c,runner:t}=s,{writeStagedRegistry:o}=await import("../packem_chunks/staged-registry.js");if(!c.dryRun){const p=s.priorRegistrySnapshot.pending.length,n=s.stagedRegistry.pending.length,i=await o(e.cwd,a,s.stagedRegistry);if(i.changed){const{stageAndCommitFile:g}=await import("../packem_chunks/git.js");let r;if(i.removed)r="chore(release): clear pending stage registry [skip ci]";else if(n>p){const u=n-p;r=`chore(release): record ${u} new pending stage${u===1?"":"s"} [skip ci]`}else if(n<p){const u=p-n;r=`chore(release): drain ${u} resolved stage${u===1?"":"s"} [skip ci]`}else r=`chore(release): update pending stage registry (${n} pending) [skip ci]`;try{await g({cwd:e.cwd,runner:t},i.path,r,{author:e.config.gitUser,push:!c.noPush&&!c.noBranchPush,sign:e.config.gitSignCommits===!0})}catch(u){process.stderr.write(`[vis release] Warning: could not commit ${i.path}: ${u.message}
30
+ `)}}}},he=async(e,s)=>{const{options:a,result:c,runner:t}=s;if(!a.dryRun&&c.published.length>0&&e.config.workspaceChangelog!==!1){const o=e.config.workspaceChangelog,p=typeof o=="object"?o:void 0,n=typeof e.config.aggregateRelease=="object"?e.config.aggregateRelease.enabled:e.config.aggregateRelease===!0;if(p!==void 0||n)try{const{writeWorkspaceChangelogWave:i}=await import("../packem_chunks/workspace.js"),g=new Set(c.published.map(w=>w.name)),r=e.plan.releases.filter(w=>g.has(w.name)),u=await i({changelogConfig:e.config.changelog,cwd:e.cwd,workspaceChangelog:e.config.workspaceChangelog},r);if(u)try{const{stageAndCommitFile:w}=await import("../packem_chunks/git.js");await w({cwd:e.cwd,runner:t},u,"chore(release): record wave [skip ci]",{author:e.config.gitUser,push:!a.noPush&&!a.noBranchPush,sign:e.config.gitSignCommits===!0})}catch(w){process.stderr.write(`[vis release] Warning: could not commit workspace CHANGELOG.md: ${w.message}
31
+ `)}}catch(i){process.stderr.write(`[vis release] Warning: could not write workspace CHANGELOG.md wave entry: ${i.message}
32
+ `)}}},O=async(e,s,a,c,t)=>{const{stageAndCommitFile:o}=await import("../packem_chunks/git.js"),{stateFilePath:p}=await import("../packem_chunks/state.js");try{const n=await o({cwd:e.cwd,runner:s},p(e.cwd,a,!0),`chore(release): ${c} publish lock [skip ci]`,{author:e.config.gitUser,push:!t.noPush,sign:e.config.gitSignCommits===!0});!t.noPush&&n.committed&&!n.pushed&&process.stderr.write(`[vis release] Warning: publish lock (${c}) was committed locally but could not be pushed — cross-runner resume may use a stale lock.
33
+ `)}catch(n){process.stderr.write(`[vis release] Warning: could not commit publish lock (${c}): ${n.message}
34
+ `)}},fe=async(e,s,a,c)=>{const{filterPlanByState:t,newState:o,readState:p,writeState:n}=await import("../packem_chunks/state.js"),{readStagedRegistry:i}=await import("../packem_chunks/staged-registry.js"),g=e.config.changesDir??E,r=e.config.publish?.lockInGit===!0;let u=a.resume||r?await p(e.cwd,g,r):void 0;u&&r&&(u.channel=e.channel?.tag);const w=async()=>{a.dryRun||!u||(await n(e.cwd,g,u,r),r&&await O(e,s,g,"progress",{noPush:a.noPush||a.noBranchPush}))};let m=await i(e.cwd,g);await q(e,"publish",m,{runner:s}),m=await i(e.cwd,g);const $={...m,pending:[...m.pending]};let{releases:P}=e.plan;return u?P=t(P,u):(u=o(e.channel?.tag,e.plan.releases),a.dryRun||(await n(e.cwd,g,u,r),r&&await O(e,s,g,"open",{noPush:a.noPush||a.noBranchPush}))),{changesDir:g,lockInGit:r,options:a,persistState:w,priorRegistrySnapshot:$,releases:P,result:c,runner:s,stagedRegistry:m,state:u}},me=async(e,s,a)=>{const{changesDir:c,lockInGit:t,options:o,persistState:p,result:n,runner:i,state:g}=s,{clearState:r}=await import("../packem_chunks/state.js");if(!o.dryRun&&!o.noTag&&n.published.length>0){const{createOrUpdateFloatingTag:u,createTag:w,defaultTagFor:m,floatingMajorTagFor:$,pushTags:P,renderTagPattern:k,resolveReleaseSource:l}=await import("../packem_chunks/git.js");let y;try{y=o.defaultTagTarget??(e.config.tagTarget==="source"?await l({cwd:e.cwd,runner:i}):void 0)}catch(f){n.failed.push({name:"_tagTarget",reason:f.message}),await p();return}const b=[],v=e.config.releaseTagPattern,d=e.channel?.tag,C=e.config.floatingMajorTag===!0,R=!!e.channel?.prerelease||!!e.preMode;for(const{name:f,version:T}of n.published){if(a.grouped.has(f))continue;const S=e.perPackageConfig.get(f)?.releaseTagPattern??v,A=S?k(S,{channel:d,name:f,version:T}):m(f,T);try{await w({cwd:e.cwd,runner:i},A,`Release ${f}@${T}`,{signing:e.config.signing,skipRemoteCheck:e.firstRelease,target:o.tagTargets?.get(f)??y}),n.tags.push(A)}catch(j){e.firstRelease&&j instanceof F&&j.code==="TAG_COLLISION"?n.skipped.push({name:A,reason:"tag-creation: tag already exists (first-release — skipped)"}):n.failed.push({name:A,reason:`tag-creation: ${j.message}`})}const H=e.depGraph.getPackage(f),N=e.perPackageConfig.get(f),V=H?.manifest?.private===!0,G=N?.skipNpmPublish===!0;if(C&&!R&&!S?.includes("{major}")&&!V&&!G){const j=$(f,T);if(j!==void 0)try{await u({cwd:e.cwd,runner:i},j,{push:!1,signing:e.config.signing,target:y}),b.push(`+refs/tags/${j}:refs/tags/${j}`),n.tags.push(j)}catch(M){n.skipped.push({name:j,reason:`floating-major-tag: ${M.message}`})}}}for(const f of a.groups)try{await w({cwd:e.cwd,runner:i},f.tag,`Release ${f.name} ${f.version}`,{signing:e.config.signing,skipRemoteCheck:e.firstRelease,target:y}),n.tags.push(f.tag)}catch(T){e.firstRelease&&T instanceof F&&T.code==="TAG_COLLISION"?n.skipped.push({name:f.tag,reason:"tag-creation: tag already exists (first-release — skipped)"}):n.failed.push({name:f.tag,reason:`tag-creation: ${T.message}`})}if(!o.noPush&&n.tags.length>0)try{await P({cwd:e.cwd,runner:i},{refspecs:b}),n.tagsPushed=!0}catch(f){n.tagsPushed=!1,n.failed.push({name:"_pushTags",reason:`git push --tags failed: ${f.message}. Retry with: git push --tags`})}g.tagged=[...n.tags],g.pushed=n.tagsPushed,await p(),n.failed.length===0&&!o.dryRun&&(await r(e.cwd,c,t),t&&await O(e,i,c,"close",{noPush:o.noPush||o.noBranchPush}))}},we=async(e,s={})=>{const a={failed:[],published:[],skipped:[],tags:[],tagsPushed:!1},c=_();if(e.plan.releases.length===0||await pe(e,c,s,a))return a;const t=e.config.changesDir??E,{acquireLock:o,releaseLock:p}=await import("../packem_chunks/state.js");let n=!1;if(!s.dryRun)try{await o(e.cwd,t),n=!0}catch(i){return a.failed.push({name:"_lock",reason:i.message}),a}try{const i=await fe(e,c,s,a);await oe(e,i);const{resolveSyncTagGroups:g}=await import("../packem_chunks/group-tags.js"),r=g(e.config,a.published);if(await me(e,i,r),await ue(e,i),await he(e,i),await ce(e,i,r),!s.dryRun&&e.config.postPublishCommand)try{await B(e.cwd,e.config.postPublishCommand,"postPublishCommand")}catch(u){a.failed.push({name:"_postPublishCommand",reason:u.message})}return a}finally{n&&await p(e.cwd,t)}},be=(e,s)=>async(a,c,t)=>{const o=["view",`${a.name}@${c}`,"version"];t&&o.push("--registry",t);const p=await e.run("npm",o,{cwd:s,silent:!0});return p.exitCode===0?p.stdout.trim()!=="":/\bE404\b/.test(`${p.stdout}
35
+ ${p.stderr}`)?!1:void 0},ye=async(e,s,a)=>{const c=await e.run("git",["log","-1","--format=%H%x00%s",String.raw`-G"version"[[:space:]]*:`,"--",a],{cwd:s,silent:!0}),[t,o]=c.stdout.trim().split("\0");return c.exitCode===0&&t?{sha:t,subject:o??""}:void 0},ve=async(e,s={})=>{const a=s.runner??_(),c=s.registryProbe??be(a,e.cwd),t={missing:[],skipped:[]},o=e.config.versionPr?.title??"🚀 Versioned release",p=g=>g.startsWith(o)||L.some(r=>r.test(g)),{default:n}=await import("../packem_chunks/index.js"),i=s.projects??[];for(const g of e.packages){const r=e.perPackageConfig.get(g.name);if(g.ecosystem!==void 0||g.private||r?.skipNpmPublish===!0||!I.valid(g.version)||i.length>0&&!i.some(l=>l===g.name||n(l,g.name)))continue;const u=await W(g,"git-tag",e.depGraph,{cwd:e.cwd,perPackageConfig:r,pm:e.pm,runner:a,workspaceConfig:e.config});if(u.resolvedFrom!=="git-tag"||!I.gt(g.version,u.version))continue;const w=l=>{t.skipped.push({name:g.name,reason:`${g.version} is untagged but ${l}`})},m=await ye(a,e.cwd,g.manifestPath);if(!m){w("the commit that set it could not be found");continue}if(!p(m.subject)){w(`it was set by ${m.sha.slice(0,7)} ("${m.subject}"), which is not a release commit`);continue}if((await a.run("git",["diff","--quiet",m.sha,"--",g.dir],{cwd:e.cwd,silent:!0})).exitCode!==0){w(`${g.dir} changed since ${m.sha.slice(0,7)}; the next release covers it`);continue}const P=await c(g,g.version,r?.registry);if(P===void 0){w("the registry could not confirm whether it is published");continue}let k;try{k=await z({cwd:e.cwd,runner:a},m.sha)??m.sha}catch(l){w(l.message);continue}t.missing.push({commit:m.sha,name:g.name,onRegistry:P,previousVersion:u.version,target:k,version:g.version})}return t},Pe=(e,s,a)=>{const c=e.perPackageConfig.get(s)?.releaseTagPattern??e.config.releaseTagPattern;return c?J(c,{channel:e.channel?.tag,name:s,version:a}):Y(s,a)},ke=(e,s)=>{const a=I.diff(e,s);return a==="major"||a==="premajor"?"major":a==="minor"||a==="preminor"?"minor":"patch"},Ie=async(e,s={})=>{const a=_(),c=await ve(e,{projects:s.projects,registryProbe:s.registryProbe,runner:a}),t={failed:[],missing:c.missing,published:[],skipped:[...c.skipped],tags:[],tagsPushed:!1};c.missing.length>0&&D();const o=c.missing.filter(i=>!i.onRegistry),p=c.missing.filter(i=>i.onRegistry);if(o.length>0){const i=o.map(r=>({changeFiles:[],isCascadeBump:!1,isDependencyBump:!1,isGroupBump:!1,name:r.name,newVersion:r.version,oldVersion:r.previousVersion,reasons:[],sources:[],type:ke(r.previousVersion,r.version)})),g=await we({...e,plan:{consumedChangeFiles:[],releases:i,warnings:[]}},{...s,tagTargets:new Map(o.map(r=>[r.name,r.target]))});t.failed.push(...g.failed),t.published.push(...g.published),t.skipped.push(...g.skipped),t.tags.push(...g.tags),t.tagsPushed=g.tagsPushed}if(p.length===0||s.dryRun||s.noTag)return t;const n=[];for(const i of p){const g=Pe(e,i.name,i.version);try{await U({cwd:e.cwd,runner:a},g,`Release ${i.name}@${i.version}`,{signing:e.config.signing,target:i.target}),n.push(g),t.skipped.push({name:i.name,reason:`already-published: tagged ${g}`})}catch(r){t.failed.push({name:g,reason:`tag-creation: ${r.message}`})}}if(t.tags.push(...n),n.length>0&&!s.noPush)try{await K({cwd:e.cwd,runner:a}),t.tagsPushed=!0}catch(i){t.tagsPushed=!1,t.failed.push({name:"_pushTags",reason:`git push --tags failed: ${i.message}. Retry with: git push --tags`})}return t};export{we as a,Ie as p};