@equinor/fusion-framework-cli
Version:
Command-line toolkit for developing, building, and publishing Fusion Framework applications and portal templates. Provides a unified developer experience from local development to production deployment.
1 lines • 253 kB
JavaScript
import{loadConfigFromFile as e,mergeConfig as t,build as n}from"vite";import r from"chalk";import i from"vite-tsconfig-paths";import o,{dirname as s,resolve as a,basename as c,extname as l,relative as u}from"node:path";import{readPackageUp as f}from"read-package-up";import p,{fileURLToPath as d}from"node:url";import h from"node:module";import m from"util";import g,{accessSync as v,constants as y,readFileSync as E,statSync as b,existsSync as w,mkdirSync as L,writeFileSync as S}from"node:fs";import{stat as C,mkdir as _}from"node:fs/promises";import{importConfig as I,FileNotFoundError as D}from"@equinor/fusion-imports";import N from"deepmerge";import{rawImportsPlugin as P}from"@equinor/fusion-framework-vite-plugin-raw-imports";import O from"node:assert";import{execSync as A}from"node:child_process";import{coerce as T,SemVer as x,satisfies as $}from"semver";import R,{z as F}from"zod";import U from"fs";import k from"path";import B from"zlib";import G from"crypto";import M from"ora";import{createDevServer as j,processServices as z}from"@equinor/fusion-framework-dev-server";import{enableAzureIdentityAuth as H}from"@equinor/fusion-framework-module-azure-identity";function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V,W,K,Z;function Y(){if(W)return V;W=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return V=e}function X(){if(Z)return K;Z=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return K={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}var J,Q,ee,te,ne,re,ie,oe,se,ae,ce,le,ue,fe={exports:{}};function pe(){return J||(J=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=X(),o=Y(),s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.safeSrc=[],u=t.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of d)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=f++;o(e,i,t),u[e]=i,c[i]=t,l[i]=r,s[i]=new RegExp(t,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h("FULL",`^${c[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h("LOOSE",`^${c[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?`+`(?:${c[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",c[u.COERCE],!0),h("COERCERTLFULL",c[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(fe,fe.exports)),fe.exports}function de(){if(ie)return re;ie=1;const e=Y(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=X(),{safeRe:r,t:i}=pe(),o=function(){if(ee)return Q;ee=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Q=n=>n?"object"!=typeof n?e:n:t}(),{compareIdentifiers:s}=function(){if(ne)return te;ne=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return te={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}();class a{constructor(s,c){if(c=o(c),s instanceof a){if(s.loose===!!c.loose&&s.includePrerelease===!!c.includePrerelease)return s;s=s.version}else if("string"!=typeof s)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof s}".`);if(s.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",s,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const l=s.trim().match(c.loose?r[i.LOOSE]:r[i.FULL]);if(!l)throw new TypeError(`Invalid Version: ${s}`);if(this.raw=s,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");l[4]?this.prerelease=l[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof a)){if("string"==typeof t&&t===this.version)return 0;t=new a(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof a||(e=new a(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof a||(t=new a(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}compareBuild(t){t instanceof a||(t=new a(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return s(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===s(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return re=a}function he(){if(se)return oe;se=1;const e=de();return oe=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},oe}var me,ge,ve,ye,Ee,be,we,Le,Se,Ce,_e=["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"],Ie=["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"],De=["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"];function Ne(){if(ge)return me;ge=1;var e=[].concat(_e).concat(Ie),t=De;return me=function(n){var r=0;function i(){return r<n.length}function o(e){if(e instanceof RegExp){var t=n.slice(r).match(e);if(t)return r+=t[0].length,t[0]}else if(n.indexOf(e,r)===r)return r+=e.length,e}function s(){o(/[ ]*/)}function a(){return o(/[A-Za-z0-9-.]+/)}function c(){var e=a();if(!e)throw new Error("Expected idstring at offset "+r);return e}function l(){return function(){for(var e,t=["WITH","AND","OR","(",")",":","+"],i=0;i<t.length&&!(e=o(t[i]));i++);if("+"===e&&r>1&&" "===n[r-2])throw new Error("Space before `+`");return e&&{type:"OPERATOR",string:e}}()||function(){if(o("DocumentRef-"))return{type:"DOCUMENTREF",string:c()}}()||function(){if(o("LicenseRef-"))return{type:"LICENSEREF",string:c()}}()||(i=r,s=a(),-1!==e.indexOf(s)?{type:"LICENSE",string:s}:-1!==t.indexOf(s)?{type:"EXCEPTION",string:s}:void(r=i));var i,s}for(var u=[];i()&&(s(),i());){var f=l();if(!f)throw new Error("Unexpected `"+n[r]+"` at offset "+r);u.push(f)}return u}}function Pe(){return ye?ve:(ye=1,ve=function(e){var t=0;function n(){return t<e.length}function r(){return n()?e[t]:null}function i(){if(!n())throw new Error;t++}function o(e){var t=r();if(t&&"OPERATOR"===t.type&&e===t.string)return i(),t.string}function s(){var e=r();if(e&&"LICENSE"===e.type){i();var t={license:e.string};o("+")&&(t.plus=!0);var n=function(){if(o("WITH")){var e=r();if(e&&"EXCEPTION"===e.type)return i(),e.string;throw new Error("Expected exception after `WITH`")}}();return n&&(t.exception=n),t}}function a(e,t){return function n(){var r=t();if(r){if(!o(e))return r;var i=n();if(!i)throw new Error("Expected expression");return{left:r,conjunction:e.toLowerCase(),right:i}}}}var c=a("AND",function(){return function(){if(o("(")){var e=l();if(!o(")"))throw new Error("Expected `)`");return e}}()||function(){var e=t,n="",s=r();if("DOCUMENTREF"===s.type&&(i(),n+="DocumentRef-"+s.string+":",!o(":")))throw new Error("Expected `:` after `DocumentRef-...`");if("LICENSEREF"===(s=r()).type)return i(),{license:n+="LicenseRef-"+s.string};t=e}()||s()}),l=a("OR",c),u=l();if(!u||n())throw new Error("Syntax error");return u})}function Oe(){if(be)return Ee;be=1;var e=Ne(),t=Pe();return Ee=function(n){return t(e(n))}}function Ae(){if(Ce)return Se;Ce=1;var e=Oe(),t=function(){if(Le)return we;Le=1;var e=Oe(),t=_e;function n(t){try{return e(t),!0}catch(e){return!1}}function r(e,t){var n=t[0].length-e[0].length;return 0!==n?n:e[0].toUpperCase().localeCompare(t[0].toUpperCase())}var i=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(r),o=[function(e){return e.toUpperCase()},function(e){return e.trim()},function(e){return e.replace(/\./g,"")},function(e){return e.replace(/\s+/g,"")},function(e){return e.replace(/\s+/g,"-")},function(e){return e.replace("v","-")},function(e){return e.replace(/,?\s*(\d)/,"-$1")},function(e){return e.replace(/,?\s*(\d)/,"-$1.0")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(e){return e[0].toUpperCase()+e.slice(1)},function(e){return e.replace("/","-")},function(e){return e.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(e){return-1!==e.indexOf("3.0")?e+"-or-later":e+"-only"},function(e){return e+"only"},function(e){return e.replace(/(\d)$/,"-$1.0")},function(e){return e.replace(/(-| )?(\d)$/,"-$2-Clause")},function(e){return e.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(e){return e.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(e){return e.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(e){return e.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(e){return e.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(e){return e.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(e){return"CC-"+e},function(e){return"CC-"+e+"-4.0"},function(e){return e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(e){return"CC-"+e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],s=t.map(function(e){var t=/^(.*)-\d+\.\d+$/.exec(e);return t?[t[0],t[1]]:[e,null]}).reduce(function(e,t){var n=t[1];return e[n]=e[n]||[],e[n].push(t[0]),e},{}),a=Object.keys(s).map(function(e){return[e,s[e]]}).filter(function(e){return 1===e[1].length&&null!==e[0]&&"APL"!==e[0]}).map(function(e){return[e[0],e[1][0]]});s=void 0;var c=[["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(a).sort(r),l=function(e){for(var t=0;t<o.length;t++){var r=o[t](e).trim();if(r!==e&&n(r))return r}return null},u=function(e){for(var t=e.toUpperCase(),n=0;n<c.length;n++){var r=c[n];if(t.indexOf(r[0])>-1)return r[1]}return null},f=function(e,t){for(var n=0;n<i.length;n++){var r=i[n],o=r[0];if(e.indexOf(o)>-1){var s=t(e.replace(o,r[1]));if(null!==s)return s}}return null};return we=function(e,t){var r=void 0===(t=t||{}).upgrade||!!t.upgrade;function i(e){return r?function(e){return-1!==["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(e)?e+"-only":-1!==["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(e)?e.replace(/\+$/,"-or-later"):-1!==["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(e)?e+"-or-later":e}(e):e}if("string"!=typeof e||0===e.trim().length)throw Error("Invalid argument. Expected non-empty string.");if(n(e=e.trim()))return i(e);var o=e.replace(/\+$/,"").trim();if(n(o))return i(o);var s=l(e);return null!==s||null!==(s=f(e,function(e){return n(e)?e:l(e)}))||null!==(s=u(e))||null!==(s=f(e,u))?i(s):null}}(),n='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',r=/^SEE LICEN[CS]E IN (.+)$/;function i(e,t){return t.slice(0,e.length)===e}function o(e){if(e.hasOwnProperty("license")){var t=e.license;return i("LicenseRef",t)||i("DocumentRef",t)}return o(e.left)||o(e.right)}return Se=function(i){var s;try{s=e(i)}catch(e){var a;if("UNLICENSED"===i||"UNLICENCED"===i)return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(a=r.exec(i))return{validForOldPackages:!0,validForNewPackages:!0,inFile:a[1]};var c={validForOldPackages:!1,validForNewPackages:!1,warnings:[n]};if(0!==i.trim().length){var l=t(i);l&&c.warnings.push('license is similar to the valid expression "'+l+'"')}return c}return o(s)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[n]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}}var Te,xe,$e,Re,Fe,Ue,ke,Be,Ge,Me,je,ze={};function He(){if(Te)return ze;Te=1;var e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),t=e(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tracing=e.metrics=void 0;var t={hasSubscribers:!1};e.metrics=t,e.tracing=t}),n=e(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultPerf=void 0,e.defaultPerf="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date});Object.defineProperty(ze,"__esModule",{value:!0}),ze.LRUCache=void 0;var r=t(),i=n(),o=()=>r.metrics.hasSubscribers||r.tracing.hasSubscribers,s=new Set,a="object"==typeof process&&process?process:{},c=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?u:null:null,u=class extends Array{constructor(e){super(e),this.fill(0)}},f=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},p=class e{#e;#t;#n;#r;#i;#o;#s;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#u;#f;#p;#d;#h;#m;#g;#v;#y;#E;#b;#w;#L;#S;#C;#_;#I;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#w,autopurgeTimers:e.#L,sizes:e.#E,keyMap:e.#u,keyList:e.#f,valList:e.#p,next:e.#d,prev:e.#h,get head(){return e.#m},get tail(){return e.#g},free:e.#v,isBackgroundFetch:t=>e.#D(t),backgroundFetch:(t,n,r,i)=>e.#N(t,n,r,i),moveToTail:t=>e.#P(t),indexes:t=>e.#O(t),rindexes:t=>e.#A(t),isStale:t=>e.#T(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#o}get memoMethod(){return this.#s}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:n=0,ttl:r,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:p,updateAgeOnHas:d,allowStale:h,dispose:m,onInsert:g,disposeAfter:v,noDisposeOnSet:y,noUpdateTTL:E,maxSize:b=0,maxEntrySize:w=0,sizeCalculation:L,fetchMethod:S,memoMethod:C,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:I,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:N,ignoreFetchAbort:P,perf:O}=t;if(void 0!==O&&"function"!=typeof O?.now)throw new TypeError("perf option must have a now() method if specified");if(this.#a=O??i.defaultPerf,0!==n&&!c(n))throw new TypeError("max option must be a nonnegative integer");let A=n?l(n):Array;if(!A)throw new Error("invalid max value: "+n);if(this.#e=n,this.#t=b,this.maxEntrySize=w||this.#t,this.sizeCalculation=L,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==C&&"function"!=typeof C)throw new TypeError("memoMethod must be a function if defined");if(this.#s=C,void 0!==S&&"function"!=typeof S)throw new TypeError("fetchMethod must be a function if specified");if(this.#o=S,this.#C=!!S,this.#u=new Map,this.#f=Array.from({length:n}).fill(void 0),this.#p=Array.from({length:n}).fill(void 0),this.#d=new A(n),this.#h=new A(n),this.#m=0,this.#g=0,this.#v=f.create(n),this.#c=0,this.#l=0,"function"==typeof m&&(this.#n=m),"function"==typeof g&&(this.#r=g),"function"==typeof v?(this.#i=v,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#S=!!this.#n,this.#I=!!this.#r,this.#_=!!this.#i,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!E,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!N,this.ignoreFetchAbort=!!P,0!==this.maxEntrySize){if(0!==this.#t&&!c(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#x()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!I,this.updateAgeOnGet=!!p,this.updateAgeOnHas=!!d,this.ttlResolution=c(o)||0===o?o:1,this.ttlAutopurge=!!u,this.ttl=r||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#$()}if(0===this.#e&&0===this.ttl&&0===this.#t)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t="LRU_CACHE_UNBOUNDED";(e=>!s.has(e))(t)&&(s.add(t),((e,t,n,r)=>{"function"==typeof a.emitWarning?a.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)})("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#$(){let e=new u(this.#e),t=new u(this.#e);this.#w=e,this.#b=t;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#L=n,this.#R=(n,i,o=this.#a.now())=>{t[n]=0!==i?o:0,e[n]=i,r(n,i)},this.#F=n=>{t[n]=0!==e[n]?this.#a.now():0,r(n,e[n])};let r=this.ttlAutopurge?(e,t)=>{if(n?.[e]&&(clearTimeout(n[e]),n[e]=void 0),t&&0!==t&&n){let r=setTimeout(()=>{this.#T(e)&&this.#U(this.#f[e],"expire")},t+1);r.unref&&r.unref(),n[e]=r}}:()=>{};this.#k=(n,r)=>{if(e[r]){let s=e[r],a=t[r];if(!s||!a)return;n.ttl=s,n.start=a,n.now=i||o();let c=n.now-a;n.remainingTTL=s-c}};let i=0,o=()=>{let e=this.#a.now();if(this.ttlResolution>0){i=e;let t=setTimeout(()=>i=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let r=this.#u.get(n);if(void 0===r)return 0;let s=e[r],a=t[r];return s&&a?s-((i||o())-a):1/0},this.#T=n=>{let r=t[n],s=e[n];return!!s&&!!r&&(i||o())-r>s}}#F=()=>{};#k=()=>{};#R=()=>{};#T=()=>!1;#x(){let e=new u(this.#e);this.#l=0,this.#E=e,this.#B=t=>{this.#l-=e[t],e[t]=0},this.#G=(e,t,n,r)=>{if(this.#D(t))return 0;if(!c(n)){if(!r)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!c(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#M=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#l>n;)this.#j(!0)}this.#l+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#l)}}#B=e=>{};#M=(e,t,n)=>{};#G=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#O({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#g;this.#z(t)&&((e||!this.#T(t))&&(yield t),t!==this.#m);)t=this.#h[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#m;this.#z(t)&&((e||!this.#T(t))&&(yield t),t!==this.#g);)t=this.#d[t]}#z(e){return void 0!==e&&this.#u.get(this.#f[e])===e}*entries(){for(let e of this.#O())void 0!==this.#p[e]&&void 0!==this.#f[e]&&!this.#D(this.#p[e])&&(yield[this.#f[e],this.#p[e]])}*rentries(){for(let e of this.#A())void 0!==this.#p[e]&&void 0!==this.#f[e]&&!this.#D(this.#p[e])&&(yield[this.#f[e],this.#p[e]])}*keys(){for(let e of this.#O()){let t=this.#f[e];void 0!==t&&!this.#D(this.#p[e])&&(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#f[e];void 0!==t&&!this.#D(this.#p[e])&&(yield t)}}*values(){for(let e of this.#O())void 0!==this.#p[e]&&!this.#D(this.#p[e])&&(yield this.#p[e])}*rvalues(){for(let e of this.#A())void 0!==this.#p[e]&&!this.#D(this.#p[e])&&(yield this.#p[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#O()){let r=this.#p[n],i=this.#D(r)?r.__staleWhileFetching:r;if(void 0!==i&&e(i,this.#f[n],this))return this.#H(this.#f[n],t)}}forEach(e,t=this){for(let n of this.#O()){let r=this.#p[n],i=this.#D(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#f[n],this)}}rforEach(e,t=this){for(let n of this.#A()){let r=this.#p[n],i=this.#D(r)?r.__staleWhileFetching:r;void 0!==i&&e.call(t,i,this.#f[n],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#T(t)&&(this.#U(this.#f[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(void 0===t)return;let n=this.#p[t],r=this.#D(n)?n.__staleWhileFetching:n;if(void 0===r)return;let i={value:r};if(this.#w&&this.#b){let e=this.#w[t],n=this.#b[t];if(e&&n){let t=e-(this.#a.now()-n);i.ttl=t,i.start=Date.now()}}return this.#E&&(i.size=this.#E[t]),i}dump(){let e=[];for(let t of this.#O({allowStale:!0})){let n=this.#f[t],r=this.#p[t],i=this.#D(r)?r.__staleWhileFetching:r;if(void 0===i||void 0===n)continue;let o={value:i};if(this.#w&&this.#b){o.ttl=this.#w[t];let e=this.#a.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#E&&(o.size=this.#E[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#a.now()-e}this.#q(t,n.value,n)}}set(e,t,n={}){let{status:i=(r.metrics.hasSubscribers?{}:void 0)}=n;n.status=i,i&&(i.op="set",i.key=e,void 0!==t&&(i.value=t),i.cache=this);let o=this.#q(e,t,n);return i&&r.metrics.hasSubscribers&&r.metrics.publish(i),o}#q(e,t,n,r){let{ttl:i=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=n;if(void 0===t)return c&&(c.set="deleted"),this.delete(e),this;let{noUpdateTTL:l=this.noUpdateTTL}=n,u=this.#D(t);c&&!u&&(c.value=t);let f=this.#G(e,t,n.size||0,a,c);if(this.maxEntrySize&&f>this.maxEntrySize)return this.#U(e,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let p=0===this.#c?void 0:this.#u.get(e);if(void 0===p)p=0===this.#c?this.#g:0!==this.#v.length?this.#v.pop():this.#c===this.#e?this.#j(!1):this.#c,this.#f[p]=e,this.#p[p]=t,this.#u.set(e,p),this.#d[this.#g]=p,this.#h[p]=this.#g,this.#g=p,this.#c++,this.#M(p,f,c),c&&(c.set="add"),l=!1,this.#I&&!u&&this.#r?.(t,e,"add");else{this.#P(p);let n=this.#p[p];if(t!==n){if(!s)if(this.#D(n)){n!==r&&n.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:i}=n;void 0!==i&&i!==t&&(this.#S&&this.#n?.(i,e,"set"),this.#_&&this.#y?.push([i,e,"set"]))}else this.#S&&this.#n?.(n,e,"set"),this.#_&&this.#y?.push([n,e,"set"]);if(this.#B(p),this.#M(p,f,c),this.#p[p]=t,!u){let r=n&&this.#D(n)?n.__staleWhileFetching:n,i=void 0===r?"add":t!==r?"replace":"update";c&&(c.set=i,void 0!==r&&(c.oldValue=r)),this.#I&&this.onInsert?.(t,e,i)}}else u||(c&&(c.set="update"),this.#I&&this.onInsert?.(t,e,"update"))}if(0!==i&&!this.#w&&this.#$(),this.#w&&(l||this.#R(p,i,o),c&&this.#k(c,p)),!s&&this.#_&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}return this}pop(){try{for(;this.#c;){let e=this.#p[this.#m];if(this.#j(!0),this.#D(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#_&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}}}#j(e){let t=this.#m,n=this.#f[t],r=this.#p[t],i=this.#D(r);i&&r.__abortController.abort(new Error("evicted"));let o=i?r.__staleWhileFetching:r;return(this.#S||this.#_)&&void 0!==o&&(this.#S&&this.#n?.(o,n,"evict"),this.#_&&this.#y?.push([o,n,"evict"])),this.#B(t),this.#L?.[t]&&(clearTimeout(this.#L[t]),this.#L[t]=void 0),e&&(this.#f[t]=void 0,this.#p[t]=void 0,this.#v.push(t)),1===this.#c?(this.#m=this.#g=0,this.#v.length=0):this.#m=this.#d[t],this.#u.delete(n),this.#c--,t}has(e,t={}){let{status:n=(r.metrics.hasSubscribers?{}:void 0)}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#V(e,t);return r.metrics.hasSubscribers&&r.metrics.publish(n),i}#V(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(void 0!==i){let e=this.#p[i];if(this.#D(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#T(i))return n&&this.#F(i),r&&(r.has="hit",this.#k(r,i)),!0;r&&(r.has="stale",this.#k(r,i))}else r&&(r.has="miss");return!1}peek(e,t={}){let{status:n=(o()?{}:void 0)}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#W(e,t);return r.metrics.hasSubscribers&&r.metrics.publish(n),i}#W(e,t){let{status:n,allowStale:r=this.allowStale}=t,i=this.#u.get(e);if(void 0===i||!r&&this.#T(i))return void(n&&(n.peek=void 0===i?"miss":"stale"));let o=this.#p[i],s=this.#D(o)?o.__staleWhileFetching:o;return n&&(void 0!==s?(n.peek="hit",n.value=s):n.peek="miss"),s}#N(e,t,n,r){let i=void 0===t?void 0:this.#p[t];if(this.#D(i))return i;let o=new AbortController,{signal:s}=n;s?.addEventListener("abort",()=>o.abort(s.reason),{signal:o.signal});let a={signal:o.signal,options:n,context:r},c=(r,i=!1)=>{let{aborted:s}=o.signal,c=n.ignoreFetchAbort&&void 0!==r,f=n.ignoreFetchAbort||!(!n.allowStaleOnFetchAbort||void 0===r);if(n.status&&(s&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,c&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),s&&!c&&!i)return l(o.signal.reason,f);let p=u,d=this.#p[t];return(d===u||void 0===d&&c&&i)&&(void 0===r?void 0!==p.__staleWhileFetching?this.#p[t]=p.__staleWhileFetching:this.#U(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#q(e,r,a.options,p))),r},l=(r,i)=>{let{aborted:s}=o.signal,a=s&&n.allowStaleOnFetchAbort,c=a||n.allowStaleOnFetchRejection,l=c||n.noDeleteOnFetchRejection,f=u;if(this.#p[t]===u&&(!l||!i&&void 0===f.__staleWhileFetching?this.#U(e,"fetch"):a||(this.#p[t]=f.__staleWhileFetching)),c)return n.status&&void 0!==f.__staleWhileFetching&&(n.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw r};n.status&&(n.status.fetchDispatched=!0);let u=new Promise((t,r)=>{let s=this.#o?.(e,i,a);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))}),s&&s instanceof Promise?s.then(e=>t(void 0===e?void 0:e),r):void 0!==s&&t(s)}).then(c,e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),l(e,!1))),f=Object.assign(u,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.#q(e,f,{...a.options,status:void 0}),t=this.#u.get(e)):this.#p[t]=f,f}#D(e){if(!this.#C)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=r.tracing.hasSubscribers,{status:i=(o()?{}:void 0)}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#K(e,t);return i&&n&&(i.trace=!0,r.tracing.tracePromise(()=>s,i).catch(()=>{})),s}async#K(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:h,forceRefresh:m=!1,status:g,signal:v}=t;if(g&&(g.op="fetch",g.key=e,m&&(g.forceRefresh=!0),g.cache=this),!this.#C)return g&&(g.fetch="get"),this.#H(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let y={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:d,ignoreFetchAbort:p,status:g,signal:v},E=this.#u.get(e);if(void 0===E){g&&(g.fetch="miss");let t=this.#N(e,E,y,h);return t.__returned=t}{let t=this.#p[E];if(this.#D(t)){let e=n&&void 0!==t.__staleWhileFetching;return g&&(g.fetch="inflight",e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#T(E);if(!m&&!i)return g&&(g.fetch="hit"),this.#P(E),r&&this.#F(E),g&&this.#k(g,E),t;let o=this.#N(e,E,y,h),s=void 0!==o.__staleWhileFetching&&n;return g&&(g.fetch=i?"stale":"refresh",s&&i&&(g.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}forceFetch(e,t={}){let n=r.tracing.hasSubscribers,{status:i=(o()?{}:void 0)}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#Z(e,t);return i&&n&&(i.trace=!0,r.tracing.tracePromise(()=>s,i).catch(()=>{})),s}async#Z(e,t={}){let n=await this.#K(e,t);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=(r.metrics.hasSubscribers?{}:void 0)}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let i=this.#Y(e,t);return n&&(n.value=i),r.metrics.hasSubscribers&&r.metrics.publish(n),i}#Y(e,t={}){let n=this.#s;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,status:i,forceRefresh:o,...s}=t;i&&o&&(i.forceRefresh=!0);let a=this.#H(e,s),c=o||void 0===a;if(i&&(i.memo=c?"miss":"hit",c||(i.value=a)),!c)return a;let l=n(e,a,{options:s,context:r});return i&&(i.value=l),this.#q(e,l,s),l}get(e,t={}){let{status:n=(r.metrics.hasSubscribers?{}:void 0)}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#H(e,t);return n&&(void 0!==i&&(n.value=i),r.metrics.hasSubscribers&&r.metrics.publish(n)),i}#H(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#u.get(e);if(void 0===s)return void(o&&(o.get="miss"));let a=this.#p[s],c=this.#D(a);return o&&this.#k(o,s),this.#T(s)?c?(o&&(o.get="stale-fetching"),n&&void 0!==a.__staleWhileFetching?(o&&(o.returnedStale=!0),a.__staleWhileFetching):void 0):(i||this.#U(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),a):void 0):(o&&(o.get=c?"fetching":"hit"),this.#P(s),r&&this.#F(s),c?a.__staleWhileFetching:a)}#X(e,t){this.#h[t]=e,this.#d[e]=t}#P(e){e!==this.#g&&(e===this.#m?this.#m=this.#d[e]:this.#X(this.#h[e],this.#d[e]),this.#X(this.#g,e),this.#g=e)}delete(e){return this.#U(e,"delete")}#U(e,t){r.metrics.hasSubscribers&&r.metrics.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(0!==this.#c){let r=this.#u.get(e);if(void 0!==r)if(this.#L?.[r]&&(clearTimeout(this.#L?.[r]),this.#L[r]=void 0),n=!0,1===this.#c)this.#J(t);else{this.#B(r);let n=this.#p[r];if(this.#D(n)?n.__abortController.abort(new Error("deleted")):(this.#S||this.#_)&&(this.#S&&this.#n?.(n,e,t),this.#_&&this.#y?.push([n,e,t])),this.#u.delete(e),this.#f[r]=void 0,this.#p[r]=void 0,r===this.#g)this.#g=this.#h[r];else if(r===this.#m)this.#m=this.#d[r];else{let e=this.#h[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#h[t]=this.#h[r]}this.#c--,this.#v.push(r)}}if(this.#_&&this.#y?.length){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}return n}clear(){return this.#J("delete")}#J(e){for(let t of this.#A({allowStale:!0})){let n=this.#p[t];if(this.#D(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#f[t];this.#S&&this.#n?.(n,r,e),this.#_&&this.#y?.push([n,r,e])}}if(this.#u.clear(),this.#p.fill(void 0),this.#f.fill(void 0),this.#w&&this.#b){this.#w.fill(0),this.#b.fill(0);for(let e of this.#L??[])void 0!==e&&clearTimeout(e);this.#L?.fill(void 0)}if(this.#E&&this.#E.fill(0),this.#m=0,this.#g=0,this.#v.length=0,this.#l=0,this.#c=0,this.#_&&this.#y){let e,t=this.#y;for(;e=t?.shift();)this.#i?.(...e)}}};return ze.LRUCache=p,ze}function qe(){if(Fe)return Re;Fe=1;const e=(e,t,n)=>{const r=e.indexOf(n);return e.lastIndexOf(t,r>-1?r:1/0)},t=e=>{try{return new URL(e)}catch{}};return Re=(n,r)=>{const i=r?((e,t)=>{const n=e.indexOf(":"),r=e.slice(0,n+1);if(Object.prototype.hasOwnProperty.call(t,r))return e;if("://"===e.substr(n,3))return e;const i=e.indexOf("@");return i>-1?i>n?`git+ssh://${e}`:e:`${e.slice(0,n+1)}//${e.slice(n+1)}`})(n,r):n;return t(i)||t((t=>{const n=e(t,"@","#"),r=e(t,":","#");return r>n&&(t=t.slice(0,r)+"/"+t.slice(r+1)),-1===e(t,":","#")&&-1===t.indexOf("//")&&(t=`git+ssh://${t}`),t})(i))}}function Ve(){if(ke)return Ue;ke=1;const e=qe();retur