@visulima/vis 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  import{createRequire as ct}from"node:module";import{k as be,m as te,l as De,a as mt,h as gt,z as Lt,g as St}from"./index-DHD8wb6Z.js";import{a as ie,g as vt}from"./_commonjsHelpers-DTfxOvZk.js";import{r as Ct,a as Pt}from"./clean-DRiLimTx.js";import{p as bt}from"./readJsonSync-CbryXYxN-B2aSeDpC.js";let ht;const ut=h=>(ht??=ct(import.meta.url))(h),G=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=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 ut(h)},{dirname:pt}=R("node:path"),Pe=R("node:url"),{fileURLToPath:ft}=Pe,ye=R("node:module"),{createRequire:dt}=ye,yt=R("util"),E=h=>"Deno"in h,Di=()=>{if(E(globalThis)){const h=globalThis.Deno,e=h.execPath();let t=e;try{const{importMeta:i}=globalThis;i?.url&&(t=i.url)}catch{}return[e,t,...h.args]}return process.argv},Ai=()=>E(globalThis)?globalThis.Deno.cwd():process.cwd(),wi=()=>{if(E(globalThis)){const h=globalThis.Deno;return new Proxy(h.env.toObject(),{get:(e,t)=>typeof t=="string"?h.env.get(t):e[t],has:(e,t)=>typeof t=="string"?h.env.has(t):t in e,set:(e,t,i)=>typeof t=="string"?(i===void 0||h.env.set(t,i),!0):!1})}return process.env},xi=()=>E(globalThis)?[]:process.execArgv,Ei=()=>E(globalThis)?globalThis.Deno.execPath():process.execPath,Oi=()=>{if(E(globalThis)){const h=globalThis.Deno.build?.os??"unknown";return h==="windows"?"win32":h}return process.platform},Ni=()=>{if(E(globalThis)){const h=globalThis.Deno.build?.arch??"unknown";return h==="x86_64"?"x64":h==="aarch64"?"arm64":h}return process.arch},Fi=(h=0)=>{if(E(globalThis))throw globalThis.Deno.exit(h),new Error("Deno exit failed");process.exit(h)},Gi=(h,e)=>{if(E(globalThis))return()=>{};const t=process;return t.on(h,e),()=>{t.removeListener(h,e)}};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 Dt(){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 At(){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 _,le;function wt(){if(le)return _;le=1;var h=[].concat(Ae()).concat(Dt()),e=At();return _=function(t){var i=0;function s(){return i<t.length}function n(L){if(L instanceof RegExp){var c=t.slice(i),g=c.match(L);if(g)return i+=g[0].length,g[0]}else if(t.indexOf(L,i)===i)return i+=L.length,L}function l(){n(/[ ]*/)}function a(){for(var L,c=["WITH","AND","OR","(",")",":","+"],g=0;g<c.length&&(L=n(c[g]),!L);g++);if(L==="+"&&i>1&&t[i-2]===" ")throw new Error("Space before `+`");return L&&{type:"OPERATOR",string:L}}function o(){return n(/[A-Za-z0-9-.]+/)}function u(){var L=o();if(!L)throw new Error("Expected idstring at offset "+i);return L}function f(){if(n("DocumentRef-")){var L=u();return{type:"DOCUMENTREF",string:L}}}function S(){if(n("LicenseRef-")){var L=u();return{type:"LICENSEREF",string:L}}}function b(){var L=i,c=o();if(h.indexOf(c)!==-1)return{type:"LICENSE",string:c};if(e.indexOf(c)!==-1)return{type:"EXCEPTION",string:c};i=L}function v(){return a()||f()||S()||b()}for(var C=[];s()&&(l(),!!s());){var m=v();if(!m)throw new Error("Unexpected `"+t[i]+"` at offset "+i);C.push(m)}return C},_}var W,ae;function xt(){return ae||(ae=1,W=function(h){var e=0;function t(){return e<h.length}function i(){return t()?h[e]:null}function s(){if(!t())throw new Error;e++}function n(m){var L=i();if(L&&L.type==="OPERATOR"&&m===L.string)return s(),L.string}function l(){if(n("WITH")){var m=i();if(m&&m.type==="EXCEPTION")return s(),m.string;throw new Error("Expected exception after `WITH`")}}function a(){var m=e,L="",c=i();if(c.type==="DOCUMENTREF"&&(s(),L+="DocumentRef-"+c.string+":",!n(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(c=i(),c.type==="LICENSEREF")return s(),L+="LicenseRef-"+c.string,{license:L};e=m}function o(){var m=i();if(m&&m.type==="LICENSE"){s();var L={license:m.string};n("+")&&(L.plus=!0);var c=l();return c&&(L.exception=c),L}}function u(){var m=n("(");if(m){var L=v();if(!n(")"))throw new Error("Expected `)`");return L}}function f(){return u()||a()||o()}function S(m,L){return function c(){var g=L();if(g){if(!n(m))return g;var y=c();if(!y)throw new Error("Expected expression");return{left:g,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=wt(),e=xt();return H=function(t){return e(h(t))},H}var j,he;function Et(){if(he)return j;he=1;var h=we(),e=Ae();function t(c){try{return h(c),!0}catch{return!1}}function i(c,g){var y=g[0].length-c[0].length;return y!==0?y:c[0].toUpperCase().localeCompare(g[0].toUpperCase())}var s=[["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(i),n=0,l=1,a=[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"}],o=e.map(function(c){var g=/^(.*)-\d+\.\d+$/.exec(c);return g?[g[0],g[1]]:[c,null]}).reduce(function(c,g){var y=g[1];return c[y]=c[y]||[],c[y].push(g[0]),c},{}),u=Object.keys(o).map(function(g){return[g,o[g]]}).filter(function(g){return g[1].length===1&&g[0]!==null&&g[0]!=="APL"}).map(function(g){return[g[0],g[1][0]]});o=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(i),S=0,b=1,v=function(c){for(var g=0;g<a.length;g++){var y=a[g](c).trim();if(y!==c&&t(y))return y}return null},C=function(c){for(var g=c.toUpperCase(),y=0;y<f.length;y++){var r=f[y];if(g.indexOf(r[S])>-1)return r[b]}return null},m=function(c,g){for(var y=0;y<s.length;y++){var r=s[y],p=r[n];if(c.indexOf(p)>-1){var d=c.replace(p,r[l]),P=g(d);if(P!==null)return P}}return null};j=function(c,g){g=g||{};var y=g.upgrade===void 0?!0:!!g.upgrade;function r(D){return y?L(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 r(c);var d=c.replace(/\+$/,"").trim();if(t(d))return r(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)?r(P):null};function L(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 Ot(){if(ue)return z;ue=1;var h=we(),e=Et(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',i=/^SEE LICEN[CS]E IN (.+)$/;function s(l,a){return a.slice(0,l.length)===l}function n(l){if(l.hasOwnProperty("license")){var a=l.license;return s("LicenseRef",a)||s("DocumentRef",a)}else return n(l.left)||n(l.right)}return z=function(l){var a;try{a=h(l)}catch{var o;if(l==="UNLICENSED"||l==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(o=i.exec(l))return{validForOldPackages:!0,validForNewPackages:!0,inFile:o[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(l.trim().length!==0){var f=e(l);f&&u.warnings.push('license is similar to the valid expression "'+f+'"')}return u}return n(a)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},z}var xe={hasSubscribers:!1},A=xe,F=xe;import("node:diagnostics_channel").then(h=>{A=h.channel("lru-cache:metrics"),F=h.tracingChannel("lru-cache")}).catch(()=>{});var Nt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=()=>A.hasSubscribers||F.hasSubscribers,Ee=new Set,pe=process||{},Ft=(h,e,t,i)=>{typeof pe.emitWarning=="function"?pe.emitWarning(h,e,t,i):console.error(`[${t}] ${e}: ${h}`)},Gt=h=>!Ee.has(h),N=h=>!!h&&h===Math.floor(h)&&h>0&&isFinite(h),Oe=h=>N(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(h){super(h),this.fill(0)}},$t=class T{heap;length;static#n=!1;static create(e){let t=Oe(e);if(!t)return[];T.#n=!0;let i=new T(e,t);return T.#n=!1,i}constructor(e,t){if(!T.#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]}},Tt=class Ne{#n;#c;#t;#O;#L;#B;#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;#l;#C;#a;#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.#l},free:e.#C,isBackgroundFetch:t=>e.#i(t),backgroundFetch:(t,i,s,n)=>e.#k(t,i,s,n),moveToTail:t=>e.#T(t),indexes:t=>e.#D(t),rindexes:t=>e.#A(t),isStale:t=>e.#g(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.#B}get memoMethod(){return this.#R}get dispose(){return this.#t}get onInsert(){return this.#O}get disposeAfter(){return this.#L}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:l,updateAgeOnHas:a,allowStale:o,dispose:u,onInsert:f,disposeAfter:S,noDisposeOnSet:b,noUpdateTTL:v,maxSize:C=0,maxEntrySize:m=0,sizeCalculation:L,fetchMethod:c,memoMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:r,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??Nt,t!==0&&!N(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=L,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(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=g,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#B=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.#l=0,this.#C=$t.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),typeof f=="function"&&(this.#O=f),typeof S=="function"?(this.#L=S,this.#a=[]):(this.#L=void 0,this.#a=void 0),this.#b=!!this.#t,this.#N=!!this.#O,this.#p=!!this.#L,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&&!N(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!N(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!o,this.noDeleteOnStaleGet=!!r,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!a,this.ttlResolution=N(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!N(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";Gt(I)&&(Ee.add(I),Ft("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 i=this.ttlAutopurge?Array.from({length:this.#n}):void 0;this.#m=i,this.#W=(o,u,f=this.#S.now())=>{t[o]=u!==0?f:0,e[o]=u,s(o,u)},this.#F=o=>{t[o]=e[o]!==0?this.#S.now():0,s(o,e[o])};let s=this.ttlAutopurge?(o,u)=>{if(i?.[o]&&(clearTimeout(i[o]),i[o]=void 0),u&&u!==0&&i){let f=setTimeout(()=>{this.#g(o)?(this.#w(this.#r[o],"expire"),i[o]=void 0):s(o,a(o))},u+1);f.unref&&f.unref(),i[o]=f}}:()=>{};this.#x=(o,u)=>{if(e[u]){let f=e[u],S=t[u];if(!f||!S)return;o.ttl=f,o.start=S,o.now=n||l();let b=o.now-S;o.remainingTTL=f-b}};let n=0,l=()=>{let o=this.#S.now();if(this.ttlResolution>0){n=o;let u=setTimeout(()=>n=0,this.ttlResolution);u.unref&&u.unref()}return o};this.getRemainingTTL=o=>{let u=this.#s.get(o);return u===void 0?0:a(u)};let a=o=>{let u=e[o],f=t[o];if(!u||!f)return 1/0;let S=(n||l())-f;return u-S};this.#g=o=>{let u=t[o],f=e[o];return!!f&&!!u&&(n||l())-u>f}}#F=()=>{};#x=()=>{};#W=()=>{};#g=()=>!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,i,s,n)=>{if(!N(s)){if(this.#i(i))return this.backgroundFetchSize;if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!N(s))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 s},this.#U=(t,i,s)=>{if(e[t]=i,this.#c){let n=this.#c-e[t];for(;this.#v>n;)this.#M(!0)}this.#v+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#v)}}#G=e=>{};#U=(e,t,i)=>{};#H=(e,t,i,s)=>{if(i||s)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.#l;this.#j(t)&&((e||!this.#g(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.#g(t))&&(yield t),t!==this.#l);)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 i of this.#D()){let s=this.#e[i],n=this.#i(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#r[i],this))return this.#$(this.#r[i],t)}}forEach(e,t=this){for(let i of this.#D()){let s=this.#e[i],n=this.#i(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this)}}rforEach(e,t=this){for(let i of this.#A()){let s=this.#e[i],n=this.#i(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#g(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 i=this.#e[t],s=this.#i(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#y){let l=this.#d[t],a=this.#y[t];if(l&&a){let o=l-(this.#S.now()-a);n.ttl=o,n.start=Date.now()}}return this.#P&&(n.size=this.#P[t]),n}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let i=this.#r[t],s=this.#e[t],n=this.#i(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let l={value:n};if(this.#d&&this.#y){l.ttl=this.#d[t];let a=this.#S.now()-this.#y[t];l.start=Math.floor(Date.now()-a)}this.#P&&(l.size=this.#P[t]),e.unshift([i,l])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#S.now()-s}this.#E(t,i.value,i)}}set(e,t,i={}){let{status:s=A.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let n=this.#E(e,t,i);return s&&A.hasSubscribers&&A.publish(s),n}#E(e,t,i,s){let{ttl:n=this.ttl,start:l,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:u}=i,f=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:S=this.noUpdateTTL}=i;u&&!f&&(u.value=t);let b=this.#H(e,t,i.size||0,o,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.#l: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.#l]=v,this.#f[v]=this.#l,this.#l=v,this.#o++,this.#U(v,b,u),u&&(u.set="add"),S=!1,this.#N&&!f&&this.#O?.(t,e,"add");else{this.#T(v);let C=this.#e[v];if(t!==C){if(!a)if(this.#i(C)){C!==s&&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.#a?.push([m,e,"set"]))}else this.#b&&this.#t?.(C,e,"set"),this.#p&&this.#a?.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,L=m===void 0?"add":t!==m?"replace":"update";u&&(u.set=L,m!==void 0&&(u.oldValue=m)),this.#N&&this.onInsert?.(t,e,L)}}else f||(u&&(u.set="update"),this.#N&&this.onInsert?.(t,e,"update"))}if(n!==0&&!this.#d&&this.#_(),this.#d&&(S||this.#W(v,n,l),u&&this.#x(u,v)),!a&&this.#p&&this.#a){let C=this.#a,m;for(;m=C?.shift();)this.#L?.(...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.#a){let e=this.#a,t;for(;t=e?.shift();)this.#L?.(...t)}}}#M(e){let t=this.#h,i=this.#r[t],s=this.#e[t],n=this.#i(s);n&&s.__abortController.abort(new Error("evicted"));let l=n?s.__staleWhileFetching:s;return(this.#b||this.#p)&&l!==void 0&&(this.#b&&this.#t?.(l,i,"evict"),this.#p&&this.#a?.push([l,i,"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.#l=0,this.#C.length=0):this.#h=this.#u[t],this.#s.delete(i),this.#o--,t}has(e,t={}){let{status:i=A.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#K(e,t);return A.hasSubscribers&&A.publish(i),s}#K(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let l=this.#e[n];if(this.#i(l)&&l.__staleWhileFetching===void 0)return!1;if(this.#g(n))s&&(s.has="stale",this.#x(s,n));else return i&&this.#F(n),s&&(s.has="hit",this.#x(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=Y()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#X(e,t);return A.hasSubscribers&&A.publish(i),s}#X(e,t){let{status:i,allowStale:s=this.allowStale}=t,n=this.#s.get(e);if(n===void 0||!s&&this.#g(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let l=this.#e[n],a=this.#i(l)?l.__staleWhileFetching:l;return i&&(a!==void 0?(i.peek="hit",i.value=a):i.peek="miss"),a}#k(e,t,i,s){let n=t===void 0?void 0:this.#e[t];if(this.#i(n))return n;let l=new AbortController,{signal:a}=i;a?.addEventListener("abort",()=>l.abort(a.reason),{signal:l.signal});let o={signal:l.signal,options:i,context:s},u=(m,L=!1)=>{let{aborted:c}=l.signal,g=i.ignoreFetchAbort&&m!==void 0,y=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&m!==void 0);if(i.status&&(c&&!L?(i.status.fetchAborted=!0,i.status.fetchError=l.signal.reason,g&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),c&&!g&&!L)return S(l.signal.reason,y);let r=v,p=this.#e[t];return(p===v||p===void 0&&g&&L)&&(m===void 0?r.__staleWhileFetching!==void 0?this.#e[t]=r.__staleWhileFetching:this.#w(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#E(e,m,o.options,r))),m},f=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),S(m,!1)),S=(m,L)=>{let{aborted:c}=l.signal,g=c&&i.allowStaleOnFetchAbort,y=g||i.allowStaleOnFetchRejection,r=y||i.noDeleteOnFetchRejection,p=v;if(this.#e[t]===v&&(!r||!L&&p.__staleWhileFetching===void 0?this.#w(e,"fetch"):g||(this.#e[t]=p.__staleWhileFetching)),y)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw m},b=(m,L)=>{let c=this.#B?.(e,n,o);l.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=g=>u(g,!0)))}),c&&c instanceof Promise?c.then(g=>m(g===void 0?void 0:g),L):c!==void 0&&m(c)};i.status&&(i.status.fetchDispatched=!0);let v=new Promise(b).then(u,f),C=Object.assign(v,{__abortController:l,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#E(e,C,{...o.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 i=F.hasSubscribers,{status:s=Y()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#z(e,t);return s&&i&&(s.trace=!0,F.tracePromise(()=>n,s).catch(()=>{})),n}async#z(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=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:L=!1,status:c,signal:g}=t;if(c&&(c.op="fetch",c.key=e,L&&(c.forceRefresh=!0),c.cache=this),!this.#I)return c&&(c.fetch="get"),this.#$(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:c});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:l,noDisposeOnSet:a,size:o,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:C,ignoreFetchAbort:v,status:c,signal:g},r=this.#s.get(e);if(r===void 0){c&&(c.fetch="miss");let p=this.#k(e,r,y,m);return p.__returned=p}else{let p=this.#e[r];if(this.#i(p)){let w=i&&p.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",w&&(c.returnedStale=!0)),w?p.__staleWhileFetching:p.__returned=p}let d=this.#g(r);if(!L&&!d)return c&&(c.fetch="hit"),this.#T(r),s&&this.#F(r),c&&this.#x(c,r),p;let P=this.#k(e,r,y,m),D=P.__staleWhileFetching!==void 0&&i;return c&&(c.fetch=d?"stale":"refresh",D&&d&&(c.returnedStale=!0)),D?P.__staleWhileFetching:P.__returned=P}}forceFetch(e,t={}){let i=F.hasSubscribers,{status:s=Y()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#J(e,t);return s&&i&&(s.trace=!0,F.tracePromise(()=>n,s).catch(()=>{})),n}async#J(e,t={}){let i=await this.#z(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=A.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Z(e,t);return i&&(i.value=s),A.hasSubscribers&&A.publish(i),s}#Z(e,t={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:l,...a}=t;n&&l&&(n.forceRefresh=!0);let o=this.#$(e,a),u=l||o===void 0;if(n&&(n.memo=u?"miss":"hit",u||(n.value=o)),!u)return o;let f=i(e,o,{options:a,context:s});return n&&(n.value=f),this.#E(e,f,a),f}get(e,t={}){let{status:i=A.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#$(e,t);return i&&(s!==void 0&&(i.value=s),A.hasSubscribers&&A.publish(i)),s}#$(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:l}=t,a=this.#s.get(e);if(a===void 0){l&&(l.get="miss");return}let o=this.#e[a],u=this.#i(o);return l&&this.#x(l,a),this.#g(a)?u?(l&&(l.get="stale-fetching"),i&&o.__staleWhileFetching!==void 0?(l&&(l.returnedStale=!0),o.__staleWhileFetching):void 0):(n||this.#w(e,"expire"),l&&(l.get="stale"),i?(l&&(l.returnedStale=!0),o):void 0):(l&&(l.get=u?"fetching":"hit"),this.#T(a),s&&this.#F(a),u?o.__staleWhileFetching:o)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#T(e){e!==this.#l&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#l,e),this.#l=e)}delete(e){return this.#w(e,"delete")}#w(e,t){A.hasSubscribers&&A.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#o!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m[s]),this.#m[s]=void 0),i=!0,this.#o===1)this.#q(t);else{this.#G(s);let n=this.#e[s];if(this.#i(n)?n.__abortController.abort(new Error("deleted")):(this.#b||this.#p)&&(this.#b&&this.#t?.(n,e,t),this.#p&&this.#a?.push([n,e,t])),this.#s.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#l)this.#l=this.#f[s];else if(s===this.#h)this.#h=this.#u[s];else{let l=this.#f[s];this.#u[l]=this.#u[s];let a=this.#u[s];this.#f[a]=this.#f[s]}this.#o--,this.#C.push(s)}}if(this.#p&&this.#a?.length){let s=this.#a,n;for(;n=s?.shift();)this.#L?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#A({allowStale:!0})){let i=this.#e[t];if(this.#i(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#r[t];this.#b&&this.#t?.(i,s,e),this.#p&&this.#a?.push([i,s,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.#l=0,this.#C.length=0,this.#v=0,this.#o=0,this.#p&&this.#a){let t=this.#a,i;for(;i=t?.shift();)this.#L?.(...i)}}};const Bt=Object.defineProperty({__proto__:null,LRUCache:Tt},Symbol.toStringTag,{value:"Module"}),Rt=ie(Bt);var q,fe;function It(){if(fe)return q;fe=1;const h=(...n)=>n.every(l=>l)?n.join(""):"",e=n=>n?encodeURIComponent(n):"",t=n=>n.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),i={sshtemplate:({domain:n,user:l,project:a,committish:o})=>`git@${n}:${l}/${a}.git${h("#",o)}`,sshurltemplate:({domain:n,user:l,project:a,committish:o})=>`git+ssh://git@${n}/${l}/${a}.git${h("#",o)}`,edittemplate:({domain:n,user:l,project:a,committish:o,editpath:u,path:f})=>`https://${n}/${l}/${a}${h("/",u,"/",e(o||"HEAD"),"/",f)}`,browsetemplate:({domain:n,user:l,project:a,committish:o,treepath:u})=>`https://${n}/${l}/${a}${h("/",u,"/",e(o))}`,browsetreetemplate:({domain:n,user:l,project:a,committish:o,treepath:u,path:f,fragment:S,hashformat:b})=>`https://${n}/${l}/${a}/${u}/${e(o||"HEAD")}/${f}${h("#",b(S||""))}`,browseblobtemplate:({domain:n,user:l,project:a,committish:o,blobpath:u,path:f,fragment:S,hashformat:b})=>`https://${n}/${l}/${a}/${u}/${e(o||"HEAD")}/${f}${h("#",b(S||""))}`,docstemplate:({domain:n,user:l,project:a,treepath:o,committish:u})=>`https://${n}/${l}/${a}${h("/",o,"/",e(u))}#readme`,httpstemplate:({auth:n,domain:l,user:a,project:o,committish:u})=>`git+https://${h(n,"@")}${l}/${a}/${o}.git${h("#",u)}`,filetemplate:({domain:n,user:l,project:a,committish:o,path:u})=>`https://${n}/${l}/${a}/raw/${e(o||"HEAD")}/${u}`,shortcuttemplate:({type:n,user:l,project:a,committish:o})=>`${n}:${l}/${a}${h("#",o)}`,pathtemplate:({user:n,project:l,committish:a})=>`${n}/${l}${h("#",a)}`,bugstemplate:({domain:n,user:l,project:a})=>`https://${n}/${l}/${a}/issues`,hashformat:t},s={};s.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:n,user:l,project:a,committish:o,path:u})=>`https://${h(n,"@")}raw.githubusercontent.com/${l}/${a}/${e(o||"HEAD")}/${u}`,gittemplate:({auth:n,domain:l,user:a,project:o,committish:u})=>`git://${h(n,"@")}${l}/${a}/${o}.git${h("#",u)}`,tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://codeload.${n}/${l}/${a}/tar.gz/${e(o||"HEAD")}`,extract:n=>{let[,l,a,o,u]=n.pathname.split("/",5);if(!(o&&o!=="tree")&&(o||(u=n.hash.slice(1)),a&&a.endsWith(".git")&&(a=a.slice(0,-4)),!(!l||!a)))return{user:l,project:a,committish:u}}},s.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:n,user:l,project:a,committish:o,treepath:u,path:f,editpath:S})=>`https://${n}/${l}/${a}${h("/",u,"/",e(o||"HEAD"),"/",f,S)}`,tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/${l}/${a}/get/${e(o||"HEAD")}.tar.gz`,extract:n=>{let[,l,a,o]=n.pathname.split("/",4);if(!["get"].includes(o)&&(a&&a.endsWith(".git")&&(a=a.slice(0,-4)),!(!l||!a)))return{user:l,project:a,committish:n.hash.slice(1)}}},s.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/api/v4/projects/${e(l+"/"+a)}/repository/archive.tar.gz?sha=${e(o||"HEAD")}`,extract:n=>{const l=n.pathname.slice(1);if(l.includes("/-/")||l.includes("/archive.tar.gz"))return;const a=l.split("/");let o=a.pop();o.endsWith(".git")&&(o=o.slice(0,-4));const u=a.join("/");if(!(!u||!o))return{user:u,project:o,committish:n.hash.slice(1)}}},s.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:n,project:l,committish:a})=>`git@${n}:${l}.git${h("#",a)}`,sshurltemplate:({domain:n,project:l,committish:a})=>`git+ssh://git@${n}/${l}.git${h("#",a)}`,edittemplate:({domain:n,user:l,project:a,committish:o,editpath:u})=>`https://${n}/${l}/${a}${h("/",e(o))}/${u}`,browsetemplate:({domain:n,project:l,committish:a})=>`https://${n}/${l}${h("/",e(a))}`,browsetreetemplate:({domain:n,project:l,committish:a,path:o,hashformat:u})=>`https://${n}/${l}${h("/",e(a))}${h("#",u(o))}`,browseblobtemplate:({domain:n,project:l,committish:a,path:o,hashformat:u})=>`https://${n}/${l}${h("/",e(a))}${h("#",u(o))}`,docstemplate:({domain:n,project:l,committish:a})=>`https://${n}/${l}${h("/",e(a))}`,httpstemplate:({domain:n,project:l,committish:a})=>`git+https://${n}/${l}.git${h("#",a)}`,filetemplate:({user:n,project:l,committish:a,path:o})=>`https://gist.githubusercontent.com/${n}/${l}/raw${h("/",e(a))}/${o}`,shortcuttemplate:({type:n,project:l,committish:a})=>`${n}:${l}${h("#",a)}`,pathtemplate:({project:n,committish:l})=>`${n}${h("#",l)}`,bugstemplate:({domain:n,project:l})=>`https://${n}/${l}`,gittemplate:({domain:n,project:l,committish:a})=>`git://${n}/${l}.git${h("#",a)}`,tarballtemplate:({project:n,committish:l})=>`https://codeload.github.com/gist/${n}/tar.gz/${e(l||"HEAD")}`,extract:n=>{let[,l,a,o]=n.pathname.split("/",4);if(o!=="raw"){if(!a){if(!l)return;a=l,l=null}return a.endsWith(".git")&&(a=a.slice(0,-4)),{user:l,project:a,committish:n.hash.slice(1)}}},hashformat:function(n){return n&&"file-"+t(n)}},s.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:n,user:l,project:a,committish:o,path:u})=>`https://${n}/${l}/${a}/blob/${e(o)||"HEAD"}/${u}`,httpstemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/${l}/${a}${h("#",o)}`,tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/${l}/${a}/archive/${e(o)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:n=>{let[,l,a,o]=n.pathname.split("/",4);if(!["archive"].includes(o)&&(a&&a.endsWith(".git")&&(a=a.slice(0,-4)),!(!l||!a)))return{user:l,project:a,committish:n.hash.slice(1)}}};for(const[n,l]of Object.entries(s))s[n]=Object.assign({},i,l);return q=s,q}var V,de;function Fe(){if(de)return V;de=1;const h=(s,n,l)=>{const a=s.indexOf(l);return s.lastIndexOf(n,a>-1?a:1/0)},e=s=>{try{return new URL(s)}catch{}},t=(s,n)=>{const l=s.indexOf(":"),a=s.slice(0,l+1);if(Object.prototype.hasOwnProperty.call(n,a)||s.substr(l,3)==="://")return s;const o=s.indexOf("@");return o>-1?o>l?`git+ssh://${s}`:s:`${s.slice(0,l+1)}//${s.slice(l+1)}`},i=s=>{const n=h(s,"@","#"),l=h(s,":","#");return l>n&&(s=s.slice(0,l)+"/"+s.slice(l+1)),h(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s};return V=(s,n)=>{const l=n?t(s,n):s;return e(l)||e(i(l))},V}var K,me;function Ut(){if(me)return K;me=1;const h=Fe(),e=t=>{const i=t.indexOf("#"),s=t.indexOf("/"),n=t.indexOf("/",s+1),l=t.indexOf(":"),a=/\s/.exec(t),o=t.indexOf("@"),u=!a||i>-1&&a.index>i,f=o===-1||i>-1&&o>i,S=l===-1||i>-1&&l>i,b=n===-1||i>-1&&n>i,v=s>0,C=i>-1?t[i-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return u&&v&&C&&m&&f&&S&&b};return K=(t,i,{gitHosts:s,protocols:n})=>{if(!t)return;const l=e(t)?`github:${t}`:t,a=h(l,n);if(!a)return;const o=s.byShortcut[a.protocol],u=s.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=o||u;if(!f)return;const S=s[o||u];let b=null;n[a.protocol]?.auth&&(a.username||a.password)&&(b=`${a.username}${a.password?":"+a.password:""}`);let v=null,C=null,m=null,L=null;try{if(o){let c=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname;const g=c.indexOf("@");g>-1&&(c=c.slice(g+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)),a.hash&&(v=decodeURIComponent(a.hash.slice(1))),L="shortcut"}else{if(!S.protocols.includes(a.protocol))return;const c=S.extract(a);if(!c)return;C=c.user&&decodeURIComponent(c.user),m=decodeURIComponent(c.project),v=decodeURIComponent(c.committish),L=n[a.protocol]?.name||a.protocol.slice(0,-1)}}catch(c){if(c instanceof URIError)return;throw c}return[f,C,b,m,v,L,i]},K}var X,ge;function Mt(){if(ge)return X;ge=1;const{LRUCache:h}=Rt,e=It(),t=Ut(),i=Fe(),s=new h({max:1e3});function n(a){try{const{protocol:o,hostname:u,pathname:f}=new URL(a);if(!u)return null;const S=/(?:git\+)http:$/.test(o)?"http:":"https:",b=f.replace(/\.git$/,"");return`${S}//${u}${b}`}catch{return null}}class l{constructor(o,u,f,S,b,v,C={}){Object.assign(this,l.#n[o],{type:o,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(o,u){l.#n[o]=u,l.#n.byDomain[u.domain]=o,l.#n.byShortcut[`${o}:`]=o,l.#c[`${o}:`]={name:o}}static fromUrl(o,u){if(typeof o!="string")return;const f=o+JSON.stringify(u||{});if(!s.has(f)){const S=t(o,u,{gitHosts:l.#n,protocols:l.#c});s.set(f,S?new l(...S):void 0)}return s.get(f)}static fromManifest(o,u={}){if(!o||typeof o!="object")return;const f=o.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&&l.fromUrl(S.replace(/^git\+/,""),u)||null;if(b)return b;const v=n(S);return l.fromUrl(v,u)||v}static parseUrl(o){return i(o)}#t(o,u){if(typeof o!="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=o(f);return f.noGitPlus&&S.startsWith("git+")?S.slice(4):S}hash(){return this.committish?`#${this.committish}`:""}ssh(o){return this.#t(this.sshtemplate,o)}sshurl(o){return this.#t(this.sshurltemplate,o)}browse(o,...u){return typeof o!="string"?this.#t(this.browsetemplate,o):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:o}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:o})}browseFile(o,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:o}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:o})}docs(o){return this.#t(this.docstemplate,o)}bugs(o){return this.#t(this.bugstemplate,o)}https(o){return this.#t(this.httpstemplate,o)}git(o){return this.#t(this.gittemplate,o)}shortcut(o){return this.#t(this.shortcuttemplate,o)}path(o){return this.#t(this.pathtemplate,o)}tarball(o){return this.#t(this.tarballtemplate,{...o,noCommittish:!1})}file(o,u){return this.#t(this.filetemplate,{...u,path:o})}edit(o,u){return this.#t(this.edittemplate,{...u,path:o})}getDefaultRepresentation(){return this.default}toString(o){return this.default&&typeof this[this.default]=="function"?this[this.default](o):this.sshurl(o)}}for(const[a,o]of Object.entries(e))l.addHost(a,o);return X=l,X}var J,Le;function kt(){if(Le)return J;Le=1,J=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 i=e.length;let s=t+1;for(;s<i&&e[s].trim();)s++;return e.slice(t,s).join(" ").trim()}return J}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"},Te={server:"start",tests:"test"};const _t={topLevel:Ge,bugs:$e,script:Te},Wt=Object.defineProperty({__proto__:null,bugs:$e,default:_t,script:Te,topLevel:Ge},Symbol.toStringTag,{value:"Module"}),Ht=ie(Wt);var Z,Se;function jt(){if(Se)return Z;Se=1;var{URL:h}=Pe,e=Ct(),t=Pt(),i=Ot(),s=Mt(),{isBuiltin:n}=ye,l=["dependencies","devDependencies","optionalDependencies"],a=kt(),o=Ht,u=r=>r.includes("@")&&r.indexOf("@")<r.lastIndexOf(".");Z={warn:function(){},fixRepositoryField:function(r){if(r.repositories&&(this.warn("repositories"),r.repository=r.repositories[0]),!r.repository)return this.warn("missingRepository");typeof r.repository=="string"&&(r.repository={type:"git",url:r.repository});var p=r.repository.url||"";if(p){var d=s.fromUrl(p);d&&(p=r.repository.url=d.getDefaultRepresentation()==="shortcut"?d.https():d.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(r){Object.keys(o.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(r,p)&&this.warn("typo",p,o.topLevel[p])},this)},fixScriptsField:function(r){if(r.scripts){if(typeof r.scripts!="object"){this.warn("nonObjectScripts"),delete r.scripts;return}Object.keys(r.scripts).forEach(function(p){typeof r.scripts[p]!="string"?(this.warn("nonStringScript"),delete r.scripts[p]):o.script[p]&&!r.scripts[o.script[p]]&&this.warn("typo",p,o.script[p],"scripts")},this)}},fixFilesField:function(r){var p=r.files;p&&!Array.isArray(p)?(this.warn("nonArrayFiles"),delete r.files):r.files&&(r.files=r.files.filter(function(d){return!d||typeof d!="string"?(this.warn("invalidFilename",d),!1):!0},this))},fixBinField:function(r){if(r.bin&&typeof r.bin=="string"){var p={},d;(d=r.name.match(/^@[^/]+[/](.*)$/))?p[d[1]]=r.bin:p[r.name]=r.bin,r.bin=p}},fixManField:function(r){r.man&&typeof r.man=="string"&&(r.man=[r.man])},fixBundleDependenciesField:function(r){var p="bundledDependencies",d="bundleDependencies";r[p]&&!r[d]&&(r[d]=r[p],delete r[p]),r[d]&&!Array.isArray(r[d])?(this.warn("nonArrayBundleDependencies"),delete r[d]):r[d]&&(r[d]=r[d].filter(function(P){return!P||typeof P!="string"?(this.warn("nonStringBundleDependency",P),!1):(r.dependencies||(r.dependencies={}),Object.prototype.hasOwnProperty.call(r.dependencies,P)||(this.warn("nonDependencyBundleDependency",P),r.dependencies[P]="*"),!0)},this))},fixDependencies:function(r){g(r,this.warn),L(r,this.warn),this.fixBundleDependenciesField(r),["dependencies","devDependencies"].forEach(function(p){if(p in r){if(!r[p]||typeof r[p]!="object"){this.warn("nonObjectDependencies",p),delete r[p];return}Object.keys(r[p]).forEach(function(d){var P=r[p][d];typeof P!="string"&&(this.warn("nonStringDependency",d,JSON.stringify(P)),delete r[p][d]);var D=s.fromUrl(r[p][d]);D&&(r[p][d]=D.toString())},this)}},this)},fixModulesField:function(r){r.modules&&(this.warn("deprecatedModules"),delete r.modules)},fixKeywordsField:function(r){typeof r.keywords=="string"&&(r.keywords=r.keywords.split(/,\s+/)),r.keywords&&!Array.isArray(r.keywords)?(delete r.keywords,this.warn("nonArrayKeywords")):r.keywords&&(r.keywords=r.keywords.filter(function(p){return typeof p!="string"||!p?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(r,p){var d=!p;if(!r.version)return r.version="",!0;if(!e(r.version,d))throw new Error('Invalid version: "'+r.version+'"');return r.version=t(r.version,d),!0},fixPeople:function(r){v(r,C),v(r,m)},fixNameField:function(r,p){typeof p=="boolean"?p={strict:p}:typeof p>"u"&&(p={});var d=p.strict;if(!r.name&&!d){r.name="";return}if(typeof r.name!="string")throw new Error("name field must be a string.");d||(r.name=r.name.trim()),b(r.name,d,p.allowLegacyCase),n(r.name)&&this.warn("conflictingName",r.name)},fixDescriptionField:function(r){r.description&&typeof r.description!="string"&&(this.warn("nonStringDescription"),delete r.description),r.readme&&!r.description&&(r.description=a(r.readme)),r.description===void 0&&delete r.description,r.description||this.warn("missingDescription")},fixReadmeField:function(r){r.readme||(this.warn("missingReadme"),r.readme="ERROR: No README data found!")},fixBugsField:function(r){if(!r.bugs&&r.repository&&r.repository.url){var p=s.fromUrl(r.repository.url);p&&p.bugs()&&(r.bugs={url:p.bugs()})}else if(r.bugs){if(typeof r.bugs=="string")u(r.bugs)?r.bugs={email:r.bugs}:h.canParse(r.bugs)?r.bugs={url:r.bugs}:this.warn("nonEmailUrlBugsString");else{y(r.bugs,this.warn);var d=r.bugs;r.bugs={},d.url&&(h.canParse(d.url)?r.bugs.url=d.url:this.warn("nonUrlBugsUrlField")),d.email&&(typeof d.email=="string"&&u(d.email)?r.bugs.email=d.email:this.warn("nonEmailBugsEmailField"))}!r.bugs.email&&!r.bugs.url&&(delete r.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(r){if(!r.homepage&&r.repository&&r.repository.url){var p=s.fromUrl(r.repository.url);p&&p.docs()&&(r.homepage=p.docs())}if(r.homepage){if(typeof r.homepage!="string")return this.warn("nonUrlHomepage"),delete r.homepage;h.canParse(r.homepage)||(r.homepage="http://"+r.homepage)}},fixLicenseField:function(r){const p=r.license||r.licence;if(!p)return this.warn("missingLicense");if(typeof p!="string"||p.length<1||p.trim()==="")return this.warn("invalidLicense");if(!i(p).validForNewPackages)return this.warn("invalidLicense")}};function f(r){if(r.charAt(0)!=="@")return!1;var p=r.slice(1).split("/");return p.length!==2?!1:p[0]&&p[1]&&p[0]===encodeURIComponent(p[0])&&p[1]===encodeURIComponent(p[1])}function S(r){return!r.match(/[/@\s+%:]/)&&r===encodeURIComponent(r)}function b(r,p,d){if(r.charAt(0)==="."||!(f(r)||S(r))||p&&!d&&r!==r.toLowerCase()||r.toLowerCase()==="node_modules"||r.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(r))}function v(r,p){return r.author&&(r.author=p(r.author)),["maintainers","contributors"].forEach(function(d){Array.isArray(r[d])&&(r[d]=r[d].map(p))}),r}function C(r){if(typeof r=="string")return r;var p=r.name||"",d=r.url||r.web,P=d?" ("+d+")":"",D=r.email||r.mail,w=D?" <"+D+">":"";return p+w+P}function m(r){if(typeof r!="string")return r;var p=r.match(/^([^(<]+)/),d=r.match(/\(([^()]+)\)/),P=r.match(/<([^<>]+)>/),D={};return p&&p[0].trim()&&(D.name=p[0].trim()),P&&(D.email=P[1]),d&&(D.url=d[1]),D}function L(r){var p=r.optionalDependencies;if(p){var d=r.dependencies||{};Object.keys(p).forEach(function(P){d[P]=p[P]}),r.dependencies=d}}function c(r,p,d){if(!r)return{};if(typeof r=="string"&&(r=r.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(r))return r;d("deprecatedArrayDependencies",p);var P={};return r.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 g(r,p){l.forEach(function(d){r[d]&&(r[d]=c(r[d],d,p))})}function y(r,p){r&&Object.keys(r).forEach(function(d){o.bugs[d]&&(p("typo",d,o.bugs[d],"bugs"),r[o.bugs[d]]=r[d],delete r[d])})}return Z}var Be="'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",Xe="keywords should be an array of strings",Je="%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.",lt="license should be a valid SPDX license expression",at="%s should probably be %s.";const zt={repositories:Be,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:Xe,conflictingName:Je,nonStringDescription:Ze,missingDescription:Qe,missingReadme:et,missingLicense:tt,nonEmailUrlBugsString:it,nonUrlBugsUrlField:rt,nonEmailBugsEmailField:nt,emptyNormalizedBugs:st,nonUrlHomepage:ot,invalidLicense:lt,typo:at},Yt=Object.defineProperty({__proto__:null,brokenGitUrl:Ie,conflictingName:Je,default:zt,deprecatedArrayDependencies:qe,deprecatedModules:Ve,emptyNormalizedBugs:st,invalidFilename:_e,invalidLicense:lt,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:Xe,nonStringScript:Me,nonUrlBugsUrlField:rt,nonUrlHomepage:ot,repositories:Be,typo:at},Symbol.toStringTag,{value:"Module"}),qt=ie(Yt);var Q,ve;function Vt(){if(ve)return Q;ve=1;var h=yt,e=qt;Q=function(){var i=Array.prototype.slice.call(arguments,0),s=i.shift();if(s==="typo")return t.apply(null,i);var n=e[s]?e[s]:s+": '%s'";return i.unshift(n),h.format.apply(null,i)};function t(i,s,n){return n&&(i=n+"['"+i+"']",s=n+"['"+s+"']"),h.format(e.typo,i,s)}return Q}var ee,Ce;function Kt(){if(Ce)return ee;Ce=1,ee=n;var h=jt();n.fixer=h;var e=Vt(),t=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],i=["dependencies","people","typos"],s=t.map(function(a){return l(a)+"Field"});s=s.concat(i);function n(a,o,u){o===!0&&(o=null,u=!0),u||(u=!1),(!o||a.private)&&(o=function(){}),a.scripts&&a.scripts.install==="node-gyp rebuild"&&!a.scripts.preinstall&&(a.gypfile=!0),h.warn=function(){o(e.apply(null,arguments))},s.forEach(function(f){h["fix"+l(f)](a,u)}),a._id=a.name+"@"+a.version}function l(a){return a.charAt(0).toUpperCase()+a.slice(1)}return ee}var Xt=Kt();const Jt=vt(Xt),Zt=(h,e,t)=>{const i=te(h),s=te(e),n=s===i?".":mt(i,s);return t.some(l=>{const a=l.startsWith("./")?l.slice(2):l,o=n.startsWith("./")?n.slice(2):n;if(a==="."&&o===".")return!0;if(a.endsWith("/**")){const u=a.slice(0,-3);return o===u||o.startsWith(`${u}/`)}if(a.endsWith("/*")){const u=a.slice(0,-2);return u===""?o!=="."&&!o.includes("/"):o.startsWith(`${u}/`)||o===u}return o===a||o.startsWith(`${a}/`)})},Qt=h=>{const e=be("pnpm-workspace.yaml",{cwd:te(h),type:"file"});if(!e)return;const t=De(e),i=Array.isArray(t.packages)?t.packages:[];if(!Zt(e,h,i))return;const s={};return t.catalog&&typeof t.catalog=="object"&&(s.catalog=t.catalog),t.catalogs&&typeof t.catalogs=="object"&&(s.catalogs=t.catalogs),Object.keys(s).length>0?s:void 0},ei=(h,e,t)=>{if(e==="catalog:")return t.catalog?.[h];if(e.startsWith("catalog:")){const i=e.slice(8);return t.catalogs?.[i]?.[h]}},ti=(h,e)=>{for(const[t,i]of Object.entries(h)){if(typeof i!="string")continue;const s=ei(t,i,e);s&&(h[t]=s)}},ii=(h,e)=>{const t=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const i of t){if(!h[i]||typeof h[i]!="object")continue;const s=h[i];ti(s,e)}};let ri;const ni=h=>(ri??=dt(import.meta.url))(h),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,re=h=>{if(typeof $<"u"&&$.versions&&$.versions.node){const[e,t]=$.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return $.getBuiltinModule(h)}return ni(h)},{existsSync:$i}=re("node:fs"),{createInterface:Ti}=re("node:readline"),{styleText:Bi}=re("node:util"),si=new Set(["__proto__","prototype","constructor"]);Math.max(...[...si].map(h=>h.length));typeof process.stdout<"u"&&!process.versions.deno&&globalThis.window;const oi=/, ([^,]*)$/,li=new Map,ai=(h,e={})=>{const t=e.strict&&e.ignoreWarnings?e.ignoreWarnings.map(String).toSorted((i,s)=>i.localeCompare(s)).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 ci extends Error{constructor(e){super(`The following warnings were encountered while normalizing package data:
3
3
  - ${e.join(`
4
- - `)}`),this.name="PackageJsonValidationError"}}const hi=(h,e,t=[])=>{const i=[];if(Jt(h,s=>{i.push(s)},e),e&&i.length>0){const s=i.filter(n=>!t.some(l=>l instanceof RegExp?l.test(n):l===n));if(s.length>0)throw new ci(s)}return h},ui=h=>De(h),pi=h=>{const e=Lt(h);return St.parse(e)},fi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?ui(h):e?.json5!==!1&&h.endsWith(".json5")?pi(h):bt(h),di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const i=["package.json"];e.yaml!==!1&&i.push("package.yaml","package.yml"),e.json5!==!1&&i.push("package.json5");const s=be(i,t);if(!s)throw new gt(`No such file or directory, for ${i.join(", ").replace(oi," or $1")} found.`);const n=e.cache&&typeof e.cache!="boolean"?e.cache:li,l=ai(s,e);if(e.cache&&n.has(l))return n.get(l);const a=fi(s,e);if(e.resolveCatalogs){const u=Qt(s);u&&ii(a,u)}hi(a,e.strict??!1,e.ignoreWarnings);const o={packageJson:a,path:s};return e.cache&&n.set(l,o),o};var mi="3.0.6";const gi={version:mi},Li=gi.version,Si="@visulima/vis";let O;const Ri=()=>{if(O!==void 0)return O;const h=process.env.VIS_VERSION;if(h)return O=h,O;try{const{packageJson:e}=di(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===Si&&typeof e.version=="string")return O=e.version,O}catch{}return O=Li,O};export{Ei as a,wi as b,Fi as c,Ai as d,Gi as e,Ri as g,Ni as h,Di as i,xi as l,Oi as u};
4
+ - `)}`),this.name="PackageJsonValidationError"}}const hi=(h,e,t=[])=>{const i=[];if(Jt(h,s=>{i.push(s)},e),e&&i.length>0){const s=i.filter(n=>!t.some(l=>l instanceof RegExp?l.test(n):l===n));if(s.length>0)throw new ci(s)}return h},ui=h=>De(h),pi=h=>{const e=Lt(h);return St.parse(e)},fi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?ui(h):e?.json5!==!1&&h.endsWith(".json5")?pi(h):bt(h),di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const i=["package.json"];e.yaml!==!1&&i.push("package.yaml","package.yml"),e.json5!==!1&&i.push("package.json5");const s=be(i,t);if(!s)throw new gt(`No such file or directory, for ${i.join(", ").replace(oi," or $1")} found.`);const n=e.cache&&typeof e.cache!="boolean"?e.cache:li,l=ai(s,e);if(e.cache&&n.has(l))return n.get(l);const a=fi(s,e);if(e.resolveCatalogs){const u=Qt(s);u&&ii(a,u)}hi(a,e.strict??!1,e.ignoreWarnings);const o={packageJson:a,path:s};return e.cache&&n.set(l,o),o};var mi="4.0.0";const gi={version:mi},Li=gi.version,Si="@visulima/vis";let O;const Ri=()=>{if(O!==void 0)return O;const h=process.env.VIS_VERSION;if(h)return O=h,O;try{const{packageJson:e}=di(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===Si&&typeof e.version=="string")return O=e.version,O}catch{}return O=Li,O};export{Ei as a,wi as b,Fi as c,Ai as d,Gi as e,Ri as g,Ni as h,Di as i,xi as l,Oi as u};
@@ -1,4 +1,4 @@
1
- import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-By2ZNeEA.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-DJvfOpBX.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,4 +1,4 @@
1
- import{createRequire as Dt}from"node:module";import{b as fe,u as Bt,c as F,h as Wt,i as Oe,d as zt,a as Ft,l as Gt,e as Me}from"./package-version-B_KfpWKC.js";let Tt;const Vt=t=>(Tt??=Dt(import.meta.url))(t),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jt=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,n]=se.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return se.getBuiltinModule(t)}return Vt(t)},{createRequire:Rt}=jt("node:module"),qt=16,we=32,Ht=64,R=128,he="positionals";let oe=class extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:o,message:i,name:s,stack:l,title:r}){super(i,{cause:e}),this.title=r,this.name=s,this.stack=l??this.stack,this.loc=o,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}},b=class extends oe{code;context;constructor(e,n,o){super({message:e,name:"CerebroError"}),this.code=n,this.context=o}},Jt=class extends b{argument;choices;value;constructor(e,n,o){super(`Invalid value "${n}" for argument "${e}". Allowed values: ${o.join(", ")}`,"INVALID_CHOICE",{argument:e,choices:o,value:n}),this.name="InvalidArgumentChoiceError",this.argument=e,this.value=n,this.choices=o,this.hint=`Pass one of: ${o.join(", ")}`}},Kt=class extends b{commandName;missingArguments;constructor(e,n){super(`Command "${e}" is missing required arguments: ${n.join(", ")}`,"MISSING_ARGUMENT",{commandName:e,missingArguments:n}),this.name="MissingArgumentError",this.commandName=e,this.missingArguments=n,this.hint=`Provide the following positional arguments: ${n.join(", ")}`}},Zt=class extends b{commandName;surplusArguments;constructor(e,n,o){super(`Command "${e}" accepts ${String(o)} positional argument${o===1?"":"s"}, but got ${String(n.length)} extra: ${n.join(", ")}`,"SURPLUS_ARGUMENT",{commandName:e,surplusArguments:[...n]}),this.name="SurplusArgumentError",this.commandName=e,this.surplusArguments=n,this.hint=`Remove the extra argument${n.length===1?"":"s"}, or declare a trailing "multiple: true" argument to collect them.`}};const at=String.raw,Ue=at`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Yt=()=>new RegExp(at`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Ue}(?:\u200D${Ue})*`,"gu");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const $i=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,Ni=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,G=Yt(),Qt=/[-_./\s]+/g,pe=/(\u001B\[[0-9;]*[a-z])/i,Pe=new RegExp("\\p{Script=Arabic}","u"),Xt=new RegExp("\\p{Script=Bengali}","u"),ee=new RegExp("\\p{Script=Cyrillic}","u"),en=new RegExp("\\p{Script=Devanagari}","u"),tn=new RegExp("\\p{Script=Ethiopic}","u"),ve=new RegExp("\\p{Script=Greek}","u"),De=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),nn=new RegExp("\\p{Script=Gujarati}","u"),on=new RegExp("\\p{Script=Gurmukhi}","u"),Te=new RegExp("\\p{Script=Hangul}","u"),Ve=new RegExp("\\p{Script=Hebrew}","u"),sn=new RegExp("\\p{Script=Hiragana}","u"),je=new RegExp("\\p{Script=Han}","u"),rn=new RegExp("\\p{Script=Kannada}","u"),an=new RegExp("\\p{Script=Katakana}","u"),cn=new RegExp("\\p{Script=Khmer}","u"),ln=new RegExp("\\p{Script=Lao}","u"),L=new RegExp("\\p{Script=Latin}","u"),un=new RegExp("\\p{Script=Malayalam}","u"),hn=new RegExp("\\p{Script=Myanmar}","u"),pn=new RegExp("\\p{Script=Oriya}","u"),dn=new RegExp("\\p{Script=Sinhala}","u"),fn=new RegExp("\\p{Script=Tamil}","u"),mn=new RegExp("\\p{Script=Telugu}","u"),gn=new RegExp("\\p{Script=Thai}","u"),wn=new RegExp("\\p{Script=Tibetan}","u"),Re=/[\u02BB\u02BC\u0027]/u,vn=t=>t.replace(G,""),V={COMMAND_NOT_FOUND:"COMMAND_NOT_FOUND",COMMAND_VALIDATION_ERROR:"COMMAND_VALIDATION_ERROR",CONFLICTING_OPTIONS:"CONFLICTING_OPTIONS",INVALID_ARGUMENT:"INVALID_ARGUMENT",INVALID_CHOICE:"INVALID_CHOICE",INVALID_INPUT:"INVALID_INPUT",MISSING_ARGUMENT:"MISSING_ARGUMENT",SURPLUS_ARGUMENT:"SURPLUS_ARGUMENT",UNKNOWN_OPTION:"UNKNOWN_OPTION"},yn=new Set([V.COMMAND_NOT_FOUND,V.COMMAND_VALIDATION_ERROR,V.CONFLICTING_OPTIONS,V.INVALID_ARGUMENT,V.INVALID_CHOICE,V.INVALID_INPUT,V.MISSING_ARGUMENT,V.SURPLUS_ARGUMENT,V.UNKNOWN_OPTION]),$n=t=>{const e=t?.code;return typeof e=="string"&&yn.has(e)},_e=t=>{if(!$n(t))return;const{hint:e,message:n}=t,o=(Array.isArray(e)?e:[e]).filter(i=>typeof i=="string"&&i.length>0);return o.length>0?[n,...o].join(`
1
+ import{createRequire as Dt}from"node:module";import{b as fe,u as Bt,c as F,h as Wt,i as Oe,d as zt,a as Ft,l as Gt,e as Me}from"./package-version-BFsJ8iyZ.js";let Tt;const Vt=t=>(Tt??=Dt(import.meta.url))(t),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jt=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,n]=se.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return se.getBuiltinModule(t)}return Vt(t)},{createRequire:Rt}=jt("node:module"),qt=16,we=32,Ht=64,R=128,he="positionals";let oe=class extends Error{loc;title;hint;type="VisulimaError";constructor({cause:e,hint:n,location:o,message:i,name:s,stack:l,title:r}){super(i,{cause:e}),this.title=r,this.name=s,this.stack=l??this.stack,this.loc=o,this.hint=n}setLocation(e){this.loc=e}setName(e){this.name=e}setMessage(e){this.message=e}setHint(e){this.hint=e}},b=class extends oe{code;context;constructor(e,n,o){super({message:e,name:"CerebroError"}),this.code=n,this.context=o}},Jt=class extends b{argument;choices;value;constructor(e,n,o){super(`Invalid value "${n}" for argument "${e}". Allowed values: ${o.join(", ")}`,"INVALID_CHOICE",{argument:e,choices:o,value:n}),this.name="InvalidArgumentChoiceError",this.argument=e,this.value=n,this.choices=o,this.hint=`Pass one of: ${o.join(", ")}`}},Kt=class extends b{commandName;missingArguments;constructor(e,n){super(`Command "${e}" is missing required arguments: ${n.join(", ")}`,"MISSING_ARGUMENT",{commandName:e,missingArguments:n}),this.name="MissingArgumentError",this.commandName=e,this.missingArguments=n,this.hint=`Provide the following positional arguments: ${n.join(", ")}`}},Zt=class extends b{commandName;surplusArguments;constructor(e,n,o){super(`Command "${e}" accepts ${String(o)} positional argument${o===1?"":"s"}, but got ${String(n.length)} extra: ${n.join(", ")}`,"SURPLUS_ARGUMENT",{commandName:e,surplusArguments:[...n]}),this.name="SurplusArgumentError",this.commandName=e,this.surplusArguments=n,this.hint=`Remove the extra argument${n.length===1?"":"s"}, or declare a trailing "multiple: true" argument to collect them.`}};const at=String.raw,Ue=at`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Yt=()=>new RegExp(at`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Ue}(?:\u200D${Ue})*`,"gu");Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]]));const $i=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,Ni=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,G=Yt(),Qt=/[-_./\s]+/g,pe=/(\u001B\[[0-9;]*[a-z])/i,Pe=new RegExp("\\p{Script=Arabic}","u"),Xt=new RegExp("\\p{Script=Bengali}","u"),ee=new RegExp("\\p{Script=Cyrillic}","u"),en=new RegExp("\\p{Script=Devanagari}","u"),tn=new RegExp("\\p{Script=Ethiopic}","u"),ve=new RegExp("\\p{Script=Greek}","u"),De=new RegExp("\\p{Script=Greek}+|\\p{Script=Latin}+|[^\\p{Script=Greek}\\p{Script=Latin}]+","gu"),nn=new RegExp("\\p{Script=Gujarati}","u"),on=new RegExp("\\p{Script=Gurmukhi}","u"),Te=new RegExp("\\p{Script=Hangul}","u"),Ve=new RegExp("\\p{Script=Hebrew}","u"),sn=new RegExp("\\p{Script=Hiragana}","u"),je=new RegExp("\\p{Script=Han}","u"),rn=new RegExp("\\p{Script=Kannada}","u"),an=new RegExp("\\p{Script=Katakana}","u"),cn=new RegExp("\\p{Script=Khmer}","u"),ln=new RegExp("\\p{Script=Lao}","u"),L=new RegExp("\\p{Script=Latin}","u"),un=new RegExp("\\p{Script=Malayalam}","u"),hn=new RegExp("\\p{Script=Myanmar}","u"),pn=new RegExp("\\p{Script=Oriya}","u"),dn=new RegExp("\\p{Script=Sinhala}","u"),fn=new RegExp("\\p{Script=Tamil}","u"),mn=new RegExp("\\p{Script=Telugu}","u"),gn=new RegExp("\\p{Script=Thai}","u"),wn=new RegExp("\\p{Script=Tibetan}","u"),Re=/[\u02BB\u02BC\u0027]/u,vn=t=>t.replace(G,""),V={COMMAND_NOT_FOUND:"COMMAND_NOT_FOUND",COMMAND_VALIDATION_ERROR:"COMMAND_VALIDATION_ERROR",CONFLICTING_OPTIONS:"CONFLICTING_OPTIONS",INVALID_ARGUMENT:"INVALID_ARGUMENT",INVALID_CHOICE:"INVALID_CHOICE",INVALID_INPUT:"INVALID_INPUT",MISSING_ARGUMENT:"MISSING_ARGUMENT",SURPLUS_ARGUMENT:"SURPLUS_ARGUMENT",UNKNOWN_OPTION:"UNKNOWN_OPTION"},yn=new Set([V.COMMAND_NOT_FOUND,V.COMMAND_VALIDATION_ERROR,V.CONFLICTING_OPTIONS,V.INVALID_ARGUMENT,V.INVALID_CHOICE,V.INVALID_INPUT,V.MISSING_ARGUMENT,V.SURPLUS_ARGUMENT,V.UNKNOWN_OPTION]),$n=t=>{const e=t?.code;return typeof e=="string"&&yn.has(e)},_e=t=>{if(!$n(t))return;const{hint:e,message:n}=t,o=(Array.isArray(e)?e:[e]).filter(i=>typeof i=="string"&&i.length>0);return o.length>0?[n,...o].join(`
2
2
  `):n},B=new Uint32Array(65536),Nn=(t,e)=>{const n=t.length,o=e.length,i=1<<n-1;let s=-1,l=0,r=n,u=n;for(;u--;)B[t.charCodeAt(u)]|=1<<u;for(u=0;u<o;u++){let a=B[e.charCodeAt(u)];const c=a|l;a|=(a&s)+s^s,l|=~(a|s),s&=a,l&i&&r++,s&i&&r--,l=l<<1|1,s=s<<1|~(c|l),l&=c}for(u=n;u--;)B[t.charCodeAt(u)]=0;return r},An=(t,e)=>{const n=e.length,o=t.length,i=[],s=[],l=Math.ceil(n/32),r=Math.ceil(o/32);for(let p=0;p<l;p++)s[p]=-1,i[p]=0;let u=0;for(;u<r-1;u++){let p=0,w=-1;const $=u*32,m=Math.min(32,o)+$;for(let y=$;y<m;y++)B[t.charCodeAt(y)]|=1<<y;for(let y=0;y<n;y++){const A=B[e.charCodeAt(y)],O=s[y/32|0]>>>y&1,C=i[y/32|0]>>>y&1,D=A|p,E=((A|C)&w)+w^w|A|C;let g=p|~(E|w),v=w&E;g>>>31^O&&(s[y/32|0]^=1<<y),v>>>31^C&&(i[y/32|0]^=1<<y),g=g<<1|O,v=v<<1|C,w=v|~(D|g),p=g&D}for(let y=$;y<m;y++)B[t.charCodeAt(y)]=0}let a=0,c=-1;const d=u*32,h=Math.min(32,o-d)+d;for(let p=d;p<h;p++)B[t.charCodeAt(p)]|=1<<p;let f=o;for(let p=0;p<n;p++){const w=B[e.charCodeAt(p)],$=s[p/32|0]>>>p&1,m=i[p/32|0]>>>p&1,y=w|a,A=((w|m)&c)+c^c|w|m;let O=a|~(A|c),C=c&A;f+=O>>>o-1&1,f-=C>>>o-1&1,O>>>31^$&&(s[p/32|0]^=1<<p),C>>>31^m&&(i[p/32|0]^=1<<p),O=O<<1|$,C=C<<1|m,c=C|~(y|O),a=O&y}for(let p=d;p<h;p++)B[t.charCodeAt(p)]=0;return f},xn=(t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return e.length===0?t.length:t.length<=32?Nn(t,e):An(t,e)};let bn;const Cn=t=>(bn??=Rt(import.meta.url))(t),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,On=t=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,n]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return ie.getBuiltinModule(t)}return Cn(t)},{writeFile:_n,stat:In,rm:En,readFile:Be,readdir:kn,mkdir:Sn,access:Ln}=On("node:fs/promises"),ce=[{alias:"v",description:"Turn on verbose output",group:"global",name:"verbose",type:Boolean},{description:"Turn on debugging output",group:"global",name:"debug",type:Boolean},{alias:"h",description:"Print out helpful usage information",group:"global",name:"help",type:Boolean},{alias:"q",description:"Silence output",group:"global",name:"quiet",type:Boolean},{alias:"V",description:"Print version info",group:"global",name:"version",type:Boolean},{description:"Turn off colored output",group:"global",name:"no-color",type:Boolean},{description:"Force colored output",group:"global",name:"color",type:Boolean}];let H=class extends b{commandName;constructor(e,n=[]){const o=`Command "${e}" not found${n.length>0?`. Did you mean: ${n.join(", ")}?`:""}`;super(o,"COMMAND_NOT_FOUND",{commandName:e,suggestions:n}),this.name="CommandNotFoundError",this.commandName=e,n.length>0&&(this.hint=`Try one of these commands: ${n.join(", ")}`)}};class ct extends b{option1;option2;constructor(e,n){super(`Options "${e}" and "${n}" cannot be used together`,"CONFLICTING_OPTIONS",{option1:e,option2:n}),this.name="ConflictingOptionsError",this.option1=e,this.option2=n,this.hint=`Remove either --${e} or --${n}`}}class Mn extends b{unknownOptions;constructor(e,n){const o=e.join(", "),i=`Found unknown ${e.length===1?"option":"options"}: ${o}`;super(i,"UNKNOWN_OPTION",{suggestions:n,unknownOptions:e}),this.name="UnknownOptionError",this.unknownOptions=e,n&&n.length>0&&(this.hint=`Did you mean: ${n.join(", ")}?`)}}class Un extends b{pluginName;constructor(e,n,o){super(`Plugin "${e}" error: ${n}`,"PLUGIN_ERROR",{originalError:o,pluginName:e}),this.name="PluginError",this.pluginName=e,o&&(this.cause=o)}}class Pn{logger;plugins=new Map;initialized=!1;cachedDependencyOrder=void 0;constructor(e){this.logger=e}hasPlugins(){return this.plugins.size>0}register(e){if(this.initialized)throw new Error(`Cannot register plugin "${e.name}" after initialization`);if(this.plugins.has(e.name))throw new Error(`Plugin "${e.name}" is already registered`);fe().CEREBRO_OUTPUT_LEVEL===String(R)&&this.logger.debug(`registering plugin: ${e.name}`),this.plugins.set(e.name,e),this.cachedDependencyOrder=void 0}async init(e){if(this.initialized)throw new Error("PluginManager already initialized");if(this.plugins.size===0){this.logger.debug("no plugins registered, skipping initialization"),this.initialized=!0;return}this.validateDependencies();const n=this.getDependencyOrder();this.logger.debug(`initializing ${String(n.length)} plugin(s)...`);for(const o of n)if(typeof o.init=="function"){this.logger.debug(`initializing plugin: ${o.name}`);try{await o.init(e)}catch(i){const s=new Un(o.name,`Failed to initialize: ${i instanceof Error?i.message:String(i)}`,i instanceof Error?i:void 0);throw this.logger.error(s.message),s}}this.initialized=!0}async executeLifecycle(e,n,o){if(!this.initialized)throw new Error("PluginManager not initialized");if(this.plugins.size===0)return;const i=this.getDependencyOrder();for(const s of i){const l=s[e];if(typeof l=="function"){this.logger.debug(`executing ${e} hook for plugin: ${s.name}`);try{await(e==="afterCommand"?l(n,o):l(n))}catch(r){throw this.logger.error(`Error in ${e} hook for plugin "${s.name}":`,r),r}}}}async executeErrorHandlers(e,n){if(!this.initialized||this.plugins.size===0)return;const o=this.getDependencyOrder();for(const i of o)if(typeof i.onError=="function"){this.logger.debug(`executing error handler for plugin: ${i.name}`);try{await i.onError(e,n)}catch(s){this.logger.error(`Error in error handler for plugin "${i.name}":`,s)}}}getDependencyOrder(){if(this.cachedDependencyOrder!==void 0)return this.cachedDependencyOrder;const e=[],n=new Set,o=new Set,i=s=>{if(n.has(s))return;if(o.has(s))throw new Error(`Circular dependency detected involving plugin "${s}"`);const l=this.plugins.get(s);if(!l)throw new Error(`Plugin "${s}" not found`);if(o.add(s),l.dependencies)for(const r of l.dependencies)i(r);o.delete(s),n.add(s),e.push(l)};for(const s of this.plugins.keys())i(s);return this.cachedDependencyOrder=e,e}validateDependencies(){for(const e of this.plugins.values())if(e.dependencies){for(const n of e.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin "${e.name}" depends on "${n}" which is not registered`)}}}const re=t=>t.type?.name==="Boolean",Dn=t=>{let e=t.type?t.type.name.toLowerCase():"string";const n=t.multiple??t.lazyMultiple?"[]":"";return e&&(e=e==="boolean"?"":`{underline ${e}${n}}`),e},We=t=>(re(t)||(t.typeLabel=t.typeLabel??Dn(t),t.defaultOption&&(t.typeLabel=`${t.typeLabel} (D)`),t.required&&(t.typeLabel=`${t.typeLabel} (R)`)),t),Tn=new RegExp(/^-([^\d-])$/),Vn=new RegExp(/^--(\S+)/),jn=new RegExp(/^-([^\d-]{2,})$/),Rn=t=>Tn.test(t)||Vn.test(t)||jn.test(t),Bn=(t,e)=>{const n=e[0]&&Rn(e[0])||e.length===0?null:e.shift()??null;if(!t.includes(n)){const o=new Error(`Command not recognised: ${String(n)}`);throw o.command=n,o.name="INVALID_COMMAND",o}return{argv:e,command:n}};let Wn=class lt extends oe{optionName;value;constructor(e,n,o){super({hint:`Pass a valid ${o} value for '${e}'.`,message:`Invalid ${o} value '${n}' for option '${e}'`,name:"INVALID_VALUE",title:"Invalid Value"}),this.optionName=e,this.value=n,Object.setPrototypeOf(this,lt.prototype)}},zn=class ut extends oe{optionName;constructor(e){super({cause:void 0,hint:`Remove the duplicate option '${e}' from your command line arguments.`,location:void 0,message:`Option '${e}' is already set`,name:"ALREADY_SET",stack:void 0,title:"Option Already Set"}),this.optionName=e,Object.setPrototypeOf(this,ut.prototype)}},ze=class ht extends oe{optionName;constructor(e){super({cause:void 0,hint:`Check your option definitions or remove the unknown option '${e}' from your command line arguments.`,location:void 0,message:`Unknown option: --${e}`,name:"UNKNOWN_OPTION",stack:void 0,title:"Unknown Option"}),this.optionName=`--${e}`,Object.setPrototypeOf(this,ht.prototype)}},Fn=class pt extends oe{value;constructor(e){super({hint:"Use a defined option or add a defaultOption to capture this value.",message:`Unknown value: ${e}`,name:"UNKNOWN_VALUE",title:"Unknown Value"}),this.value=e,Object.setPrototypeOf(this,pt.prototype)}},M=class dt extends oe{constructor(e,n){super({cause:void 0,hint:n,location:void 0,message:e,name:"INVALID_DEFINITIONS",stack:void 0,title:"Invalid Option Definition"}),Object.setPrototypeOf(this,dt.prototype)}};const Z=t=>t===Boolean||typeof t=="function"&&t.name==="Boolean",Ie=t=>t===Number||typeof t=="function"&&t.name==="Number",Fe=t=>t===String||typeof t=="function"&&t.name==="String",Ge=(t,e,n)=>{const o=Number(t);if(e&&Number.isNaN(o)&&String(t).trim().toLowerCase()!=="nan")throw new Wn(n??"",String(t),"Number");return o},Gn=(t,e,n={})=>{const{optionName:o,strictTypes:i}=n;return Array.isArray(t)?Z(e)?t.map(Boolean):Ie(e)?t.map(s=>Ge(s,i,o)):Fe(e)?t.map(String):t.map(s=>e(String(s))):t===null?null:Z(e)?!!t:Ie(e)?Ge(t,i,o):Fe(e)?typeof t=="string"?t:String(t):e(typeof t=="string"?t:String(t))},I=(t,e,n,...o)=>{t&&console.debug(`[command-line-args:${n}] ${e}`,...o)},qn=/-([a-z])/g,Hn=/^\d+$/,Jn=t=>t.codePointAt(0)===95,qe=(t,e)=>Array.isArray(t)?[...t,...e]:[t,...e],He=t=>t==="__proto__"||t==="constructor"||t==="prototype",ye=(t,e,n,o=!1)=>{t[e]===void 0?t[e]=o?[n]:n:o&&Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]},Je=(t,e,n,o,i)=>{let s=e.get(t)??n.get(t);if(!s&&o){const l=t.toLowerCase();s=o.get(l)??i?.get(l)}return s},Kn=(t,e,n,o)=>{const i=n.debug??!1;I(i,"resolveArgs called with options:","resolver",{partial:n.partial,stopAtFirstUnknown:n.stopAtFirstUnknown}),I(i,"Starting argument resolution","resolver"),I(i,"Tokens:","resolver",t),I(i,"Definitions:","resolver",e),I(i,"Processing tokens...","resolver");const s=new Map,l=new Map,r=n.caseInsensitive?new Map:void 0,u=n.caseInsensitive?new Map:void 0,a=n.camelCase?new Map:void 0,c=n.camelCase?new Map:void 0;for(const g of e)if(s.set(g.name,g),g.alias&&l.set(g.alias,g),n.caseInsensitive&&r&&(r.set(g.name.toLowerCase(),g),g.alias&&u&&u.set(g.alias.toLowerCase(),g)),n.camelCase&&a&&c){const v=g.name.replaceAll(qn,(N,k)=>k.toUpperCase());a.set(g.name,v),c.set(v,g.name)}const d=Object.create(null),h=Object.create(null),f=[],p=[],w=new Set;let $=!1;const m=e.find(g=>g.defaultOption),y=e.some(g=>g.group),A=e.find(g=>Ie(g.type));for(let g=0;g<t.length;g++){const v=t[g];if(v.kind==="option-terminator"){d._unknown=o.slice(v.index),$=!0;break}if(v.kind==="option"&&v.name){let N=Je(v.name,s,l,r,u);!N&&v.value===void 0&&A&&Hn.test(v.name)&&(N=A,v.value=v.name,v.name=A.name);let k=!1;if(!N&&n.negation&&v.value===void 0&&v.name.startsWith("no-")){const _=v.name.slice(3),P=Je(_,s,l,r,u);P?.type&&Z(P.type)&&(N=P,k=!0)}const x=N?N.name:v.name,S=N?.multiple,U=N?.lazyMultiple;if(Object.hasOwn(h,x)&&h[x]!==void 0&&!S&&!U&&!n.partial)throw new zn(x);if(!N&&n.partial){const _=v.rawName??`--${v.name}${v.value!==void 0&&v.inlineValue?`=${v.value}`:""}`;f.push({index:v.index,value:_});continue}if(!N&&n.stopAtFirstUnknown){d._unknown=o.slice(v.index);break}if(!N&&!n.partial)throw new ze(v.name);if(v.value===void 0){const _=t[g+1],P=_?.kind==="option"&&!("name"in _)&&_.value!==void 0,T=_&&N&&!(N.type&&Z(N.type))&&(_.kind==="positional"||P),Pt=N&&N.defaultOption&&!N.multiple&&!N.lazyMultiple;if(T&&(!N?.defaultOption||Pt))if(S){let j=g+1;const ge=[];for(;j<t.length&&(t[j].kind==="positional"||t[j].kind==="option"&&!("name"in t[j])&&t[j].value!==void 0);)ge.push(t[j].value),w.add(t[j].index),j++;h[x]=h[x]===void 0?ge:qe(h[x],ge),g=j-1}else U?(ye(h,x,_.value,!0),w.add(_.index),g++):(h[x]=_.value,w.add(_.index),g++);else N?.type&&Z(N.type)?ye(h,x,!k,S):(S||U)&&h[x]!==void 0?ye(h,x,null,!0):h[x]=S?[]:null}else{let{value:_}=v;if(N?.type&&Z(N.type))switch(_){case"":{if(n.partial){const T=`${v.rawName??`--${v.name}`}${v.value?`=${v.value}`:""}`;p.push({index:v.index,value:T}),_=!0}else throw new ze(v.name);break}case"false":{_=!1;break}case"true":{_=!0;break}default:_=!0}const P=[_];if(S){let T=g+1;for(;T<t.length&&t[T].kind==="positional";)P.push(t[T].value),w.add(t[T].index),T++;g=T-1}h[x]===void 0?h[x]=S||U?P:_:S||U?h[x]=qe(h[x],P):h[x]=_}}else if(v.kind==="positional"&&n.stopAtFirstUnknown&&!w.has(v.index)&&!m){I(i,`Found unconsumed positional token at index ${String(v.index)}, stopping processing`,"resolver"),d._unknown=o.slice(v.index);break}}for(const[g,v]of Object.entries(h)){const N=s.get(g);N&&(N.multiple||N.lazyMultiple)&&!Array.isArray(v)&&(h[g]=[v])}const O=g=>g.kind==="option"&&!s.has(g.name??"")&&!l.has(g.name??"")&&(!n.caseInsensitive||!r?.has(g.name?.toLowerCase()??"")&&!u?.has(g.name?.toLowerCase()??""));let C=-1,D=Number.POSITIVE_INFINITY;if(n.stopAtFirstUnknown&&!$&&(C=t.findIndex(g=>O(g)),C!==-1&&(D=t[C].index)),m){const g=[],v=[];for(const N of t)N.kind==="positional"&&!w.has(N.index)&&N.index<D&&(g.push(N.value),v.push(N));if(g.length>0){const N=h[m.name],k=m.multiple??m.lazyMultiple;N===void 0?k?(v.forEach(x=>w.add(x.index)),h[m.name]=g):(w.add(v[0].index),h[m.name]=g[0]):k&&(v.forEach(x=>w.add(x.index)),h[m.name]=Array.isArray(N)?[...g,...N]:[...g,N])}}if(!n.partial){for(const g of t)if(g.kind==="positional"&&!w.has(g.index))throw new Fn(o[g.index])}if(n.partial&&!n.stopAtFirstUnknown){const g=[...f];for(const v of p)g.push({index:v.index,value:v.value});for(const v of t)v.kind==="positional"&&!w.has(v.index)&&g.push({index:v.index,value:o[v.index]});g.length>0&&(g.sort((v,N)=>v.index-N.index),d._unknown=g.map(v=>v.value))}if(n.stopAtFirstUnknown&&!$){const g=t.findIndex(N=>N.kind==="positional"&&!w.has(N.index));let v=-1;if(C!==-1&&g!==-1?v=Math.min(C,g):C!==-1?v=C:g!==-1&&(v=g),v>=0){const N=t[v].index;d._unknown=o.slice(N)}}for(const[g,v]of Object.entries(h)){const N=n.camelCase?a?.get(g)??g:g,k=s.get(g);k?.type?d[N]=Gn(v,k.type,{optionName:k.name,strictTypes:n.strictTypes}):d[N]=v===void 0?null:v}for(const g of e){const v=n.camelCase?a?.get(g.name)??g.name:g.name;!(v in d)&&g.defaultValue!==void 0&&(g.multiple??g.lazyMultiple?d[v]=Array.isArray(g.defaultValue)?[...g.defaultValue]:[g.defaultValue]:d[v]=g.defaultValue)}if(y){const g={},v={},N={};for(const x of e)if(x.group){const S=Array.isArray(x.group)?x.group:[x.group];for(const U of S)He(U)||(g[U]??={})}for(const x of Object.keys(d))if(!Jn(x)){v[x]=d[x];let S=x;n.camelCase&&(S=c?.get(x)??x);const U=s.get(S);if(U?.group){const _=Array.isArray(U.group)?U.group:[U.group];for(const P of _)He(P)||g[P]&&(g[P][x]=d[x])}else N[x]=d[x]}const k={_all:v};for(const[x,S]of Object.entries(g))k[x]=S;Object.keys(N).length>0&&(k._none=N),d._unknown&&(k._unknown=d._unknown),Object.keys(d).forEach(x=>delete d[x]),Object.assign(d,k)}const E=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));return I(i,"Final parsed result:","resolver",E),E},ft="-",ne=ft.codePointAt(0),Y="=",Zn=Y.codePointAt(0),Yn="--",Qn=ft,Xn="--",mt=t=>t.length>2&&t.startsWith(Xn),eo=t=>mt(t)&&!t.includes(Y,3),to=t=>mt(t)&&t.includes(Y,3),no=t=>{if(t.length!==2||t.codePointAt(0)!==ne||t.codePointAt(1)===ne)return!1;const e=t.codePointAt(1);return e!==void 0&&(e<48||e>57)},oo=t=>{if(t.length<=2||t.codePointAt(0)!==ne||t.codePointAt(1)===ne)return!1;const e=t.codePointAt(1);return!(e!==void 0&&e>=48&&e<=57)},so=t=>{const e=[];let n=0,o=[],i=0,s=-1,l=0;for(;i<o.length||n<t.length;){let r;if(i<o.length?(r=o[i],i++):(r=t[n],n++),l>0?l--:s++,r===Yn){e.push({index:s,kind:"option-terminator"});const u=[...o.slice(i),...t.slice(n)],a=u.map((c,d)=>({index:s+d+1,kind:"positional",value:c}));e.push(...a),s+=u.length;break}if(no(r)){const u=r.charAt(1);e.push({index:s,kind:"option",name:u,rawName:r});continue}if(oo(r)&&!r.includes(Y)){const u=[];let a="",c=!1;for(let d=1;d<r.length;d++){const h=r.charAt(d);c?a+=h:h.codePointAt(0)===Zn?c=!0:u.push(`${Qn}${h}`)}if(c)if(u.length>0){const d=u.pop();u.push(`${d}=${a}`)}else u.push(a);o=i<o.length?[...u,...o.slice(i)]:u,i=0,l=u.length;continue}if(eo(r)){const u=r.slice(2);e.push({index:s,kind:"option",name:u,rawName:r});continue}if(to(r)){const u=r.indexOf(Y),a=r.slice(2,u),c=r.slice(u+1);e.push({index:s,inlineValue:!0,kind:"option",name:a,rawName:r,value:c});continue}if(r.length>2&&r.codePointAt(0)===ne&&r.codePointAt(1)!==ne&&r.includes(Y)){const u=r.indexOf(Y),a=r.charAt(1),c=r.slice(u+1);e.push({index:s,inlineValue:!0,kind:"option",name:a,rawName:r,value:c});continue}e.push({index:s,kind:"positional",value:r})}return e},io=/\d/,ro=t=>typeof t=="function",ao=(t,e,n)=>{const o=n?.debug??!1;I(o,"Validating definitions:","validation",t,"caseInsensitive:",e);const i=new Set,s=new Set,l=new Set,r=new Set;let u=0;for(const a of t){if(I(o,"Checking definition:","validation",a),!a.name)throw I(o,"Validation failed: name is required","validation"),new M("Invalid option definition: name is required");if(typeof a.name!="string")throw new M("Invalid option definition: name must be a string");if(a.name.trim()==="")throw new M("Invalid option definition: name cannot be empty");const c=e?a.name.toLowerCase():"";if(i.has(a.name)||e&&l.has(c))throw new M(`Invalid option definition: duplicate name '${a.name}'`);if(s.has(a.name)||e&&r.has(c))throw new M(`Invalid option definition: name '${a.name}' conflicts with an existing alias`);if(i.add(a.name),e&&l.add(c),a.alias!==void 0){if(typeof a.alias!="string")throw new M("Invalid option definition: alias must be a string");if(a.alias.length!==1)throw new M("Invalid option definition: alias must be a single character");if(io.test(a.alias))throw new M("Invalid option definition: alias cannot be numeric");if(a.alias==="-")throw new M('Invalid option definition: alias cannot be "-"');const d=e?a.alias.toLowerCase():"";if(s.has(a.alias)||e&&r.has(d))throw new M(`Invalid option definition: duplicate alias '${a.alias}'`);if(i.has(a.alias)||e&&l.has(d))throw new M(`Invalid option definition: alias '${a.alias}' conflicts with an existing option name`);s.add(a.alias),e&&r.add(d)}if(a.defaultOption&&(u++,a.type!==void 0&&Z(a.type)))throw new M("Invalid option definition: defaultOption cannot be Boolean type");if(a.type!==void 0&&!(a.type===Boolean||a.type===Number||a.type===String||typeof a.type=="function"&&ro(a.type)))throw new M("Invalid option definition: invalid type")}if(u>1)throw I(o,"Validation failed: multiple defaultOptions not allowed","validation"),new M("Invalid option definition: multiple defaultOptions not allowed");I(o,"Validation completed successfully","validation")};function co(t,e={}){const n=e.debug??!1;I(n,"Starting command-line-args parsing","index"),I(n,"Options:","index",e);const o={...e};o.stopAtFirstUnknown&&(o.partial=!0);const i=Array.isArray(t)?t:[t];I(n,"Normalized definitions:","index",i),ao(i,o.caseInsensitive,n?o:void 0);let{argv:s}=o;s??=process.argv.slice(2),I(n,"Using argv:","index",s);let l=s;o.caseInsensitive&&(l=s.map(a=>{if(a.startsWith("--")){const c=a.indexOf("="),d=(c===-1?a.slice(2):a.slice(2,c)).toLowerCase();return c===-1?`--${d}`:`--${d}${a.slice(c)}`}if(a.startsWith("-")&&!a.startsWith("--")&&a.length>1){const c=a.indexOf("="),d=c===-1?a.slice(1):a.slice(1,c);if(!d)return a;const h=d.toLowerCase();return c===-1?`-${h}`:`-${h}${a.slice(c)}`}return a}));const r=so(l.map(String));I(n,"Tokenized arguments:","index",r);const u=Kn(r,i,o,s);return I(n,"Command-line-args parsing completed","index"),u}class lo{result;argv;options;argument;args;command;commandName;env;logger;console;fs;process;runtime;rawUnknown;rawArgv;constructor(e,n){this.commandName=e,this.command=n}}let $e=class extends b{commandName;constructor(e,n,o){super(`Failed to load command "${e}": ${n}`,"COMMAND_LOADER_ERROR",{commandName:e,reason:n}),this.name="CommandLoaderError",this.commandName=e,this.hint="Ensure the loader resolves to a module with a default export that is the command handler function.",o!==void 0&&(this.cause=o)}};const uo=/^-{1,2}(\w+)(=(.+))?$/,gt=(t,e,n,o)=>{const i=uo.exec(t);if(i===null)return{};const s=i[1];if(!s)return{};const l=n&&o?n.get(s)??o.get(s):e.find(r=>r.name===s||r.alias===s);return l!==void 0?{argName:l.name,argValue:i[3],option:l}:{}},Ke=(t,e)=>{if(e.type===void 0)return t;if(e.type.name==="Boolean"){if(t==="true"||t==="1")return e.type(!0);if(t==="false"||t==="0")return e.type(!1)}return e.type(t)},ho=new Set(["0","1","false","true"]),po=(t,e,n,o)=>{if(e.length===0||t.length===0)return{};const i=(s,l)=>{const{argName:r,argValue:u,option:a}=gt(l,e,n,o),{lastOption:c}=s;return a&&re(a)&&u&&r?s.partial[r]=Ke(u,a):s.lastName&&c&&re(c)&&ho.has(l)&&(s.partial[s.lastName]=Ke(l,c)),{lastName:r,lastOption:a,partial:s.partial}};return t.reduce(i,{partial:{}}).partial},fo=new Set(["0","1","false","true"]),mo=(t,e,n,o)=>{if(e.length===0||t.length===0)return t;const i=(s,l)=>{const{argValue:r,option:u}=gt(l,e,n,o),{lastOption:a}=s;if(a&&re(a)&&fo.has(l)){const{args:c}=s;return{args:c.slice(0,-1)}}return u&&re(u)&&r?{args:s.args}:{args:[...s.args,l],lastOption:u}};return t.reduce(i,{args:[]}).args},go=t=>{const e=new Map;for(const n of t){const o=e.get(n.name);o?e.set(n.name,{...o,...n}):e.set(n.name,n)}return[...e.values()]},wo=t=>{if(t===void 0)return;const e=t.toLowerCase().trim();return e==="true"||e==="1"||e==="yes"||e==="on"},vo=(t,e)=>{if(!t.type)return e;if(e!==void 0){if(t.type===Boolean||typeof t.type=="function"&&t.type.name==="Boolean")return wo(e);if(t.type===Number||typeof t.type=="function"&&t.type.name==="Number"){const n=Number.parseFloat(e);return Number.isNaN(n)?void 0:n}return t.type===String||typeof t.type=="function"&&t.type.name==="String"?e:t.type(e)}},yo=/_./g,$o=/^[A-Z]/,No=t=>t.toLowerCase().replaceAll(yo,e=>e[1]?.toUpperCase()??e).replace($o,e=>e.toLowerCase()),Ao=(t,e=fe())=>{if(!t||t.length===0)return{};const n={};for(const o of t){const i=e[o.name],s=vo(o,i),l=s===void 0?o.defaultValue:s,r=No(o.name);n[r]=l}return n},xo=/-([a-z])/g,wt=t=>t.replaceAll(xo,(e,n)=>n.toUpperCase()),Ze=(t,e)=>t.type===void 0?e:t.type(e),bo=(t,e)=>{const{choices:n}=t;if(!n||n.length===0)return[];const o=[];for(const i of e)n.includes(i)||o.push({choices:n,name:t.name,value:i});return o},Co=(t,e)=>e&&t.defaultValue!==void 0&&!Array.isArray(t.defaultValue)?[t.defaultValue]:t.defaultValue,Oo=(t,e)=>{const n={},o=[],i=[],s=t.length-1;let l=0;for(const[r,u]of t.entries()){const a=wt(u.name),c=r===s&&u.multiple===!0,d=c?e.slice(r):e.slice(r,r+1);if(d.length===0){u.required===!0&&o.push(u.name),n[a]=Co(u,c);continue}i.push(...bo(u,d)),l=r+d.length,n[a]=c?d.map(h=>Ze(u,h)):Ze(u,d[0])}return{invalid:i,missing:o,resolved:n,surplus:e.slice(l)}},_o=t=>{const e=new Map,n=new Map;for(const o of t)if(e.set(o.name,o),o.alias){const i=Array.isArray(o.alias)?o.alias:[o.alias];for(const s of i)n.set(s,o)}return{optionMapByAlias:n,optionMapByName:e}},vt=async t=>{if(typeof t.__resolvedExecute__=="function")return t.__resolvedExecute__;if(typeof t.loader!="function")throw new $e(t.name,"no execute or loader defined");let e;try{e=await t.loader()}catch(o){throw new $e(t.name,o instanceof Error?o.message:String(o),o)}const n=e.default;if(typeof n!="function")throw new $e(t.name,"loader did not return a module with a default-exported handler function");return t.__resolvedExecute__=n,n},Io=(t,e,n,o,i,s=[])=>{const l=new lo(t.name,t),{_all:r,_unknown:u,positionals:a}=e,c=Object.keys(n).length>0?{...r,...n}:r;he in c&&delete c[he],l.argument=a?.[he]??[],l.args={},l.rawUnknown=[...u??[]],l.rawArgv=[...s];const d=Object.keys(o).length>0;return l.options=d?{...c,...o}:c,l.env=Ao(t.env,i),l},Eo=(t,e,n)=>{const o=t.options??[],i=o.length>0;let s=go(i?[...o,...n]:n);if(s.length>0){for(const c of s)if(c.multiple&&c.lazyMultiple)throw new Error(`Argument "${c.name}" cannot have both multiple and lazyMultiple options, please choose one.`)}const l=t.arguments!==void 0&&t.arguments.length>0;(t.argument||l)&&(s=[{defaultOption:!0,description:t.argument?.description,group:"positionals",multiple:!0,name:he,type:t.argument?.type??String,typeLabel:t.argument?.typeLabel},...s]);let r,u;if(i){const{optionMapByAlias:c,optionMapByName:d}=_o(o);r=mo(e,o,d,c),u=po(e,o,d,c)}else r=e,u={};const a=co(s,{argv:r,camelCase:!0,partial:!0,stopAtFirstUnknown:!0});return{arguments_:s,booleanValues:u,parsedArgs:a}},Ne=async(t,e,n)=>typeof t.execute=="function"?t.execute(e):(await vt(t))(e),ko=(t,e)=>{if(!t.arguments||t.arguments.length===0)return;const n=e.rawUnknown.indexOf("--"),o=n===-1?[]:e.rawUnknown.slice(n+1),i=o.length===0?e.argument:e.argument.slice(0,Math.max(0,e.argument.length-o.length)),s=Oo(t.arguments,i);if(e.args=s.resolved,s.missing.length>0)throw new Kt(t.name,s.missing);const[l]=s.invalid;if(l)throw new Jt(l.name,l.value,l.choices);if(s.surplus.length>0)throw new Zt(t.name,s.surplus,t.arguments.length)};let So=class{capacity;cache;constructor(t){this.capacity=t,this.cache=new Map}get(t){if(!this.cache.has(t))return;const e=this.cache.get(t);return this.cache.delete(t),this.cache.set(t,e),e}has(t){return this.cache.has(t)}set(t,e){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.capacity){const n=this.cache.keys().next().value;n!==void 0&&this.cache.delete(n)}this.cache.set(t,e)}delete(t){this.cache.delete(t)}clear(){this.cache.clear()}size(){return this.cache.size}};const Lo=(t,e)=>typeof t!="string"||t===""?"":t[0].toLowerCase()+t.slice(1),Mo=new RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))","g"),Uo=t=>{if(typeof t!="string")throw new TypeError(`The "value" argument must be of type string. Received ${typeof t}`);return t.replaceAll(Mo,"")},Ae=new So(1e3),Po=/[.*+?^${}()|[\]\\]/g,Do=t=>{const e=t.join("");if(Ae.has(e)){const i=Ae.get(e);return i.lastIndex=0,i}const n=t.map(i=>i.replaceAll(Po,String.raw`\$&`)).join("|"),o=new RegExp(n,"g");return Ae.set(e,o),o},To=t=>{const e=[];let n=0,o;for(G.lastIndex=0;(o=G.exec(t))!==null;)o.index>n&&e.push(t.slice(n,o.index)),e.push(o[0]),n=G.lastIndex;return n<t.length&&e.push(t.slice(n)),e.filter(Boolean)},Vo=/[ČŠŽĐ]/i,yt=new Uint8Array(128),$t=new Uint8Array(128),Nt=new Uint8Array(128);for(let t=0;t<128;t++)yt[t]=t>=65&&t<=90?1:0,$t[t]=t>=97&&t<=122?1:0,Nt[t]=t>=48&&t<=57?1:0;const xe=t=>yt[t],Ye=t=>$t[t],be=t=>Nt[t],W=(t,e,n,o,i)=>{if(t.length===0)return[];let s=!1;const l=Object.values(e);for(const f of l)if(f(t[0])){s=!0;break}if(!s&&!n)return[t];const r=[...t],u=[];let a=r[0],c="other";const d=Object.entries(e);for(const f of d){const[p,w]=f;if(w(r[0])){c=p;break}}let h=n&&o?r[0]===r[0].toLocaleUpperCase(o):!1;for(let f=1;f<r.length;f++){const p=r[f];let w="other";for(const y of d){const[A,O]=y;if(O(p)){w=A;break}}const $=n&&o?p===p.toLocaleUpperCase(o):!1;let m=!1;i?m=i(c,w,h,$,p,f,r):(c!==w&&c!=="other"&&w!=="other"&&(m=!0),n&&w!=="other"&&!h&&$&&(m=!0)),m?(u.push(a),a=p):a+=p,c=w,n&&(h=$)}return a&&a.length>0&&u.push(a),u.length>0?u:[t]},jo=(t,e,n,o)=>{if(n.size===0)return e;for(const i of n)if(t.startsWith(i,e))return o.push(i),e+i.length;return e},At=(t,e=new Set)=>{if(t.length===0)return[];if(t.toUpperCase()===t)return[t];let n=0;const o=[],i=t.length;for(let s=1;s<i;s++){const l=jo(t,n,e,o);if(l!==n){n=l,s=n-1;continue}const r=t.codePointAt(s-1),u=t.codePointAt(s),a=r&&r<128&&xe(r),c=u&&u<128&&xe(u),d=r&&r<128&&Ye(r),h=r&&r<128&&be(r),f=u&&u<128&&be(u);if(d&&c){o.push(t.slice(n,s)),n=s;continue}if(h&&!f||!h&&f){o.push(t.slice(n,s)),n=s;continue}if(f&&!h){let p=!1,w=!1;if(s+1<i){const $=t.codePointAt(s+1);p=$&&$<128&&xe($),w=$&&$<128&&be($)}if(!w&&p){o.push(t.slice(n,s),t.slice(s,s+1)),n=s+1;continue}}if(s+1<i){const p=t.codePointAt(s+1),w=p&&p<128&&Ye(p);if(a&&c&&w){const $=t.slice(n,s+1);e.has($)||(o.push(t.slice(n,s)),n=s)}}}return n<i&&o.push(t.slice(n)),o.filter(s=>s!=="")},xt=(t,e,n)=>{if(t.length===0)return[];const o=t===t.toLocaleUpperCase(e);if(e.startsWith("de")){if(!o&&t.replaceAll("ß","SS")===t.toLocaleUpperCase(e))return[t];const a=[...t],c=a.length,d=[];let h=a[0],f=a[0]===a[0].toLocaleUpperCase(e),p=f,w=f?0:-1;for(let $=1;$<c;$++){const m=a[$],y=m===m.toLocaleUpperCase(e);if(y===f)h+=m;else if(y)h&&h.length>0&&(d.push(h),h=m),p=!0,w=$;else{if(p&&$-w>1){const A=a[$-1],O=h.slice(0,-1);O&&O.length>0&&d.push(O),h=A+m}else h+=m;p=!1,w=-1}f=y}return h&&h.length>0&&d.push(h),d}if(e.startsWith("uk")||e.startsWith("ru")||e.startsWith("bg")||e.startsWith("sr")||e.startsWith("mk")||e.startsWith("be")){if(!ee.test(t)&&!L.test(t))return[t];const a=[...t],c=a.length,d=[];let h=a[0];const f=a[0];let p;ee.test(f)?p=1:L.test(f)?p=2:p=0;let w=f===f.toLocaleUpperCase(e);for(let m=1;m<c;m++){const y=a[m];let A;ee.test(y)?A=1:L.test(y)?A=2:A=0;const O=y===y.toLocaleUpperCase(e);p!==A&&(p===1||p===2)&&(A===1||A===2)||A===p&&!w&&O?(d.push(h),h=y):h+=y,p=A,w=O}h&&h.length>0&&d.push(h);const $=[];for(let m=0;m<d.length;m++)m<d.length-1&&d[m].length===1&&L.test(d[m])&&ee.test(d[m+1][0])?($.push(d[m]+d[m+1]),m+=1):$.push(d[m]);return $}if(e.startsWith("el")){if(!ve.test(t)&&!L.test(t))return[t];const a=[];De.lastIndex=0;let c;for(;(c=De.exec(t))!==null;)a.push(c[0]);a.length===0&&a.push(t);const d=[];if(a.length===1){const h=a[0];if(!h||!ve.test(h[0])||h.length===1)return[h??t]}for(const h of a){if(!h)continue;if(!ve.test(h[0])||h.length===1){d.push(h);continue}const f=h.length;let p=h[0],w=h[0]===h[0].toLocaleUpperCase(e);for(let $=1;$<f;$++){const m=h[$],y=m===m.toLocaleUpperCase(e);!w&&y?(d.push(p),p=m):p+=m,w=y}p&&d.push(p)}return d}if(e.startsWith("ja")||e.startsWith("ko")){const a=e.startsWith("ja"),c=a?{hiragana:h=>sn.test(h),kanji:h=>je.test(h),katakana:h=>an.test(h),latin:h=>L.test(h)}:{hangul:h=>Te.test(h),latin:h=>L.test(h)},d=new Set(["が","で","と","に","の","は","へ","も","や","を"]);if(a){const h=W(t,c,!1,e,(p,w)=>p==="hiragana"&&w==="katakana"||p==="katakana"&&w==="hiragana"||p==="hiragana"&&w==="latin"||p==="katakana"&&w==="latin"||p==="kanji"&&w==="latin"||p==="latin"&&(w==="hiragana"||w==="katakana"||w==="kanji")),f=[];for(const p of h){const w=p;w.length===1&&d.has(w)&&f.length>0?f[f.length-1]=f.at(-1)+w:f.push(w)}return f.length>0?f:[t]}return W(t,c,!1,e,(h,f)=>h==="hangul"&&f==="latin"||h==="latin"&&f==="hangul")}if(e.startsWith("sl")){const a=[...t],c=a.length,d=[];let h=a[0],f=a[0]===a[0].toLocaleUpperCase(e);for(let p=1;p<c;p++){const w=a[p],$=w===w.toLocaleUpperCase(e),m=Vo.test(w),y=p<c-1&&a[p+1]===a[p+1].toLocaleUpperCase(e);!f&&$||m&&y?(d.push(h),h=w,m&&y&&(d.push(h),h="")):h+=w,f=$}return h&&h.length>0&&d.push(h),d}if(e.startsWith("zh"))return W(t,{han:a=>je.test(a),latin:a=>L.test(a)},!1,e);if(["ar","fa","he","ur"].includes(e.split("-")[0])){const a=c=>Ve.test(c)||Pe.test(c);return W(t,{latin:c=>L.test(c),rtl:c=>a(c)},!1,e)}if(["am","bn","gu","hi","km","kn","lo","ml","mr","ne","or","pa","si","ta","te","th"].includes(e.split("-")[0])){const a=c=>en.test(c)||Xt.test(c)||nn.test(c)||on.test(c)||rn.test(c)||fn.test(c)||mn.test(c)||un.test(c)||dn.test(c)||gn.test(c)||ln.test(c)||wn.test(c)||hn.test(c)||tn.test(c)||cn.test(c)||pn.test(c);return W(t,{indic:c=>a(c),latin:c=>L.test(c)},!1,e)}if(["be","bg","ru","sr","uk"].includes(e))return W(t,{cyrillic:a=>ee.test(a),latin:a=>L.test(a)},!0,e);if(["ar","fa","he"].includes(e))return W(t,{latin:a=>L.test(a),rtl:a=>Ve.test(a)||Pe.test(a)},!1,e);if(e.startsWith("ko"))return W(t,{hangul:a=>Te.test(a),latin:a=>L.test(a)},!1,e);if(e.startsWith("uz")){if(!ee.test(t)&&!L.test(t))return[t];const a=[...t],c=a.length,d=[];let h=a[0],f=a[0]===a[0].toLocaleUpperCase(e);for(let p=1;p<c;p++){const w=a[p],$=w===w.toLocaleUpperCase(e);if(Re.test(w)||Re.test(a[p-1])){h+=w;continue}!f&&$?(d.push(h),h=w):h+=w,f=$}return h&&h.length>0&&d.push(h),d}const i=[...t],s=i.length,l=[];let r=i[0],u=i[0]===i[0].toLocaleUpperCase(e);for(const a of n)if(t.startsWith(a)){l.push(a),r=i[a.length],u=r===r.toLocaleUpperCase(e);break}for(let a=1;a<s;a++){const c=i[a],d=c===c.toLocaleUpperCase(e);let h=0;for(const f of n)if(t.startsWith(f,a)){l.push(r,f),h=f.length,r="";const p=f.at(-1);p&&(u=p===p.toLocaleUpperCase(e));break}if(h>0){a+=h-1;continue}!u&&d?(l.push(r),r=c):r+=c,u=d}return r&&l.push(r),l},Ro=(t,e,n)=>{const o=[],i=pe.test(t)?t.split(pe).filter(Boolean):[t];for(const s of i){const l=s;if(pe.test(l))o.push(l);else{G.lastIndex=0;const r=G.test(l)?To(l).filter(Boolean):[l];for(const u of r)if(G.lastIndex=0,G.test(u))o.push(u);else if(e){const a=e.toLowerCase().split("-")[0];o.push(...xt(u,a,n))}else o.push(...At(u,n))}}return o},Bo=(t,e={})=>{if(!t||typeof t!="string")return[];const{handleAnsi:n=!1,handleEmoji:o=!1,knownAcronyms:i=[],locale:s,normalize:l=!1,separators:r,stripAnsi:u=!1,stripEmoji:a=!1}=e,c=new Set([...i].toSorted((m,y)=>y.length-m.length));let d=t;u&&(d=Uo(d)),a&&(d=vn(d));let h;Array.isArray(r)?h=Do(r):r instanceof RegExp?h=r:h=Qt;const f=[];let p=d;const w=h.flags.includes("g")?h:new RegExp(h.source,`${h.flags}g`);for(;p.length>0;){const m=w.exec(p);if(!m){p===".."?f.push(".."):p==="."?f.push("."):p.length>0&&f.push(p);break}const y=m.index,A=m[0],O=A.length,C=p.slice(0,y),D=p.slice(y+O);if(A.startsWith("../"))f.push(".."),p=p.slice(y+3);else if(A.startsWith("./"))f.push("."),p=p.slice(y+2);else if(y===0&&A==="..")f.push(".."),p=p.slice(2);else if(y===0&&A===".")f.push("."),p=p.slice(1);else{C.length>0&&f.push(C);let E=0;for(;(E=A.indexOf("../",E))!==-1;)f.push(".."),E+=3;for(E=0;(E=A.indexOf("./",E))!==-1;)(E===0||A[E-1]!==".")&&f.push("."),E+=2;let g=D;for(;g.startsWith("../");)f.push(".."),g=g.slice(3);for(;g.startsWith("./");)f.push("."),g=g.slice(2);if(g===".."){f.push("..");break}else if(g==="."){f.push(".");break}else p=g}w.lastIndex=0}if(f.length===0){const m=d.split(h).filter(Boolean);f.push(...m)}let $=[];for(const m of f)n||o?$.push(...Ro(m,s,c)):s?$.push(...xt(m,s,c)):$.push(...At(m,c));return l&&($=$.map(m=>c.has(m)?m:s&&m===m.toLocaleUpperCase(s)?m[0]+m.slice(1).toLocaleLowerCase(s):m.toUpperCase()===m&&!c.has(m)?m.slice(0,1)+m.slice(1).toLowerCase():m)),$},Wo=(t,e)=>typeof t!="string"||t===""?"":t[0].toUpperCase()+t.slice(1),zo=(t,e)=>{const{length:n}=t;if(n===0)return"";if(n===1)return t[0];const o=[];let i="",s="";for(let l=0;l<n;l++){const r=t[l];if(pe.test(r)){i?(o.push(i+s+r),i="",s=""):(o.length>0&&o.push(e),i=r);continue}i?(s&&(s+=e),s+=r):(o.length>0&&o.push(e),o.push(r))}return o.join("")},te=(t,e)=>{if(typeof t!="string"||!t)return"";let n=!0;return zo(Bo(t,{handleAnsi:e?.handleAnsi,handleEmoji:e?.handleEmoji,knownAcronyms:e?.knownAcronyms,locale:e?.locale,normalize:e?.normalize,separators:void 0,stripAnsi:e?.stripAnsi,stripEmoji:e?.stripEmoji}).map(o=>{const i=o,s=i.toLowerCase();return n?(n=!1,Lo(s)):Wo(s)}),"")};class Fo extends b{commandName;missingOptions;constructor(e,n){super(`Command "${e}" is missing required options: ${n.join(", ")}`,"COMMAND_VALIDATION_ERROR",{commandName:e,missingOptions:n}),this.name="CommandValidationError",this.commandName=e,this.missingOptions=n,this.hint=`Provide the following required options: ${n.join(", ")}`}}class Go extends b{choices;option;value;constructor(e,n,o){super(`Invalid value "${n}" for option "${e}". Allowed values: ${o.join(", ")}`,"INVALID_CHOICE",{choices:o,option:e,value:n}),this.name="InvalidChoiceError",this.option=e,this.value=n,this.choices=o,this.hint=`Use one of: ${o.map(i=>`--${e} ${i}`).join(", ")}`}}const Qe=(t,e,n=!1)=>{const o=[],i=e._all??e;for(const s of t){if(!n&&!s.required)continue;const l=s.__camelCaseName__??s.name;if(i[l]===void 0){if(s.type?.name==="Boolean"){e[l]=!1;continue}o.push(s)}}return o},qo=(t,e)=>e.includes(t)?!0:Math.abs(t.length-e.length)>t.length/2?!1:xn(t,e)<=t.length/3,z=(t,e)=>{const n=t.toLowerCase();return e.filter(o=>qo(o.toLowerCase(),n))},Ho=(t,e)=>{const n=[];if(t._unknown&&t._unknown.forEach(o=>{const i=o.startsWith("--");let s=`Found unknown ${i?"option":"argument"} "${o}"`;if(i){const l=z(o.replace("--",""),(e.options??[]).map(r=>r.name));if(l.length>0){const[r,...u]=l.map(a=>`--${a}`);s+=u.length>0?`, did you mean ${r??""} or ${u.join(", ")}?`:`, did you mean ${r??""}?`}}n.push(s)}),n.length>0)throw new b(n.join(`
3
3
  `),V.UNKNOWN_OPTION,{unknownOptions:[...t._unknown??[]]})},K=(t,e)=>new b(`Command "${t}" ${e}`,"INVALID_COMMAND",{commandName:t}),Jo=(t,e)=>{const n=new Set;for(const[o,i]of t.entries()){if(typeof i!="object"||i===null)throw K(e,`has a positional argument at index ${String(o)} that is not an object`);const{name:s}=i;if(typeof s!="string"||s.length===0)throw K(e,`has a positional argument at index ${String(o)} without a name`);const l=wt(s);if(n.has(l))throw K(e,`declares duplicate positional argument "${s}"`);n.add(l);const r=o===0?void 0:t[o-1];if(i.required===!0&&r!==void 0&&r.required!==!0)throw K(e,`declares required positional "${s}" after an optional one, which can never be satisfied`);if(i.multiple===!0&&o!==t.length-1)throw K(e,`declares a variadic positional "${s}" that is not the last one`)}},Ko=(t,e,n)=>{const o=n.__requiredOptions__,i=o?Qe(o,e,!0):Qe(t,e,!1);if(i.length>0)throw new Fo(n.name,i.map(s=>s.name));e._unknown&&e._unknown.length>0&&!n.argument&&!n.arguments?.length&&Ho(e,n)},Zo=(t,e,n)=>{const o=n.__conflictingOptions__??t.filter(i=>i.conflicts!==void 0);if(o.length>0){const i=o.find(s=>{const l=s.__camelCaseName__??te(s.name);return Array.isArray(s.conflicts)?s.conflicts.some(r=>e[te(r)]!==void 0)&&e[l]!==void 0:e[te(s.conflicts)]!==void 0&&e[l]!==void 0});if(i)throw new ct(i.name,typeof i.conflicts=="string"?i.conflicts:i.conflicts?.[0]??"unknown")}},Yo=(t,e)=>{const n=e.options;if(n)for(const o of n){if(!o.choices||o.choices.length===0)continue;const i=o.__camelCaseName__??te(o.name),s=t[i];if(s==null)continue;const l=Array.isArray(s)?s:[s];for(const r of l){const u=String(r);if(!o.choices.includes(u))throw new Go(o.name,u,o.choices)}}},Qo=t=>{if(!Array.isArray(t.options))return;const e=new Map,n=new Map;for(const i of t.options){if(i.name){const s=e.get(i.name)??[];s.push(i),e.set(i.name,s)}if(typeof i.alias=="string"&&i.alias.length>0){const s=n.get(i.alias)??[];s.push(i),n.set(i.alias,s)}else if(Array.isArray(i.alias)){for(const s of i.alias)if(s.length>0){const l=n.get(s)??[];l.push(i),n.set(s,l)}}}const o=[];for(const[i,s]of e)s.length>1&&o.push(`Duplicate option name "${i}" in command "${t.name}": ${JSON.stringify(s)}`);for(const[i,s]of n)s.length>1&&o.push(`Duplicate option alias "-${i}" used by options ${s.map(l=>`"${l.name}"`).join(", ")} in command "${t.name}"`);if(o.length>0)throw new Error(o.join(`
4
4
  `))},Xo=t=>{const{arguments:e}=t;if(e!==void 0){if(!Array.isArray(e))throw K(t.name,'must declare "arguments" as an array — slot order is significant, so a record cannot express it');if(t.argument!==void 0)throw K(t.name,'cannot define both "argument" and "arguments" — choose one');Jo(e,t.name)}},es=(t,e)=>{if(e.length===0)return{argv:[],commandPath:void 0};const n=[];let o;for(let i=1;i<=e.length;i+=1){const s=e[i-1];if(s===void 0||s.startsWith("-"))break;n.push(s);const l=n.join(" ");t.has(l)&&(o={commandPath:[...n],depth:i})}return o?{argv:e.slice(o.depth),commandPath:o.commandPath}:{argv:e,commandPath:void 0}},J=t=>t.join(" "),Xe=(t,e)=>e&&e.length>0?[...e,t]:[t],et=t=>t===void 0||Array.isArray(t)?t:Object.entries(t).map(([e,n])=>({...n,name:e})),ts=t=>{const e=et(t.options),n=et(t.env);return e===t.options&&n===t.env?t:Object.assign(Object.create(Object.getPrototypeOf(t)),t,{env:n,options:e})},ns=/^no-/,os=t=>{t.options?.forEach(e=>{e.__camelCaseName__=te(e.name)})},ss=t=>{if(!Array.isArray(t.options)||t.options.length===0)return;const e=new Set;for(const o of t.options)e.add(o.name);const n=[];for(const o of t.options)if(o.name.startsWith("no-")){const i=o.name.replace(ns,"");if(!e.has(i)){if(o.type!==Boolean)throw new Error(`Cannot add negated option "${o.name}" to command "${t.name}" because it is not a boolean.`);const s={...o,alias:void 0,defaultValue:o.defaultValue===void 0?!0:!o.defaultValue,description:`Inverse of --${o.name}.`,name:i};n.push(s),e.add(i)}}n.length>0&&t.options.push(...n)},is=(t,e)=>{if(!e.options||e.options.length===0)return;const{options:n}=t,o=new Map;for(const s of e.options)if(s.name.startsWith("no-")){const l=te(s.name);o.set(l,s)}const i=Object.keys(n).filter(s=>o.has(s));if(i.length!==0)for(const s of i){const l=s.charAt(2);if(!l)continue;const r=l.toLowerCase()+s.slice(3),u=o.get(s);u&&(u.__negated__=!0),n[r]=!n[s],Reflect.deleteProperty(n,s)}},rs=(t,e)=>{if(!e.options||e.options.length===0)return;const n=new Map;for(const i of e.options)i.__camelCaseName__&&i.__negated__===void 0&&i.implies!==void 0&&n.set(i.__camelCaseName__,i);if(n.size===0)return;const{options:o}=t;for(const i of Object.keys(o)){const s=n.get(i);if(s?.implies){const{implies:l}=s;for(const[r,u]of Object.entries(l))o[r]===void 0&&(o[r]=u)}}},as=()=>!!process.versions.electron,cs=()=>as()&&!process.defaultApp,ls=()=>cs()?0:1,us=t=>t.slice(ls()+1),hs=" ",ps=(t,e)=>t===e?!0:t.length!==e.length?!1:t.every((n,o)=>n===e[o]),ds=t=>{if(typeof t=="string")return t.split(hs);const e=Oe();return ps(t,e)?us(t):t},fs=t=>{const e=s=>{t.error(`Uncaught exception: ${s.message||s}`),s.stack&&t.error(s.stack),F(1)},n=(s,l)=>{if(s instanceof Error)t.error(`Promise rejection: ${s.message||s}`),s.stack&&t.error(s.stack);else{let r;if(typeof s=="string")r=s;else try{r=JSON.stringify(s)}catch{r=String(s)}t.error(`Promise rejection: ${r}`)}F(1)},o=Me("uncaughtException",e),i=Me("unhandledRejection",n);return()=>{o(),i()}},tt=100,ms=/^[a-z][\w-]*$/i,Ee=(t,e)=>{if(typeof t!="string"||t.trim().length===0)throw new b(`${e} must be a non-empty string`,"INVALID_INPUT",{fieldName:e,value:t});return t.trim()},nt=(t,e)=>{if(!Array.isArray(t)||!t.every(n=>typeof n=="string"))throw new b(`${e} must be an array of strings`,"INVALID_INPUT",{fieldName:e,value:t});return t},le=(t,e)=>{if(typeof t!="object"||t===null)throw new b(`${e} must be an object`,"INVALID_INPUT",{fieldName:e,value:t});return t},ue=t=>{const e=Ee(t,"Command name");if(e.length>tt)throw new b(`Command name is too long (maximum ${String(tt)} characters)`,"INVALID_COMMAND_NAME",{commandName:e,length:e.length});if(e.includes("..")||e.includes("/")||e.includes("\\")||e.includes(";")||e.includes("|")||e.includes("&"))throw new b(`Command name "${e}" contains invalid characters`,"INVALID_COMMAND_NAME",{commandName:e});if(!ms.test(e))throw new b(`Command name "${e}" must start with a letter and contain only letters, numbers, hyphens, and underscores`,"INVALID_COMMAND_NAME",{commandName:e});return e},gs=1e6,ws=1e5,vs=new Set([`
package/index.js CHANGED
@@ -82,7 +82,7 @@ function requireNative() {
82
82
  const binding = require('@visulima/vis-binding-android-arm64')
83
83
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
84
84
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
85
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
85
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
86
86
  }
87
87
  return binding
88
88
  } catch (e) {
@@ -98,7 +98,7 @@ function requireNative() {
98
98
  const binding = require('@visulima/vis-binding-android-arm-eabi')
99
99
  const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
100
100
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
101
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
101
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -119,7 +119,7 @@ function requireNative() {
119
119
  const binding = require('@visulima/vis-binding-win32-x64-gnu')
120
120
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
121
121
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
122
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
123
  }
124
124
  return binding
125
125
  } catch (e) {
@@ -135,7 +135,7 @@ function requireNative() {
135
135
  const binding = require('@visulima/vis-binding-win32-x64-msvc')
136
136
  const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
137
137
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
138
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
139
139
  }
140
140
  return binding
141
141
  } catch (e) {
@@ -152,7 +152,7 @@ function requireNative() {
152
152
  const binding = require('@visulima/vis-binding-win32-ia32-msvc')
153
153
  const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
154
154
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
155
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
155
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
156
156
  }
157
157
  return binding
158
158
  } catch (e) {
@@ -168,7 +168,7 @@ function requireNative() {
168
168
  const binding = require('@visulima/vis-binding-win32-arm64-msvc')
169
169
  const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
170
170
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
171
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
171
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
172
172
  }
173
173
  return binding
174
174
  } catch (e) {
@@ -187,7 +187,7 @@ function requireNative() {
187
187
  const binding = require('@visulima/vis-binding-darwin-universal')
188
188
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
189
189
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
190
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
190
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
191
191
  }
192
192
  return binding
193
193
  } catch (e) {
@@ -203,7 +203,7 @@ function requireNative() {
203
203
  const binding = require('@visulima/vis-binding-darwin-x64')
204
204
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
205
205
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
206
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
206
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
207
207
  }
208
208
  return binding
209
209
  } catch (e) {
@@ -219,7 +219,7 @@ function requireNative() {
219
219
  const binding = require('@visulima/vis-binding-darwin-arm64')
220
220
  const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
221
221
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
222
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
222
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
223
223
  }
224
224
  return binding
225
225
  } catch (e) {
@@ -239,7 +239,7 @@ function requireNative() {
239
239
  const binding = require('@visulima/vis-binding-freebsd-x64')
240
240
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
241
241
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
242
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
242
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
243
243
  }
244
244
  return binding
245
245
  } catch (e) {
@@ -255,7 +255,7 @@ function requireNative() {
255
255
  const binding = require('@visulima/vis-binding-freebsd-arm64')
256
256
  const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
257
257
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
258
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
258
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
259
259
  }
260
260
  return binding
261
261
  } catch (e) {
@@ -276,7 +276,7 @@ function requireNative() {
276
276
  const binding = require('@visulima/vis-binding-linux-x64-musl')
277
277
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
278
278
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
279
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
279
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
280
280
  }
281
281
  return binding
282
282
  } catch (e) {
@@ -292,7 +292,7 @@ function requireNative() {
292
292
  const binding = require('@visulima/vis-binding-linux-x64-gnu')
293
293
  const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
294
294
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
295
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
295
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
296
  }
297
297
  return binding
298
298
  } catch (e) {
@@ -310,7 +310,7 @@ function requireNative() {
310
310
  const binding = require('@visulima/vis-binding-linux-arm64-musl')
311
311
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
312
312
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
313
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
313
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
314
314
  }
315
315
  return binding
316
316
  } catch (e) {
@@ -326,7 +326,7 @@ function requireNative() {
326
326
  const binding = require('@visulima/vis-binding-linux-arm64-gnu')
327
327
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
328
328
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
329
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
329
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
330
  }
331
331
  return binding
332
332
  } catch (e) {
@@ -344,7 +344,7 @@ function requireNative() {
344
344
  const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
345
345
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
346
346
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
347
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
347
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
348
348
  }
349
349
  return binding
350
350
  } catch (e) {
@@ -360,7 +360,7 @@ function requireNative() {
360
360
  const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
361
361
  const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
362
362
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
363
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
363
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
364
  }
365
365
  return binding
366
366
  } catch (e) {
@@ -378,7 +378,7 @@ function requireNative() {
378
378
  const binding = require('@visulima/vis-binding-linux-loong64-musl')
379
379
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
380
380
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
381
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
381
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
382
382
  }
383
383
  return binding
384
384
  } catch (e) {
@@ -394,7 +394,7 @@ function requireNative() {
394
394
  const binding = require('@visulima/vis-binding-linux-loong64-gnu')
395
395
  const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
396
396
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
397
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
397
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
398
  }
399
399
  return binding
400
400
  } catch (e) {
@@ -412,7 +412,7 @@ function requireNative() {
412
412
  const binding = require('@visulima/vis-binding-linux-riscv64-musl')
413
413
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
414
414
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
415
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
415
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
416
416
  }
417
417
  return binding
418
418
  } catch (e) {
@@ -428,7 +428,7 @@ function requireNative() {
428
428
  const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
429
429
  const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
430
430
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
431
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
432
432
  }
433
433
  return binding
434
434
  } catch (e) {
@@ -445,7 +445,7 @@ function requireNative() {
445
445
  const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
446
446
  const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
447
447
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
448
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
448
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
449
449
  }
450
450
  return binding
451
451
  } catch (e) {
@@ -461,7 +461,7 @@ function requireNative() {
461
461
  const binding = require('@visulima/vis-binding-linux-s390x-gnu')
462
462
  const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
463
463
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
464
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
464
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
465
465
  }
466
466
  return binding
467
467
  } catch (e) {
@@ -481,7 +481,7 @@ function requireNative() {
481
481
  const binding = require('@visulima/vis-binding-openharmony-arm64')
482
482
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
483
483
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
484
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
484
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
485
485
  }
486
486
  return binding
487
487
  } catch (e) {
@@ -497,7 +497,7 @@ function requireNative() {
497
497
  const binding = require('@visulima/vis-binding-openharmony-x64')
498
498
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
499
499
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
500
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
500
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
501
501
  }
502
502
  return binding
503
503
  } catch (e) {
@@ -513,7 +513,7 @@ function requireNative() {
513
513
  const binding = require('@visulima/vis-binding-openharmony-arm')
514
514
  const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
515
515
  if (bindingPackageVersion !== '3.0.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
516
- throw new Error(`Native binding package version mismatch, expected 4.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
516
+ throw new Error(`Native binding package version mismatch, expected 4.0.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
517
517
  }
518
518
  return binding
519
519
  } catch (e) {