diff --git a/chompfile.toml b/chompfile.toml index 6cb6e96..0a778ed 100644 --- a/chompfile.toml +++ b/chompfile.toml @@ -4,9 +4,9 @@ extensions = ['chomp@0.1:npm'] [[task]] name = 'build' -deps = ['src/extension.mjs', 'npm:install'] +deps = ['src/extension.mjs', 'importmap.json', 'rollup-config.mjs'] target = 'dist/extension.js' -run = 'rollup -c' +run = 'jspm build -r @babel/helper-module-transforms=@babel/helper-module-transforms@7.21.2 --config rollup-config.mjs' [[task]] name = 'test' @@ -15,4 +15,4 @@ run = 'code --extensionDevelopmentPath=$JSPM_VSCODE_PATH --extensionDevelopmentK [[task]] name = 'publish' -run = 'vsce publish' +run = 'vsce publish' \ No newline at end of file diff --git a/dist/extension.js b/dist/extension.js index 7903838..e861960 100644 --- a/dist/extension.js +++ b/dist/extension.js @@ -1,65 +1,64 @@ -var e$1e={};const t$1j=/^([~\^])?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?$/;const r$1x=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(\+[\da-z-]+)?$/i;e$1e.semverRegEx=r$1x;e$1e.shortSemverRegEx=t$1j;const s$1k=Symbol("major");const i$1d=Symbol("minor");const n$1v=Symbol("patch");const h$_=Symbol("pre");const a$1s=Symbol("build");const o$1x=Symbol("tag");let m$10=/^\d+$/;class Semver{constructor(e){let t=e.match(r$1x);if(t){this[s$1k]=parseInt(t[1],10);this[i$1d]=parseInt(t[2],10);this[n$1v]=parseInt(t[3],10);this[h$_]=t[4]&&t[4].split(".");this[a$1s]=t[5];}else this[o$1x]=e;}get major(){return this[s$1k]}get minor(){return this[i$1d]}get patch(){return this[n$1v]}get pre(){return this[h$_]}get build(){return this[a$1s]}get tag(){return this[o$1x]}gt(e){return 1===Semver.compare(this,e)}lt(e){return -1===Semver.compare(this,e)}eq(e){e instanceof Semver||(e=new Semver(e));if(this[o$1x]&&e[o$1x])return this[o$1x]===e[o$1x];if(this[o$1x]||e[o$1x])return false;if(this[s$1k]!==e[s$1k])return false;if(this[i$1d]!==e[i$1d])return false;if(this[n$1v]!==e[n$1v])return false;if(void 0===this[h$_]&&void 0===e[h$_])return true;if(void 0===this[h$_]||void 0===e[h$_])return false;if(this[h$_].length!==e[h$_].length)return false;for(let t=0;tt[s$1k]?1:-1:e[i$1d]!==t[i$1d]?e[i$1d]>t[i$1d]?1:-1:e[n$1v]!==t[n$1v]?e[n$1v]>t[n$1v]?1:-1:e[h$_]||t[h$_]?e[h$_]?t[h$_]?prereleaseCompare(e[h$_],t[h$_]):-1:1:0}}e$1e.Semver=Semver;function prereleaseCompare(e,t){for(let r=0,s=Math.min(e.length,t.length);rparseInt(t[r],10)?1:-1:e[r]>t[r]?1:-1}return e.length===t.length?0:e.length>t.length?1:-1}const u$1g=0;const c$1d=1;const v$W=2;const l$1h=3;const S$G=Symbol("type");const g$S=Symbol("version");class SemverRange{constructor(e){if("*"===e||""===e){this[S$G]=u$1g;return}let r=e.match(t$1j);if(r){r[1]&&(e=e.substr(1));if(void 0===r[3]){this[g$S]=new Semver(e+".0.0");this[S$G]=c$1d;}else {this[g$S]=new Semver(e+".0");"^"===r[1]&&"0"!==r[2]?this[S$G]=c$1d:this[S$G]=v$W;}this[g$S][h$_]=this[g$S][h$_]||[];}else if(e.startsWith("^^")){this[g$S]=new Semver(e.substr(2));this[S$G]=c$1d;}else if("^"===e[0]){this[g$S]=new Semver(e.substr(1));0===this[g$S][s$1k]?0===this[g$S][i$1d]?this[S$G]=l$1h:this[S$G]=v$W:this[S$G]=c$1d;}else if("~"===e[0]){this[g$S]=new Semver(e.substr(1));this[S$G]=v$W;}else {this[g$S]=new Semver(e);this[S$G]=l$1h;}this[g$S][o$1x]&&this[S$G]!==l$1h&&(this[S$G]=l$1h);}get isExact(){return this[S$G]===l$1h}get isExactSemver(){return this[S$G]===l$1h&&void 0===this.version[o$1x]}get isExactTag(){return this[S$G]===l$1h&&void 0!==this.version[o$1x]}get isStable(){return this[S$G]===v$W}get isMajor(){return this[S$G]===c$1d}get isWildcard(){return this[S$G]===u$1g}get type(){switch(this[S$G]){case u$1g:return "wildcard";case c$1d:return "major";case v$W:return "stable";case l$1h:return "exact"}}get version(){return this[g$S]}gt(e){return 1===SemverRange.compare(this,e)}lt(e){return -1===SemverRange.compare(this,e)}eq(e){return 0===SemverRange.compare(this,e)}has(e,t=false){e instanceof Semver||(e=new Semver(e));return this[S$G]===u$1g?t||!e[h$_]&&!e[o$1x]:this[S$G]===l$1h?this[g$S].eq(e):!e[o$1x]&&(this[g$S][s$1k]===e[s$1k]&&(!(this[S$G]===c$1d?this[g$S][i$1d]>e[i$1d]:this[g$S][i$1d]!==e[i$1d])&&((this[S$G]===c$1d&&this[g$S][i$1d]!==e[i$1d]||!(this[g$S][n$1v]>e[n$1v]))&&(void 0===e[h$_]||0===e[h$_].length||(void 0===this[g$S][h$_]||0===this[g$S][h$_].length?t:(false!==t||this[g$S][i$1d]===e[i$1d]&&this[g$S][n$1v]===e[n$1v])&&1!==prereleaseCompare(this[g$S][h$_],e[h$_]))))))}contains(e){e instanceof SemverRange||(e=new SemverRange(e));return this[S$G]===u$1g||e[S$G]!==u$1g&&(e[S$G]>=this[S$G]&&this.has(e[g$S],true))}intersect(e){e instanceof SemverRange||(e=new SemverRange(e));if(this[S$G]===u$1g&&e[S$G]===u$1g)return this;if(this[S$G]===u$1g)return e;if(e[S$G]===u$1g)return this;if(this[S$G]===l$1h)return e.has(this[g$S],true)?this:void 0;if(e[S$G]===l$1h)return this.has(e[g$S],true)?e:void 0;let t,r,s;if(e[g$S].gt(this[g$S])){t=e;r=this;s=true;}else {t=this;r=e;s=false;}if(!r.has(t[g$S],true))return;if(r[S$G]===c$1d)return s?e:this;let i=new SemverRange(t[g$S].toString());i[S$G]=v$W;return i}bestMatch(e,t=false){let r;e.forEach((e=>{e instanceof Semver||(e=new Semver(e));this.has(e,t)&&(r?1===Semver.compare(e,r)&&(r=e):r=e);}));return r}toString(){let e=this[g$S];switch(this[S$G]){case u$1g:return "*";case c$1d:return 0===e[s$1k]&&0===e[i$1d]&&0===e[n$1v]?"0":e[h$_]&&0===e[h$_].length&&0===e[n$1v]?"^"+e[s$1k]+"."+e[i$1d]:"^"+e.toString();case v$W:return e[h$_]&&0===e[h$_].length&&0===e[n$1v]||0===e[s$1k]&&0===e[i$1d]?e[s$1k]+"."+e[i$1d]:"~"+e.toString();case l$1h:return e.toString()}}toJSON(){return this.toString()}static match(e,t,r=false){t instanceof Semver||(t=new Semver(t));return t.matches(e,r)}static isValid(e){let t=new SemverRange(e);return t[S$G]!==l$1h||void 0===t[g$S][o$1x]}static compare(e,t){e instanceof SemverRange||(e=new SemverRange(e));t instanceof SemverRange||(t=new SemverRange(t));if(e[S$G]===u$1g&&t[S$G]===u$1g)return 0;if(e[S$G]===u$1g)return 1;if(t[S$G]===u$1g)return -1;let r=Semver.compare(e[g$S],t[g$S]);return 0!==r?r:e[S$G]===t[S$G]?0:e[S$G]>t[S$G]?1:-1}}e$1e.SemverRange=SemverRange;const p$19=e$1e.Semver,R$v=e$1e.SemverRange; +var e$1f={};const t$1l=/^([~\^])?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?$/;const r$1v=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(\+[\da-z-]+)?$/i;e$1f.semverRegEx=r$1v;e$1f.shortSemverRegEx=t$1l;const s$1k=Symbol("major");const i$1c=Symbol("minor");const n$1x=Symbol("patch");const h$$=Symbol("pre");const a$1v=Symbol("build");const o$1x=Symbol("tag");let m$12=/^\d+$/;class Semver{constructor(e){let t=e.match(r$1v);if(t){this[s$1k]=parseInt(t[1],10);this[i$1c]=parseInt(t[2],10);this[n$1x]=parseInt(t[3],10);this[h$$]=t[4]&&t[4].split(".");this[a$1v]=t[5];}else this[o$1x]=e;}get major(){return this[s$1k]}get minor(){return this[i$1c]}get patch(){return this[n$1x]}get pre(){return this[h$$]}get build(){return this[a$1v]}get tag(){return this[o$1x]}gt(e){return 1===Semver.compare(this,e)}lt(e){return -1===Semver.compare(this,e)}eq(e){e instanceof Semver||(e=new Semver(e));if(this[o$1x]&&e[o$1x])return this[o$1x]===e[o$1x];if(this[o$1x]||e[o$1x])return false;if(this[s$1k]!==e[s$1k])return false;if(this[i$1c]!==e[i$1c])return false;if(this[n$1x]!==e[n$1x])return false;if(void 0===this[h$$]&&void 0===e[h$$])return true;if(void 0===this[h$$]||void 0===e[h$$])return false;if(this[h$$].length!==e[h$$].length)return false;for(let t=0;tt[s$1k]?1:-1:e[i$1c]!==t[i$1c]?e[i$1c]>t[i$1c]?1:-1:e[n$1x]!==t[n$1x]?e[n$1x]>t[n$1x]?1:-1:e[h$$]||t[h$$]?e[h$$]?t[h$$]?prereleaseCompare(e[h$$],t[h$$]):-1:1:0}}e$1f.Semver=Semver;function prereleaseCompare(e,t){for(let r=0,s=Math.min(e.length,t.length);rparseInt(t[r],10)?1:-1:e[r]>t[r]?1:-1}return e.length===t.length?0:e.length>t.length?1:-1}const u$1h=0;const c$1e=1;const v$V=2;const l$1f=3;const S$G=Symbol("type");const g$S=Symbol("version");class SemverRange{constructor(e){if("*"===e||""===e){this[S$G]=u$1h;return}let r=e.match(t$1l);if(r){r[1]&&(e=e.substr(1));if(void 0===r[3]){this[g$S]=new Semver(e+".0.0");this[S$G]=c$1e;}else {this[g$S]=new Semver(e+".0");"^"===r[1]&&"0"!==r[2]?this[S$G]=c$1e:this[S$G]=v$V;}this[g$S][h$$]=this[g$S][h$$]||[];}else if(e.startsWith("^^")){this[g$S]=new Semver(e.substr(2));this[S$G]=c$1e;}else if("^"===e[0]){this[g$S]=new Semver(e.substr(1));0===this[g$S][s$1k]?0===this[g$S][i$1c]?this[S$G]=l$1f:this[S$G]=v$V:this[S$G]=c$1e;}else if("~"===e[0]){this[g$S]=new Semver(e.substr(1));this[S$G]=v$V;}else {this[g$S]=new Semver(e);this[S$G]=l$1f;}this[g$S][o$1x]&&this[S$G]!==l$1f&&(this[S$G]=l$1f);}get isExact(){return this[S$G]===l$1f}get isExactSemver(){return this[S$G]===l$1f&&void 0===this.version[o$1x]}get isExactTag(){return this[S$G]===l$1f&&void 0!==this.version[o$1x]}get isStable(){return this[S$G]===v$V}get isMajor(){return this[S$G]===c$1e}get isWildcard(){return this[S$G]===u$1h}get type(){switch(this[S$G]){case u$1h:return "wildcard";case c$1e:return "major";case v$V:return "stable";case l$1f:return "exact"}}get version(){return this[g$S]}gt(e){return 1===SemverRange.compare(this,e)}lt(e){return -1===SemverRange.compare(this,e)}eq(e){return 0===SemverRange.compare(this,e)}has(e,t=false){e instanceof Semver||(e=new Semver(e));return this[S$G]===u$1h?t||!e[h$$]&&!e[o$1x]:this[S$G]===l$1f?this[g$S].eq(e):!e[o$1x]&&(this[g$S][s$1k]===e[s$1k]&&(!(this[S$G]===c$1e?this[g$S][i$1c]>e[i$1c]:this[g$S][i$1c]!==e[i$1c])&&((this[S$G]===c$1e&&this[g$S][i$1c]!==e[i$1c]||!(this[g$S][n$1x]>e[n$1x]))&&(void 0===e[h$$]||0===e[h$$].length||(void 0===this[g$S][h$$]||0===this[g$S][h$$].length?t:(false!==t||this[g$S][i$1c]===e[i$1c]&&this[g$S][n$1x]===e[n$1x])&&1!==prereleaseCompare(this[g$S][h$$],e[h$$]))))))}contains(e){e instanceof SemverRange||(e=new SemverRange(e));return this[S$G]===u$1h||e[S$G]!==u$1h&&(e[S$G]>=this[S$G]&&this.has(e[g$S],true))}intersect(e){e instanceof SemverRange||(e=new SemverRange(e));if(this[S$G]===u$1h&&e[S$G]===u$1h)return this;if(this[S$G]===u$1h)return e;if(e[S$G]===u$1h)return this;if(this[S$G]===l$1f)return e.has(this[g$S],true)?this:void 0;if(e[S$G]===l$1f)return this.has(e[g$S],true)?e:void 0;let t,r,s;if(e[g$S].gt(this[g$S])){t=e;r=this;s=true;}else {t=this;r=e;s=false;}if(!r.has(t[g$S],true))return;if(r[S$G]===c$1e)return s?e:this;let i=new SemverRange(t[g$S].toString());i[S$G]=v$V;return i}bestMatch(e,t=false){let r;e.forEach((e=>{e instanceof Semver||(e=new Semver(e));this.has(e,t)&&(r?1===Semver.compare(e,r)&&(r=e):r=e);}));return r}toString(){let e=this[g$S];switch(this[S$G]){case u$1h:return "*";case c$1e:return 0===e[s$1k]&&0===e[i$1c]&&0===e[n$1x]?"0":e[h$$]&&0===e[h$$].length&&0===e[n$1x]?"^"+e[s$1k]+"."+e[i$1c]:"^"+e.toString();case v$V:return e[h$$]&&0===e[h$$].length&&0===e[n$1x]||0===e[s$1k]&&0===e[i$1c]?e[s$1k]+"."+e[i$1c]:"~"+e.toString();case l$1f:return e.toString()}}toJSON(){return this.toString()}static match(e,t,r=false){t instanceof Semver||(t=new Semver(t));return t.matches(e,r)}static isValid(e){let t=new SemverRange(e);return t[S$G]!==l$1f||void 0===t[g$S][o$1x]}static compare(e,t){e instanceof SemverRange||(e=new SemverRange(e));t instanceof SemverRange||(t=new SemverRange(t));if(e[S$G]===u$1h&&t[S$G]===u$1h)return 0;if(e[S$G]===u$1h)return 1;if(t[S$G]===u$1h)return -1;let r=Semver.compare(e[g$S],t[g$S]);return 0!==r?r:e[S$G]===t[S$G]?0:e[S$G]>t[S$G]?1:-1}}e$1f.SemverRange=SemverRange;const p$19=e$1f.Semver,R$w=e$1f.SemverRange; -var e$1d=[];var n$1u=false;var r$1w;var a$1r=-1;function cleanUpNextTick(){if(n$1u&&r$1w){n$1u=false;r$1w.length?e$1d=r$1w.concat(e$1d):a$1r=-1;e$1d.length&&drainQueue();}}function drainQueue(){if(!n$1u){var t=setTimeout(cleanUpNextTick,0);n$1u=true;var o=e$1d.length;while(o){r$1w=e$1d;e$1d=[];while(++a$1r1)for(var t=1;tDate.now()-K$q;}function uptime(){return J$n.now()/1e3}var X$m=1e9;function hrtime(e){var n=Math.floor(.001*(Date.now()-J$n.now()));var r=.001*J$n.now();var a=Math.floor(r)+n;var t=Math.floor(r%1*1e9);if(e){a-=e[0];t-=e[1];if(t<0){a--;t+=X$m;}}return [a,t]}hrtime.bigint=function(e){var n=hrtime(e);return "undefined"===typeof BigInt?n[0]*X$m+n[1]:BigInt(n[0]*X$m)+BigInt(n[1])};var Y$m=10;var Z$l={};var $$o=0;function on$1(){return se$e}var ee$g=on$1;var ne$f=on$1;var re$f=on$1;var ae$f=on$1;var te$f=on$1;var oe$f=noop$1;var ie$f=on$1;var ve$d=on$1;function listeners(){return []}var se$e={version:u$1f,versions:c$1c,arch:o$1w,platform:i$1c,release:p$18,_rawDebug:d$15,moduleLoadList:g$R,binding:f$1g,_linkedBinding:m$$,_events:Z$l,_eventsCount:$$o,_maxListeners:Y$m,on:on$1,addListener:ee$g,once:ne$f,off:re$f,removeListener:ae$f,removeAllListeners:te$f,emit:oe$f,prependListener:ie$f,prependOnceListener:ve$d,listeners:listeners,domain:h$Z,_exiting:_$K,config:b$T,dlopen:w$H,uptime:uptime,_getActiveRequests:_getActiveRequests,_getActiveHandles:_getActiveHandles,reallyExit:x$F,_kill:k$F,cpuUsage:cpuUsage,resourceUsage:E$D,memoryUsage:U$w,kill:A$y,exit:C$B,openStdin:T$x,allowedNodeEnvironmentFlags:y$T,assert:assert$1,features:L$s,_fatalExceptions:I$z,setUncaughtExceptionCaptureCallback:N$u,hasUncaughtExceptionCaptureCallback:hasUncaughtExceptionCaptureCallback,emitWarning:emitWarning,nextTick:nextTick,_tickCallback:P$w,_debugProcess:D$A,_debugEnd:H$s,_startProfilerIdleNotifier:M$z,_stopProfilerIdleNotifier:q$r,stdout:B$z,stdin:S$F,stderr:R$u,abort:O$y,umask:umask,chdir:chdir,cwd:cwd,env:v$V,title:t$1i,argv:s$1j,execArgv:l$1g,pid:Q$m,ppid:F$v,execPath:W$r,debugPort:G$o,hrtime:hrtime,argv0:V$s,_preload_modules:j$z,setSourceMapsEnabled:z$r}; +var e$1e=[];var n$1w=false;var r$1u;var a$1u=-1;function cleanUpNextTick(){if(n$1w&&r$1u){n$1w=false;r$1u.length?e$1e=r$1u.concat(e$1e):a$1u=-1;e$1e.length&&drainQueue();}}function drainQueue(){if(!n$1w){var t=setTimeout(cleanUpNextTick,0);n$1w=true;var o=e$1e.length;while(o){r$1u=e$1e;e$1e=[];while(++a$1u1)for(var t=1;tDate.now()-K$q;}function uptime(){return J$n.now()/1e3}var X$m=1e9;function hrtime(e){var n=Math.floor(.001*(Date.now()-J$n.now()));var r=.001*J$n.now();var a=Math.floor(r)+n;var t=Math.floor(r%1*1e9);if(e){a-=e[0];t-=e[1];if(t<0){a--;t+=X$m;}}return [a,t]}hrtime.bigint=function(e){var n=hrtime(e);return "undefined"===typeof BigInt?n[0]*X$m+n[1]:BigInt(n[0]*X$m)+BigInt(n[1])};var Y$m=10;var Z$l={};var $$o=0;function on$1(){return se$f}var ee$g=on$1;var ne$f=on$1;var re$f=on$1;var ae$e=on$1;var te$f=on$1;var oe$e=noop$1;var ie$f=on$1;var ve$b=on$1;function listeners(){return []}var se$f={version:u$1g,versions:c$1d,arch:o$1w,platform:i$1b,release:p$18,_rawDebug:d$17,moduleLoadList:g$R,binding:f$1i,_linkedBinding:m$11,_events:Z$l,_eventsCount:$$o,_maxListeners:Y$m,on:on$1,addListener:ee$g,once:ne$f,off:re$f,removeListener:ae$e,removeAllListeners:te$f,emit:oe$e,prependListener:ie$f,prependOnceListener:ve$b,listeners:listeners,domain:h$_,_exiting:_$L,config:b$T,dlopen:w$I,uptime:uptime,_getActiveRequests:_getActiveRequests,_getActiveHandles:_getActiveHandles,reallyExit:x$F,_kill:k$F,cpuUsage:cpuUsage,resourceUsage:E$F,memoryUsage:U$w,kill:A$x,exit:C$B,openStdin:T$w,allowedNodeEnvironmentFlags:y$S,assert:assert$1,features:L$t,_fatalExceptions:I$A,setUncaughtExceptionCaptureCallback:N$u,hasUncaughtExceptionCaptureCallback:hasUncaughtExceptionCaptureCallback,emitWarning:emitWarning,nextTick:nextTick,_tickCallback:P$x,_debugProcess:D$y,_debugEnd:H$s,_startProfilerIdleNotifier:M$A,_stopProfilerIdleNotifier:q$r,stdout:B$y,stdin:S$F,stderr:R$v,abort:O$z,umask:umask,chdir:chdir,cwd:cwd,env:v$U,title:t$1k,argv:s$1j,execArgv:l$1e,pid:Q$m,ppid:F$v,execPath:W$s,debugPort:G$o,hrtime:hrtime,argv0:V$s,_preload_modules:j$A,setSourceMapsEnabled:z$r}; -var r$1u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var t$1h={};var n$1t=se$e;t$1h=t$1h=SemVer;var o$1v;o$1v="object"===typeof n$1t&&n$1t.env&&n$1t.env.NODE_DEBUG&&/\bsemver\b/i.test(n$1t.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e);}:function(){};t$1h.SEMVER_SPEC_VERSION="2.0.0";var a$1q=256;var i$1b=Number.MAX_SAFE_INTEGER||9007199254740991;var s$1i=16;var p$17=t$1h.re=[];var c$1b=t$1h.src=[];var l$1f=t$1h.tokens={};var E$C=0;function tok(e){l$1f[e]=E$C++;}tok("NUMERICIDENTIFIER");c$1b[l$1f.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");c$1b[l$1f.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");c$1b[l$1f.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");c$1b[l$1f.MAINVERSION]="("+c$1b[l$1f.NUMERICIDENTIFIER]+")\\."+"("+c$1b[l$1f.NUMERICIDENTIFIER]+")\\."+"("+c$1b[l$1f.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");c$1b[l$1f.MAINVERSIONLOOSE]="("+c$1b[l$1f.NUMERICIDENTIFIERLOOSE]+")\\."+"("+c$1b[l$1f.NUMERICIDENTIFIERLOOSE]+")\\."+"("+c$1b[l$1f.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");c$1b[l$1f.PRERELEASEIDENTIFIER]="(?:"+c$1b[l$1f.NUMERICIDENTIFIER]+"|"+c$1b[l$1f.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");c$1b[l$1f.PRERELEASEIDENTIFIERLOOSE]="(?:"+c$1b[l$1f.NUMERICIDENTIFIERLOOSE]+"|"+c$1b[l$1f.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");c$1b[l$1f.PRERELEASE]="(?:-("+c$1b[l$1f.PRERELEASEIDENTIFIER]+"(?:\\."+c$1b[l$1f.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");c$1b[l$1f.PRERELEASELOOSE]="(?:-?("+c$1b[l$1f.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+c$1b[l$1f.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");c$1b[l$1f.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");c$1b[l$1f.BUILD]="(?:\\+("+c$1b[l$1f.BUILDIDENTIFIER]+"(?:\\."+c$1b[l$1f.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");c$1b[l$1f.FULLPLAIN]="v?"+c$1b[l$1f.MAINVERSION]+c$1b[l$1f.PRERELEASE]+"?"+c$1b[l$1f.BUILD]+"?";c$1b[l$1f.FULL]="^"+c$1b[l$1f.FULLPLAIN]+"$";tok("LOOSEPLAIN");c$1b[l$1f.LOOSEPLAIN]="[v=\\s]*"+c$1b[l$1f.MAINVERSIONLOOSE]+c$1b[l$1f.PRERELEASELOOSE]+"?"+c$1b[l$1f.BUILD]+"?";tok("LOOSE");c$1b[l$1f.LOOSE]="^"+c$1b[l$1f.LOOSEPLAIN]+"$";tok("GTLT");c$1b[l$1f.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");c$1b[l$1f.XRANGEIDENTIFIERLOOSE]=c$1b[l$1f.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");c$1b[l$1f.XRANGEIDENTIFIER]=c$1b[l$1f.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");c$1b[l$1f.XRANGEPLAIN]="[v=\\s]*("+c$1b[l$1f.XRANGEIDENTIFIER]+")"+"(?:\\.("+c$1b[l$1f.XRANGEIDENTIFIER]+")"+"(?:\\.("+c$1b[l$1f.XRANGEIDENTIFIER]+")"+"(?:"+c$1b[l$1f.PRERELEASE]+")?"+c$1b[l$1f.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");c$1b[l$1f.XRANGEPLAINLOOSE]="[v=\\s]*("+c$1b[l$1f.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c$1b[l$1f.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c$1b[l$1f.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+c$1b[l$1f.PRERELEASELOOSE]+")?"+c$1b[l$1f.BUILD]+"?"+")?)?";tok("XRANGE");c$1b[l$1f.XRANGE]="^"+c$1b[l$1f.GTLT]+"\\s*"+c$1b[l$1f.XRANGEPLAIN]+"$";tok("XRANGELOOSE");c$1b[l$1f.XRANGELOOSE]="^"+c$1b[l$1f.GTLT]+"\\s*"+c$1b[l$1f.XRANGEPLAINLOOSE]+"$";tok("COERCE");c$1b[l$1f.COERCE]="(^|[^\\d])"+"(\\d{1,"+s$1i+"})"+"(?:\\.(\\d{1,"+s$1i+"}))?"+"(?:\\.(\\d{1,"+s$1i+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");p$17[l$1f.COERCERTL]=new RegExp(c$1b[l$1f.COERCE],"g");tok("LONETILDE");c$1b[l$1f.LONETILDE]="(?:~>?)";tok("TILDETRIM");c$1b[l$1f.TILDETRIM]="(\\s*)"+c$1b[l$1f.LONETILDE]+"\\s+";p$17[l$1f.TILDETRIM]=new RegExp(c$1b[l$1f.TILDETRIM],"g");var u$1e="$1~";tok("TILDE");c$1b[l$1f.TILDE]="^"+c$1b[l$1f.LONETILDE]+c$1b[l$1f.XRANGEPLAIN]+"$";tok("TILDELOOSE");c$1b[l$1f.TILDELOOSE]="^"+c$1b[l$1f.LONETILDE]+c$1b[l$1f.XRANGEPLAINLOOSE]+"$";tok("LONECARET");c$1b[l$1f.LONECARET]="(?:\\^)";tok("CARETTRIM");c$1b[l$1f.CARETTRIM]="(\\s*)"+c$1b[l$1f.LONECARET]+"\\s+";p$17[l$1f.CARETTRIM]=new RegExp(c$1b[l$1f.CARETTRIM],"g");var f$1f="$1^";tok("CARET");c$1b[l$1f.CARET]="^"+c$1b[l$1f.LONECARET]+c$1b[l$1f.XRANGEPLAIN]+"$";tok("CARETLOOSE");c$1b[l$1f.CARETLOOSE]="^"+c$1b[l$1f.LONECARET]+c$1b[l$1f.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");c$1b[l$1f.COMPARATORLOOSE]="^"+c$1b[l$1f.GTLT]+"\\s*("+c$1b[l$1f.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");c$1b[l$1f.COMPARATOR]="^"+c$1b[l$1f.GTLT]+"\\s*("+c$1b[l$1f.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");c$1b[l$1f.COMPARATORTRIM]="(\\s*)"+c$1b[l$1f.GTLT]+"\\s*("+c$1b[l$1f.LOOSEPLAIN]+"|"+c$1b[l$1f.XRANGEPLAIN]+")";p$17[l$1f.COMPARATORTRIM]=new RegExp(c$1b[l$1f.COMPARATORTRIM],"g");var h$Y="$1$2$3";tok("HYPHENRANGE");c$1b[l$1f.HYPHENRANGE]="^\\s*("+c$1b[l$1f.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+c$1b[l$1f.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");c$1b[l$1f.HYPHENRANGELOOSE]="^\\s*("+c$1b[l$1f.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+c$1b[l$1f.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");c$1b[l$1f.STAR]="(<|>)?=?\\s*\\*";for(var m$_=0;m$_a$1q)return null;var t=r.loose?p$17[l$1f.LOOSE]:p$17[l$1f.FULL];if(!t.test(e))return null;try{return new SemVer(e,r)}catch(e){return null}}t$1h.valid=valid;function valid(e,r){var t=parse$3(e,r);return t?t.version:null}t$1h.clean=clean;function clean(e,r){var t=parse$3(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}t$1h.SemVer=SemVer;function SemVer(e,t){t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});if(e instanceof SemVer){if(e.loose===t.loose)return e;e=e.version;}else if("string"!==typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>a$1q)throw new TypeError("version is longer than "+a$1q+" characters");if(!((this||r$1u)instanceof SemVer))return new SemVer(e,t);o$1v("SemVer",e,t);(this||r$1u).options=t;(this||r$1u).loose=!!t.loose;var n=e.trim().match(t.loose?p$17[l$1f.LOOSE]:p$17[l$1f.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);(this||r$1u).raw=e;(this||r$1u).major=+n[1];(this||r$1u).minor=+n[2];(this||r$1u).patch=+n[3];if((this||r$1u).major>i$1b||(this||r$1u).major<0)throw new TypeError("Invalid major version");if((this||r$1u).minor>i$1b||(this||r$1u).minor<0)throw new TypeError("Invalid minor version");if((this||r$1u).patch>i$1b||(this||r$1u).patch<0)throw new TypeError("Invalid patch version");n[4]?(this||r$1u).prerelease=n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r=0)if("number"===typeof(this||r$1u).prerelease[n]){(this||r$1u).prerelease[n]++;n=-2;}-1===n&&(this||r$1u).prerelease.push(0);}t&&((this||r$1u).prerelease[0]===t?isNaN((this||r$1u).prerelease[1])&&((this||r$1u).prerelease=[t,0]):(this||r$1u).prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}this.format();(this||r$1u).raw=(this||r$1u).version;return this||r$1u};t$1h.inc=inc;function inc(e,r,t,n){if("string"===typeof t){n=t;t=void 0;}try{return new SemVer(e,t).inc(r,n).version}catch(e){return null}}t$1h.diff=diff;function diff(e,r){if(eq(e,r))return null;var t=parse$3(e);var n=parse$3(r);var o="";if(t.prerelease.length||n.prerelease.length){o="pre";var a="prerelease";}for(var i in t)if(("major"===i||"minor"===i||"patch"===i)&&t[i]!==n[i])return o+i;return a}t$1h.compareIdentifiers=compareIdentifiers;var R$t=/^[0-9]+$/;function compareIdentifiers(e,r){var t=R$t.test(e);var n=R$t.test(r);if(t&&n){e=+e;r=+r;}return e===r?0:t&&!n?-1:n&&!t?1:e0}t$1h.lt=lt$7;function lt$7(e,r,t){return compare$1(e,r,t)<0}t$1h.eq=eq;function eq(e,r,t){return 0===compare$1(e,r,t)}t$1h.neq=neq;function neq(e,r,t){return 0!==compare$1(e,r,t)}t$1h.gte=gte;function gte(e,r,t){return compare$1(e,r,t)>=0}t$1h.lte=lte;function lte(e,r,t){return compare$1(e,r,t)<=0}t$1h.cmp=cmp;function cmp(e,r,t,n){switch(r){case"===":"object"===typeof e&&(e=e.version);"object"===typeof t&&(t=t.version);return e===t;case"!==":"object"===typeof e&&(e=e.version);"object"===typeof t&&(t=t.version);return e!==t;case"":case"=":case"==":return eq(e,t,n);case"!=":return neq(e,t,n);case">":return gt$7(e,t,n);case">=":return gte(e,t,n);case"<":return lt$7(e,t,n);case"<=":return lte(e,t,n);default:throw new TypeError("Invalid operator: "+r)}}t$1h.Comparator=Comparator;function Comparator(e,t){t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});if(e instanceof Comparator){if(e.loose===!!t.loose)return e;e=e.value;}if(!((this||r$1u)instanceof Comparator))return new Comparator(e,t);o$1v("comparator",e,t);(this||r$1u).options=t;(this||r$1u).loose=!!t.loose;this.parse(e);(this||r$1u).semver===I$y?(this||r$1u).value="":(this||r$1u).value=(this||r$1u).operator+(this||r$1u).semver.version;o$1v("comp",this||r$1u);}var I$y={};Comparator.prototype.parse=function(e){var t=(this||r$1u).options.loose?p$17[l$1f.COMPARATORLOOSE]:p$17[l$1f.COMPARATOR];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);(this||r$1u).operator=void 0!==n[1]?n[1]:"";"="===(this||r$1u).operator&&((this||r$1u).operator="");n[2]?(this||r$1u).semver=new SemVer(n[2],(this||r$1u).options.loose):(this||r$1u).semver=I$y;};Comparator.prototype.toString=function(){return (this||r$1u).value};Comparator.prototype.test=function(e){o$1v("Comparator.test",e,(this||r$1u).options.loose);if((this||r$1u).semver===I$y||e===I$y)return true;if("string"===typeof e)try{e=new SemVer(e,(this||r$1u).options);}catch(e){return false}return cmp(e,(this||r$1u).operator,(this||r$1u).semver,(this||r$1u).options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator))throw new TypeError("a Comparator is required");t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});var n;if(""===(this||r$1u).operator){if(""===(this||r$1u).value)return true;n=new Range(e.value,t);return satisfies((this||r$1u).value,n,t)}if(""===e.operator){if(""===e.value)return true;n=new Range((this||r$1u).value,t);return satisfies(e.semver,n,t)}var o=(">="===(this||r$1u).operator||">"===(this||r$1u).operator)&&(">="===e.operator||">"===e.operator);var a=("<="===(this||r$1u).operator||"<"===(this||r$1u).operator)&&("<="===e.operator||"<"===e.operator);var i=(this||r$1u).semver.version===e.semver.version;var s=(">="===(this||r$1u).operator||"<="===(this||r$1u).operator)&&(">="===e.operator||"<="===e.operator);var p=cmp((this||r$1u).semver,"<",e.semver,t)&&(">="===(this||r$1u).operator||">"===(this||r$1u).operator)&&("<="===e.operator||"<"===e.operator);var c=cmp((this||r$1u).semver,">",e.semver,t)&&("<="===(this||r$1u).operator||"<"===(this||r$1u).operator)&&(">="===e.operator||">"===e.operator);return o||a||i&&s||p||c};t$1h.Range=Range;function Range(e,t){t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});if(e instanceof Range)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range(e.raw,t);if(e instanceof Comparator)return new Range(e.value,t);if(!((this||r$1u)instanceof Range))return new Range(e,t);(this||r$1u).options=t;(this||r$1u).loose=!!t.loose;(this||r$1u).includePrerelease=!!t.includePrerelease;(this||r$1u).raw=e;(this||r$1u).set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this||r$1u).filter((function(e){return e.length}));if(!(this||r$1u).set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format();}Range.prototype.format=function(){(this||r$1u).range=(this||r$1u).set.map((function(e){return e.join(" ").trim()})).join("||").trim();return (this||r$1u).range};Range.prototype.toString=function(){return (this||r$1u).range};Range.prototype.parseRange=function(e){var t=(this||r$1u).options.loose;e=e.trim();var n=t?p$17[l$1f.HYPHENRANGELOOSE]:p$17[l$1f.HYPHENRANGE];e=e.replace(n,hyphenReplace);o$1v("hyphen replace",e);e=e.replace(p$17[l$1f.COMPARATORTRIM],h$Y);o$1v("comparator trim",e,p$17[l$1f.COMPARATORTRIM]);e=e.replace(p$17[l$1f.TILDETRIM],u$1e);e=e.replace(p$17[l$1f.CARETTRIM],f$1f);e=e.split(/\s+/).join(" ");var a=t?p$17[l$1f.COMPARATORLOOSE]:p$17[l$1f.COMPARATOR];var i=e.split(" ").map((function(e){return parseComparator(e,(this||r$1u).options)}),this||r$1u).join(" ").split(/\s+/);(this||r$1u).options.loose&&(i=i.filter((function(e){return !!e.match(a)})));i=i.map((function(e){return new Comparator(e,(this||r$1u).options)}),this||r$1u);return i};Range.prototype.intersects=function(e,t){if(!(e instanceof Range))throw new TypeError("a Range is required");return (this||r$1u).set.some((function(r){return isSatisfiable(r,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};function isSatisfiable(e,r){var t=true;var n=e.slice();var o=n.pop();while(t&&n.length){t=n.every((function(e){return o.intersects(e,r)}));o=n.pop();}return t}t$1h.toComparators=toComparators;function toComparators(e,r){return new Range(e,r).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,r){o$1v("comp",e,r);e=replaceCarets(e,r);o$1v("caret",e);e=replaceTildes(e,r);o$1v("tildes",e);e=replaceXRanges(e,r);o$1v("xrange",e);e=replaceStars(e,r);o$1v("stars",e);return e}function isX(e){return !e||"x"===e.toLowerCase()||"*"===e}function replaceTildes(e,r){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,r)})).join(" ")}function replaceTilde(e,r){var t=r.loose?p$17[l$1f.TILDELOOSE]:p$17[l$1f.TILDE];return e.replace(t,(function(r,t,n,a,i){o$1v("tilde",e,r,t,n,a,i);var s;if(isX(t))s="";else if(isX(n))s=">="+t+".0.0 <"+(+t+1)+".0.0";else if(isX(a))s=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0";else if(i){o$1v("replaceTilde pr",i);s=">="+t+"."+n+"."+a+"-"+i+" <"+t+"."+(+n+1)+".0";}else s=">="+t+"."+n+"."+a+" <"+t+"."+(+n+1)+".0";o$1v("tilde return",s);return s}))}function replaceCarets(e,r){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,r)})).join(" ")}function replaceCaret(e,r){o$1v("caret",e,r);var t=r.loose?p$17[l$1f.CARETLOOSE]:p$17[l$1f.CARET];return e.replace(t,(function(r,t,n,a,i){o$1v("caret",e,r,t,n,a,i);var s;if(isX(t))s="";else if(isX(n))s=">="+t+".0.0 <"+(+t+1)+".0.0";else if(isX(a))s="0"===t?">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0":">="+t+"."+n+".0 <"+(+t+1)+".0.0";else if(i){o$1v("replaceCaret pr",i);s="0"===t?"0"===n?">="+t+"."+n+"."+a+"-"+i+" <"+t+"."+n+"."+(+a+1):">="+t+"."+n+"."+a+"-"+i+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+a+"-"+i+" <"+(+t+1)+".0.0";}else {o$1v("no pr");s="0"===t?"0"===n?">="+t+"."+n+"."+a+" <"+t+"."+n+"."+(+a+1):">="+t+"."+n+"."+a+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+a+" <"+(+t+1)+".0.0";}o$1v("caret return",s);return s}))}function replaceXRanges(e,r){o$1v("replaceXRanges",e,r);return e.split(/\s+/).map((function(e){return replaceXRange(e,r)})).join(" ")}function replaceXRange(e,r){e=e.trim();var t=r.loose?p$17[l$1f.XRANGELOOSE]:p$17[l$1f.XRANGE];return e.replace(t,(function(t,n,a,i,s,p){o$1v("xRange",e,t,n,a,i,s,p);var c=isX(a);var l=c||isX(i);var E=l||isX(s);var u=E;"="===n&&u&&(n="");p=r.includePrerelease?"-0":"";if(c)t=">"===n||"<"===n?"<0.0.0-0":"*";else if(n&&u){l&&(i=0);s=0;if(">"===n){n=">=";if(l){a=+a+1;i=0;s=0;}else {i=+i+1;s=0;}}else if("<="===n){n="<";l?a=+a+1:i=+i+1;}t=n+a+"."+i+"."+s+p;}else l?t=">="+a+".0.0"+p+" <"+(+a+1)+".0.0"+p:E&&(t=">="+a+"."+i+".0"+p+" <"+a+"."+(+i+1)+".0"+p);o$1v("xRange return",t);return t}))}function replaceStars(e,r){o$1v("replaceStars",e,r);return e.trim().replace(p$17[l$1f.STAR],"")}function hyphenReplace(e,r,t,n,o,a,i,s,p,c,l,E,u){r=isX(t)?"":isX(n)?">="+t+".0.0":isX(o)?">="+t+"."+n+".0":">="+r;s=isX(p)?"":isX(c)?"<"+(+p+1)+".0.0":isX(l)?"<"+p+"."+(+c+1)+".0":E?"<="+p+"."+c+"."+l+"-"+E:"<="+s;return (r+" "+s).trim()}Range.prototype.test=function(e){if(!e)return false;if("string"===typeof e)try{e=new SemVer(e,(this||r$1u).options);}catch(e){return false}for(var t=0;t<(this||r$1u).set.length;t++)if(testSet((this||r$1u).set[t],e,(this||r$1u).options))return true;return false};function testSet(e,r,t){for(var n=0;n0){var a=e[n].semver;if(a.major===r.major&&a.minor===r.minor&&a.patch===r.patch)return true}}return false}return true}t$1h.satisfies=satisfies;function satisfies(e,r,t){try{r=new Range(r,t);}catch(e){return false}return r.test(e)}t$1h.maxSatisfying=maxSatisfying;function maxSatisfying(e,r,t){var n=null;var o=null;try{var a=new Range(r,t);}catch(e){return null}e.forEach((function(e){if(a.test(e)&&(!n||-1===o.compare(e))){n=e;o=new SemVer(n,t);}}));return n}t$1h.minSatisfying=minSatisfying;function minSatisfying(e,r,t){var n=null;var o=null;try{var a=new Range(r,t);}catch(e){return null}e.forEach((function(e){if(a.test(e)&&(!n||1===o.compare(e))){n=e;o=new SemVer(n,t);}}));return n}t$1h.minVersion=minVersion$1;function minVersion$1(e,r){e=new Range(e,r);var t=new SemVer("0.0.0");if(e.test(t))return t;t=new SemVer("0.0.0-0");if(e.test(t))return t;t=null;for(var n=0;n":0===r.prerelease.length?r.patch++:r.prerelease.push(0);r.raw=r.format();case"":case">=":t&&!gt$7(t,r)||(t=r);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));}return t&&e.test(t)?t:null}t$1h.validRange=validRange;function validRange(e,r){try{return new Range(e,r).range||"*"}catch(e){return null}}t$1h.ltr=ltr;function ltr(e,r,t){return outside(e,r,"<",t)}t$1h.gtr=gtr;function gtr(e,r,t){return outside(e,r,">",t)}t$1h.outside=outside;function outside(e,r,t,n){e=new SemVer(e,n);r=new Range(r,n);var o,a,i,s,p;switch(t){case">":o=gt$7;a=lte;i=lt$7;s=">";p=">=";break;case"<":o=lt$7;a=gte;i=gt$7;s="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,r,n))return false;for(var c=0;c=0.0.0"));E=E||e;u=u||e;o(e.semver,E.semver,n)?E=e:i(e.semver,u.semver,n)&&(u=e);}));if(E.operator===s||E.operator===p)return false;if((!u.operator||u.operator===s)&&a(e,u.semver))return false;if(u.operator===p&&i(e,u.semver))return false}return true}t$1h.prerelease=prerelease;function prerelease(e,r){var t=parse$3(e,r);return t&&t.prerelease.length?t.prerelease:null}t$1h.intersects=intersects;function intersects(e,r,t){e=new Range(e,t);r=new Range(r,t);return e.intersects(r)}t$1h.coerce=coerce;function coerce(e,r){if(e instanceof SemVer)return e;"number"===typeof e&&(e=String(e));if("string"!==typeof e)return null;r=r||{};var t=null;if(r.rtl){var n;while((n=p$17[l$1f.COERCERTL].exec(e))&&(!t||t.index+t[0].length!==e.length)){t&&n.index+n[0].length===t.index+t[0].length||(t=n);p$17[l$1f.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;}p$17[l$1f.COERCERTL].lastIndex=-1;}else t=e.match(p$17[l$1f.COERCE]);return null===t?null:parse$3(t[2]+"."+(t[3]||"0")+"."+(t[4]||"0"),r)}var v$U=t$1h;const O$x=t$1h.SEMVER_SPEC_VERSION,L$r=t$1h.tokens;const N$t=t$1h.re,S$E=t$1h.src,T$w=t$1h.parse,g$Q=t$1h.valid,A$x=t$1h.clean,d$14=t$1h.SemVer,C$A=t$1h.inc,w$G=t$1h.diff,y$S=t$1h.compareIdentifiers,P$v=t$1h.rcompareIdentifiers,D$z=t$1h.major,V$r=t$1h.minor,M$y=t$1h.patch,X$l=t$1h.compare,k$E=t$1h.compareLoose,F$u=t$1h.compareBuild,G$n=t$1h.rcompare,j$y=t$1h.sort,U$v=t$1h.rsort,b$S=t$1h.gt,x$E=t$1h.lt,$$n=t$1h.eq,B$y=t$1h.neq,q$q=t$1h.gte,H$r=t$1h.lte,_$J=t$1h.cmp,Y$l=t$1h.Comparator,z$q=t$1h.Range,Z$k=t$1h.toComparators,J$m=t$1h.satisfies,K$p=t$1h.maxSatisfying,Q$l=t$1h.minSatisfying,W$q=t$1h.minVersion,ee$f=t$1h.validRange,re$e=t$1h.ltr,te$e=t$1h.gtr,ne$e=t$1h.outside,oe$e=t$1h.prerelease,ae$e=t$1h.intersects,ie$e=t$1h.coerce; +var r$1s="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var t$1j={};var n$1v=se$f;t$1j=t$1j=SemVer;var a$1t;a$1t="object"===typeof n$1v&&n$1v.env&&n$1v.env.NODE_DEBUG&&/\bsemver\b/i.test(n$1v.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e);}:function(){};t$1j.SEMVER_SPEC_VERSION="2.0.0";var o$1v=256;var i$1a=Number.MAX_SAFE_INTEGER||9007199254740991;var s$1i=16;var p$17=o$1v-6;var E$E=t$1j.re=[];var c$1c=t$1j.safeRe=[];var l$1d=t$1j.src=[];var u$1f=t$1j.tokens={};var f$1h=0;function tok(e){u$1f[e]=f$1h++;}var R$u="[a-zA-Z0-9-]";var m$10=[["\\s",1],["\\d",o$1v],[R$u,p$17]];function makeSafeRe(e){for(var r=0;r)?=?)";tok("XRANGEIDENTIFIERLOOSE");l$1d[u$1f.XRANGEIDENTIFIERLOOSE]=l$1d[u$1f.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");l$1d[u$1f.XRANGEIDENTIFIER]=l$1d[u$1f.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");l$1d[u$1f.XRANGEPLAIN]="[v=\\s]*("+l$1d[u$1f.XRANGEIDENTIFIER]+")(?:\\.("+l$1d[u$1f.XRANGEIDENTIFIER]+")(?:\\.("+l$1d[u$1f.XRANGEIDENTIFIER]+")(?:"+l$1d[u$1f.PRERELEASE]+")?"+l$1d[u$1f.BUILD]+"?)?)?";tok("XRANGEPLAINLOOSE");l$1d[u$1f.XRANGEPLAINLOOSE]="[v=\\s]*("+l$1d[u$1f.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+l$1d[u$1f.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+l$1d[u$1f.XRANGEIDENTIFIERLOOSE]+")(?:"+l$1d[u$1f.PRERELEASELOOSE]+")?"+l$1d[u$1f.BUILD]+"?)?)?";tok("XRANGE");l$1d[u$1f.XRANGE]="^"+l$1d[u$1f.GTLT]+"\\s*"+l$1d[u$1f.XRANGEPLAIN]+"$";tok("XRANGELOOSE");l$1d[u$1f.XRANGELOOSE]="^"+l$1d[u$1f.GTLT]+"\\s*"+l$1d[u$1f.XRANGEPLAINLOOSE]+"$";tok("COERCE");l$1d[u$1f.COERCE]="(^|[^\\d])(\\d{1,"+s$1i+"})(?:\\.(\\d{1,"+s$1i+"}))?(?:\\.(\\d{1,"+s$1i+"}))?(?:$|[^\\d])";tok("COERCERTL");E$E[u$1f.COERCERTL]=new RegExp(l$1d[u$1f.COERCE],"g");c$1c[u$1f.COERCERTL]=new RegExp(makeSafeRe(l$1d[u$1f.COERCE]),"g");tok("LONETILDE");l$1d[u$1f.LONETILDE]="(?:~>?)";tok("TILDETRIM");l$1d[u$1f.TILDETRIM]="(\\s*)"+l$1d[u$1f.LONETILDE]+"\\s+";E$E[u$1f.TILDETRIM]=new RegExp(l$1d[u$1f.TILDETRIM],"g");c$1c[u$1f.TILDETRIM]=new RegExp(makeSafeRe(l$1d[u$1f.TILDETRIM]),"g");var h$Z="$1~";tok("TILDE");l$1d[u$1f.TILDE]="^"+l$1d[u$1f.LONETILDE]+l$1d[u$1f.XRANGEPLAIN]+"$";tok("TILDELOOSE");l$1d[u$1f.TILDELOOSE]="^"+l$1d[u$1f.LONETILDE]+l$1d[u$1f.XRANGEPLAINLOOSE]+"$";tok("LONECARET");l$1d[u$1f.LONECARET]="(?:\\^)";tok("CARETTRIM");l$1d[u$1f.CARETTRIM]="(\\s*)"+l$1d[u$1f.LONECARET]+"\\s+";E$E[u$1f.CARETTRIM]=new RegExp(l$1d[u$1f.CARETTRIM],"g");c$1c[u$1f.CARETTRIM]=new RegExp(makeSafeRe(l$1d[u$1f.CARETTRIM]),"g");var I$z="$1^";tok("CARET");l$1d[u$1f.CARET]="^"+l$1d[u$1f.LONECARET]+l$1d[u$1f.XRANGEPLAIN]+"$";tok("CARETLOOSE");l$1d[u$1f.CARETLOOSE]="^"+l$1d[u$1f.LONECARET]+l$1d[u$1f.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");l$1d[u$1f.COMPARATORLOOSE]="^"+l$1d[u$1f.GTLT]+"\\s*("+l$1d[u$1f.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");l$1d[u$1f.COMPARATOR]="^"+l$1d[u$1f.GTLT]+"\\s*("+l$1d[u$1f.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");l$1d[u$1f.COMPARATORTRIM]="(\\s*)"+l$1d[u$1f.GTLT]+"\\s*("+l$1d[u$1f.LOOSEPLAIN]+"|"+l$1d[u$1f.XRANGEPLAIN]+")";E$E[u$1f.COMPARATORTRIM]=new RegExp(l$1d[u$1f.COMPARATORTRIM],"g");c$1c[u$1f.COMPARATORTRIM]=new RegExp(makeSafeRe(l$1d[u$1f.COMPARATORTRIM]),"g");var v$T="$1$2$3";tok("HYPHENRANGE");l$1d[u$1f.HYPHENRANGE]="^\\s*("+l$1d[u$1f.XRANGEPLAIN]+")\\s+-\\s+("+l$1d[u$1f.XRANGEPLAIN]+")\\s*$";tok("HYPHENRANGELOOSE");l$1d[u$1f.HYPHENRANGELOOSE]="^\\s*("+l$1d[u$1f.XRANGEPLAINLOOSE]+")\\s+-\\s+("+l$1d[u$1f.XRANGEPLAINLOOSE]+")\\s*$";tok("STAR");l$1d[u$1f.STAR]="(<|>)?=?\\s*\\*";for(var O$y=0;O$yo$1v)return null;var t=r.loose?c$1c[u$1f.LOOSE]:c$1c[u$1f.FULL];if(!t.test(e))return null;try{return new SemVer(e,r)}catch(e){return null}}t$1j.valid=valid;function valid(e,r){var t=parse$3(e,r);return t?t.version:null}t$1j.clean=clean;function clean(e,r){var t=parse$3(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}t$1j.SemVer=SemVer;function SemVer(e,t){t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});if(e instanceof SemVer){if(e.loose===t.loose)return e;e=e.version;}else if("string"!==typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>o$1v)throw new TypeError("version is longer than "+o$1v+" characters");if(!((this||r$1s)instanceof SemVer))return new SemVer(e,t);a$1t("SemVer",e,t);(this||r$1s).options=t;(this||r$1s).loose=!!t.loose;var n=e.trim().match(t.loose?c$1c[u$1f.LOOSE]:c$1c[u$1f.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);(this||r$1s).raw=e;(this||r$1s).major=+n[1];(this||r$1s).minor=+n[2];(this||r$1s).patch=+n[3];if((this||r$1s).major>i$1a||(this||r$1s).major<0)throw new TypeError("Invalid major version");if((this||r$1s).minor>i$1a||(this||r$1s).minor<0)throw new TypeError("Invalid minor version");if((this||r$1s).patch>i$1a||(this||r$1s).patch<0)throw new TypeError("Invalid patch version");n[4]?(this||r$1s).prerelease=n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r=0)if("number"===typeof(this||r$1s).prerelease[n]){(this||r$1s).prerelease[n]++;n=-2;}-1===n&&(this||r$1s).prerelease.push(0);}t&&((this||r$1s).prerelease[0]===t?isNaN((this||r$1s).prerelease[1])&&((this||r$1s).prerelease=[t,0]):(this||r$1s).prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}this.format();(this||r$1s).raw=(this||r$1s).version;return this||r$1s};t$1j.inc=inc;function inc(e,r,t,n){if("string"===typeof t){n=t;t=void 0;}try{return new SemVer(e,t).inc(r,n).version}catch(e){return null}}t$1j.diff=diff;function diff(e,r){if(eq(e,r))return null;var t=parse$3(e);var n=parse$3(r);var a="";if(t.prerelease.length||n.prerelease.length){a="pre";var o="prerelease";}for(var i in t)if(("major"===i||"minor"===i||"patch"===i)&&t[i]!==n[i])return a+i;return o}t$1j.compareIdentifiers=compareIdentifiers;var L$s=/^[0-9]+$/;function compareIdentifiers(e,r){var t=L$s.test(e);var n=L$s.test(r);if(t&&n){e=+e;r=+r;}return e===r?0:t&&!n?-1:n&&!t?1:e0}t$1j.lt=lt$6;function lt$6(e,r,t){return compare$1(e,r,t)<0}t$1j.eq=eq;function eq(e,r,t){return 0===compare$1(e,r,t)}t$1j.neq=neq;function neq(e,r,t){return 0!==compare$1(e,r,t)}t$1j.gte=gte;function gte(e,r,t){return compare$1(e,r,t)>=0}t$1j.lte=lte;function lte(e,r,t){return compare$1(e,r,t)<=0}t$1j.cmp=cmp;function cmp(e,r,t,n){switch(r){case"===":"object"===typeof e&&(e=e.version);"object"===typeof t&&(t=t.version);return e===t;case"!==":"object"===typeof e&&(e=e.version);"object"===typeof t&&(t=t.version);return e!==t;case"":case"=":case"==":return eq(e,t,n);case"!=":return neq(e,t,n);case">":return gt$6(e,t,n);case">=":return gte(e,t,n);case"<":return lt$6(e,t,n);case"<=":return lte(e,t,n);default:throw new TypeError("Invalid operator: "+r)}}t$1j.Comparator=Comparator;function Comparator(e,t){t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});if(e instanceof Comparator){if(e.loose===!!t.loose)return e;e=e.value;}if(!((this||r$1s)instanceof Comparator))return new Comparator(e,t);e=e.trim().split(/\s+/).join(" ");a$1t("comparator",e,t);(this||r$1s).options=t;(this||r$1s).loose=!!t.loose;this.parse(e);(this||r$1s).semver===N$t?(this||r$1s).value="":(this||r$1s).value=(this||r$1s).operator+(this||r$1s).semver.version;a$1t("comp",this||r$1s);}var N$t={};Comparator.prototype.parse=function(e){var t=(this||r$1s).options.loose?c$1c[u$1f.COMPARATORLOOSE]:c$1c[u$1f.COMPARATOR];var n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);(this||r$1s).operator=void 0!==n[1]?n[1]:"";"="===(this||r$1s).operator&&((this||r$1s).operator="");n[2]?(this||r$1s).semver=new SemVer(n[2],(this||r$1s).options.loose):(this||r$1s).semver=N$t;};Comparator.prototype.toString=function(){return (this||r$1s).value};Comparator.prototype.test=function(e){a$1t("Comparator.test",e,(this||r$1s).options.loose);if((this||r$1s).semver===N$t||e===N$t)return true;if("string"===typeof e)try{e=new SemVer(e,(this||r$1s).options);}catch(e){return false}return cmp(e,(this||r$1s).operator,(this||r$1s).semver,(this||r$1s).options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator))throw new TypeError("a Comparator is required");t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});var n;if(""===(this||r$1s).operator){if(""===(this||r$1s).value)return true;n=new Range(e.value,t);return satisfies((this||r$1s).value,n,t)}if(""===e.operator){if(""===e.value)return true;n=new Range((this||r$1s).value,t);return satisfies(e.semver,n,t)}var a=(">="===(this||r$1s).operator||">"===(this||r$1s).operator)&&(">="===e.operator||">"===e.operator);var o=("<="===(this||r$1s).operator||"<"===(this||r$1s).operator)&&("<="===e.operator||"<"===e.operator);var i=(this||r$1s).semver.version===e.semver.version;var s=(">="===(this||r$1s).operator||"<="===(this||r$1s).operator)&&(">="===e.operator||"<="===e.operator);var p=cmp((this||r$1s).semver,"<",e.semver,t)&&(">="===(this||r$1s).operator||">"===(this||r$1s).operator)&&("<="===e.operator||"<"===e.operator);var E=cmp((this||r$1s).semver,">",e.semver,t)&&("<="===(this||r$1s).operator||"<"===(this||r$1s).operator)&&(">="===e.operator||">"===e.operator);return a||o||i&&s||p||E};t$1j.Range=Range;function Range(e,t){t&&"object"===typeof t||(t={loose:!!t,includePrerelease:false});if(e instanceof Range)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range(e.raw,t);if(e instanceof Comparator)return new Range(e.value,t);if(!((this||r$1s)instanceof Range))return new Range(e,t);(this||r$1s).options=t;(this||r$1s).loose=!!t.loose;(this||r$1s).includePrerelease=!!t.includePrerelease;(this||r$1s).raw=e.trim().split(/\s+/).join(" ");(this||r$1s).set=(this||r$1s).raw.split("||").map((function(e){return this.parseRange(e.trim())}),this||r$1s).filter((function(e){return e.length}));if(!(this||r$1s).set.length)throw new TypeError("Invalid SemVer Range: "+(this||r$1s).raw);this.format();}Range.prototype.format=function(){(this||r$1s).range=(this||r$1s).set.map((function(e){return e.join(" ").trim()})).join("||").trim();return (this||r$1s).range};Range.prototype.toString=function(){return (this||r$1s).range};Range.prototype.parseRange=function(e){var t=(this||r$1s).options.loose;var n=t?c$1c[u$1f.HYPHENRANGELOOSE]:c$1c[u$1f.HYPHENRANGE];e=e.replace(n,hyphenReplace);a$1t("hyphen replace",e);e=e.replace(c$1c[u$1f.COMPARATORTRIM],v$T);a$1t("comparator trim",e,c$1c[u$1f.COMPARATORTRIM]);e=e.replace(c$1c[u$1f.TILDETRIM],h$Z);e=e.replace(c$1c[u$1f.CARETTRIM],I$z);e=e.split(/\s+/).join(" ");var o=t?c$1c[u$1f.COMPARATORLOOSE]:c$1c[u$1f.COMPARATOR];var i=e.split(" ").map((function(e){return parseComparator(e,(this||r$1s).options)}),this||r$1s).join(" ").split(/\s+/);(this||r$1s).options.loose&&(i=i.filter((function(e){return !!e.match(o)})));i=i.map((function(e){return new Comparator(e,(this||r$1s).options)}),this||r$1s);return i};Range.prototype.intersects=function(e,t){if(!(e instanceof Range))throw new TypeError("a Range is required");return (this||r$1s).set.some((function(r){return isSatisfiable(r,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};function isSatisfiable(e,r){var t=true;var n=e.slice();var a=n.pop();while(t&&n.length){t=n.every((function(e){return a.intersects(e,r)}));a=n.pop();}return t}t$1j.toComparators=toComparators;function toComparators(e,r){return new Range(e,r).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,r){a$1t("comp",e,r);e=replaceCarets(e,r);a$1t("caret",e);e=replaceTildes(e,r);a$1t("tildes",e);e=replaceXRanges(e,r);a$1t("xrange",e);e=replaceStars(e,r);a$1t("stars",e);return e}function isX(e){return !e||"x"===e.toLowerCase()||"*"===e}function replaceTildes(e,r){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,r)})).join(" ")}function replaceTilde(e,r){var t=r.loose?c$1c[u$1f.TILDELOOSE]:c$1c[u$1f.TILDE];return e.replace(t,(function(r,t,n,o,i){a$1t("tilde",e,r,t,n,o,i);var s;if(isX(t))s="";else if(isX(n))s=">="+t+".0.0 <"+(+t+1)+".0.0";else if(isX(o))s=">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0";else if(i){a$1t("replaceTilde pr",i);s=">="+t+"."+n+"."+o+"-"+i+" <"+t+"."+(+n+1)+".0";}else s=">="+t+"."+n+"."+o+" <"+t+"."+(+n+1)+".0";a$1t("tilde return",s);return s}))}function replaceCarets(e,r){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,r)})).join(" ")}function replaceCaret(e,r){a$1t("caret",e,r);var t=r.loose?c$1c[u$1f.CARETLOOSE]:c$1c[u$1f.CARET];return e.replace(t,(function(r,t,n,o,i){a$1t("caret",e,r,t,n,o,i);var s;if(isX(t))s="";else if(isX(n))s=">="+t+".0.0 <"+(+t+1)+".0.0";else if(isX(o))s="0"===t?">="+t+"."+n+".0 <"+t+"."+(+n+1)+".0":">="+t+"."+n+".0 <"+(+t+1)+".0.0";else if(i){a$1t("replaceCaret pr",i);s="0"===t?"0"===n?">="+t+"."+n+"."+o+"-"+i+" <"+t+"."+n+"."+(+o+1):">="+t+"."+n+"."+o+"-"+i+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+o+"-"+i+" <"+(+t+1)+".0.0";}else {a$1t("no pr");s="0"===t?"0"===n?">="+t+"."+n+"."+o+" <"+t+"."+n+"."+(+o+1):">="+t+"."+n+"."+o+" <"+t+"."+(+n+1)+".0":">="+t+"."+n+"."+o+" <"+(+t+1)+".0.0";}a$1t("caret return",s);return s}))}function replaceXRanges(e,r){a$1t("replaceXRanges",e,r);return e.split(/\s+/).map((function(e){return replaceXRange(e,r)})).join(" ")}function replaceXRange(e,r){e=e.trim();var t=r.loose?c$1c[u$1f.XRANGELOOSE]:c$1c[u$1f.XRANGE];return e.replace(t,(function(t,n,o,i,s,p){a$1t("xRange",e,t,n,o,i,s,p);var E=isX(o);var c=E||isX(i);var l=c||isX(s);var u=l;"="===n&&u&&(n="");p=r.includePrerelease?"-0":"";if(E)t=">"===n||"<"===n?"<0.0.0-0":"*";else if(n&&u){c&&(i=0);s=0;if(">"===n){n=">=";if(c){o=+o+1;i=0;s=0;}else {i=+i+1;s=0;}}else if("<="===n){n="<";c?o=+o+1:i=+i+1;}t=n+o+"."+i+"."+s+p;}else c?t=">="+o+".0.0"+p+" <"+(+o+1)+".0.0"+p:l&&(t=">="+o+"."+i+".0"+p+" <"+o+"."+(+i+1)+".0"+p);a$1t("xRange return",t);return t}))}function replaceStars(e,r){a$1t("replaceStars",e,r);return e.trim().replace(c$1c[u$1f.STAR],"")}function hyphenReplace(e,r,t,n,a,o,i,s,p,E,c,l,u){r=isX(t)?"":isX(n)?">="+t+".0.0":isX(a)?">="+t+"."+n+".0":">="+r;s=isX(p)?"":isX(E)?"<"+(+p+1)+".0.0":isX(c)?"<"+p+"."+(+E+1)+".0":l?"<="+p+"."+E+"."+c+"-"+l:"<="+s;return (r+" "+s).trim()}Range.prototype.test=function(e){if(!e)return false;if("string"===typeof e)try{e=new SemVer(e,(this||r$1s).options);}catch(e){return false}for(var t=0;t<(this||r$1s).set.length;t++)if(testSet((this||r$1s).set[t],e,(this||r$1s).options))return true;return false};function testSet(e,r,t){for(var n=0;n0){var o=e[n].semver;if(o.major===r.major&&o.minor===r.minor&&o.patch===r.patch)return true}}return false}return true}t$1j.satisfies=satisfies;function satisfies(e,r,t){try{r=new Range(r,t);}catch(e){return false}return r.test(e)}t$1j.maxSatisfying=maxSatisfying;function maxSatisfying(e,r,t){var n=null;var a=null;try{var o=new Range(r,t);}catch(e){return null}e.forEach((function(e){if(o.test(e)&&(!n||-1===a.compare(e))){n=e;a=new SemVer(n,t);}}));return n}t$1j.minSatisfying=minSatisfying;function minSatisfying(e,r,t){var n=null;var a=null;try{var o=new Range(r,t);}catch(e){return null}e.forEach((function(e){if(o.test(e)&&(!n||1===a.compare(e))){n=e;a=new SemVer(n,t);}}));return n}t$1j.minVersion=minVersion$1;function minVersion$1(e,r){e=new Range(e,r);var t=new SemVer("0.0.0");if(e.test(t))return t;t=new SemVer("0.0.0-0");if(e.test(t))return t;t=null;for(var n=0;n":0===r.prerelease.length?r.patch++:r.prerelease.push(0);r.raw=r.format();case"":case">=":t&&!gt$6(t,r)||(t=r);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));}return t&&e.test(t)?t:null}t$1j.validRange=validRange;function validRange(e,r){try{return new Range(e,r).range||"*"}catch(e){return null}}t$1j.ltr=ltr;function ltr(e,r,t){return outside(e,r,"<",t)}t$1j.gtr=gtr;function gtr(e,r,t){return outside(e,r,">",t)}t$1j.outside=outside;function outside(e,r,t,n){e=new SemVer(e,n);r=new Range(r,n);var a,o,i,s,p;switch(t){case">":a=gt$6;o=lte;i=lt$6;s=">";p=">=";break;case"<":a=lt$6;o=gte;i=gt$6;s="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,r,n))return false;for(var E=0;E=0.0.0"));l=l||e;u=u||e;a(e.semver,l.semver,n)?l=e:i(e.semver,u.semver,n)&&(u=e);}));if(l.operator===s||l.operator===p)return false;if((!u.operator||u.operator===s)&&o(e,u.semver))return false;if(u.operator===p&&i(e,u.semver))return false}return true}t$1j.prerelease=prerelease;function prerelease(e,r){var t=parse$3(e,r);return t&&t.prerelease.length?t.prerelease:null}t$1j.intersects=intersects;function intersects(e,r,t){e=new Range(e,t);r=new Range(r,t);return e.intersects(r)}t$1j.coerce=coerce;function coerce(e,r){if(e instanceof SemVer)return e;"number"===typeof e&&(e=String(e));if("string"!==typeof e)return null;r=r||{};var t=null;if(r.rtl){var n;while((n=c$1c[u$1f.COERCERTL].exec(e))&&(!t||t.index+t[0].length!==e.length)){t&&n.index+n[0].length===t.index+t[0].length||(t=n);c$1c[u$1f.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;}c$1c[u$1f.COERCERTL].lastIndex=-1;}else t=e.match(c$1c[u$1f.COERCE]);return null===t?null:parse$3(t[2]+"."+(t[3]||"0")+"."+(t[4]||"0"),r)}var S$E=t$1j;const T$v=t$1j.SEMVER_SPEC_VERSION,g$Q=t$1j.tokens;const A$w=t$1j.re,d$16=t$1j.safeRe,C$A=t$1j.src,w$H=t$1j.parse,P$w=t$1j.valid,y$R=t$1j.clean,D$x=t$1j.SemVer,M$z=t$1j.inc,V$r=t$1j.diff,k$E=t$1j.compareIdentifiers,X$l=t$1j.rcompareIdentifiers,F$u=t$1j.major,G$n=t$1j.minor,j$z=t$1j.patch,U$v=t$1j.compare,b$S=t$1j.compareLoose,x$E=t$1j.compareBuild,$$n=t$1j.rcompare,B$x=t$1j.sort,q$q=t$1j.rsort,H$r=t$1j.gt,_$K=t$1j.lt,Y$l=t$1j.eq,z$q=t$1j.neq,Z$k=t$1j.gte,J$m=t$1j.lte,K$p=t$1j.cmp,Q$l=t$1j.Comparator,W$r=t$1j.Range,ee$f=t$1j.toComparators,re$e=t$1j.satisfies,te$e=t$1j.maxSatisfying,ne$e=t$1j.minSatisfying,ae$d=t$1j.minVersion,oe$d=t$1j.validRange,ie$e=t$1j.ltr,se$e=t$1j.gtr,pe$c=t$1j.outside,Ee$9=t$1j.prerelease,ce$c=t$1j.intersects,le$c=t$1j.coerce; -var r$1v = /*#__PURE__*/Object.freeze({ +var r$1t = /*#__PURE__*/Object.freeze({ __proto__: null, - 'default': v$U, - Comparator: Y$l, - Range: z$q, - SEMVER_SPEC_VERSION: O$x, - SemVer: d$14, - clean: A$x, - cmp: _$J, - coerce: ie$e, - compare: X$l, - compareBuild: F$u, - compareIdentifiers: y$S, - compareLoose: k$E, - diff: w$G, - eq: $$n, - gt: b$S, - gte: q$q, - gtr: te$e, - inc: C$A, - intersects: ae$e, - lt: x$E, - lte: H$r, - ltr: re$e, - major: D$z, - maxSatisfying: K$p, - minSatisfying: Q$l, - minVersion: W$q, - minor: V$r, - neq: B$y, - outside: ne$e, - parse: T$w, - patch: M$y, - prerelease: oe$e, - rcompare: G$n, - rcompareIdentifiers: P$v, - re: N$t, - rsort: U$v, - satisfies: J$m, - sort: j$y, - src: S$E, - toComparators: Z$k, - tokens: L$r, - valid: g$Q, - validRange: ee$f + Comparator: Q$l, + Range: W$r, + SEMVER_SPEC_VERSION: T$v, + SemVer: D$x, + clean: y$R, + cmp: K$p, + coerce: le$c, + compare: U$v, + compareBuild: x$E, + compareIdentifiers: k$E, + compareLoose: b$S, + default: S$E, + diff: V$r, + eq: Y$l, + gt: H$r, + gte: Z$k, + gtr: se$e, + inc: M$z, + intersects: ce$c, + lt: _$K, + lte: J$m, + ltr: ie$e, + major: F$u, + maxSatisfying: te$e, + minSatisfying: ne$e, + minVersion: ae$d, + minor: G$n, + neq: z$q, + outside: pe$c, + parse: w$H, + patch: j$z, + prerelease: Ee$9, + rcompare: $$n, + rcompareIdentifiers: X$l, + re: A$w, + rsort: q$q, + safeRe: d$16, + satisfies: re$e, + sort: B$x, + src: C$A, + toComparators: ee$f, + tokens: g$Q, + valid: P$w, + validRange: oe$d }); -var n$1s="default"in r$1v?v$U:r$1v;var r$1t={};const i$1a=n$1s;const{Semver:o$1u,SemverRange:a$1p}=e$1e;r$1t=function nodeRangeToSemverRange(e){let t=i$1a.validRange(e);if(!t)return new a$1p(e);if("*"===t)return new a$1p(t);try{let t=new a$1p(e);if(!t.version.tag)return t}catch(e){if("ENOTSEMVER"!==e.code)throw e}let n;for(let e of t.split("||")){let t,r,i,f;for(let n of e.split(" ")){let e="<"===n[0];let a=">"===n[0];if(!e&&!a){t=n;i=true;break}let l="="===n[1];if(a){if(!e){let e="="===n[1];let t=new o$1u(n.substr(1+e));if(!r||r.lt(t)){r=t;f=e;}}}else {let e=new o$1u(n.substr(1+l));if(!t||t.gt(e)){t=e;i=l;}}}if(!t){n=new a$1p("*");continue}if(r&&t&&r.gt(t)){let e=new a$1p(r.toString());n&&(n.contains(e)||!e.gt(n)&&!e.contains(n))||(n=e);continue}let l;if(t){if(i){let e=new a$1p(t.toString());n&&(n.contains(e)||!e.gt(n)&&!e.contains(n))||(n=e);continue}let e=0,o=0,f=0,s="";if(t.pre&&r.major===t.major&&r.minor===t.minor&&r.patch===t.patch){n=new a$1p("~"+r.toString());continue}if(0===t.patch)if(0===t.minor){if(t.major>0){e=t.major-1;s="^";}}else {e=t.major;o=t.minor-1;s="~";}else {e=t.major;o=t.minor;f=0;s="~";}l=new a$1p(0===e&&"^"===s?"0":s+e+"."+o+"."+f);}if(!r){n=l;continue}let s;s=f?new a$1p("^^"+r.toString()):r.pre?new a$1p("^^"+r.major+"."+r.minor+"."+r.patch+"-"+[...r.pre,1].join(".")):new a$1p("^^"+r.major+"."+r.minor+"."+(r.patch+1));let c=l?s.intersect(l)||l:s;n&&(n.contains(c)||!c.gt(n)&&!c.contains(n))||(n=c);}return n};var f$1e=r$1t; +var n$1u="default"in r$1t?S$E:r$1t;var r$1r={};const i$19=n$1u;const{Semver:o$1u,SemverRange:a$1s}=e$1f;r$1r=function nodeRangeToSemverRange(e){let t=i$19.validRange(e);if(!t)return new a$1s(e);if("*"===t)return new a$1s(t);try{let t=new a$1s(e);if(!t.version.tag)return t}catch(e){if("ENOTSEMVER"!==e.code)throw e}let n;for(let e of t.split("||")){let t,r,i,f;for(let n of e.split(" ")){let e="<"===n[0];let a=">"===n[0];if(!e&&!a){t=n;i=true;break}let l="="===n[1];if(a){if(!e){let e="="===n[1];let t=new o$1u(n.substr(1+e));if(!r||r.lt(t)){r=t;f=e;}}}else {let e=new o$1u(n.substr(1+l));if(!t||t.gt(e)){t=e;i=l;}}}if(!t){n=new a$1s("*");continue}if(r&&t&&r.gt(t)){let e=new a$1s(r.toString());n&&(n.contains(e)||!e.gt(n)&&!e.contains(n))||(n=e);continue}let l;if(t){if(i){let e=new a$1s(t.toString());n&&(n.contains(e)||!e.gt(n)&&!e.contains(n))||(n=e);continue}let e=0,o=0,f=0,s="";if(t.pre&&r.major===t.major&&r.minor===t.minor&&r.patch===t.patch){n=new a$1s("~"+r.toString());continue}if(0===t.patch)if(0===t.minor){if(t.major>0){e=t.major-1;s="^";}}else {e=t.major;o=t.minor-1;s="~";}else {e=t.major;o=t.minor;f=0;s="~";}l=new a$1s(0===e&&"^"===s?"0":s+e+"."+o+"."+f);}if(!r){n=l;continue}let s;s=f?new a$1s("^^"+r.toString()):r.pre?new a$1s("^^"+r.major+"."+r.minor+"."+r.patch+"-"+[...r.pre,1].join(".")):new a$1s("^^"+r.major+"."+r.minor+"."+(r.patch+1));let c=l?s.intersect(l)||l:s;n&&(n.contains(c)||!c.gt(n)&&!c.contains(n))||(n=c);}return n};var f$1g=r$1r; function wrapWithRetry(t){return async function(r,...e){let a=0;while(true)try{return await t(r,...e)}catch(t){if(a++>3)throw t}}} -let r$1s=[];let o$1t=0;function pushFetchPool(){if(++o$1t>100)return new Promise((t=>r$1s.push(t)))}function popFetchPool(){o$1t--;r$1s.length&&r$1s.shift()();}const e$1c=wrapWithRetry((async function fetch(t,r){const o=pushFetchPool();o&&await o;try{return await globalThis.fetch(t,r)}catch(t){if(t instanceof TypeError)return {status:401,async text(){return ""},async json(){throw new Error("Not JSON")},arrayBuffer(){return new ArrayBuffer(0)}}}finally{popFetchPool();}})); +let r$1q=[];let o$1t=0;function pushFetchPool(){if(++o$1t>100)return new Promise((t=>r$1q.push(t)))}function popFetchPool(){o$1t--;r$1q.length&&r$1q.shift()();}const e$1d=wrapWithRetry((async function fetch(t,r){const o=pushFetchPool();o&&await o;try{return await globalThis.fetch(t,r)}catch(t){if(t instanceof TypeError)return {status:401,async text(){return ""},async json(){throw new Error("Not JSON")},arrayBuffer(){return new ArrayBuffer(0)}}}finally{popFetchPool();}})); -function sourceResponse(t){return {status:200,async text(){return t.toString()},async json(){return JSON.parse(t.toString())},arrayBuffer(){return t.buffer||t}}}const r$1r={status:200,async text(){return ""},async json(){throw new Error("Not JSON")},arrayBuffer(){return new ArrayBuffer(0)}};const s$1h=require("vscode");const o$1s=wrapWithRetry((async function(t,o){if(!o)throw new Error("Always expect fetch options to be passed");const n=t.toString();const a=n.slice(0,n.indexOf(":")+1);switch(a){case"ipfs:":throw new Error("IPFS Support for VSCode not yet implemented");case"file:":if(n.endsWith("/"))try{await s$1h.workspace.fs.readFile(s$1h.Uri.parse(n));return {status:404,statusText:"Directory does not exist"}}catch(t){if("FileIsADirectory"===t.code)return r$1r;throw t}try{return sourceResponse((new TextDecoder).decode(await s$1h.workspace.fs.readFile(s$1h.Uri.parse(n))))}catch(t){return "FileIsADirectory"===t.code?r$1r:"Unavailable"===t.code||"EntryNotFound"===t.code||"FileNotFound"===t.code?{status:404,statusText:t.toString()}:{status:500,statusText:t.toString()}}case"data:":case"http:":case"https:":return e$1c(t,o)}})); - -var t$1g;let s$1g;if("undefined"!==typeof Deno)s$1g=new URL("file://"+Deno.cwd()+"/");else if("undefined"!==typeof process&&(null===(t$1g=process.versions)||void 0===t$1g?void 0:t$1g.node))s$1g=new URL("file://"+process.cwd()+"/");else if("undefined"!==typeof document){const t=document.querySelector("base[href]");t?s$1g=new URL(t.href+(t.href.endsWith("/")?"":"/")):"undefined"!==typeof location&&(s$1g=new URL("../",new URL(location.href)));}function getCommonBase(t,s){if(t.startsWith(s))return s;if(s.startsWith(t))return t;const e=t.split("/");const r=s.split("/");let o=0;while(e[o]===r[o])o++;return e.slice(0,o).join("/")+"/"}function sameOrigin(t,s){return t.protocol===s.protocol&&t.host===s.host&&t.port===s.port&&t.username===s.username&&t.password===s.password}function resolve$1(t,s,e){return t.startsWith("/")?e?new URL("."+t.slice("/"===t[1]?1:0),e).href:t:new URL(t,s).href}function rebase(t,s,e=null){let r;if(t.startsWith("/")||t.startsWith("//")){if(null===e)return t;r=new URL(t,e);}else r=new URL(t,s);return e&&r.href.startsWith(e.href)?r.href.slice(e.href.length-1):e&&e.href.startsWith(r.href)?"/"+relative(r,e):sameOrigin(r,s)?relative(r,s):r.href}function relative(t,s){const e=s.pathname;const r=t.pathname;const o=Math.min(e.length,r.length);let i=-1;for(let t=0;t[t,resolve$1(t,e,r)]));o=o.sort((([,t],[,s])=>t.lengths===t||s.endsWith("/")&&t.startsWith(s)))}function getMapMatch$1(t,s){if(t in s)return t;let e;for(const r of Object.keys(s)){const s=r.endsWith("*");(r.endsWith("/")||s)&&(t.startsWith(s?r.slice(0,-1):r)&&(!e||r.length>e.length)&&(e=r));}return e} + */constructor(t){this.imports=Object.create(null);this.scopes=Object.create(null);let{map:e,mapUrl:r=s$1h,rootUrl:o}=t instanceof URL||"string"===typeof t||"undefined"===typeof t?{mapUrl:t,map:void 0,rootUrl:void 0}:t;"string"===typeof r&&(r=new URL(r));this.mapUrl=r;void 0!==o||"http:"!==this.mapUrl.protocol&&"https:"!==this.mapUrl.protocol?"string"===typeof o&&(o=new URL(o)):o=new URL("/",this.mapUrl);this.rootUrl=o||null;e&&this.extend(e);}}function getScopeMatches(t,s,e,r){let o=Object.keys(s).map((t=>[t,resolve$1(t,e,r)]));o=o.sort((([,t],[,s])=>t.lengths===t||s.endsWith("/")&&t.startsWith(s)))}function getMapMatch$1(t,s){if(t in s)return t;let e;for(const r of Object.keys(s)){const s=r.endsWith("*");(r.endsWith("/")||s)&&(t.startsWith(s?r.slice(0,-1):r)&&(!e||r.length>e.length)&&(e=r));}return e} -let e$1b,a$1o,r$1q,i$19=2<<19;const s$1f=1===new Uint8Array(new Uint16Array([1]).buffer)[0]?function(e,a){const r=e.length;let i=0;for(;i>>8;}},t$1f="xportmportlassetaromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels";let c$1a,f$1d,n$1r;function parse$2(ce,fe="@"){c$1a=ce,f$1d=fe;const ne=2*c$1a.length+(2<<18);if(ne>i$19||!e$1b){for(;ne>i$19;)i$19*=2;a$1o=new ArrayBuffer(i$19),s$1f(t$1f,new Uint16Array(a$1o,16,105)),e$1b=function(e,a,r){"use asm";var i=new e.Int8Array(r),s=new e.Int16Array(r),t=new e.Int32Array(r),c=new e.Uint8Array(r),f=new e.Uint16Array(r),n=1024;function b(){var e=0,a=0,r=0,c=0,ce=0,fe=0,ne=0;ne=n;n=n+10240|0;i[795]=1;s[395]=0;s[396]=0;t[67]=t[2];i[796]=0;t[66]=0;i[794]=0;t[68]=ne+2048;t[69]=ne;i[797]=0;e=(t[3]|0)+-2|0;t[70]=e;a=e+(t[64]<<1)|0;t[71]=a;e:while(1){r=e+2|0;t[70]=r;if(e>>>0>=a>>>0){ce=18;break}a:do{switch(s[r>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if((((s[396]|0)==0?H(r)|0:0)?(m(e+4|0,16,10)|0)==0:0)?(l(),(i[795]|0)==0):0){ce=9;break e}else ce=17;break}case 105:{if(H(r)|0?(m(e+4|0,26,10)|0)==0:0){k();ce=17;}else ce=17;break}case 59:{ce=17;break}case 47:switch(s[e+4>>1]|0){case 47:{P();break a}case 42:{y(1);break a}default:{ce=16;break e}}default:{ce=16;break e}}}while(0);if((ce|0)==17){ce=0;t[67]=t[70];}e=t[70]|0;a=t[71]|0;}if((ce|0)==9){e=t[70]|0;t[67]=e;ce=19;}else if((ce|0)==16){i[795]=0;t[70]=e;ce=19;}else if((ce|0)==18)if(!(i[794]|0)){e=r;ce=19;}else e=0;do{if((ce|0)==19){e:while(1){a=e+2|0;t[70]=a;c=a;if(e>>>0>=(t[71]|0)>>>0){ce=82;break}a:do{switch(s[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(((s[396]|0)==0?H(a)|0:0)?(m(e+4|0,16,10)|0)==0:0){l();ce=81;}else ce=81;break}case 105:{if(H(a)|0?(m(e+4|0,26,10)|0)==0:0){k();ce=81;}else ce=81;break}case 99:{if((H(a)|0?(m(e+4|0,36,8)|0)==0:0)?V(s[e+12>>1]|0)|0:0){i[797]=1;ce=81;}else ce=81;break}case 40:{c=t[68]|0;a=s[396]|0;ce=a&65535;t[c+(ce<<3)>>2]=1;r=t[67]|0;s[396]=a+1<<16>>16;t[c+(ce<<3)+4>>2]=r;ce=81;break}case 41:{a=s[396]|0;if(!(a<<16>>16)){ce=36;break e}a=a+-1<<16>>16;s[396]=a;r=s[395]|0;if(r<<16>>16!=0?(fe=t[(t[69]|0)+((r&65535)+-1<<2)>>2]|0,(t[fe+20>>2]|0)==(t[(t[68]|0)+((a&65535)<<3)+4>>2]|0)):0){a=fe+4|0;if(!(t[a>>2]|0))t[a>>2]=c;t[fe+12>>2]=e+4;s[395]=r+-1<<16>>16;ce=81;}else ce=81;break}case 123:{ce=t[67]|0;c=t[61]|0;e=ce;do{if((s[ce>>1]|0)==41&(c|0)!=0?(t[c+4>>2]|0)==(ce|0):0){a=t[62]|0;t[61]=a;if(!a){t[57]=0;break}else {t[a+28>>2]=0;break}}}while(0);c=t[68]|0;r=s[396]|0;ce=r&65535;t[c+(ce<<3)>>2]=(i[797]|0)==0?2:6;s[396]=r+1<<16>>16;t[c+(ce<<3)+4>>2]=e;i[797]=0;ce=81;break}case 125:{e=s[396]|0;if(!(e<<16>>16)){ce=49;break e}c=t[68]|0;ce=e+-1<<16>>16;s[396]=ce;if((t[c+((ce&65535)<<3)>>2]|0)==4){h();ce=81;}else ce=81;break}case 39:{d(39);ce=81;break}case 34:{d(34);ce=81;break}case 47:switch(s[e+4>>1]|0){case 47:{P();break a}case 42:{y(1);break a}default:{e=t[67]|0;c=s[e>>1]|0;r:do{if(!(U(c)|0)){switch(c<<16>>16){case 41:if(D(t[(t[68]|0)+(f[396]<<3)+4>>2]|0)|0){ce=69;break r}else {ce=66;break r}case 125:break;default:{ce=66;break r}}a=t[68]|0;r=f[396]|0;if(!(p(t[a+(r<<3)+4>>2]|0)|0)?(t[a+(r<<3)>>2]|0)!=6:0)ce=66;else ce=69;}else switch(c<<16>>16){case 46:if(((s[e+-2>>1]|0)+-48&65535)<10){ce=66;break r}else {ce=69;break r}case 43:if((s[e+-2>>1]|0)==43){ce=66;break r}else {ce=69;break r}case 45:if((s[e+-2>>1]|0)==45){ce=66;break r}else {ce=69;break r}default:{ce=69;break r}}}while(0);r:do{if((ce|0)==66){ce=0;if(!(o(e)|0)){switch(c<<16>>16){case 0:{ce=69;break r}case 47:{if(i[796]|0){ce=69;break r}break}default:{}}r=t[3]|0;a=c;do{if(e>>>0<=r>>>0)break;e=e+-2|0;t[67]=e;a=s[e>>1]|0;}while(!(E(a)|0));if(F(a)|0){do{if(e>>>0<=r>>>0)break;e=e+-2|0;t[67]=e;}while(F(s[e>>1]|0)|0);if(j(e)|0){g();i[796]=0;ce=81;break a}else e=1;}else e=1;}else ce=69;}}while(0);if((ce|0)==69){g();e=0;}i[796]=e;ce=81;break a}}case 96:{c=t[68]|0;r=s[396]|0;ce=r&65535;t[c+(ce<<3)+4>>2]=t[67];s[396]=r+1<<16>>16;t[c+(ce<<3)>>2]=3;h();ce=81;break}default:ce=81;}}while(0);if((ce|0)==81){ce=0;t[67]=t[70];}e=t[70]|0;}if((ce|0)==36){T();e=0;break}else if((ce|0)==49){T();e=0;break}else if((ce|0)==82){e=(i[794]|0)==0?(s[395]|s[396])<<16>>16==0:0;break}}}while(0);n=ne;return e|0}function l(){var e=0,a=0,r=0,c=0,f=0,n=0,ce=0,fe=0,ne=0,be=0,le=0,ke=0,ue=0,oe=0;fe=t[70]|0;ne=t[63]|0;oe=fe+12|0;t[70]=oe;r=w(1)|0;e=t[70]|0;if(!((e|0)==(oe|0)?!(I(r)|0):0))ue=3;e:do{if((ue|0)==3){a:do{switch(r<<16>>16){case 123:{t[70]=e+2;e=w(1)|0;r=t[70]|0;while(1){if(W(e)|0){d(e);e=(t[70]|0)+2|0;t[70]=e;}else {q(e)|0;e=t[70]|0;}w(1)|0;e=v(r,e)|0;if(e<<16>>16==44){t[70]=(t[70]|0)+2;e=w(1)|0;}a=r;r=t[70]|0;if(e<<16>>16==125){ue=15;break}if((r|0)==(a|0)){ue=12;break}if(r>>>0>(t[71]|0)>>>0){ue=14;break}}if((ue|0)==12){T();break e}else if((ue|0)==14){T();break e}else if((ue|0)==15){t[70]=r+2;break a}break}case 42:{t[70]=e+2;w(1)|0;oe=t[70]|0;v(oe,oe)|0;break}default:{i[795]=0;switch(r<<16>>16){case 100:{fe=e+14|0;t[70]=fe;switch((w(1)|0)<<16>>16){case 97:{a=t[70]|0;if((m(a+2|0,56,8)|0)==0?(f=a+10|0,F(s[f>>1]|0)|0):0){t[70]=f;w(0)|0;ue=22;}break}case 102:{ue=22;break}case 99:{a=t[70]|0;if(((m(a+2|0,36,8)|0)==0?(c=a+10|0,oe=s[c>>1]|0,V(oe)|0|oe<<16>>16==123):0)?(t[70]=c,n=w(1)|0,n<<16>>16!=123):0){ke=n;ue=31;}break}default:{}}r:do{if((ue|0)==22?(ce=t[70]|0,(m(ce+2|0,64,14)|0)==0):0){r=ce+16|0;a=s[r>>1]|0;if(!(V(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break r}t[70]=r;a=w(1)|0;if(a<<16>>16==42){t[70]=(t[70]|0)+2;a=w(1)|0;}if(a<<16>>16!=40){ke=a;ue=31;}}}while(0);if((ue|0)==31?(be=t[70]|0,q(ke)|0,le=t[70]|0,le>>>0>be>>>0):0){$(e,fe,be,le);t[70]=(t[70]|0)+-2;break e}$(e,fe,0,0);t[70]=e+12;break e}case 97:{t[70]=e+10;w(0)|0;e=t[70]|0;ue=35;break}case 102:{ue=35;break}case 99:{if((m(e+2|0,36,8)|0)==0?(a=e+10|0,E(s[a>>1]|0)|0):0){t[70]=a;oe=w(1)|0;ue=t[70]|0;q(oe)|0;oe=t[70]|0;$(ue,oe,ue,oe);t[70]=(t[70]|0)+-2;break e}e=e+4|0;t[70]=e;break}case 108:case 118:break;default:break e}if((ue|0)==35){t[70]=e+16;e=w(1)|0;if(e<<16>>16==42){t[70]=(t[70]|0)+2;e=w(1)|0;}ue=t[70]|0;q(e)|0;oe=t[70]|0;$(ue,oe,ue,oe);t[70]=(t[70]|0)+-2;break e}e=e+4|0;t[70]=e;i[795]=0;r:while(1){t[70]=e+2;oe=w(1)|0;e=t[70]|0;switch((q(oe)|0)<<16>>16){case 91:case 123:break r;default:{}}a=t[70]|0;if((a|0)==(e|0))break e;$(e,a,e,a);if((w(1)|0)<<16>>16!=44)break;e=t[70]|0;}t[70]=(t[70]|0)+-2;break e}}}while(0);oe=(w(1)|0)<<16>>16==102;e=t[70]|0;if(oe?(m(e+2|0,50,6)|0)==0:0){t[70]=e+8;u(fe,w(1)|0);e=(ne|0)==0?232:ne+16|0;while(1){e=t[e>>2]|0;if(!e)break e;t[e+12>>2]=0;t[e+8>>2]=0;e=e+16|0;}}t[70]=e+-2;}}while(0);return}function k(){var e=0,a=0,r=0,c=0,f=0,n=0;f=t[70]|0;e=f+12|0;t[70]=e;e:do{switch((w(1)|0)<<16>>16){case 40:{a=t[68]|0;n=s[396]|0;r=n&65535;t[a+(r<<3)>>2]=5;e=t[70]|0;s[396]=n+1<<16>>16;t[a+(r<<3)+4>>2]=e;if((s[t[67]>>1]|0)!=46){t[70]=e+2;n=w(1)|0;A(f,t[70]|0,0,e);a=t[61]|0;r=t[69]|0;f=s[395]|0;s[395]=f+1<<16>>16;t[r+((f&65535)<<2)>>2]=a;switch(n<<16>>16){case 39:{d(39);break}case 34:{d(34);break}default:{t[70]=(t[70]|0)+-2;break e}}e=(t[70]|0)+2|0;t[70]=e;switch((w(1)|0)<<16>>16){case 44:{t[70]=(t[70]|0)+2;w(1)|0;f=t[61]|0;t[f+4>>2]=e;n=t[70]|0;t[f+16>>2]=n;i[f+24>>0]=1;t[70]=n+-2;break e}case 41:{s[396]=(s[396]|0)+-1<<16>>16;n=t[61]|0;t[n+4>>2]=e;t[n+12>>2]=(t[70]|0)+2;i[n+24>>0]=1;s[395]=(s[395]|0)+-1<<16>>16;break e}default:{t[70]=(t[70]|0)+-2;break e}}}break}case 46:{t[70]=(t[70]|0)+2;if((w(1)|0)<<16>>16==109?(a=t[70]|0,(m(a+2|0,44,6)|0)==0):0){e=t[67]|0;if(!(G(e)|0)?(s[e>>1]|0)==46:0)break e;A(f,f,a+8|0,2);}break}case 42:case 39:case 34:{c=18;break}case 123:{e=t[70]|0;if(s[396]|0){t[70]=e+-2;break e}while(1){if(e>>>0>=(t[71]|0)>>>0)break;e=w(1)|0;if(!(W(e)|0)){if(e<<16>>16==125){c=33;break}}else d(e);e=(t[70]|0)+2|0;t[70]=e;}if((c|0)==33)t[70]=(t[70]|0)+2;n=(w(1)|0)<<16>>16==102;e=t[70]|0;if(n?m(e+2|0,50,6)|0:0){T();break e}t[70]=e+8;e=w(1)|0;if(W(e)|0){u(f,e);break e}else {T();break e}}default:if((t[70]|0)==(e|0))t[70]=f+10;else c=18;}}while(0);do{if((c|0)==18){if(s[396]|0){t[70]=(t[70]|0)+-2;break}e=t[71]|0;a=t[70]|0;while(1){if(a>>>0>=e>>>0){c=25;break}r=s[a>>1]|0;if(W(r)|0){c=23;break}n=a+2|0;t[70]=n;a=n;}if((c|0)==23){u(f,r);break}else if((c|0)==25){T();break}}}while(0);return}function u(e,a){e=e|0;a=a|0;var r=0,i=0;r=(t[70]|0)+2|0;switch(a<<16>>16){case 39:{d(39);i=5;break}case 34:{d(34);i=5;break}default:T();}do{if((i|0)==5){A(e,r,t[70]|0,1);t[70]=(t[70]|0)+2;a=w(0)|0;e=a<<16>>16==97;if(e){r=t[70]|0;if(m(r+2|0,78,10)|0)i=11;}else {r=t[70]|0;if(!(((a<<16>>16==119?(s[r+2>>1]|0)==105:0)?(s[r+4>>1]|0)==116:0)?(s[r+6>>1]|0)==104:0))i=11;}if((i|0)==11){t[70]=r+-2;break}t[70]=r+((e?6:4)<<1);if((w(1)|0)<<16>>16!=123){t[70]=r;break}e=t[70]|0;a=e;e:while(1){t[70]=a+2;a=w(1)|0;switch(a<<16>>16){case 39:{d(39);t[70]=(t[70]|0)+2;a=w(1)|0;break}case 34:{d(34);t[70]=(t[70]|0)+2;a=w(1)|0;break}default:a=q(a)|0;}if(a<<16>>16!=58){i=20;break}t[70]=(t[70]|0)+2;switch((w(1)|0)<<16>>16){case 39:{d(39);break}case 34:{d(34);break}default:{i=24;break e}}t[70]=(t[70]|0)+2;switch((w(1)|0)<<16>>16){case 125:{i=29;break e}case 44:break;default:{i=28;break e}}t[70]=(t[70]|0)+2;if((w(1)|0)<<16>>16==125){i=29;break}a=t[70]|0;}if((i|0)==20){t[70]=r;break}else if((i|0)==24){t[70]=r;break}else if((i|0)==28){t[70]=r;break}else if((i|0)==29){i=t[61]|0;t[i+16>>2]=e;t[i+12>>2]=(t[70]|0)+2;break}}}while(0);return}function o(e){e=e|0;e:do{switch(s[e>>1]|0){case 100:switch(s[e+-2>>1]|0){case 105:{e=O(e+-4|0,88,2)|0;break e}case 108:{e=O(e+-4|0,92,3)|0;break e}default:{e=0;break e}}case 101:switch(s[e+-2>>1]|0){case 115:switch(s[e+-4>>1]|0){case 108:{e=B(e+-6|0,101)|0;break e}case 97:{e=B(e+-6|0,99)|0;break e}default:{e=0;break e}}case 116:{e=O(e+-4|0,98,4)|0;break e}case 117:{e=O(e+-4|0,106,6)|0;break e}default:{e=0;break e}}case 102:{if((s[e+-2>>1]|0)==111?(s[e+-4>>1]|0)==101:0)switch(s[e+-6>>1]|0){case 99:{e=O(e+-8|0,118,6)|0;break e}case 112:{e=O(e+-8|0,130,2)|0;break e}default:{e=0;break e}}else e=0;break}case 107:{e=O(e+-2|0,134,4)|0;break}case 110:{e=e+-2|0;if(B(e,105)|0)e=1;else e=O(e,142,5)|0;break}case 111:{e=B(e+-2|0,100)|0;break}case 114:{e=O(e+-2|0,152,7)|0;break}case 116:{e=O(e+-2|0,166,4)|0;break}case 119:switch(s[e+-2>>1]|0){case 101:{e=B(e+-4|0,110)|0;break e}case 111:{e=O(e+-4|0,174,3)|0;break e}default:{e=0;break e}}default:e=0;}}while(0);return e|0}function h(){var e=0,a=0,r=0,i=0;a=t[71]|0;r=t[70]|0;e:while(1){e=r+2|0;if(r>>>0>=a>>>0){a=10;break}switch(s[e>>1]|0){case 96:{a=7;break e}case 36:{if((s[r+4>>1]|0)==123){a=6;break e}break}case 92:{e=r+4|0;break}default:{}}r=e;}if((a|0)==6){e=r+4|0;t[70]=e;a=t[68]|0;i=s[396]|0;r=i&65535;t[a+(r<<3)>>2]=4;s[396]=i+1<<16>>16;t[a+(r<<3)+4>>2]=e;}else if((a|0)==7){t[70]=e;r=t[68]|0;i=(s[396]|0)+-1<<16>>16;s[396]=i;if((t[r+((i&65535)<<3)>>2]|0)!=3)T();}else if((a|0)==10){t[70]=e;T();}return}function w(e){e=e|0;var a=0,r=0,i=0;r=t[70]|0;e:do{a=s[r>>1]|0;a:do{if(a<<16>>16!=47)if(e)if(V(a)|0)break;else break e;else if(F(a)|0)break;else break e;else switch(s[r+2>>1]|0){case 47:{P();break a}case 42:{y(e);break a}default:{a=47;break e}}}while(0);i=t[70]|0;r=i+2|0;t[70]=r;}while(i>>>0<(t[71]|0)>>>0);return a|0}function d(e){e=e|0;var a=0,r=0,i=0,c=0;c=t[71]|0;a=t[70]|0;while(1){i=a+2|0;if(a>>>0>=c>>>0){a=9;break}r=s[i>>1]|0;if(r<<16>>16==e<<16>>16){a=10;break}if(r<<16>>16==92){r=a+4|0;if((s[r>>1]|0)==13){a=a+6|0;a=(s[a>>1]|0)==10?a:r;}else a=r;}else if(Z(r)|0){a=9;break}else a=i;}if((a|0)==9){t[70]=i;T();}else if((a|0)==10)t[70]=i;return}function v(e,a){e=e|0;a=a|0;var r=0,i=0,c=0,f=0;r=t[70]|0;i=s[r>>1]|0;f=(e|0)==(a|0);c=f?0:e;f=f?0:a;if(i<<16>>16==97){t[70]=r+4;r=w(1)|0;e=t[70]|0;if(W(r)|0){d(r);a=(t[70]|0)+2|0;t[70]=a;}else {q(r)|0;a=t[70]|0;}i=w(1)|0;r=t[70]|0;}if((r|0)!=(e|0))$(e,a,c,f);return i|0}function A(e,a,r,s){e=e|0;a=a|0;r=r|0;s=s|0;var c=0,f=0;c=t[65]|0;t[65]=c+32;f=t[61]|0;t[((f|0)==0?228:f+28|0)>>2]=c;t[62]=f;t[61]=c;t[c+8>>2]=e;if(2==(s|0))e=r;else e=1==(s|0)?r+2|0:0;t[c+12>>2]=e;t[c>>2]=a;t[c+4>>2]=r;t[c+16>>2]=0;t[c+20>>2]=s;i[c+24>>0]=1==(s|0)&1;t[c+28>>2]=0;return}function C(){var e=0,a=0,r=0;r=t[71]|0;a=t[70]|0;e:while(1){e=a+2|0;if(a>>>0>=r>>>0){a=6;break}switch(s[e>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{e=a+4|0;break}default:{}}a=e;}if((a|0)==6){t[70]=e;T();e=0;}else if((a|0)==7){t[70]=e;e=93;}return e|0}function g(){var e=0,a=0,r=0;e:while(1){e=t[70]|0;a=e+2|0;t[70]=a;if(e>>>0>=(t[71]|0)>>>0){r=7;break}switch(s[a>>1]|0){case 13:case 10:{r=7;break e}case 47:break e;case 91:{C()|0;break}case 92:{t[70]=e+4;break}default:{}}}if((r|0)==7)T();return}function p(e){e=e|0;switch(s[e>>1]|0){case 62:{e=(s[e+-2>>1]|0)==61;break}case 41:case 59:{e=1;break}case 104:{e=O(e+-2|0,200,4)|0;break}case 121:{e=O(e+-2|0,208,6)|0;break}case 101:{e=O(e+-2|0,220,3)|0;break}default:e=0;}return e|0}function y(e){e=e|0;var a=0,r=0,i=0,c=0,f=0;c=(t[70]|0)+2|0;t[70]=c;r=t[71]|0;while(1){a=c+2|0;if(c>>>0>=r>>>0)break;i=s[a>>1]|0;if(!e?Z(i)|0:0)break;if(i<<16>>16==42?(s[c+4>>1]|0)==47:0){f=8;break}c=a;}if((f|0)==8){t[70]=a;a=c+4|0;}t[70]=a;return}function m(e,a,r){e=e|0;a=a|0;r=r|0;var s=0,t=0;e:do{if(!r)e=0;else {while(1){s=i[e>>0]|0;t=i[a>>0]|0;if(s<<24>>24!=t<<24>>24)break;r=r+-1|0;if(!r){e=0;break e}else {e=e+1|0;a=a+1|0;}}e=(s&255)-(t&255)|0;}}while(0);return e|0}function I(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:{e=1;break}default:if((e&-8)<<16>>16==40|(e+-58&65535)<6)e=1;else {switch(e<<16>>16){case 91:case 93:case 94:{e=1;break e}default:{}}e=(e+-123&65535)<4;}}}while(0);return e|0}function U(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:break;default:if(!((e+-58&65535)<6|(e+-40&65535)<7&e<<16>>16!=41)){switch(e<<16>>16){case 91:case 94:break e;default:{}}return e<<16>>16!=125&(e+-123&65535)<4|0}}}while(0);return 1}function x(e){e=e|0;var a=0;a=s[e>>1]|0;e:do{if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:{}}if(I(a)|0)return a<<16>>16!=46|(G(e)|0)|0;else a=0;}else a=1;}while(0);return a|0}function S(e){e=e|0;var a=0,r=0,i=0,c=0;r=n;n=n+16|0;i=r;t[i>>2]=0;t[64]=e;a=t[3]|0;c=a+(e<<1)|0;e=c+2|0;s[c>>1]=0;t[i>>2]=e;t[65]=e;t[57]=0;t[61]=0;t[59]=0;t[58]=0;t[63]=0;t[60]=0;n=r;return a|0}function O(e,a,r){e=e|0;a=a|0;r=r|0;var i=0,s=0;i=e+(0-r<<1)|0;s=i+2|0;e=t[3]|0;if(s>>>0>=e>>>0?(m(s,a,r<<1)|0)==0:0)if((s|0)==(e|0))e=1;else e=x(i)|0;else e=0;return e|0}function $(e,a,r,i){e=e|0;a=a|0;r=r|0;i=i|0;var s=0,c=0;s=t[65]|0;t[65]=s+20;c=t[63]|0;t[((c|0)==0?232:c+16|0)>>2]=s;t[63]=s;t[s>>2]=e;t[s+4>>2]=a;t[s+8>>2]=r;t[s+12>>2]=i;t[s+16>>2]=0;return}function j(e){e=e|0;switch(s[e>>1]|0){case 107:{e=O(e+-2|0,134,4)|0;break}case 101:{if((s[e+-2>>1]|0)==117)e=O(e+-4|0,106,6)|0;else e=0;break}default:e=0;}return e|0}function B(e,a){e=e|0;a=a|0;var r=0;r=t[3]|0;if(r>>>0<=e>>>0?(s[e>>1]|0)==a<<16>>16:0)if((r|0)==(e|0))r=1;else r=E(s[e+-2>>1]|0)|0;else r=0;return r|0}function E(e){e=e|0;e:do{if((e+-9&65535)<5)e=1;else {switch(e<<16>>16){case 32:case 160:{e=1;break e}default:{}}e=e<<16>>16!=46&(I(e)|0);}}while(0);return e|0}function P(){var e=0,a=0,r=0;e=t[71]|0;r=t[70]|0;e:while(1){a=r+2|0;if(r>>>0>=e>>>0)break;switch(s[a>>1]|0){case 13:case 10:break e;default:r=a;}}t[70]=a;return}function q(e){e=e|0;while(1){if(V(e)|0)break;if(I(e)|0)break;e=(t[70]|0)+2|0;t[70]=e;e=s[e>>1]|0;if(!(e<<16>>16)){e=0;break}}return e|0}function z(){var e=0;e=t[(t[59]|0)+20>>2]|0;switch(e|0){case 1:{e=-1;break}case 2:{e=-2;break}default:e=e-(t[3]|0)>>1;}return e|0}function D(e){e=e|0;if(!(O(e,180,5)|0)?!(O(e,190,3)|0):0)e=O(e,196,2)|0;else e=1;return e|0}function F(e){e=e|0;switch(e<<16>>16){case 160:case 32:case 12:case 11:case 9:{e=1;break}default:e=0;}return e|0}function G(e){e=e|0;if((s[e>>1]|0)==46?(s[e+-2>>1]|0)==46:0)e=(s[e+-4>>1]|0)==46;else e=0;return e|0}function H(e){e=e|0;if((t[3]|0)==(e|0))e=1;else e=x(e+-2|0)|0;return e|0}function J(){var e=0;e=t[(t[60]|0)+12>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function K(){var e=0;e=t[(t[59]|0)+12>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function L(){var e=0;e=t[(t[60]|0)+8>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function M(){var e=0;e=t[(t[59]|0)+16>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function N(){var e=0;e=t[(t[59]|0)+4>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function Q(){var e=0;e=t[59]|0;e=t[((e|0)==0?228:e+28|0)>>2]|0;t[59]=e;return (e|0)!=0|0}function R(){var e=0;e=t[60]|0;e=t[((e|0)==0?232:e+16|0)>>2]|0;t[60]=e;return (e|0)!=0|0}function T(){i[794]=1;t[66]=(t[70]|0)-(t[3]|0)>>1;t[70]=(t[71]|0)+2;return}function V(e){e=e|0;return (e|128)<<16>>16==160|(e+-9&65535)<5|0}function W(e){e=e|0;return e<<16>>16==39|e<<16>>16==34|0}function X(){return (t[(t[59]|0)+8>>2]|0)-(t[3]|0)>>1|0}function Y(){return (t[(t[60]|0)+4>>2]|0)-(t[3]|0)>>1|0}function Z(e){e=e|0;return e<<16>>16==13|e<<16>>16==10|0}function _(){return (t[t[59]>>2]|0)-(t[3]|0)>>1|0}function ee(){return (t[t[60]>>2]|0)-(t[3]|0)>>1|0}function ae(){return c[(t[59]|0)+24>>0]|0|0}function re(e){e=e|0;t[3]=e;return}function ie(){return (i[795]|0)!=0|0}function se(){return t[66]|0}function te(e){e=e|0;n=e+992+15&-16;return 992}return {su:te,ai:M,e:se,ee:Y,ele:J,els:L,es:ee,f:ie,id:z,ie:N,ip:ae,is:_,p:b,re:R,ri:Q,sa:S,se:K,ses:re,ss:X}}("undefined"!=typeof self?self:global,{},a$1o),r$1q=e$1b.su(i$19-(2<<17));}const be=c$1a.length+1;e$1b.ses(r$1q),e$1b.sa(be-1),s$1f(c$1a,new Uint16Array(a$1o,r$1q,be)),e$1b.p()||(n$1r=e$1b.e(),o$1r());const le=[],ke=[];for(;e$1b.ri();){const a=e$1b.is(),r=e$1b.ie(),i=e$1b.ai(),s=e$1b.id(),t=e$1b.ss(),f=e$1b.se();let n;e$1b.ip()&&(n=b$R(-1===s?a:a+1,c$1a.charCodeAt(-1===s?a-1:a))),le.push({n:n,s:a,e:r,ss:t,se:f,d:s,a:i});}for(;e$1b.re();){const a=e$1b.es(),r=e$1b.ee(),i=e$1b.els(),s=e$1b.ele(),t=c$1a.charCodeAt(a),f=i>=0?c$1a.charCodeAt(i):-1;ke.push({s:a,e:r,ls:i,le:s,n:34===t||39===t?b$R(a+1,t):c$1a.slice(a,r),ln:i<0?void 0:34===f||39===f?b$R(i+1,f):c$1a.slice(i,s)});}return [le,ke,!!e$1b.f()]}function b$R(e,a){n$1r=e;let r="",i=n$1r;for(;;){n$1r>=c$1a.length&&o$1r();const e=c$1a.charCodeAt(n$1r);if(e===a)break;92===e?(r+=c$1a.slice(i,n$1r),r+=l$1e(),i=n$1r):(8232===e||8233===e||u$1d(e)&&o$1r(),++n$1r);}return r+=c$1a.slice(i,n$1r++),r}function l$1e(){let e=c$1a.charCodeAt(++n$1r);switch(++n$1r,e){case 110:return "\n";case 114:return "\r";case 120:return String.fromCharCode(k$D(2));case 117:return function(){const e=c$1a.charCodeAt(n$1r);let a;123===e?(++n$1r,a=k$D(c$1a.indexOf("}",n$1r)-n$1r),++n$1r,a>1114111&&o$1r()):a=k$D(4);return a<=65535?String.fromCharCode(a):(a-=65536,String.fromCharCode(55296+(a>>10),56320+(1023&a)))}();case 116:return "\t";case 98:return "\b";case 118:return "\v";case 102:return "\f";case 13:10===c$1a.charCodeAt(n$1r)&&++n$1r;case 10:return "";case 56:case 57:o$1r();default:if(e>=48&&e<=55){let a=c$1a.substr(n$1r-1,3).match(/^[0-7]+/)[0],r=parseInt(a,8);return r>255&&(a=a.slice(0,-1),r=parseInt(a,8)),n$1r+=a.length-1,e=c$1a.charCodeAt(n$1r),"0"===a&&56!==e&&57!==e||o$1r(),String.fromCharCode(r)}return u$1d(e)?"":String.fromCharCode(e)}}function k$D(e){const a=n$1r;let r=0,i=0;for(let a=0;a=97)e=s-97+10;else if(s>=65)e=s-65+10;else {if(!(s>=48&&s<=57))break;e=s-48;}if(e>=16)break;i=s,r=16*r+e;}else 95!==i&&0!==a||o$1r(),i=s;}return 95!==i&&n$1r-a===e||o$1r(),r}function u$1d(e){return 13===e||10===e}function o$1r(){throw Object.assign(Error(`Parse error ${f$1d}:${c$1a.slice(0,n$1r).split("\n").length}:${n$1r-c$1a.lastIndexOf("\n",n$1r-1)}`),{idx:n$1r})} +let e$1c,a$1r,r$1p,i$18=2<<19;const s$1g=1===new Uint8Array(new Uint16Array([1]).buffer)[0]?function(e,a){const r=e.length;let i=0;for(;i>>8;}},t$1h="xportmportlassetaromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels";let f$1f,c$1b,n$1t;function parse$2(ce,ne="@"){f$1f=ce,c$1b=ne;const be=2*f$1f.length+(2<<18);if(be>i$18||!e$1c){for(;be>i$18;)i$18*=2;a$1r=new ArrayBuffer(i$18),s$1g(t$1h,new Uint16Array(a$1r,16,105)),e$1c=function(e,a,r){"use asm";var i=new e.Int8Array(r),s=new e.Int16Array(r),t=new e.Int32Array(r),f=new e.Uint8Array(r),c=new e.Uint16Array(r),n=1024;function b(){var e=0,a=0,r=0,f=0,ce=0,ne=0;ne=n;n=n+10240|0;i[796]=1;i[795]=0;s[395]=0;s[396]=0;t[67]=t[2];i[797]=0;t[66]=0;i[794]=0;t[68]=ne+2048;t[69]=ne;i[798]=0;e=(t[3]|0)+-2|0;t[70]=e;a=e+(t[64]<<1)|0;t[71]=a;e:while(1){r=e+2|0;t[70]=r;if(e>>>0>=a>>>0){ce=18;break}a:do{switch(s[r>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if((((s[396]|0)==0?H(r)|0:0)?(m(e+4|0,16,10)|0)==0:0)?(l(),(i[796]|0)==0):0){ce=9;break e}else ce=17;break}case 105:{if(H(r)|0?(m(e+4|0,26,10)|0)==0:0){k();ce=17;}else ce=17;break}case 59:{ce=17;break}case 47:switch(s[e+4>>1]|0){case 47:{P();break a}case 42:{y(1);break a}default:{ce=16;break e}}default:{ce=16;break e}}}while(0);if((ce|0)==17){ce=0;t[67]=t[70];}e=t[70]|0;a=t[71]|0;}if((ce|0)==9){e=t[70]|0;t[67]=e;ce=19;}else if((ce|0)==16){i[796]=0;t[70]=e;ce=19;}else if((ce|0)==18)if(!(i[794]|0)){e=r;ce=19;}else e=0;do{if((ce|0)==19){e:while(1){a=e+2|0;t[70]=a;if(e>>>0>=(t[71]|0)>>>0){ce=82;break}a:do{switch(s[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(((s[396]|0)==0?H(a)|0:0)?(m(e+4|0,16,10)|0)==0:0){l();ce=81;}else ce=81;break}case 105:{if(H(a)|0?(m(e+4|0,26,10)|0)==0:0){k();ce=81;}else ce=81;break}case 99:{if((H(a)|0?(m(e+4|0,36,8)|0)==0:0)?V(s[e+12>>1]|0)|0:0){i[798]=1;ce=81;}else ce=81;break}case 40:{f=t[68]|0;a=s[396]|0;ce=a&65535;t[f+(ce<<3)>>2]=1;r=t[67]|0;s[396]=a+1<<16>>16;t[f+(ce<<3)+4>>2]=r;ce=81;break}case 41:{a=s[396]|0;if(!(a<<16>>16)){ce=36;break e}ce=a+-1<<16>>16;s[396]=ce;f=s[395]|0;a=f&65535;if(f<<16>>16!=0?(t[(t[68]|0)+((ce&65535)<<3)>>2]|0)==5:0){a=t[(t[69]|0)+(a+-1<<2)>>2]|0;r=a+4|0;if(!(t[r>>2]|0))t[r>>2]=(t[67]|0)+2;t[a+12>>2]=e+4;s[395]=f+-1<<16>>16;ce=81;}else ce=81;break}case 123:{ce=t[67]|0;f=t[61]|0;e=ce;do{if((s[ce>>1]|0)==41&(f|0)!=0?(t[f+4>>2]|0)==(ce|0):0){a=t[62]|0;t[61]=a;if(!a){t[57]=0;break}else {t[a+28>>2]=0;break}}}while(0);f=t[68]|0;r=s[396]|0;ce=r&65535;t[f+(ce<<3)>>2]=(i[798]|0)==0?2:6;s[396]=r+1<<16>>16;t[f+(ce<<3)+4>>2]=e;i[798]=0;ce=81;break}case 125:{e=s[396]|0;if(!(e<<16>>16)){ce=49;break e}f=t[68]|0;ce=e+-1<<16>>16;s[396]=ce;if((t[f+((ce&65535)<<3)>>2]|0)==4){h();ce=81;}else ce=81;break}case 39:{d(39);ce=81;break}case 34:{d(34);ce=81;break}case 47:switch(s[e+4>>1]|0){case 47:{P();break a}case 42:{y(1);break a}default:{e=t[67]|0;f=s[e>>1]|0;r:do{if(!(U(f)|0)){switch(f<<16>>16){case 41:if(D(t[(t[68]|0)+(c[396]<<3)+4>>2]|0)|0){ce=69;break r}else {ce=66;break r}case 125:break;default:{ce=66;break r}}a=t[68]|0;r=c[396]|0;if(!(p(t[a+(r<<3)+4>>2]|0)|0)?(t[a+(r<<3)>>2]|0)!=6:0)ce=66;else ce=69;}else switch(f<<16>>16){case 46:if(((s[e+-2>>1]|0)+-48&65535)<10){ce=66;break r}else {ce=69;break r}case 43:if((s[e+-2>>1]|0)==43){ce=66;break r}else {ce=69;break r}case 45:if((s[e+-2>>1]|0)==45){ce=66;break r}else {ce=69;break r}default:{ce=69;break r}}}while(0);r:do{if((ce|0)==66){ce=0;if(!(o(e)|0)){switch(f<<16>>16){case 0:{ce=69;break r}case 47:{if(i[797]|0){ce=69;break r}break}default:{}}r=t[3]|0;a=f;do{if(e>>>0<=r>>>0)break;e=e+-2|0;t[67]=e;a=s[e>>1]|0;}while(!(E(a)|0));if(F(a)|0){do{if(e>>>0<=r>>>0)break;e=e+-2|0;t[67]=e;}while(F(s[e>>1]|0)|0);if(j(e)|0){g();i[797]=0;ce=81;break a}else e=1;}else e=1;}else ce=69;}}while(0);if((ce|0)==69){g();e=0;}i[797]=e;ce=81;break a}}case 96:{f=t[68]|0;r=s[396]|0;ce=r&65535;t[f+(ce<<3)+4>>2]=t[67];s[396]=r+1<<16>>16;t[f+(ce<<3)>>2]=3;h();ce=81;break}default:ce=81;}}while(0);if((ce|0)==81){ce=0;t[67]=t[70];}e=t[70]|0;}if((ce|0)==36){T();e=0;break}else if((ce|0)==49){T();e=0;break}else if((ce|0)==82){e=(i[794]|0)==0?(s[395]|s[396])<<16>>16==0:0;break}}}while(0);n=ne;return e|0}function l(){var e=0,a=0,r=0,f=0,c=0,n=0,ce=0,ne=0,be=0,le=0,ke=0,ue=0,oe=0,we=0;ne=t[70]|0;be=t[63]|0;we=ne+12|0;t[70]=we;r=w(1)|0;e=t[70]|0;if(!((e|0)==(we|0)?!(I(r)|0):0))oe=3;e:do{if((oe|0)==3){a:do{switch(r<<16>>16){case 123:{t[70]=e+2;e=w(1)|0;a=t[70]|0;while(1){if(W(e)|0){d(e);e=(t[70]|0)+2|0;t[70]=e;}else {q(e)|0;e=t[70]|0;}w(1)|0;e=A(a,e)|0;if(e<<16>>16==44){t[70]=(t[70]|0)+2;e=w(1)|0;}if(e<<16>>16==125){oe=15;break}we=a;a=t[70]|0;if((a|0)==(we|0)){oe=12;break}if(a>>>0>(t[71]|0)>>>0){oe=14;break}}if((oe|0)==12){T();break e}else if((oe|0)==14){T();break e}else if((oe|0)==15){i[795]=1;t[70]=(t[70]|0)+2;break a}break}case 42:{t[70]=e+2;w(1)|0;we=t[70]|0;A(we,we)|0;break}default:{i[796]=0;switch(r<<16>>16){case 100:{ne=e+14|0;t[70]=ne;switch((w(1)|0)<<16>>16){case 97:{a=t[70]|0;if((m(a+2|0,56,8)|0)==0?(c=a+10|0,F(s[c>>1]|0)|0):0){t[70]=c;w(0)|0;oe=22;}break}case 102:{oe=22;break}case 99:{a=t[70]|0;if(((m(a+2|0,36,8)|0)==0?(f=a+10|0,we=s[f>>1]|0,V(we)|0|we<<16>>16==123):0)?(t[70]=f,n=w(1)|0,n<<16>>16!=123):0){ue=n;oe=31;}break}default:{}}r:do{if((oe|0)==22?(ce=t[70]|0,(m(ce+2|0,64,14)|0)==0):0){r=ce+16|0;a=s[r>>1]|0;if(!(V(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break r}t[70]=r;a=w(1)|0;if(a<<16>>16==42){t[70]=(t[70]|0)+2;a=w(1)|0;}if(a<<16>>16!=40){ue=a;oe=31;}}}while(0);if((oe|0)==31?(le=t[70]|0,q(ue)|0,ke=t[70]|0,ke>>>0>le>>>0):0){O(e,ne,le,ke);t[70]=(t[70]|0)+-2;break e}O(e,ne,0,0);t[70]=e+12;break e}case 97:{t[70]=e+10;w(0)|0;e=t[70]|0;oe=35;break}case 102:{oe=35;break}case 99:{if((m(e+2|0,36,8)|0)==0?(a=e+10|0,E(s[a>>1]|0)|0):0){t[70]=a;we=w(1)|0;oe=t[70]|0;q(we)|0;we=t[70]|0;O(oe,we,oe,we);t[70]=(t[70]|0)+-2;break e}e=e+4|0;t[70]=e;break}case 108:case 118:break;default:break e}if((oe|0)==35){t[70]=e+16;e=w(1)|0;if(e<<16>>16==42){t[70]=(t[70]|0)+2;e=w(1)|0;}oe=t[70]|0;q(e)|0;we=t[70]|0;O(oe,we,oe,we);t[70]=(t[70]|0)+-2;break e}t[70]=e+6;i[796]=0;r=w(1)|0;e=t[70]|0;r=(q(r)|0|32)<<16>>16==123;f=t[70]|0;if(r){t[70]=f+2;we=w(1)|0;e=t[70]|0;q(we)|0;}r:while(1){a=t[70]|0;if((a|0)==(e|0))break;O(e,a,e,a);a=w(1)|0;if(r)switch(a<<16>>16){case 93:case 125:break e;default:{}}e=t[70]|0;if(a<<16>>16!=44){oe=51;break}t[70]=e+2;a=w(1)|0;e=t[70]|0;switch(a<<16>>16){case 91:case 123:{oe=51;break r}default:{}}q(a)|0;}if((oe|0)==51)t[70]=e+-2;if(!r)break e;t[70]=f+-2;break e}}}while(0);we=(w(1)|0)<<16>>16==102;e=t[70]|0;if(we?(m(e+2|0,50,6)|0)==0:0){t[70]=e+8;u(ne,w(1)|0);e=(be|0)==0?232:be+16|0;while(1){e=t[e>>2]|0;if(!e)break e;t[e+12>>2]=0;t[e+8>>2]=0;e=e+16|0;}}t[70]=e+-2;}}while(0);return}function k(){var e=0,a=0,r=0,f=0,c=0,n=0;c=t[70]|0;e=c+12|0;t[70]=e;e:do{switch((w(1)|0)<<16>>16){case 40:{a=t[68]|0;n=s[396]|0;r=n&65535;t[a+(r<<3)>>2]=5;e=t[70]|0;s[396]=n+1<<16>>16;t[a+(r<<3)+4>>2]=e;if((s[t[67]>>1]|0)!=46){t[70]=e+2;n=w(1)|0;v(c,t[70]|0,0,e);a=t[61]|0;r=t[69]|0;c=s[395]|0;s[395]=c+1<<16>>16;t[r+((c&65535)<<2)>>2]=a;switch(n<<16>>16){case 39:{d(39);break}case 34:{d(34);break}default:{t[70]=(t[70]|0)+-2;break e}}e=(t[70]|0)+2|0;t[70]=e;switch((w(1)|0)<<16>>16){case 44:{t[70]=(t[70]|0)+2;w(1)|0;c=t[61]|0;t[c+4>>2]=e;n=t[70]|0;t[c+16>>2]=n;i[c+24>>0]=1;t[70]=n+-2;break e}case 41:{s[396]=(s[396]|0)+-1<<16>>16;n=t[61]|0;t[n+4>>2]=e;t[n+12>>2]=(t[70]|0)+2;i[n+24>>0]=1;s[395]=(s[395]|0)+-1<<16>>16;break e}default:{t[70]=(t[70]|0)+-2;break e}}}break}case 46:{t[70]=(t[70]|0)+2;if((w(1)|0)<<16>>16==109?(a=t[70]|0,(m(a+2|0,44,6)|0)==0):0){e=t[67]|0;if(!(G(e)|0)?(s[e>>1]|0)==46:0)break e;v(c,c,a+8|0,2);}break}case 42:case 39:case 34:{f=18;break}case 123:{e=t[70]|0;if(s[396]|0){t[70]=e+-2;break e}while(1){if(e>>>0>=(t[71]|0)>>>0)break;e=w(1)|0;if(!(W(e)|0)){if(e<<16>>16==125){f=33;break}}else d(e);e=(t[70]|0)+2|0;t[70]=e;}if((f|0)==33)t[70]=(t[70]|0)+2;n=(w(1)|0)<<16>>16==102;e=t[70]|0;if(n?m(e+2|0,50,6)|0:0){T();break e}t[70]=e+8;e=w(1)|0;if(W(e)|0){u(c,e);break e}else {T();break e}}default:if((t[70]|0)==(e|0))t[70]=c+10;else f=18;}}while(0);do{if((f|0)==18){if(s[396]|0){t[70]=(t[70]|0)+-2;break}e=t[71]|0;a=t[70]|0;while(1){if(a>>>0>=e>>>0){f=25;break}r=s[a>>1]|0;if(W(r)|0){f=23;break}n=a+2|0;t[70]=n;a=n;}if((f|0)==23){u(c,r);break}else if((f|0)==25){T();break}}}while(0);return}function u(e,a){e=e|0;a=a|0;var r=0,i=0;r=(t[70]|0)+2|0;switch(a<<16>>16){case 39:{d(39);i=5;break}case 34:{d(34);i=5;break}default:T();}do{if((i|0)==5){v(e,r,t[70]|0,1);t[70]=(t[70]|0)+2;a=w(0)|0;e=a<<16>>16==97;if(e){r=t[70]|0;if(m(r+2|0,78,10)|0)i=11;}else {r=t[70]|0;if(!(((a<<16>>16==119?(s[r+2>>1]|0)==105:0)?(s[r+4>>1]|0)==116:0)?(s[r+6>>1]|0)==104:0))i=11;}if((i|0)==11){t[70]=r+-2;break}t[70]=r+((e?6:4)<<1);if((w(1)|0)<<16>>16!=123){t[70]=r;break}e=t[70]|0;a=e;e:while(1){t[70]=a+2;a=w(1)|0;switch(a<<16>>16){case 39:{d(39);t[70]=(t[70]|0)+2;a=w(1)|0;break}case 34:{d(34);t[70]=(t[70]|0)+2;a=w(1)|0;break}default:a=q(a)|0;}if(a<<16>>16!=58){i=20;break}t[70]=(t[70]|0)+2;switch((w(1)|0)<<16>>16){case 39:{d(39);break}case 34:{d(34);break}default:{i=24;break e}}t[70]=(t[70]|0)+2;switch((w(1)|0)<<16>>16){case 125:{i=29;break e}case 44:break;default:{i=28;break e}}t[70]=(t[70]|0)+2;if((w(1)|0)<<16>>16==125){i=29;break}a=t[70]|0;}if((i|0)==20){t[70]=r;break}else if((i|0)==24){t[70]=r;break}else if((i|0)==28){t[70]=r;break}else if((i|0)==29){i=t[61]|0;t[i+16>>2]=e;t[i+12>>2]=(t[70]|0)+2;break}}}while(0);return}function o(e){e=e|0;e:do{switch(s[e>>1]|0){case 100:switch(s[e+-2>>1]|0){case 105:{e=$(e+-4|0,88,2)|0;break e}case 108:{e=$(e+-4|0,92,3)|0;break e}default:{e=0;break e}}case 101:switch(s[e+-2>>1]|0){case 115:switch(s[e+-4>>1]|0){case 108:{e=B(e+-6|0,101)|0;break e}case 97:{e=B(e+-6|0,99)|0;break e}default:{e=0;break e}}case 116:{e=$(e+-4|0,98,4)|0;break e}case 117:{e=$(e+-4|0,106,6)|0;break e}default:{e=0;break e}}case 102:{if((s[e+-2>>1]|0)==111?(s[e+-4>>1]|0)==101:0)switch(s[e+-6>>1]|0){case 99:{e=$(e+-8|0,118,6)|0;break e}case 112:{e=$(e+-8|0,130,2)|0;break e}default:{e=0;break e}}else e=0;break}case 107:{e=$(e+-2|0,134,4)|0;break}case 110:{e=e+-2|0;if(B(e,105)|0)e=1;else e=$(e,142,5)|0;break}case 111:{e=B(e+-2|0,100)|0;break}case 114:{e=$(e+-2|0,152,7)|0;break}case 116:{e=$(e+-2|0,166,4)|0;break}case 119:switch(s[e+-2>>1]|0){case 101:{e=B(e+-4|0,110)|0;break e}case 111:{e=$(e+-4|0,174,3)|0;break e}default:{e=0;break e}}default:e=0;}}while(0);return e|0}function h(){var e=0,a=0,r=0,i=0;a=t[71]|0;r=t[70]|0;e:while(1){e=r+2|0;if(r>>>0>=a>>>0){a=10;break}switch(s[e>>1]|0){case 96:{a=7;break e}case 36:{if((s[r+4>>1]|0)==123){a=6;break e}break}case 92:{e=r+4|0;break}default:{}}r=e;}if((a|0)==6){e=r+4|0;t[70]=e;a=t[68]|0;i=s[396]|0;r=i&65535;t[a+(r<<3)>>2]=4;s[396]=i+1<<16>>16;t[a+(r<<3)+4>>2]=e;}else if((a|0)==7){t[70]=e;r=t[68]|0;i=(s[396]|0)+-1<<16>>16;s[396]=i;if((t[r+((i&65535)<<3)>>2]|0)!=3)T();}else if((a|0)==10){t[70]=e;T();}return}function w(e){e=e|0;var a=0,r=0,i=0;r=t[70]|0;e:do{a=s[r>>1]|0;a:do{if(a<<16>>16!=47)if(e)if(V(a)|0)break;else break e;else if(F(a)|0)break;else break e;else switch(s[r+2>>1]|0){case 47:{P();break a}case 42:{y(e);break a}default:{a=47;break e}}}while(0);i=t[70]|0;r=i+2|0;t[70]=r;}while(i>>>0<(t[71]|0)>>>0);return a|0}function d(e){e=e|0;var a=0,r=0,i=0,f=0;f=t[71]|0;a=t[70]|0;while(1){i=a+2|0;if(a>>>0>=f>>>0){a=9;break}r=s[i>>1]|0;if(r<<16>>16==e<<16>>16){a=10;break}if(r<<16>>16==92){r=a+4|0;if((s[r>>1]|0)==13){a=a+6|0;a=(s[a>>1]|0)==10?a:r;}else a=r;}else if(Z(r)|0){a=9;break}else a=i;}if((a|0)==9){t[70]=i;T();}else if((a|0)==10)t[70]=i;return}function v(e,a,r,s){e=e|0;a=a|0;r=r|0;s=s|0;var f=0,c=0;f=t[65]|0;t[65]=f+32;c=t[61]|0;t[((c|0)==0?228:c+28|0)>>2]=f;t[62]=c;t[61]=f;t[f+8>>2]=e;if(2==(s|0))e=r;else e=1==(s|0)?r+2|0:0;t[f+12>>2]=e;t[f>>2]=a;t[f+4>>2]=r;t[f+16>>2]=0;t[f+20>>2]=s;c=1==(s|0);i[f+24>>0]=c&1;t[f+28>>2]=0;if(c|2==(s|0))i[795]=1;return}function A(e,a){e=e|0;a=a|0;var r=0,i=0,f=0,c=0;r=t[70]|0;i=s[r>>1]|0;c=(e|0)==(a|0);f=c?0:e;c=c?0:a;if(i<<16>>16==97){t[70]=r+4;r=w(1)|0;e=t[70]|0;if(W(r)|0){d(r);a=(t[70]|0)+2|0;t[70]=a;}else {q(r)|0;a=t[70]|0;}i=w(1)|0;r=t[70]|0;}if((r|0)!=(e|0))O(e,a,f,c);return i|0}function C(){var e=0,a=0,r=0;r=t[71]|0;a=t[70]|0;e:while(1){e=a+2|0;if(a>>>0>=r>>>0){a=6;break}switch(s[e>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{e=a+4|0;break}default:{}}a=e;}if((a|0)==6){t[70]=e;T();e=0;}else if((a|0)==7){t[70]=e;e=93;}return e|0}function g(){var e=0,a=0,r=0;e:while(1){e=t[70]|0;a=e+2|0;t[70]=a;if(e>>>0>=(t[71]|0)>>>0){r=7;break}switch(s[a>>1]|0){case 13:case 10:{r=7;break e}case 47:break e;case 91:{C()|0;break}case 92:{t[70]=e+4;break}default:{}}}if((r|0)==7)T();return}function p(e){e=e|0;switch(s[e>>1]|0){case 62:{e=(s[e+-2>>1]|0)==61;break}case 41:case 59:{e=1;break}case 104:{e=$(e+-2|0,200,4)|0;break}case 121:{e=$(e+-2|0,208,6)|0;break}case 101:{e=$(e+-2|0,220,3)|0;break}default:e=0;}return e|0}function y(e){e=e|0;var a=0,r=0,i=0,f=0,c=0;f=(t[70]|0)+2|0;t[70]=f;r=t[71]|0;while(1){a=f+2|0;if(f>>>0>=r>>>0)break;i=s[a>>1]|0;if(!e?Z(i)|0:0)break;if(i<<16>>16==42?(s[f+4>>1]|0)==47:0){c=8;break}f=a;}if((c|0)==8){t[70]=a;a=f+4|0;}t[70]=a;return}function m(e,a,r){e=e|0;a=a|0;r=r|0;var s=0,t=0;e:do{if(!r)e=0;else {while(1){s=i[e>>0]|0;t=i[a>>0]|0;if(s<<24>>24!=t<<24>>24)break;r=r+-1|0;if(!r){e=0;break e}else {e=e+1|0;a=a+1|0;}}e=(s&255)-(t&255)|0;}}while(0);return e|0}function I(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:{e=1;break}default:if((e&-8)<<16>>16==40|(e+-58&65535)<6)e=1;else {switch(e<<16>>16){case 91:case 93:case 94:{e=1;break e}default:{}}e=(e+-123&65535)<4;}}}while(0);return e|0}function U(e){e=e|0;e:do{switch(e<<16>>16){case 38:case 37:case 33:break;default:if(!((e+-58&65535)<6|(e+-40&65535)<7&e<<16>>16!=41)){switch(e<<16>>16){case 91:case 94:break e;default:{}}return e<<16>>16!=125&(e+-123&65535)<4|0}}}while(0);return 1}function x(e){e=e|0;var a=0;a=s[e>>1]|0;e:do{if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:{}}if(I(a)|0)return a<<16>>16!=46|(G(e)|0)|0;else a=0;}else a=1;}while(0);return a|0}function S(e){e=e|0;var a=0,r=0,i=0,f=0;r=n;n=n+16|0;i=r;t[i>>2]=0;t[64]=e;a=t[3]|0;f=a+(e<<1)|0;e=f+2|0;s[f>>1]=0;t[i>>2]=e;t[65]=e;t[57]=0;t[61]=0;t[59]=0;t[58]=0;t[63]=0;t[60]=0;n=r;return a|0}function O(e,a,r,s){e=e|0;a=a|0;r=r|0;s=s|0;var f=0,c=0;f=t[65]|0;t[65]=f+20;c=t[63]|0;t[((c|0)==0?232:c+16|0)>>2]=f;t[63]=f;t[f>>2]=e;t[f+4>>2]=a;t[f+8>>2]=r;t[f+12>>2]=s;t[f+16>>2]=0;i[795]=1;return}function $(e,a,r){e=e|0;a=a|0;r=r|0;var i=0,s=0;i=e+(0-r<<1)|0;s=i+2|0;e=t[3]|0;if(s>>>0>=e>>>0?(m(s,a,r<<1)|0)==0:0)if((s|0)==(e|0))e=1;else e=x(i)|0;else e=0;return e|0}function j(e){e=e|0;switch(s[e>>1]|0){case 107:{e=$(e+-2|0,134,4)|0;break}case 101:{if((s[e+-2>>1]|0)==117)e=$(e+-4|0,106,6)|0;else e=0;break}default:e=0;}return e|0}function B(e,a){e=e|0;a=a|0;var r=0;r=t[3]|0;if(r>>>0<=e>>>0?(s[e>>1]|0)==a<<16>>16:0)if((r|0)==(e|0))r=1;else r=E(s[e+-2>>1]|0)|0;else r=0;return r|0}function E(e){e=e|0;e:do{if((e+-9&65535)<5)e=1;else {switch(e<<16>>16){case 32:case 160:{e=1;break e}default:{}}e=e<<16>>16!=46&(I(e)|0);}}while(0);return e|0}function P(){var e=0,a=0,r=0;e=t[71]|0;r=t[70]|0;e:while(1){a=r+2|0;if(r>>>0>=e>>>0)break;switch(s[a>>1]|0){case 13:case 10:break e;default:r=a;}}t[70]=a;return}function q(e){e=e|0;while(1){if(V(e)|0)break;if(I(e)|0)break;e=(t[70]|0)+2|0;t[70]=e;e=s[e>>1]|0;if(!(e<<16>>16)){e=0;break}}return e|0}function z(){var e=0;e=t[(t[59]|0)+20>>2]|0;switch(e|0){case 1:{e=-1;break}case 2:{e=-2;break}default:e=e-(t[3]|0)>>1;}return e|0}function D(e){e=e|0;if(!($(e,180,5)|0)?!($(e,190,3)|0):0)e=$(e,196,2)|0;else e=1;return e|0}function F(e){e=e|0;switch(e<<16>>16){case 160:case 32:case 12:case 11:case 9:{e=1;break}default:e=0;}return e|0}function G(e){e=e|0;if((s[e>>1]|0)==46?(s[e+-2>>1]|0)==46:0)e=(s[e+-4>>1]|0)==46;else e=0;return e|0}function H(e){e=e|0;if((t[3]|0)==(e|0))e=1;else e=x(e+-2|0)|0;return e|0}function J(){var e=0;e=t[(t[60]|0)+12>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function K(){var e=0;e=t[(t[59]|0)+12>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function L(){var e=0;e=t[(t[60]|0)+8>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function M(){var e=0;e=t[(t[59]|0)+16>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function N(){var e=0;e=t[(t[59]|0)+4>>2]|0;if(!e)e=-1;else e=e-(t[3]|0)>>1;return e|0}function Q(){var e=0;e=t[59]|0;e=t[((e|0)==0?228:e+28|0)>>2]|0;t[59]=e;return (e|0)!=0|0}function R(){var e=0;e=t[60]|0;e=t[((e|0)==0?232:e+16|0)>>2]|0;t[60]=e;return (e|0)!=0|0}function T(){i[794]=1;t[66]=(t[70]|0)-(t[3]|0)>>1;t[70]=(t[71]|0)+2;return}function V(e){e=e|0;return (e|128)<<16>>16==160|(e+-9&65535)<5|0}function W(e){e=e|0;return e<<16>>16==39|e<<16>>16==34|0}function X(){return (t[(t[59]|0)+8>>2]|0)-(t[3]|0)>>1|0}function Y(){return (t[(t[60]|0)+4>>2]|0)-(t[3]|0)>>1|0}function Z(e){e=e|0;return e<<16>>16==13|e<<16>>16==10|0}function _(){return (t[t[59]>>2]|0)-(t[3]|0)>>1|0}function ee(){return (t[t[60]>>2]|0)-(t[3]|0)>>1|0}function ae(){return f[(t[59]|0)+24>>0]|0|0}function re(e){e=e|0;t[3]=e;return}function ie(){return (i[795]|0)!=0|0}function se(){return (i[796]|0)!=0|0}function te(){return t[66]|0}function fe(e){e=e|0;n=e+992+15&-16;return 992}return {su:fe,ai:M,e:te,ee:Y,ele:J,els:L,es:ee,f:se,id:z,ie:N,ip:ae,is:_,ms:ie,p:b,re:R,ri:Q,sa:S,se:K,ses:re,ss:X}}("undefined"!=typeof self?self:global,{},a$1r),r$1p=e$1c.su(i$18-(2<<17));}const le=f$1f.length+1;e$1c.ses(r$1p),e$1c.sa(le-1),s$1g(f$1f,new Uint16Array(a$1r,r$1p,le)),e$1c.p()||(n$1t=e$1c.e(),o$1s());const ke=[],ue=[];for(;e$1c.ri();){const a=e$1c.is(),r=e$1c.ie(),i=e$1c.ai(),s=e$1c.id(),t=e$1c.ss(),c=e$1c.se();let n;e$1c.ip()&&(n=b$R(-1===s?a:a+1,f$1f.charCodeAt(-1===s?a-1:a))),ke.push({n:n,s:a,e:r,ss:t,se:c,d:s,a:i});}for(;e$1c.re();){const a=e$1c.es(),r=e$1c.ee(),i=e$1c.els(),s=e$1c.ele(),t=f$1f.charCodeAt(a),c=i>=0?f$1f.charCodeAt(i):-1;ue.push({s:a,e:r,ls:i,le:s,n:34===t||39===t?b$R(a+1,t):f$1f.slice(a,r),ln:i<0?void 0:34===c||39===c?b$R(i+1,c):f$1f.slice(i,s)});}return [ke,ue,!!e$1c.f(),!!e$1c.ms()]}function b$R(e,a){n$1t=e;let r="",i=n$1t;for(;;){n$1t>=f$1f.length&&o$1s();const e=f$1f.charCodeAt(n$1t);if(e===a)break;92===e?(r+=f$1f.slice(i,n$1t),r+=l$1c(),i=n$1t):(8232===e||8233===e||u$1e(e)&&o$1s(),++n$1t);}return r+=f$1f.slice(i,n$1t++),r}function l$1c(){let e=f$1f.charCodeAt(++n$1t);switch(++n$1t,e){case 110:return "\n";case 114:return "\r";case 120:return String.fromCharCode(k$D(2));case 117:return function(){const e=f$1f.charCodeAt(n$1t);let a;123===e?(++n$1t,a=k$D(f$1f.indexOf("}",n$1t)-n$1t),++n$1t,a>1114111&&o$1s()):a=k$D(4);return a<=65535?String.fromCharCode(a):(a-=65536,String.fromCharCode(55296+(a>>10),56320+(1023&a)))}();case 116:return "\t";case 98:return "\b";case 118:return "\v";case 102:return "\f";case 13:10===f$1f.charCodeAt(n$1t)&&++n$1t;case 10:return "";case 56:case 57:o$1s();default:if(e>=48&&e<=55){let a=f$1f.substr(n$1t-1,3).match(/^[0-7]+/)[0],r=parseInt(a,8);return r>255&&(a=a.slice(0,-1),r=parseInt(a,8)),n$1t+=a.length-1,e=f$1f.charCodeAt(n$1t),"0"===a&&56!==e&&57!==e||o$1s(),String.fromCharCode(r)}return u$1e(e)?"":String.fromCharCode(e)}}function k$D(e){const a=n$1t;let r=0,i=0;for(let a=0;a=97)e=s-97+10;else if(s>=65)e=s-65+10;else {if(!(s>=48&&s<=57))break;e=s-48;}if(e>=16)break;i=s,r=16*r+e;}else 95!==i&&0!==a||o$1s(),i=s;}return 95!==i&&n$1t-a===e||o$1s(),r}function u$1e(e){return 13===e||10===e}function o$1s(){throw Object.assign(Error(`Parse error ${c$1b}:${f$1f.slice(0,n$1t).split("\n").length}:${n$1t-f$1f.lastIndexOf("\n",n$1t-1)}`),{idx:n$1t})} -const u$1c=["__dirname","__filename","exports","module","require"];let h$X;async function createCjsAnalysis(t,e,s){h$X||({default:h$X}=await Promise.resolve().then(function () { return n$z; }));const r=new Set;const n=new Set;const a=new Set;h$X.transform(e,{ast:false,sourceMaps:false,inputSourceMap:false,babelrc:false,babelrcRoots:false,configFile:false,highlightCode:false,compact:false,sourceType:"script",parserOpts:{allowReturnOutsideFunction:true,errorRecovery:true},plugins:[({types:t})=>({visitor:{Program(t,e){e.functionDepth=0;},CallExpression(e,a){if(t.isIdentifier(e.node.callee,{name:"require"})||t.isIdentifier(e.node.callee.object,{name:"require"})&&t.isIdentifier(e.node.callee.property,{name:"resolve"})||t.isMemberExpression(e.node.callee)&&t.isIdentifier(e.node.callee.object,{name:"module"})&&t.isIdentifier(e.node.callee.property,{name:"require"})){const t=buildDynamicString$1(e.get("arguments.0").node,s);r.add(t);a.functionDepth>0&&n.add(t);}},ReferencedIdentifier(t){let e=t.node.name;t.scope.hasBinding(e)||a.add(e);},Scope:{enter(e,s){t.isFunction(e.scope.block)&&s.functionDepth++;},exit(e,s){t.isFunction(e.scope.block)&&s.functionDepth--;}}}})]});let i=false;for(let t of u$1c)if(a.has(t)){i=true;break}return {deps:[...r],dynamicDeps:t.filter((t=>t.n)).map((t=>t.n)),cjsLazyDeps:[...n],size:e.length,format:"commonjs",usesCjs:i}}function buildDynamicString$1(t,e,s=false,r=false){if("StringLiteral"===t.type)return t.value;if("TemplateLiteral"===t.type){let n="";for(let a=0;a({visitor:{ExportAllDeclaration(t){s.add(t.node.source.value);},ExportNamedDeclaration(t){t.node.source&&s.add(t.node.source.value);},ImportDeclaration(t){s.add(t.node.source.value);},Import(t){r.add(buildDynamicString(t.parentPath.get("arguments.0").node,e,true));},MetaProperty(e){t.isIdentifier(e.node.meta,{name:"import"})&&t.isIdentifier(e.node.property,{name:"meta"})&&(n=true);}}})]});}finally{globalThis.console=m$Z;}return {deps:[...s],dynamicDeps:[...r],cjsLazyDeps:null,size:t.length,format:"typescript"}}function buildDynamicString(t,e,s=false,r=false){if("StringLiteral"===t.type)return t.value;if("TemplateLiteral"===t.type){let n="";for(let a=0;al+1){i=t.slice(l+1,c);const e=t.slice(c+1);o=n||P$u.isValid(e)?[new P$u(e)]:e.split("||").map((t=>f$1e(t)));""===e&&(p=true);}else if(-1===l&&n){i=n;o=P$u.isValid(t)?[new P$u(t)]:t.split("||").map((t=>f$1e(t)));}else {i=t.slice(l+1);o=[new P$u("*")];}-1===l&&-1!==i.indexOf("/")&&"@"!==i[0]&&(a="github");const u=i.split("/").length;if(u>2||1===u&&"@"===i[0])throw new JspmError(`Invalid package target ${t}`);return {pkgTarget:{registry:a,name:i,ranges:o,unstable:p},installSubpath:null}}function pkgToStr(t){return `${t.registry?t.registry+":":""}${t.name}${t.version?"@"+t.version:""}`} +const u$1d=["__dirname","__filename","exports","module","require"];let h$Y;async function createCjsAnalysis(t,e,s){h$Y||({default:h$Y}=await Promise.resolve().then(function () { return n$A; }));const r=new Set;const n=new Set;const a=new Set;h$Y.transform(e,{ast:false,sourceMaps:false,inputSourceMap:false,babelrc:false,babelrcRoots:false,configFile:false,highlightCode:false,compact:false,sourceType:"script",parserOpts:{allowReturnOutsideFunction:true,errorRecovery:true},plugins:[({types:t})=>({visitor:{Program(t,e){e.functionDepth=0;},CallExpression(e,a){if(t.isIdentifier(e.node.callee,{name:"require"})||t.isIdentifier(e.node.callee.object,{name:"require"})&&t.isIdentifier(e.node.callee.property,{name:"resolve"})||t.isMemberExpression(e.node.callee)&&t.isIdentifier(e.node.callee.object,{name:"module"})&&t.isIdentifier(e.node.callee.property,{name:"require"})){const t=buildDynamicString$1(e.get("arguments.0").node,s);r.add(t);a.functionDepth>0&&n.add(t);}},ReferencedIdentifier(t){let e=t.node.name;t.scope.hasBinding(e)||a.add(e);},Scope:{enter(e,s){t.isFunction(e.scope.block)&&s.functionDepth++;},exit(e,s){t.isFunction(e.scope.block)&&s.functionDepth--;}}}})]});let i=false;for(let t of u$1d)if(a.has(t)){i=true;break}return {deps:[...r],dynamicDeps:t.filter((t=>t.n)).map((t=>t.n)),cjsLazyDeps:[...n],size:e.length,format:"commonjs",usesCjs:i}}function buildDynamicString$1(t,e,s=false,r=false){if("StringLiteral"===t.type)return t.value;if("TemplateLiteral"===t.type){let n="";for(let a=0;a({visitor:{ExportAllDeclaration(t){s.add(t.node.source.value);},ExportNamedDeclaration(t){t.node.source&&s.add(t.node.source.value);},ImportDeclaration(t){s.add(t.node.source.value);},Import(t){r.add(buildDynamicString(t.parentPath.get("arguments.0").node,e,true));},MetaProperty(e){t.isIdentifier(e.node.meta,{name:"import"})&&t.isIdentifier(e.node.property,{name:"meta"})&&(n=true);}}})]});}finally{globalThis.console=m$$;}return {deps:[...s],dynamicDeps:[...r],cjsLazyDeps:null,size:t.length,format:"typescript"}}function buildDynamicString(t,e,s=false,r=false){if("StringLiteral"===t.type)return t.value;if("TemplateLiteral"===t.type){let n="";for(let a=0;al+1){i=t.slice(l+1,c);const e=t.slice(c+1);o=n||P$v.isValid(e)?[new P$v(e)]:e.split("||").map((t=>f$1g(t)));""===e&&(p=true);}else if(-1===l&&n){i=n;o=P$v.isValid(t)?[new P$v(t)]:t.split("||").map((t=>f$1g(t)));}else {i=t.slice(l+1);o=[new P$v("*")];}-1===l&&-1!==i.indexOf("/")&&"@"!==i[0]&&(a="github");const u=i.split("/").length;if(u>2||1===u&&"@"===i[0])throw new JspmError(`Invalid package target ${t}`);return {pkgTarget:{registry:a,name:i,ranges:o,unstable:p},installSubpath:null}}function pkgToStr(t){return `${t.registry?t.registry+":":""}${t.name}${t.version?"@"+t.version:""}`} /** * Throws unless the given specifier is a valid npm-style package specifier. * @@ -161,7 +160,7 @@ const u$1c=["__dirname","__filename","exports","module","require"];let h$X;async * * @param {string} specifier Specifier to parse. * @returns {{ pkgName: string, subpath: '.' | `./${string}` } | undefined} - */function parsePkg(t){let e=t.indexOf("/");if("@"===t[0]){if(-1===e)return;e=t.indexOf("/",e+1);}return -1===e?{pkgName:t,subpath:"."}:{pkgName:t.slice(0,e),subpath:`.${t.slice(e)}`}}const j$x="https://ga.jspm.io/";const T$v="https://ga.system.jspm.io/";const x$D="https://api.jspm.io/";const O$w=3e5;const S$D=5e3;const L$q=["default","system"];async function pkgToUrl$5(t,e){return `${"system"===e?T$v:j$x}${pkgToStr(t)}/`}const M$x=/^(([a-z]+):)?((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$6(t){let e=null;let s;if(t.startsWith(j$x))s="default";else {if(!t.startsWith(T$v))return;s="system";}const[,,r,n,a]=t.slice(("default"===s?j$x:T$v).length).match(M$x)||[];if(r&&n&&a){if("npm"===r&&"@jspm/core"===n&&t.includes("/nodelibs/")){e=`./nodelibs/${t.slice(t.indexOf("/nodelibs/")+10).split("/")[1]}`;e=e&&e.endsWith(".js")?e.slice(0,-3):null;}return {pkg:{registry:r,name:n,version:a},layer:s,subpath:e}}}let E$B={};function clearResolveCache(){E$B={};}async function checkBuildOrError(t,e){const s=await o$1s(`${t}package.json`,e);if(s.ok)return true;const r=await o$1s(`${t}/_error.log`,e);if(r.ok){const e=await r.text();throw new JspmError(`Resolved dependency ${t} with error:\n\n${e}\nPlease post an issue at jspm/project on GitHub, or by following the link below:\n\nhttps://github.com/jspm/project/issues/new?title=CDN%20build%20error%20for%20${encodeURIComponent(t)}&body=_Reporting%20CDN%20Build%20Error._%0A%0A%3C!--%20%20No%20further%20description%20necessary,%20just%20click%20%22Submit%20new%20issue%22%20--%3E`)}console.error(`Unable to request ${t}package.json - ${s.status} ${s.statusText||"returned"}`);return false}async function ensureBuild(t,e){if(await checkBuildOrError(await pkgToUrl$5(t,"default"),e))return;const s=`${t.name}@${t.version}`;const r=await o$1s(`${x$D}build/${s}`,e);if(!r.ok&&403!==r.status){const t=(await r.json()).error;throw new JspmError(`Unable to request the JSPM API for a build of ${s}, with error: ${t}.`)}let a=Date.now();while(true){await new Promise((t=>setTimeout(t,S$D)));if(await checkBuildOrError(await pkgToUrl$5(t,"default"),e))return;if(Date.now()-a>=O$w)throw new JspmError(`Timed out waiting for the build of ${s} to be ready on the JSPM CDN. Try again later, or post a JSPM project issue if the issue persists.`)}}async function resolveLatestTarget$1(t,e,s){const{registry:r,name:n,range:a,unstable:i}=t;if(a.isExact&&!a.version.tag){const t={registry:r,name:n,version:a.version.toString()};await ensureBuild(t,this.fetchOpts);return t}const o=E$B[t.registry+":"+t.name]=E$B[t.registry+":"+t.name]||{latest:null,majors:Object.create(null),minors:Object.create(null),tags:Object.create(null)};if(a.isWildcard||a.isExact&&"latest"===a.version.tag){let e=await(o.latest||(o.latest=lookupRange.call(this,r,n,"",i,s)));e instanceof Promise&&(e=await e);if(!e)return null;this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> WILDCARD ${e.version}${s?" ["+s+"]":""}`);await ensureBuild(e,this.fetchOpts);return e}if(a.isExact&&a.version.tag){const e=a.version.tag;let l=await(o.tags[e]||(o.tags[e]=lookupRange.call(this,r,n,e,i,s)));l instanceof Promise&&(l=await l);if(!l)return null;this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> TAG ${e}${s?" ["+s+"]":""}`);await ensureBuild(l,this.fetchOpts);return l}let l=false;if(a.isMajor){const e=a.version.major;let c=await(o.majors[e]||(o.majors[e]=lookupRange.call(this,r,n,e,i,s)));c instanceof Promise&&(c=await c);if(!c)return null;if(!a.version.gt(c.version)){this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> MAJOR ${c.version}${s?" ["+s+"]":""}`);await ensureBuild(c,this.fetchOpts);return c}l=true;}if(l||a.isStable){const e=`${a.version.major}.${a.version.minor}`;let l=await(o.minors[e]||(o.minors[e]=lookupRange.call(this,r,n,e,i,s)));l instanceof Promise&&(l=await l);if(!l)return null;this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> MINOR ${l.version}${s?" ["+s+"]":""}`);await ensureBuild(l,this.fetchOpts);return l}return null}function pkgToLookupUrl(t,e=false){return `${j$x}${t.registry}:${t.name}${t.version?"@"+t.version:e?"@":""}`}async function lookupRange(t,s,r,a,i){const o=await o$1s(pkgToLookupUrl({registry:t,name:s,version:r},a),this.fetchOpts);switch(o.status){case 304:case 200:return {registry:t,name:s,version:(await o.text()).trim()};case 404:const n=await fetchVersions(s);const l=new R$v(String(r)||"*",a);const c=l.bestMatch(n,a);if(c)return {registry:t,name:s,version:c};throw new JspmError(`Unable to resolve ${t}:${s}@${r} to a valid version${importedFrom(i)}`);default:throw new JspmError(`Invalid status code ${o.status} looking up "${t}:${s}" - ${o.statusText}${importedFrom(i)}`)}}const D$y=new Map;async function fetchVersions(t){if(D$y.has(t))return D$y.get(t);const e=await(await o$1s(`https://npmlookup.jspm.io/${encodeURI(t)}`,{})).json();const s=Object.keys(e.versions||{});D$y.set(t,s);return s}var C$z=Object.freeze({__proto__:null,supportedLayers:L$q,pkgToUrl:pkgToUrl$5,parseUrlPkg:parseUrlPkg$6,clearResolveCache:clearResolveCache,resolveLatestTarget:resolveLatestTarget$1});const I$x="https://cdn.skypack.dev/";async function pkgToUrl$4(t){return `${I$x}${t.name}@${t.version}/`}const _$I=/^((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$5(t){if(!t.startsWith(I$x))return;const[,e,s]=t.slice(I$x.length).match(_$I)||[];return e&&s?{registry:"npm",name:e,version:s}:void 0}var W$p=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl$4,parseUrlPkg:parseUrlPkg$5,resolveLatestTarget:resolveLatestTarget$1});const A$w="https://cdn.jsdelivr.net/";async function pkgToUrl$3(t){return `${A$w}${t.registry}/${t.name}@${t.version}/`}const N$s=/^([^\/]+)\/((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$4(t){if(!t.startsWith(A$w))return;const[,e,s,r]=t.slice(A$w.length).match(N$s)||[];return {registry:e,name:s,version:r}}var z$p=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl$3,parseUrlPkg:parseUrlPkg$4,resolveLatestTarget:resolveLatestTarget$1});const J$l="https://unpkg.com/";async function pkgToUrl$2(t){return `${J$l}${t.name}@${t.version}/`}const B$x=/^((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$3(t){if(!t.startsWith(J$l))return;const[,e,s]=t.slice(J$l.length).match(B$x)||[];return e&&s?{registry:"npm",name:e,version:s}:void 0}var F$t=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl$2,parseUrlPkg:parseUrlPkg$3,resolveLatestTarget:resolveLatestTarget$1});const H$q=new Set(["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","repl","stream","stream/promises","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);async function pkgToUrl$1(t,e){return "node"!==t.registry?pkgToUrl$5(t,e):`node:${t.name}/`}function resolveBuiltin(t,s){const r=t.startsWith("node:")?t.slice(5):H$q.has(t)?t:null;if(r)return s.includes("deno")||s.includes("node")?`node:${r}`:{target:{pkgTarget:{registry:"npm",name:"@jspm/core",ranges:[new R$v("*")],unstable:true},installSubpath:`./nodelibs/${r}`},alias:r}}async function getPackageConfig$2(){return {exports:{".":"."}}}async function resolveLatestTarget(t,s,r){return "npm"!==t.registry||"@jspm/core"!==t.name?null:resolveLatestTarget$1.call(this,{registry:"npm",name:"@jspm/core",range:new R$v("*"),unstable:true},s,r)}function parseUrlPkg$2(t){if(!t.startsWith("node:"))return;let e=t.slice(5);e.endsWith("/")&&(e=e.slice(0,-1));return {registry:"node",name:e,version:""}}var q$p=Object.freeze({__proto__:null,nodeBuiltinSet:H$q,pkgToUrl:pkgToUrl$1,resolveBuiltin:resolveBuiltin,getPackageConfig:getPackageConfig$2,resolveLatestTarget:resolveLatestTarget,parseUrlPkg:parseUrlPkg$2});const G$m="https://esm.sh/";async function pkgToUrl(t){return `${G$m}*${t.name}@${t.version}/`}const K$o=/^(?:v\d+\/)?\*?((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$1(t){if(!t.startsWith(G$m))return;const[,e,s]=t.slice(G$m.length).match(K$o)||[];return e&&s?{registry:"npm",name:e,version:s}:void 0}async function getPackageConfig$1(t){const e=await o$1s(`${t}package.json`,this.fetchOpts);switch(e.status){case 200:case 304:break;case 400:case 401:case 403:case 404:case 406:case 500:this.pcfgs[t]=null;return;default:throw new JspmError(`Invalid status code ${e.status} reading package config for ${t}. ${e.statusText}`)}const s=await e.json();if(s.exports)for(const t of Object.keys(s.exports))s.exports[t]=t;if(s.imports)for(const t of Object.keys(s.imports))s.imports[t]=t;return s}var V$q=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl,parseUrlPkg:parseUrlPkg$1,getPackageConfig:getPackageConfig$1,resolveLatestTarget:resolveLatestTarget$1});const Y$k={deno:$$m,jsdelivr:z$p,node:q$p,skypack:W$p,unpkg:F$t,"esm.sh":V$q,"jspm.io":C$z,jspm:C$z};function getProvider(t,e){const s=e[t];if(s)return s;throw new JspmError(`No provider named "${t}" has been defined.`)}const Q$k={"denoland:":"deno","deno:":"deno"};const X$k=new Set(["npm","deno","node"]);const Z$j=new Set(["node","deno"]);function createEsmAnalysis(t,e,s){if(!t.length&&tt$9.test(e))return createSystemAnalysis(e,t,s);const r=[];const n=[];for(const a of t)if(-1!==a.d){if(a.d>=0&&a.n)try{n.push(a.n);}catch(t){console.warn(`TODO: Dynamic import custom expression tracing in ${s} for:\n\n${e.slice(a.ss,a.se)}\n`);}}else r.includes(a.n)||r.push(a.n);const a=e.length;return {deps:r,dynamicDeps:n,cjsLazyDeps:null,size:a,format:"esm"}}const tt$9=/^\s*(\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*)*\s*System\s*\.\s*register\s*\(\s*(\[[^\]]*\])\s*,\s*\(?function\s*\(\s*([^\),\s]+\s*(,\s*([^\),\s]+)\s*)?\s*)?\)/;function createSystemAnalysis(t,e,s){const[,,,r,,,n]=t.match(tt$9)||[];if(!r)return createEsmAnalysis(e,t,s);const a=JSON.parse(r.replace(/'/g,'"'));const i=[];if(n){const e=`${n}.import(`;let s=-1;while(-1!==(s=t.indexOf(e,s+1))){const r=s+e.length+1;const n=t[s+e.length];if('"'===n||"'"===n){const a=t.indexOf(n,s+e.length+1);if(-1!==a)try{i.push(JSON.parse('"'+t.slice(r,a)+'"'));continue}catch(t){}}console.warn("TODO: Dynamic import custom expression tracing.");}}const o=t.length;return {deps:a,dynamicDeps:i,cjsLazyDeps:null,size:o,format:"system"}}let et$7,st$7;function isBuiltinScheme(t){return -1!==t.indexOf(":")&&Z$j.has(t.slice(0,t.indexOf(":")))}function isMappableScheme(t){return -1!==t.indexOf(":")&&X$k.has(t.slice(0,t.indexOf(":")))}class Resolver{addCustomProvider(t,e){if(!e.pkgToUrl)throw new Error('Custom provider "'+t+'" must define a "pkgToUrl" method.');if(!e.parseUrlPkg)throw new Error('Custom provider "'+t+'" must define a "parseUrlPkg" method.');if(!e.resolveLatestTarget)throw new Error('Custom provider "'+t+'" must define a "resolveLatestTarget" method.');this.providers=Object.assign({},this.providers,{[t]:e});}providerNameForUrl(t){for(const e of Object.keys(this.providers)){const s=this.providers[e];if(s.ownsUrl&&s.ownsUrl.call(this,t)||s.parseUrlPkg.call(this,t))return e}}providerForUrl(t){const e=this.providerNameForUrl(t);return e?this.providers[e]:null}async parseUrlPkg(t){for(const e of Object.keys(this.providers)){const s=this.providers[e];const r=s.parseUrlPkg.call(this,t);if(r)return {pkg:"pkg"in r?r.pkg:r,source:{provider:e,layer:"layer"in r?r.layer:"default"},subpath:"subpath"in r?r.subpath:null}}return null}async pkgToUrl(t,{provider:e,layer:s}){return getProvider(e,this.providers).pkgToUrl.call(this,t,s)}resolveBuiltin(t){for(const e of Object.values(this.providers)){if(!e.resolveBuiltin)continue;const s=e.resolveBuiltin.call(this,t,this.env);if(s)return s}}async getPackageBase(t){const e=await this.parseUrlPkg(t);if(e)return this.pkgToUrl(e.pkg,e.source);let s;try{s=new URL("./",t);}catch{return t}const r=new URL("/",s).href;do{let e;if(e=await this.checkPjson(s.href))return new URL(".",e).href;if(s.href===r)return new URL("./",t).href}while(s=new URL("../",s))}async getPackageConfig(t){if(!t.startsWith("file:")&&!t.startsWith("http:")&&!t.startsWith("https:")&&!t.startsWith("ipfs:")&&!t.startsWith("node:"))return null;if(!t.endsWith("/"))throw new Error(`Internal Error: Package URL must end in "/". Got ${t}`);let e=this.pcfgs[t];if(e)return e;this.pcfgPromises[t]||(this.pcfgPromises[t]=(async()=>{var e;const s=this.providerForUrl(t);if(s){var r;const e=await(null===(r=s.getPackageConfig)||void 0===r?void 0:r.call(this,t));if(void 0!==e){this.pcfgs[t]=e;return}}const a=await o$1s(`${t}package.json`,this.fetchOpts);switch(a.status){case 200:case 304:break;case 400:case 401:case 403:case 404:case 406:case 500:this.pcfgs[t]=null;return;default:throw new JspmError(`Invalid status code ${a.status} reading package config for ${t}. ${a.statusText}`)}if(a.headers&&!(null===(e=a.headers.get("Content-Type"))||void 0===e?void 0:e.match(/^application\/json(;|$)/)))this.pcfgs[t]=null;else try{this.pcfgs[t]=await a.json();}catch(e){this.pcfgs[t]=null;}})());await this.pcfgPromises[t];return this.pcfgs[t]}async getDepList(t,e=false){const s=await this.getPackageConfig(t);return s?[...new Set([Object.keys(s.dependencies||{}),Object.keys(e&&s.devDependencies||{}),Object.keys(s.peerDependencies||{}),Object.keys(s.optionalDependencies||{}),Object.keys(s.imports||{})].flat())]:[]}async checkPjson(t){return null!==await this.getPackageConfig(t)&&t}async exists(t){const e=await o$1s(t,this.fetchOpts);switch(e.status){case 200:case 304:return true;case 400:case 401:case 403:case 404:case 406:case 500:return false;default:throw new JspmError(`Invalid status code ${e.status} loading ${t}. ${e.statusText}`)}}async resolveLatestTarget(t,{provider:e,layer:s},r){let n;for(const e of t.ranges.sort(t.ranges[0].constructor.compare))n?e.gt(n)&&!n.contains(e)&&(n=e):n=e;const a={registry:t.registry,name:t.name,range:n,unstable:t.unstable};const i=getProvider(e,this.providers).resolveLatestTarget.bind(this);const o=await i(a,s,r);if(o)return o;throw new JspmError("nodemodules"===e?`${r}node_modules/${t.name} does not exist, try installing "${t.name}" with npm first via "npm install ${t.name}".`:`Unable to resolve package ${a.registry}:${a.name} in range "${a.range}" from parent ${r}.`)}async wasCommonJS(t){var e;const s=await this.getPackageBase(t);if(!s)return false;const r=await this.getPackageConfig(s);if(!r)return false;const n="./"+t.slice(s.length);return !!(null===r||void 0===r||null===(e=r.exports)||void 0===e?void 0:e[n+"!cjs"])}async realPath(t){if(!t.startsWith("file:")||this.preserveSymlinks)return t;let e=false;t=t.replace(/%3a/i,(()=>{e=true;return ":"}));et$7||([{realpath:et$7},{pathToFileURL:st$7}]=await Promise.all([Promise.resolve().then(function () { return e$m; }),Promise.resolve().then(function () { return url; })]));const s=st$7(await new Promise(((e,s)=>et$7(new URL(t),((t,r)=>t?s(t):e(r)))))).href;return e?"file:"+s.slice(5).replace(":","%3a"):s}async finalizeResolve(t,e,s){e&&t.endsWith("/")&&(t=t.slice(0,-1));e&&(t=await(async()=>{if(await this.exists(t+"/package.json")){const r=await this.getPackageConfig(t)||{};return this.env.includes("browser")&&"string"===typeof r.browser?this.finalizeResolve(await legacyMainResolve.call(this,r.browser,new URL(t)),e,s):this.env.includes("module")&&"string"===typeof r.module?this.finalizeResolve(await legacyMainResolve.call(this,r.module,new URL(t)),e,s):"string"===typeof r.main?this.finalizeResolve(await legacyMainResolve.call(this,r.main,new URL(t)),e,s):this.finalizeResolve(await legacyMainResolve.call(this,null,new URL(t)),e,s)}return await this.exists(t+"/index.js")?t+"/index.js":await this.exists(t+"/index.json")?t+"/index.json":await this.exists(t+"/index.node")?t+"/index.node":await this.exists(t)?t:await this.exists(t+".js")?t+".js":await this.exists(t+".json")?t+".json":await this.exists(t+".node")?t+".node":t})());if(this.env.includes("browser")){s=s||await this.getPackageBase(t);if(t.startsWith(s)){const r=await this.getPackageConfig(s);if(r&&"object"===typeof r.browser&&null!==r.browser){const n="./"+t.slice(s.length);if(r.browser[n]){const a=r.browser[n];if(false===a)throw new Error(`TODO: Empty browser map for ${n} in ${t}`);if(!a.startsWith("./"))throw new Error(`TODO: External browser map for ${n} to ${a} in ${t}`);return s+a.slice(2)===t?t:await this.finalizeResolve(s+a.slice(2),e,s)}}}}return t}async getExportResolution(t,e,s){const r=await this.getPackageConfig(t)||{};if("#"===s[0]){if(void 0===r.imports||null===r.imports)return null;const n=getMapMatch(s,r.imports);if(!n)return null;const a=enumeratePackageTargets(r.imports[n]);for(const s of a)try{if(await this.finalizeResolve(s,false,t)===t+e.slice(2))return "."}catch{}return null}if(void 0!==r.exports&&null!==r.exports){if("string"===typeof r.exports){if("."!==e)return null;const s=new URL(r.exports,t).href;try{if(await this.finalizeResolve(s,false,t)===t+e.slice(2))return "."}catch{}return null}if(allDotKeys(r.exports)){let n;for(const a of Object.keys(r.exports)){const i=enumeratePackageTargets(r.exports[a]);for(const r of i)if(-1===r.indexOf("*")){if(await this.finalizeResolve(new URL(r,t).href,false,t)===t+e.slice(2)){if(n)if(s.endsWith(n.slice(2))){if(!s.endsWith(a.slice(2)))continue}else s.endsWith(a.slice(2))||a.lengtht.d>0))&&!n.length&&t.startsWith("file:")){var l;if(r){var c;if(!(t.endsWith(".mjs")||t.endsWith(".js")&&"module"===(null===(c=await this.getPackageConfig(await this.getPackageBase(t)))||void 0===c?void 0:c.type)))return createCjsAnalysis(e,o,t)}else if(t.endsWith(".cjs")||t.endsWith(".js")&&"module"!==(null===(l=await this.getPackageConfig(await this.getPackageBase(t)))||void 0===l?void 0:l.type))return createCjsAnalysis(e,o,t)}return s?createSystemAnalysis(o,e,t):createEsmAnalysis(e,o,t)}catch(n){if(!n.message||!n.message.startsWith("Parse error @:"))throw n;if(a)try{return this.analyze(t,e,s,r,false)}catch{}if(n.message&&n.message.startsWith("Parse error @:")){const[e]=n.message.split("\n",1);const s=e.slice(14);let[r,a]=s.split(":");const i=o.split("\n");let l="";r>1&&(l+="\n "+i[r-2]);l+="\n> "+i[r-1];l+="\n "+" ".repeat(a-1)+"^";i.length>1&&(l+="\n "+i[r]);throw new JspmError(`${l}\n\nError parsing ${t}:${s}`)}throw n}}resolvePackageTarget(t,e,s,r,n){if("string"===typeof t){if("."===t)return e.slice(0,-1);if(!t.startsWith("./")){if(n)return t;throw new Error(`Invalid exports target ${t} resolving ./${r} in ${e}`)}if(!t.startsWith("./"))throw new Error("Invalid ");if(""===r)return new URL(t,e).href;if(-1!==t.indexOf("*"))return new URL(t.replace(/\*/g,r),e).href;if(t.endsWith("/"))return new URL(t+r,e).href;throw new Error(`Expected pattern or path export resolving ./${r} in ${e}`)}if("object"!==typeof t||null===t||Array.isArray(t)){if(Array.isArray(t))for(const a of t)return this.resolvePackageTarget(a,e,s,r,n)}else for(const a in t)if("default"===a||(s?this.cjsEnv:this.env).includes(a)){const i=this.resolvePackageTarget(t[a],e,s,r,n);if(i)return i}return null}constructor(t,e,s,r=false){this.pcfgPromises=Object.create(null);this.pcfgs=Object.create(null);this.preserveSymlinks=false;this.providers=Y$k;if(t.includes("require"))throw new Error("Cannot manually pass require condition");t.includes("import")||t.push("import");this.env=t;this.cjsEnv=this.env.map((t=>"import"===t?"require":t));this.log=e;this.fetchOpts=s;this.preserveSymlinks=r;}}function enumeratePackageTargets(t,e=new Set){if("string"===typeof t)e.add(t);else {if("object"===typeof t&&null!==t&&!Array.isArray(t)){for(const s in t)enumeratePackageTargets(t[s],e);return e}if(Array.isArray(t))for(const s of t){enumeratePackageTargets(s,e);return e}}return e}async function legacyMainResolve(t,e,s,r){let n;if(null===t||void 0===t?void 0:t.endsWith("index.js")){if(await this.exists(n=new URL(`./${t}`,e).href))return n}else if(t){if(await this.exists(n=new URL(`./${t}/index.js`,e).href))return n;if(await this.exists(n=new URL(`./${t}/index.json`,e).href))return n;if(await this.exists(n=new URL(`./${t}/index.node`,e).href))return n;if(await this.exists(n=new URL(`./${t}`,e).href))return n;if(await this.exists(n=new URL(`./${t}.js`,e).href))return n;if(await this.exists(n=new URL(`./${t}.json`,e).href))return n;if(await this.exists(n=new URL(`./${t}.node`,e).href))return n}else {if("file:"!==e.protocol&&await this.exists(n=new URL("./mod.ts",e).href))return n;if(await this.exists(n=new URL("./index.js",e).href))return n;if(await this.exists(n=new URL("./index.json",e).href))return n;if(await this.exists(n=new URL("./index.node",e).href))return n}throw new JspmError(`Unable to resolve ${t?t+" in ":""}${e} resolving ${null!==s&&void 0!==s?s:""}${importedFrom(r)}.`,"MODULE_NOT_FOUND")}function getMapMatch(t,e){if(t in e)return t;let s;for(const r of Object.keys(e)){const e=r.indexOf("*");if(r.endsWith("/")||-1!==e)if(r.endsWith("/"))t.startsWith(r)&&(!s||r.length>s.length)&&(s=r);else {const n=r.slice(0,e);const a=r.slice(e+1);t.startsWith(n)&&t.endsWith(a)&&t.length>n.length+a.length&&(s&&s.startsWith(n)&&s.endsWith(a)||(s=r));}}return s}function allDotKeys(t){for(let e in t)if("."!==e[0])return false;return true}let rt$7;async function getIntegrity(t,e){rt$7||({createHash:rt$7}=await Promise.resolve().then(function () { return crypto$1; }));const s=await o$1s(t,e);const r=await s.text();const a=rt$7("sha384");a.update(r);return "sha384-"+a.digest("base64")}function encodeBase64(t){return "undefined"!==typeof window?window.btoa(t):Buffer.from(t).toString("base64")}function decodeBase64(t){return "undefined"!==typeof window?window.atob(t):Buffer.from(t,"base64").toString("utf8")}const{Semver:nt$7,SemverRange:at$6}=e$1e;function enumerateParentScopes(t){const e=[];let s=t.lastIndexOf("/");const r=t.indexOf("://")+1;while((s=t.lastIndexOf("/",s-1))!==r)e.push(t.slice(0,s+1));return e}function getResolution(t,e,s){s&&!s.endsWith("/")&&throwInternalError(s);if(!s)return t.primary[e];const r=t.secondary[s];var n;return null!==(n=null===r||void 0===r?void 0:r[e])&&void 0!==n?n:null}function getFlattenedResolution(t,e,s,r){const n=enumerateParentScopes(s);for(const s of n){if(!t.flattened[s])continue;const n=t.flattened[s][e];if(n)for(const t of n)if(t.export===r||t.export.endsWith("/")&&r.startsWith(t.export))return t.resolution}return null}function setConstraint(t,e,s,r=null){null===r?t.primary[e]=s:(t.secondary[r]=t.secondary[r]||Object.create(null))[e]=s;}function setResolution(t,e,s,r=null,n=null){r&&!r.endsWith("/")&&throwInternalError(r);if(null===r){const r=t.primary[e];if(r&&r.installUrl===s&&r.installSubpath===n)return false;t.primary[e]={installUrl:s,installSubpath:n};return true}{t.secondary[r]=t.secondary[r]||{};const a=t.secondary[r][e];if(a&&a.installUrl===s&&a.installSubpath===n)return false;t.secondary[r][e]={installUrl:s,installSubpath:n};return true}}function mergeLocks(t,e){for(const s of Object.keys(e.primary))t.primary[s]=e.primary[s];for(const s of Object.keys(e.secondary))t[s]?Object.assign(t[s]=Object.create(null),e[s]):t.secondary[s]=e.secondary[s];for(const s of Object.keys(e.flattened))t[s]?Object.assign(t[s],e[s]):t.flattened[s]=e.flattened[s];}function mergeConstraints(t,e){for(const s of Object.keys(e.primary))t.primary[s]=e.primary[s];for(const s of Object.keys(e.secondary))t[s]?Object.assign(t[s]=Object.create(null),e[s]):t.secondary[s]=e.secondary[s];}function toPackageTargetMap(t,e,s="npm",r=false){const n=Object.create(null);if(t.dependencies)for(const r of Object.keys(t.dependencies))n[r]=newPackageTarget(t.dependencies[r],e,s,r).pkgTarget;if(t.peerDependencies)for(const r of Object.keys(t.peerDependencies))r in n||(n[r]=newPackageTarget(t.peerDependencies[r],e,s,r).pkgTarget);if(t.optionalDependencies)for(const r of Object.keys(t.optionalDependencies))r in n||(n[r]=newPackageTarget(t.optionalDependencies[r],e,s,r).pkgTarget);if(r&&t.devDependencies)for(const r of Object.keys(t.devDependencies))r in n||(n[r]=newPackageTarget(t.devDependencies[r],e,s,r).pkgTarget);return n}async function packageTargetFromExact(t,e,s=false){let r,n,a;if("node_modules"===t.registry){const s=decodeBase64(t.version);const i=await e.getPackageConfig(s);if(!i)throw new JspmError(`Package ${s} has no package config, cannot create package target.`);if(!i.name||!i.version)throw new JspmError(`Package ${s} has no name or version, cannot create package target.`);n=i.name;a=i.version;r="npm";}else ({registry:r,name:n,version:a}=t);const i=new nt$7(a);return i.tag?{registry:r,name:n,ranges:[new at$6(a)],unstable:false}:s?0!==i.major?{registry:r,name:n,ranges:[new at$6(i.major)],unstable:false}:0!==i.minor?{registry:r,name:n,ranges:[new at$6(i.major+"."+i.minor)],unstable:false}:{registry:r,name:n,ranges:[new at$6(a)],unstable:false}:{registry:r,name:n,ranges:[new at$6("^"+a)],unstable:false}}function getConstraintFor(t,e,s){const r=[];for(const[n,a]of Object.entries(s.primary))a instanceof URL||a.registry!==e||a.name!==t||r.push({alias:n,pkgScope:null,ranges:a.ranges});for(const[n,a]of Object.entries(s.secondary))for(const s of Object.keys(a)){const i=a[s];i instanceof URL||i.registry!==e||i.name!==t||r.push({alias:s,pkgScope:n,ranges:i.ranges});}return r}async function extractLockConstraintsAndMap(t,e,s,r,n,a,i){const o={primary:Object.create(null),secondary:Object.create(null),flattened:Object.create(null)};const l={imports:Object.create(null),scopes:Object.create(null)};const c=await a.getPackageBase(s.href);const p=await a.getPackageConfig(c);const u={primary:p?toPackageTargetMap(p,new URL(c),n,true):Object.create(null),secondary:Object.create(null)};const h=new Set;for(const e of Object.keys(t.imports||{})){if(isPlain(e)){const n=parsePkg(e);let{parsedTarget:i,pkgUrl:l,subpath:f}=await resolveTargetPkg(t.imports[e],s,r,c,a);const d=i&&await a.getExportResolution(l,f,e);h.add(l);if(d){if("#"===e[0])continue;u.primary[n.pkgName]||(u.primary[n.pkgName]=await packageTargetFromExact(i.pkg,a));let t=null;n.subpath!==d&&("."===n.subpath?t=d:"."===d?t=false:d.endsWith(n.subpath.slice(1))&&(t=d.slice(0,n.subpath.length)));if(false!==t){setResolution(o,n.pkgName,l,null,t);continue}}if(p&&p.name===n.pkgName){const t=await a.getExportResolution(c,f,e);if(n.subpath===t)continue}}l.imports[isPlain(e)?e:resolveUrl(e,s,r)]=resolveUrl(t.imports[e],s,r);}for(const e of Object.keys(t.scopes||{})){var f;const n=null!==(f=resolveUrl(e,s,r))&&void 0!==f?f:e;const i=await a.getPackageBase(n);const c="/"===new URL(i).pathname;h.add(i);const p=t.scopes[e];for(const t of Object.keys(p)){if(isPlain(t)){const e=parsePkg(t);let{parsedTarget:n,pkgUrl:l,subpath:f}=await resolveTargetPkg(p[t],s,r,i,a);h.add(l);const d=n&&await a.getExportResolution(l,f,t);if(d){if("#"===t[0])continue;u.primary[e.pkgName]||(u.primary[e.pkgName]=n?await packageTargetFromExact(n.pkg,a):new URL(l));let s=null;e.subpath!==d&&("."===e.subpath?s=d:"."===d?s=false:d.endsWith(e.subpath.slice(1))&&(s=d.slice(0,e.subpath.length)));if(false!==s){if(c){const t=o.flattened[i]=o.flattened[i]||{};t[e.pkgName]=t[e.pkgName]||[];t[e.pkgName].push({export:e.subpath,resolution:{installUrl:l,installSubpath:s}});}else setResolution(o,e.pkgName,l,i,s);continue}}}(l.scopes[n]=l.scopes[n]||Object.create(null))[isPlain(t)?t:resolveUrl(t,s,r)]=resolveUrl(p[t],s,r);}}await Promise.all([...h].map((async t=>{if(!isURL(t))return;const e=await getPackageConfig(t);e&&(u.secondary[t]=toPackageTargetMap(e,new URL(t),n,false));})));return {maps:l,constraints:u,locks:await enforceProviderConstraints(o,i,a,c)}}async function enforceProviderConstraints(t,e,s,r){const n={primary:{},secondary:{},flattened:{}};for(const[a,i]of Object.entries(t.primary)){const{installUrl:t,installSubpath:o}=await translateLock(i,e,s,r);setResolution(n,a,t,null,o);}for(const[r,a]of Object.entries(t.secondary))for(const[t,i]of Object.entries(a)){const{installUrl:a,installSubpath:o}=await translateLock(i,e,s,r);setResolution(n,t,a,r,o);}for(const[r,a]of Object.entries(t.flattened)){n.flattened[r]={};for(const[t,i]of Object.entries(a)){n.flattened[r][t]=[];for(const a of i){const i=await translateLock(a.resolution,e,s,r);n.flattened[r][t].push({export:a.export,resolution:i});}}}return n}async function translateLock(t,e,s,r){const n=await s.parseUrlPkg(t.installUrl);if(!n)return t;const a=await s.getPackageBase(r);const i=await translateProvider(n,e,s,a);return i?{installUrl:await s.pkgToUrl(i.pkg,e),installSubpath:t.installSubpath}:t}async function translateProvider(t,{provider:e,layer:s},r,n){const a=t.pkg;if(("deno"===a.registry||"denoland"===a.registry)&&"deno"===e)return t;if("deno"===a.registry||"denoland"===a.registry||"deno"===e)return null;const i="node_modules"===a.registry;const o="nodemodules"===e;if(i===o)return {...t,source:{provider:e,layer:s}};const l=await packageTargetFromExact(a,r);let c;try{c=await r.resolveLatestTarget(l,{provider:e,layer:s},n);}catch(t){return null}return {pkg:c,source:{provider:e,layer:s},subpath:t.subpath}}async function resolveTargetPkg(t,e,s,r,n,a){let i=resolveUrl(t,e,s);let o=await n.parseUrlPkg(i);let l=o?await n.pkgToUrl(o.pkg,o.source):await n.getPackageBase(i);const c="."+i.slice(l.length-1);return {parsedTarget:o,pkgUrl:l,subpath:c}}var it$7,ot$6;class Installer{visitInstalls(t){if(!t(this.installs.primary,null))for(const e of Object.keys(this.installs.secondary))if(t(this.installs.secondary[e],e))return}startInstall(){if(this.installing)throw new Error("Internal error: already installing");this.installing=true;this.newInstalls=false;this.added=new Map;}finishInstall(){this.installing=false;}getProvider(t){let e=this.defaultProvider;for(const s of Object.keys(this.providers))if(s.endsWith(":")&&t.registry===s.slice(0,-1)||t.name.startsWith(s)&&(t.name.length===s.length||"/"===t.name[s.length])){e=parseProviderStr(this.providers[s]);break}return e} + */function parsePkg(t){let e=t.indexOf("/");if("@"===t[0]){if(-1===e)return;e=t.indexOf("/",e+1);}return -1===e?{pkgName:t,subpath:"."}:{pkgName:t.slice(0,e),subpath:`.${t.slice(e)}`}}const R$t="https://ga.jspm.io/";const T$u="https://ga.system.jspm.io/";const x$D="https://api.jspm.io/";const O$x=3e5;const S$D=5e3;const L$r=["default","system"];async function pkgToUrl$5(t,e){return `${"system"===e?T$u:R$t}${pkgToStr(t)}/`}const M$y=/^(([a-z]+):)?((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$6(t){let e=null;let s;if(t.startsWith(R$t))s="default";else {if(!t.startsWith(T$u))return;s="system";}const[,,r,n,a]=t.slice(("default"===s?R$t:T$u).length).match(M$y)||[];if(r&&n&&a){if("npm"===r&&"@jspm/core"===n&&t.includes("/nodelibs/")){e=`./nodelibs/${t.slice(t.indexOf("/nodelibs/")+10).split("/")[1]}`;e=e&&e.endsWith(".js")?e.slice(0,-3):null;}return {pkg:{registry:r,name:n,version:a},layer:s,subpath:e}}}let E$D={};function clearResolveCache(){E$D={};}async function checkBuildOrError(t,e){const s=await e$1d(`${t}package.json`,e);if(s.ok)return true;const r=await e$1d(`${t}/_error.log`,e);if(r.ok){const e=await r.text();throw new JspmError(`Resolved dependency ${t} with error:\n\n${e}\nPlease post an issue at jspm/project on GitHub, or by following the link below:\n\nhttps://github.com/jspm/project/issues/new?title=CDN%20build%20error%20for%20${encodeURIComponent(t)}&body=_Reporting%20CDN%20Build%20Error._%0A%0A%3C!--%20%20No%20further%20description%20necessary,%20just%20click%20%22Submit%20new%20issue%22%20--%3E`)}console.error(`Unable to request ${t}package.json - ${s.status} ${s.statusText||"returned"}`);return false}async function ensureBuild(t,e){if(await checkBuildOrError(await pkgToUrl$5(t,"default"),e))return;const s=`${t.name}@${t.version}`;const r=await e$1d(`${x$D}build/${s}`,e);if(!r.ok&&403!==r.status){const t=(await r.json()).error;throw new JspmError(`Unable to request the JSPM API for a build of ${s}, with error: ${t}.`)}let a=Date.now();while(true){await new Promise((t=>setTimeout(t,S$D)));if(await checkBuildOrError(await pkgToUrl$5(t,"default"),e))return;if(Date.now()-a>=O$x)throw new JspmError(`Timed out waiting for the build of ${s} to be ready on the JSPM CDN. Try again later, or post a JSPM project issue if the issue persists.`)}}async function resolveLatestTarget$1(t,e,s){const{registry:r,name:n,range:a,unstable:i}=t;if(a.isExact&&!a.version.tag){const t={registry:r,name:n,version:a.version.toString()};await ensureBuild(t,this.fetchOpts);return t}const o=E$D[t.registry+":"+t.name]=E$D[t.registry+":"+t.name]||{latest:null,majors:Object.create(null),minors:Object.create(null),tags:Object.create(null)};if(a.isWildcard||a.isExact&&"latest"===a.version.tag){let e=await(o.latest||(o.latest=lookupRange.call(this,r,n,"",i,s)));e instanceof Promise&&(e=await e);if(!e)return null;this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> WILDCARD ${e.version}${s?" ["+s+"]":""}`);await ensureBuild(e,this.fetchOpts);return e}if(a.isExact&&a.version.tag){const e=a.version.tag;let l=await(o.tags[e]||(o.tags[e]=lookupRange.call(this,r,n,e,i,s)));l instanceof Promise&&(l=await l);if(!l)return null;this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> TAG ${e}${s?" ["+s+"]":""}`);await ensureBuild(l,this.fetchOpts);return l}let l=false;if(a.isMajor){const e=a.version.major;let c=await(o.majors[e]||(o.majors[e]=lookupRange.call(this,r,n,e,i,s)));c instanceof Promise&&(c=await c);if(!c)return null;if(!a.version.gt(c.version)){this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> MAJOR ${c.version}${s?" ["+s+"]":""}`);await ensureBuild(c,this.fetchOpts);return c}l=true;}if(l||a.isStable){const e=`${a.version.major}.${a.version.minor}`;let l=await(o.minors[e]||(o.minors[e]=lookupRange.call(this,r,n,e,i,s)));l instanceof Promise&&(l=await l);if(!l)return null;this.log("jspm/resolveLatestTarget",`${t.registry}:${t.name}@${a} -> MINOR ${l.version}${s?" ["+s+"]":""}`);await ensureBuild(l,this.fetchOpts);return l}return null}function pkgToLookupUrl(t,e=false){return `${R$t}${t.registry}:${t.name}${t.version?"@"+t.version:e?"@":""}`}async function lookupRange(t,s,r,a,i){const o=pkgToLookupUrl({registry:t,name:s,version:r},a);const l=await e$1d(o,this.fetchOpts);switch(l.status){case 304:case 200:return {registry:t,name:s,version:(await l.text()).trim()};case 404:const n=await fetchVersions(s);const c=new R$w(String(r)||"*",a);const p=c.bestMatch(n,a);if(p)return {registry:t,name:s,version:p};throw new JspmError(`Unable to resolve ${t}:${s}@${r} to a valid version${importedFrom(i)}`);default:throw new JspmError(`Invalid status code ${l.status} looking up "${t}:${s}" from ${o} - ${l.statusText}${importedFrom(i)}`)}}const D$w=new Map;async function fetchVersions(t){if(D$w.has(t))return D$w.get(t);const e=await(await e$1d(`https://npmlookup.jspm.io/${encodeURI(t)}`,{})).json();const s=Object.keys(e.versions||{});D$w.set(t,s);return s}var C$z=Object.freeze({__proto__:null,supportedLayers:L$r,pkgToUrl:pkgToUrl$5,parseUrlPkg:parseUrlPkg$6,clearResolveCache:clearResolveCache,resolveLatestTarget:resolveLatestTarget$1});const I$y="https://cdn.skypack.dev/";async function pkgToUrl$4(t){return `${I$y}${t.name}@${t.version}/`}const _$J=/^((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$5(t){if(!t.startsWith(I$y))return;const[,e,s]=t.slice(I$y.length).match(_$J)||[];return e&&s?{registry:"npm",name:e,version:s}:void 0}var W$q=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl$4,parseUrlPkg:parseUrlPkg$5,resolveLatestTarget:resolveLatestTarget$1});const A$v="https://cdn.jsdelivr.net/";async function pkgToUrl$3(t){return `${A$v}${t.registry}/${t.name}@${t.version}/`}const N$s=/^([^\/]+)\/((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$4(t){if(!t.startsWith(A$v))return;const[,e,s,r]=t.slice(A$v.length).match(N$s)||[];return {registry:e,name:s,version:r}}var z$p=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl$3,parseUrlPkg:parseUrlPkg$4,resolveLatestTarget:resolveLatestTarget$1});const J$l="https://unpkg.com/";async function pkgToUrl$2(t){return `${J$l}${t.name}@${t.version}/`}const B$w=/^((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$3(t){if(!t.startsWith(J$l))return;const[,e,s]=t.slice(J$l.length).match(B$w)||[];return e&&s?{registry:"npm",name:e,version:s}:void 0}var F$t=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl$2,parseUrlPkg:parseUrlPkg$3,resolveLatestTarget:resolveLatestTarget$1});const H$q=new Set(["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","repl","stream","stream/promises","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);async function pkgToUrl$1(t,e){return "node"!==t.registry?pkgToUrl$5(t,e):`node:${t.name}/`}function resolveBuiltin(t,s){let r=t.startsWith("node:")?t.slice(5):H$q.has(t)?t:null;if(r){if(s.includes("deno")||s.includes("node"))return `node:${r}`;r.includes("/")&&(r=r.split("/")[0]);return {target:{pkgTarget:{registry:"npm",name:"@jspm/core",ranges:[new R$w("*")],unstable:true},installSubpath:`./nodelibs/${r}`},alias:r}}}async function getPackageConfig$2(){return {exports:{".":"."}}}async function resolveLatestTarget(t,s,r){return "npm"!==t.registry||"@jspm/core"!==t.name?null:resolveLatestTarget$1.call(this,{registry:"npm",name:"@jspm/core",range:new R$w("*"),unstable:true},s,r)}function parseUrlPkg$2(t){if(!t.startsWith("node:"))return;let e=t.slice(5);e.endsWith("/")&&(e=e.slice(0,-1));return {registry:"node",name:e,version:""}}var q$p=Object.freeze({__proto__:null,nodeBuiltinSet:H$q,pkgToUrl:pkgToUrl$1,resolveBuiltin:resolveBuiltin,getPackageConfig:getPackageConfig$2,resolveLatestTarget:resolveLatestTarget,parseUrlPkg:parseUrlPkg$2});const G$m="https://esm.sh/";async function pkgToUrl(t){return `${G$m}*${t.name}@${t.version}/`}const K$o=/^(?:v\d+\/)?\*?((?:@[^/\\%@]+\/)?[^./\\%@][^/\\%@]*)@([^\/]+)(\/.*)?$/;function parseUrlPkg$1(t){if(!t.startsWith(G$m))return;const[,e,s]=t.slice(G$m.length).match(K$o)||[];return e&&s?{registry:"npm",name:e,version:s}:void 0}async function getPackageConfig$1(t){const e=await e$1d(`${t}package.json`,this.fetchOpts);switch(e.status){case 200:case 304:break;case 400:case 401:case 403:case 404:case 406:case 500:this.pcfgs[t]=null;return;default:throw new JspmError(`Invalid status code ${e.status} reading package config for ${t}. ${e.statusText}`)}const s=await e.json();if(s.exports)for(const t of Object.keys(s.exports))s.exports[t]=t;if(s.imports)for(const t of Object.keys(s.imports))s.imports[t]=t;return s}var V$q=Object.freeze({__proto__:null,pkgToUrl:pkgToUrl,parseUrlPkg:parseUrlPkg$1,getPackageConfig:getPackageConfig$1,resolveLatestTarget:resolveLatestTarget$1});const Y$k={deno:$$m,jsdelivr:z$p,node:q$p,skypack:W$q,unpkg:F$t,"esm.sh":V$q,"jspm.io":C$z,jspm:C$z};function getProvider(t,e){const s=e[t];if(s)return s;throw new JspmError(`No provider named "${t}" has been defined.`)}const Q$k={"denoland:":"deno","deno:":"deno"};const X$k=new Set(["npm","deno","node"]);const Z$j=new Set(["node","deno"]);function createEsmAnalysis(t,e,s){if(!t.length&&tt$8.test(e))return createSystemAnalysis(e,t,s);const r=[];const n=[];for(const a of t)if(-1!==a.d){if(a.d>=0&&a.n)try{n.push(a.n);}catch(t){console.warn(`TODO: Dynamic import custom expression tracing in ${s} for:\n\n${e.slice(a.ss,a.se)}\n`);}}else r.includes(a.n)||r.push(a.n);const a=e.length;return {deps:r,dynamicDeps:n,cjsLazyDeps:null,size:a,format:"esm"}}const tt$8=/^\s*(\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*)*\s*System\s*\.\s*register\s*\(\s*(\[[^\]]*\])\s*,\s*\(?function\s*\(\s*([^\),\s]+\s*(,\s*([^\),\s]+)\s*)?\s*)?\)/;function createSystemAnalysis(t,e,s){const[,,,r,,,n]=t.match(tt$8)||[];if(!r)return createEsmAnalysis(e,t,s);const a=JSON.parse(r.replace(/'/g,'"'));const i=[];if(n){const e=`${n}.import(`;let s=-1;while(-1!==(s=t.indexOf(e,s+1))){const r=s+e.length+1;const n=t[s+e.length];if('"'===n||"'"===n){const a=t.indexOf(n,s+e.length+1);if(-1!==a)try{i.push(JSON.parse('"'+t.slice(r,a)+'"'));continue}catch(t){}}console.warn("TODO: Dynamic import custom expression tracing.");}}const o=t.length;return {deps:a,dynamicDeps:i,cjsLazyDeps:null,size:o,format:"system"}}let et$6,st$6;function isBuiltinScheme(t){return -1!==t.indexOf(":")&&Z$j.has(t.slice(0,t.indexOf(":")))}function isMappableScheme(t){return -1!==t.indexOf(":")&&X$k.has(t.slice(0,t.indexOf(":")))}class Resolver{addCustomProvider(t,e){if(!e.pkgToUrl)throw new Error('Custom provider "'+t+'" must define a "pkgToUrl" method.');if(!e.parseUrlPkg)throw new Error('Custom provider "'+t+'" must define a "parseUrlPkg" method.');if(!e.resolveLatestTarget)throw new Error('Custom provider "'+t+'" must define a "resolveLatestTarget" method.');this.providers=Object.assign({},this.providers,{[t]:e});}providerNameForUrl(t){for(const e of Object.keys(this.providers)){const s=this.providers[e];if(s.ownsUrl&&s.ownsUrl.call(this,t)||s.parseUrlPkg.call(this,t))return e}}providerForUrl(t){const e=this.providerNameForUrl(t);return e?this.providers[e]:null}async parseUrlPkg(t){for(const e of Object.keys(this.providers)){const s=this.providers[e];const r=s.parseUrlPkg.call(this,t);if(r)return {pkg:"pkg"in r?r.pkg:r,source:{provider:e,layer:"layer"in r?r.layer:"default"},subpath:"subpath"in r?r.subpath:null}}return null}async pkgToUrl(t,{provider:e,layer:s}){return getProvider(e,this.providers).pkgToUrl.call(this,t,s)}resolveBuiltin(t){for(const e of Object.values(this.providers)){if(!e.resolveBuiltin)continue;const s=e.resolveBuiltin.call(this,t,this.env);if(s)return s}}async getPackageBase(t){const e=await this.parseUrlPkg(t);if(e)return this.pkgToUrl(e.pkg,e.source);let s;try{s=new URL("./",t);}catch{return t}const r=new URL("/",s).href;do{let e;if(e=await this.checkPjson(s.href))return new URL(".",e).href;if(s.href===r)return new URL("./",t).href}while(s=new URL("../",s))}async getPackageConfig(t){if(!t.startsWith("file:")&&!t.startsWith("http:")&&!t.startsWith("https:")&&!t.startsWith("ipfs:")&&!t.startsWith("node:"))return null;if(!t.endsWith("/"))throw new Error(`Internal Error: Package URL must end in "/". Got ${t}`);let e=this.pcfgs[t];if(e)return e;this.pcfgPromises[t]||(this.pcfgPromises[t]=(async()=>{var e;const s=this.providerForUrl(t);if(s){var r;const e=await(null===(r=s.getPackageConfig)||void 0===r?void 0:r.call(this,t));if(void 0!==e){this.pcfgs[t]=e;return}}const a=await e$1d(`${t}package.json`,this.fetchOpts);switch(a.status){case 200:case 304:break;case 400:case 401:case 403:case 404:case 406:case 500:this.pcfgs[t]=null;return;default:throw new JspmError(`Invalid status code ${a.status} reading package config for ${t}. ${a.statusText}`)}if(a.headers&&!(null===(e=a.headers.get("Content-Type"))||void 0===e?void 0:e.match(/^application\/json(;|$)/)))this.pcfgs[t]=null;else try{this.pcfgs[t]=await a.json();}catch(e){this.pcfgs[t]=null;}})());await this.pcfgPromises[t];return this.pcfgs[t]}async getDepList(t,e=false){const s=await this.getPackageConfig(t);return s?[...new Set([Object.keys(s.dependencies||{}),Object.keys(e&&s.devDependencies||{}),Object.keys(s.peerDependencies||{}),Object.keys(s.optionalDependencies||{}),Object.keys(s.imports||{})].flat())]:[]}async checkPjson(t){return null!==await this.getPackageConfig(t)&&t}async exists(t){const e=await e$1d(t,this.fetchOpts);switch(e.status){case 200:case 304:return true;case 400:case 401:case 403:case 404:case 406:case 500:return false;default:throw new JspmError(`Invalid status code ${e.status} loading ${t}. ${e.statusText}`)}}async resolveLatestTarget(t,{provider:e,layer:s},r){let n;for(const e of t.ranges.sort(t.ranges[0].constructor.compare))n?e.gt(n)&&!n.contains(e)&&(n=e):n=e;const a={registry:t.registry,name:t.name,range:n,unstable:t.unstable};const i=getProvider(e,this.providers).resolveLatestTarget.bind(this);const o=await i(a,s,r);if(o)return o;throw new JspmError("nodemodules"===e?`${r}node_modules/${t.name} does not exist, try installing "${t.name}" with npm first via "npm install ${t.name}".`:`Unable to resolve package ${a.registry}:${a.name} in range "${a.range}" from parent ${r}.`)}async wasCommonJS(t){var e;const s=await this.getPackageBase(t);if(!s)return false;const r=await this.getPackageConfig(s);if(!r)return false;const n="./"+t.slice(s.length);return !!(null===r||void 0===r||null===(e=r.exports)||void 0===e?void 0:e[n+"!cjs"])}async realPath(t){if(!t.startsWith("file:")||this.preserveSymlinks)return t;let e=false;t=t.replace(/%3a/i,(()=>{e=true;return ":"}));et$6||([{realpath:et$6},{pathToFileURL:st$6}]=await Promise.all([Promise.resolve().then(function () { return e$m; }),Promise.resolve().then(function () { return url; })]));const s=st$6(await new Promise(((e,s)=>et$6(new URL(t),((t,r)=>t?s(t):e(r)))))).href;return e?"file:"+s.slice(5).replace(":","%3a"):s}async finalizeResolve(t,e,s){e&&t.endsWith("/")&&(t=t.slice(0,-1));e&&(t=await(async()=>{if(await this.exists(t+"/package.json")){const r=await this.getPackageConfig(t)||{};return this.env.includes("browser")&&"string"===typeof r.browser?this.finalizeResolve(await legacyMainResolve.call(this,r.browser,new URL(t)),e,s):this.env.includes("module")&&"string"===typeof r.module?this.finalizeResolve(await legacyMainResolve.call(this,r.module,new URL(t)),e,s):"string"===typeof r.main?this.finalizeResolve(await legacyMainResolve.call(this,r.main,new URL(t)),e,s):this.finalizeResolve(await legacyMainResolve.call(this,null,new URL(t)),e,s)}return await this.exists(t+"/index.js")?t+"/index.js":await this.exists(t+"/index.json")?t+"/index.json":await this.exists(t+"/index.node")?t+"/index.node":await this.exists(t)?t:await this.exists(t+".js")?t+".js":await this.exists(t+".json")?t+".json":await this.exists(t+".node")?t+".node":t})());if(this.env.includes("browser")){s=s||await this.getPackageBase(t);if(t.startsWith(s)){const r=await this.getPackageConfig(s);if(r&&"object"===typeof r.browser&&null!==r.browser){const n="./"+t.slice(s.length);if(r.browser[n]){const a=r.browser[n];if(false===a)throw new Error(`TODO: Empty browser map for ${n} in ${t}`);if(!a.startsWith("./"))throw new Error(`TODO: External browser map for ${n} to ${a} in ${t}`);return s+a.slice(2)===t?t:await this.finalizeResolve(s+a.slice(2),e,s)}}}}return t}async getExportResolution(t,e,s){const r="."===e?t.slice(0,-1):t+e.slice(2);const n=await this.getPackageConfig(t)||{};if("#"===s[0]){if(void 0===n.imports||null===n.imports)return null;const e=getMapMatch(s,n.imports);if(!e)return null;const a=enumeratePackageTargets(n.imports[e]);for(const e of a)try{if(await this.finalizeResolve(e,false,t)===r)return "."}catch{}return null}if(void 0!==n.exports&&null!==n.exports){if("string"===typeof n.exports){if("."!==e)return null;const s=new URL(n.exports,t).href;try{if(await this.finalizeResolve(s,false,t)===r)return "."}catch{}return null}if(allDotKeys(n.exports)){let a;for(const i of Object.keys(n.exports)){const o=enumeratePackageTargets(n.exports[i]);for(const n of o)if(-1===n.indexOf("*")){if(await this.finalizeResolve(new URL(n,t).href,false,t)===r){if(a)if(s.endsWith(a.slice(2))){if(!s.endsWith(i.slice(2)))continue}else s.endsWith(i.slice(2))||i.lengtht.d>0))&&!n.length&&t.startsWith("file:")){var l;if(r){var c;if(!(t.endsWith(".mjs")||t.endsWith(".js")&&"module"===(null===(c=await this.getPackageConfig(await this.getPackageBase(t)))||void 0===c?void 0:c.type)))return createCjsAnalysis(e,o,t)}else if(t.endsWith(".cjs")||t.endsWith(".js")&&"module"!==(null===(l=await this.getPackageConfig(await this.getPackageBase(t)))||void 0===l?void 0:l.type))return createCjsAnalysis(e,o,t)}return s?createSystemAnalysis(o,e,t):createEsmAnalysis(e,o,t)}catch(n){if(!n.message||!n.message.startsWith("Parse error @:"))throw n;if(a)try{return this.analyze(t,e,s,r,false)}catch{}if(n.message&&n.message.startsWith("Parse error @:")){const[e]=n.message.split("\n",1);const s=e.slice(14);let[r,a]=s.split(":");const i=o.split("\n");let l="";r>1&&(l+="\n "+i[r-2]);l+="\n> "+i[r-1];l+="\n "+" ".repeat(a-1)+"^";i.length>1&&(l+="\n "+i[r]);throw new JspmError(`${l}\n\nError parsing ${t}:${s}`)}throw n}}resolvePackageTarget(t,e,s,r,n){if("string"===typeof t){if("."===t)return e.slice(0,-1);if(!t.startsWith("./")){if(n)return t;throw new Error(`Invalid exports target ${t} resolving ./${r} in ${e}`)}if(!t.startsWith("./"))throw new Error("Invalid ");if(""===r)return new URL(t,e).href;if(-1!==t.indexOf("*"))return new URL(t.replace(/\*/g,r),e).href;if(t.endsWith("/"))return new URL(t+r,e).href;throw new Error(`Expected pattern or path export resolving ./${r} in ${e}`)}if("object"!==typeof t||null===t||Array.isArray(t)){if(Array.isArray(t))for(const a of t)return this.resolvePackageTarget(a,e,s,r,n)}else for(const a in t)if("default"===a||(s?this.cjsEnv:this.env).includes(a)){const i=this.resolvePackageTarget(t[a],e,s,r,n);if(i)return i}return null}constructor(t,e,s,r=false){this.pcfgPromises=Object.create(null);this.pcfgs=Object.create(null);this.preserveSymlinks=false;this.providers=Y$k;if(t.includes("require"))throw new Error("Cannot manually pass require condition");t.includes("import")||t.push("import");this.env=t;this.cjsEnv=this.env.map((t=>"import"===t?"require":t));this.log=e;this.fetchOpts=s;this.preserveSymlinks=r;}}function enumeratePackageTargets(t,e=new Set){if("string"===typeof t)e.add(t);else {if("object"===typeof t&&null!==t&&!Array.isArray(t)){for(const s in t)enumeratePackageTargets(t[s],e);return e}if(Array.isArray(t))for(const s of t){enumeratePackageTargets(s,e);return e}}return e}async function legacyMainResolve(t,e,s,r){let n;if(null===t||void 0===t?void 0:t.endsWith("index.js")){if(await this.exists(n=new URL(`./${t}`,e).href))return n}else if(t){if(await this.exists(n=new URL(`./${t}/index.js`,e).href))return n;if(await this.exists(n=new URL(`./${t}/index.json`,e).href))return n;if(await this.exists(n=new URL(`./${t}/index.node`,e).href))return n;if(await this.exists(n=new URL(`./${t}`,e).href))return n;if(await this.exists(n=new URL(`./${t}.js`,e).href))return n;if(await this.exists(n=new URL(`./${t}.json`,e).href))return n;if(await this.exists(n=new URL(`./${t}.node`,e).href))return n}else {if("file:"!==e.protocol&&await this.exists(n=new URL("./mod.ts",e).href))return n;if(await this.exists(n=new URL("./index.js",e).href))return n;if(await this.exists(n=new URL("./index.json",e).href))return n;if(await this.exists(n=new URL("./index.node",e).href))return n}throw new JspmError(`Unable to resolve ${t?t+" in ":""}${e} resolving ${null!==s&&void 0!==s?s:""}${importedFrom(r)}.`,"MODULE_NOT_FOUND")}function getMapMatch(t,e){if(t in e)return t;let s;for(const r of Object.keys(e)){const e=r.indexOf("*");if(r.endsWith("/")||-1!==e)if(r.endsWith("/"))t.startsWith(r)&&(!s||r.length>s.length)&&(s=r);else {const n=r.slice(0,e);const a=r.slice(e+1);t.startsWith(n)&&t.endsWith(a)&&t.length>n.length+a.length&&(s&&s.startsWith(n)&&s.endsWith(a)||(s=r));}}return s}function allDotKeys(t){for(let e in t)if("."!==e[0])return false;return true}let rt$6;async function getIntegrity(t,e){rt$6||({createHash:rt$6}=await Promise.resolve().then(function () { return crypto$1; }));const s=await e$1d(t,e);const r=await s.text();const a=rt$6("sha384");a.update(r);return "sha384-"+a.digest("base64")}function encodeBase64(t){return "undefined"!==typeof window?window.btoa(t):Buffer.from(t).toString("base64")}function decodeBase64(t){return "undefined"!==typeof window?window.atob(t):Buffer.from(t,"base64").toString("utf8")}const{Semver:nt$6,SemverRange:at$5}=e$1f;function enumerateParentScopes(t){const e=[];let s=t.lastIndexOf("/");const r=t.indexOf("://")+1;while((s=t.lastIndexOf("/",s-1))!==r)e.push(t.slice(0,s+1));return e}function getResolution(t,e,s){s&&!s.endsWith("/")&&throwInternalError(s);if(!s)return t.primary[e];const r=t.secondary[s];var n;return null!==(n=null===r||void 0===r?void 0:r[e])&&void 0!==n?n:null}function getFlattenedResolution(t,e,s,r){const n=enumerateParentScopes(s);for(const s of n){if(!t.flattened[s])continue;const n=t.flattened[s][e];if(n)for(const t of n)if(t.export===r||t.export.endsWith("/")&&r.startsWith(t.export))return t.resolution}return null}function setConstraint(t,e,s,r=null){null===r?t.primary[e]=s:(t.secondary[r]=t.secondary[r]||Object.create(null))[e]=s;}function setResolution(t,e,s,r=null,n=null){r&&!r.endsWith("/")&&throwInternalError(r);if(null===r){const r=t.primary[e];if(r&&r.installUrl===s&&r.installSubpath===n)return false;t.primary[e]={installUrl:s,installSubpath:n};return true}{t.secondary[r]=t.secondary[r]||{};const a=t.secondary[r][e];if(a&&a.installUrl===s&&a.installSubpath===n)return false;t.secondary[r][e]={installUrl:s,installSubpath:n};return true}}function mergeLocks(t,e){for(const s of Object.keys(e.primary))t.primary[s]=e.primary[s];for(const s of Object.keys(e.secondary))t[s]?Object.assign(t[s]=Object.create(null),e[s]):t.secondary[s]=e.secondary[s];for(const s of Object.keys(e.flattened))t[s]?Object.assign(t[s],e[s]):t.flattened[s]=e.flattened[s];}function mergeConstraints(t,e){for(const s of Object.keys(e.primary))t.primary[s]=e.primary[s];for(const s of Object.keys(e.secondary))t[s]?Object.assign(t[s]=Object.create(null),e[s]):t.secondary[s]=e.secondary[s];}function toPackageTargetMap(t,e,s="npm",r=false){const n=Object.create(null);if(t.dependencies)for(const r of Object.keys(t.dependencies))n[r]=newPackageTarget(t.dependencies[r],e,s,r).pkgTarget;if(t.peerDependencies)for(const r of Object.keys(t.peerDependencies))r in n||(n[r]=newPackageTarget(t.peerDependencies[r],e,s,r).pkgTarget);if(t.optionalDependencies)for(const r of Object.keys(t.optionalDependencies))r in n||(n[r]=newPackageTarget(t.optionalDependencies[r],e,s,r).pkgTarget);if(r&&t.devDependencies)for(const r of Object.keys(t.devDependencies))r in n||(n[r]=newPackageTarget(t.devDependencies[r],e,s,r).pkgTarget);return n}async function packageTargetFromExact(t,e,s=false){let r,n,a;if("node_modules"===t.registry){const s=decodeBase64(t.version);const i=await e.getPackageConfig(s);if(!i)throw new JspmError(`Package ${s} has no package config, cannot create package target.`);if(!i.name||!i.version)throw new JspmError(`Package ${s} has no name or version, cannot create package target.`);n=i.name;a=i.version;r="npm";}else ({registry:r,name:n,version:a}=t);const i=new nt$6(a);return i.tag?{registry:r,name:n,ranges:[new at$5(a)],unstable:false}:s?0!==i.major?{registry:r,name:n,ranges:[new at$5(i.major)],unstable:false}:0!==i.minor?{registry:r,name:n,ranges:[new at$5(i.major+"."+i.minor)],unstable:false}:{registry:r,name:n,ranges:[new at$5(a)],unstable:false}:{registry:r,name:n,ranges:[new at$5("^"+a)],unstable:false}}function getConstraintFor(t,e,s){const r=[];for(const[n,a]of Object.entries(s.primary))a instanceof URL||a.registry!==e||a.name!==t||r.push({alias:n,pkgScope:null,ranges:a.ranges});for(const[n,a]of Object.entries(s.secondary))for(const s of Object.keys(a)){const i=a[s];i instanceof URL||i.registry!==e||i.name!==t||r.push({alias:s,pkgScope:n,ranges:i.ranges});}return r}async function extractLockConstraintsAndMap(t,e,s,r,n,a,i){const o={primary:Object.create(null),secondary:Object.create(null),flattened:Object.create(null)};const l={imports:Object.create(null),scopes:Object.create(null)};const c=await a.getPackageBase(s.href);const p=await a.getPackageConfig(c);const u={primary:p?toPackageTargetMap(p,new URL(c),n,true):Object.create(null),secondary:Object.create(null)};const h=new Set;for(const e of Object.keys(t.imports||{})){if(isPlain(e)){const n=parsePkg(e);let{parsedTarget:i,pkgUrl:l,subpath:f}=await resolveTargetPkg(t.imports[e],s,r,c,a);const d=i&&await a.getExportResolution(l,f,e);h.add(l);if(d){if("#"===e[0])continue;u.primary[n.pkgName]||(u.primary[n.pkgName]=await packageTargetFromExact(i.pkg,a));let t=null;n.subpath!==d&&("."===n.subpath?t=d:"."===d?t=false:d.endsWith(n.subpath.slice(1))&&(t=d.slice(0,n.subpath.length)));if(false!==t){setResolution(o,n.pkgName,l,null,t);continue}}if(p&&p.name===n.pkgName){const t=await a.getExportResolution(c,f,e);if(n.subpath===t)continue}}l.imports[isPlain(e)?e:resolveUrl(e,s,r)]=resolveUrl(t.imports[e],s,r);}for(const e of Object.keys(t.scopes||{})){var f;const n=null!==(f=resolveUrl(e,s,r))&&void 0!==f?f:e;const i=await a.getPackageBase(n);const c="/"===new URL(i).pathname;h.add(i);const p=t.scopes[e];for(const t of Object.keys(p)){if(isPlain(t)){const e=parsePkg(t);let{parsedTarget:n,pkgUrl:l,subpath:f}=await resolveTargetPkg(p[t],s,r,i,a);h.add(l);const d=n&&await a.getExportResolution(l,f,t);if(d){if("#"===t[0])continue;u.primary[e.pkgName]||(u.primary[e.pkgName]=n?await packageTargetFromExact(n.pkg,a):new URL(l));let s=null;e.subpath!==d&&("."===e.subpath?s=d:"."===d?s=false:d.endsWith(e.subpath.slice(1))&&(s=d.slice(0,e.subpath.length)));if(false!==s){if(c){const t=o.flattened[i]=o.flattened[i]||{};t[e.pkgName]=t[e.pkgName]||[];t[e.pkgName].push({export:e.subpath,resolution:{installUrl:l,installSubpath:s}});}else setResolution(o,e.pkgName,l,i,s);continue}}}(l.scopes[n]=l.scopes[n]||Object.create(null))[isPlain(t)?t:resolveUrl(t,s,r)]=resolveUrl(p[t],s,r);}}await Promise.all([...h].map((async t=>{if(!isURL(t))return;const e=await getPackageConfig(t);e&&(u.secondary[t]=toPackageTargetMap(e,new URL(t),n,false));})));return {maps:l,constraints:u,locks:await enforceProviderConstraints(o,i,a,c)}}async function enforceProviderConstraints(t,e,s,r){const n={primary:{},secondary:{},flattened:{}};for(const[a,i]of Object.entries(t.primary)){const{installUrl:t,installSubpath:o}=await translateLock(i,e,s,r);setResolution(n,a,t,null,o);}for(const[r,a]of Object.entries(t.secondary))for(const[t,i]of Object.entries(a)){const{installUrl:a,installSubpath:o}=await translateLock(i,e,s,r);setResolution(n,t,a,r,o);}for(const[r,a]of Object.entries(t.flattened)){n.flattened[r]={};for(const[t,i]of Object.entries(a)){n.flattened[r][t]=[];for(const a of i){const i=await translateLock(a.resolution,e,s,r);n.flattened[r][t].push({export:a.export,resolution:i});}}}return n}async function translateLock(t,e,s,r){const n=await s.parseUrlPkg(t.installUrl);if(!n)return t;const a=await s.getPackageBase(r);const i=await translateProvider(n,e,s,a);return i?{installUrl:await s.pkgToUrl(i.pkg,e),installSubpath:t.installSubpath}:t}async function translateProvider(t,{provider:e,layer:s},r,n){const a=t.pkg;if(("deno"===a.registry||"denoland"===a.registry)&&"deno"===e)return t;if("deno"===a.registry||"denoland"===a.registry||"deno"===e)return null;const i="node_modules"===a.registry;const o="nodemodules"===e;if(i===o)return {...t,source:{provider:e,layer:s}};const l=await packageTargetFromExact(a,r);let c;try{c=await r.resolveLatestTarget(l,{provider:e,layer:s},n);}catch(t){return null}return {pkg:c,source:{provider:e,layer:s},subpath:t.subpath}}async function resolveTargetPkg(t,e,s,r,n,a){let i=resolveUrl(t,e,s);let o=await n.parseUrlPkg(i);let l=o?await n.pkgToUrl(o.pkg,o.source):await n.getPackageBase(i);const c="."+i.slice(l.length-1);return {parsedTarget:o,pkgUrl:l,subpath:c}}var it$6,ot$5;class Installer{visitInstalls(t){if(!t(this.installs.primary,null))for(const e of Object.keys(this.installs.secondary))if(t(this.installs.secondary[e],e))return}startInstall(){if(this.installing)throw new Error("Internal error: already installing");this.installing=true;this.newInstalls=false;this.added=new Map;}finishInstall(){this.installing=false;}getProvider(t){let e=this.defaultProvider;for(const s of Object.keys(this.providers))if(s.endsWith(":")&&t.registry===s.slice(0,-1)||t.name.startsWith(s)&&(t.name.length===s.length||"/"===t.name[s.length])){e=parseProviderStr(this.providers[s]);break}return e} /** * Locks a package against the given target. * @@ -182,7 +181,7 @@ const u$1c=["__dirname","__filename","exports","module","require"];let h$X;async * @param {`./${string}` | '.'} traceSubpath * @param {string} parentUrl URL of the parent for this install. * @returns {Promise} - */async install(t,e,s=null,r,n=this.installBaseUrl){var a,i,o,l;this.log("installer/install",`installing ${t} from ${n} in scope ${s}`);this.installing||throwInternalError("Not installing");const c=!s||s==this.installBaseUrl;if(this.resolutions[t])return this.installTarget(t,newPackageTarget(this.resolutions[t],this.opts.baseUrl,this.defaultRegistry,t),r,e,c?null:s,n);const p=s||await this.resolver.getPackageBase(n);const u=await this.resolver.getPackageConfig(p)||{};const h=(null===(a=u.dependencies)||void 0===a?void 0:a[t])||(null===(i=u.peerDependencies)||void 0===i?void 0:i[t])||(null===(o=u.optionalDependencies)||void 0===o?void 0:o[t])||c&&(null===(l=u.devDependencies)||void 0===l?void 0:l[t]);const f=h&&newPackageTarget(h,new URL(p),this.defaultRegistry,t);const d=!!f&&(c&&e.includes("latest")||!c&&"latest-all"===e);const g=getResolution(this.installs,t,c?null:s);if(!d&&g&&(c||"freeze"===e||await this.inRange(g.installUrl,f.pkgTarget))){this.log("installer/install",`existing lock for ${t} from ${n} in scope ${s} is ${JSON.stringify(g)}`);return g}if(!c){const n=getFlattenedResolution(this.installs,t,s,r);if(!d&&n&&("freeze"===e||await this.inRange(n.installUrl,f.pkgTarget))){this.newInstalls=setResolution(this.installs,t,n.installUrl,s,n.installSubpath);return n}}if(f)return this.installTarget(t,f,r,e,c?null:s,n);const m=t+(r?r.slice(1):"");const w=this.resolver.resolveBuiltin(m);if(w)return "string"===typeof w?w:this.installTarget(m,w.target,r,e,c?null:s,n);if(this.installs.primary[t]){const{installUrl:e}=getResolution(this.installs,t,null);return {installUrl:e,installSubpath:null}}const v=newPackageTarget("*",new URL(p),this.defaultRegistry,t);const{installUrl:y}=await this.installTarget(t,v,null,e,c?null:s,n);return {installUrl:y,installSubpath:null}}get pkgUrls(){const t=new Set;for(const e of Object.values(this.installs.primary))t.add(e.installUrl);for(const e of Object.keys(this.installs.secondary))for(const{installUrl:s}of Object.values(this.installs.secondary[e]))t.add(s);for(const e of Object.keys(this.installs.flattened))for(const{resolution:{installUrl:s}}of Object.values(this.installs.flattened[e]).flat())t.add(s);return t}async getBestExistingMatch(t){let e=null;for(const r of this.pkgUrls){const n=await this.resolver.parseUrlPkg(r);n&&await this.inRange(n.pkg,t)&&(e=e?-1===p$19.compare(new p$19(e.version),n.pkg.version)?n.pkg:e:n.pkg);}return e}async inRange(t,e){var s;if(!e||e instanceof URL)return false;const r="string"===typeof t?null===(s=await this.resolver.parseUrlPkg(t))||void 0===s?void 0:s.pkg:t;return !!r&&(r.registry===e.registry&&r.name===e.name&&e.ranges.some((t=>t.has(r.version,true))))}tryUpgradeAllTo(t,e,r){const n=new p$19(t.version);let a=true;for(const{ranges:t}of r)t.every((t=>!t.has(n)))&&(a=false);if(!a)return false;for(const{alias:t,pkgScope:s}of r){const r=getResolution(this.installs,t,s);if(!r)continue;const{installSubpath:n}=r;this.newInstalls=setResolution(this.installs,t,e,s,n);}return true}upgradeSupportedTo(t,e,r){const n=new p$19(t.version);for(const{alias:t,pkgScope:s,ranges:a}of r){const r=getResolution(this.installs,t,s);if(!r)continue;if(!a.some((t=>t.has(n,true))))continue;const{installSubpath:i}=r;this.newInstalls=setResolution(this.installs,t,e,s,i);}}constructor(t,e,s,r){this.installing=false;this.newInstalls=false;this.added=new Map;this.hasLock=false;this.defaultProvider={provider:"jspm.io",layer:"default"};this.defaultRegistry="npm";this.log=s;this.resolver=r;this.resolutions=e.resolutions||{};this.installBaseUrl=t;this.opts=e;this.hasLock=!!e.lock;this.installs=e.lock||{primary:Object.create(null),secondary:Object.create(null),flattened:Object.create(null)};this.constraints={primary:Object.create(null),secondary:Object.create(null)};e.defaultRegistry&&(this.defaultRegistry=e.defaultRegistry);e.defaultProvider&&(this.defaultProvider=parseProviderStr(e.defaultProvider));this.providers=Object.assign({},Q$k);var n;e.defaultProvider.includes("deno")&&(null!==(n=(it$7=this.providers)[ot$6="npm:"])&&void 0!==n?n:it$7[ot$6]="jspm.io");e.providers&&Object.assign(this.providers,e.providers);}}function parseProviderStr(t){const e=t.split("#");return {provider:e[0],layer:e[1]||"default"}}function combineSubpaths(t,e){return null===t||"."===e?t||e:`${t}${e.slice(1)}`}class TraceMap{async addInputMap(t,e=this.mapUrl,s=this.rootUrl,r){return this.processInputMap=this.processInputMap.then((async()=>{const n=new ImportMap({map:t,mapUrl:e,rootUrl:s}).rebase(this.mapUrl,this.rootUrl);const a=Object.keys(n.imports||[]);for(const t of a)this.pins.includes(t)||this.pins.push(t);const{maps:o,locks:l,constraints:c}=await extractLockConstraintsAndMap(n,r,e,s,this.installer.defaultRegistry,this.resolver,this.installer.defaultProvider);this.inputMap.extend(o);mergeLocks(this.installer.installs,l);mergeConstraints(this.installer.constraints,c);}))} + */async install(t,e,s=null,r,n=this.installBaseUrl){var a,i,o,l;this.log("installer/install",`installing ${t} from ${n} in scope ${s}`);this.installing||throwInternalError("Not installing");const c=!s||s==this.installBaseUrl;if(this.resolutions[t])return this.installTarget(t,newPackageTarget(this.resolutions[t],this.opts.baseUrl,this.defaultRegistry,t),r,e,c?null:s,n);const p=s||await this.resolver.getPackageBase(n);const u=await this.resolver.getPackageConfig(p)||{};const h=(null===(a=u.dependencies)||void 0===a?void 0:a[t])||(null===(i=u.peerDependencies)||void 0===i?void 0:i[t])||(null===(o=u.optionalDependencies)||void 0===o?void 0:o[t])||c&&(null===(l=u.devDependencies)||void 0===l?void 0:l[t]);const f=h&&newPackageTarget(h,new URL(p),this.defaultRegistry,t);const d=!!f&&(c&&e.includes("latest")||!c&&"latest-all"===e);const g=getResolution(this.installs,t,c?null:s);if(!d&&g&&(c||"freeze"===e||await this.inRange(g.installUrl,f.pkgTarget))){this.log("installer/install",`existing lock for ${t} from ${n} in scope ${s} is ${JSON.stringify(g)}`);return g}if(!c){const n=getFlattenedResolution(this.installs,t,s,r);if(!d&&n&&("freeze"===e||await this.inRange(n.installUrl,f.pkgTarget))){this.newInstalls=setResolution(this.installs,t,n.installUrl,s,n.installSubpath);return n}}if(f)return this.installTarget(t,f,r,e,c?null:s,n);const m=t+(r?r.slice(1):"");const w=this.resolver.resolveBuiltin(m);if(w)return "string"===typeof w?w:this.installTarget(m,w.target,r,e,c?null:s,n);if(this.installs.primary[t]){const{installUrl:e}=getResolution(this.installs,t,null);return {installUrl:e,installSubpath:null}}const v=newPackageTarget("*",new URL(p),this.defaultRegistry,t);const{installUrl:y}=await this.installTarget(t,v,null,e,c?null:s,n);return {installUrl:y,installSubpath:null}}get pkgUrls(){const t=new Set;for(const e of Object.values(this.installs.primary))t.add(e.installUrl);for(const e of Object.keys(this.installs.secondary))for(const{installUrl:s}of Object.values(this.installs.secondary[e]))t.add(s);for(const e of Object.keys(this.installs.flattened))for(const{resolution:{installUrl:s}}of Object.values(this.installs.flattened[e]).flat())t.add(s);return t}async getBestExistingMatch(t){let e=null;for(const r of this.pkgUrls){const n=await this.resolver.parseUrlPkg(r);n&&await this.inRange(n.pkg,t)&&(e=e?-1===p$19.compare(new p$19(e.version),n.pkg.version)?n.pkg:e:n.pkg);}return e}async inRange(t,e){var s;if(!e||e instanceof URL)return false;const r="string"===typeof t?null===(s=await this.resolver.parseUrlPkg(t))||void 0===s?void 0:s.pkg:t;return !!r&&(r.registry===e.registry&&r.name===e.name&&e.ranges.some((t=>t.has(r.version,true))))}tryUpgradeAllTo(t,e,r){const n=new p$19(t.version);let a=true;for(const{ranges:t}of r)t.every((t=>!t.has(n)))&&(a=false);if(!a)return false;for(const{alias:t,pkgScope:s}of r){const r=getResolution(this.installs,t,s);if(!r)continue;const{installSubpath:n}=r;this.newInstalls=setResolution(this.installs,t,e,s,n);}return true}upgradeSupportedTo(t,e,r){const n=new p$19(t.version);for(const{alias:t,pkgScope:s,ranges:a}of r){const r=getResolution(this.installs,t,s);if(!r)continue;if(!a.some((t=>t.has(n,true))))continue;const{installSubpath:i}=r;this.newInstalls=setResolution(this.installs,t,e,s,i);}}constructor(t,e,s,r){this.installing=false;this.newInstalls=false;this.added=new Map;this.hasLock=false;this.defaultProvider={provider:"jspm.io",layer:"default"};this.defaultRegistry="npm";this.log=s;this.resolver=r;this.resolutions=e.resolutions||{};this.installBaseUrl=t;this.opts=e;this.hasLock=!!e.lock;this.installs=e.lock||{primary:Object.create(null),secondary:Object.create(null),flattened:Object.create(null)};this.constraints={primary:Object.create(null),secondary:Object.create(null)};e.defaultRegistry&&(this.defaultRegistry=e.defaultRegistry);e.defaultProvider&&(this.defaultProvider=parseProviderStr(e.defaultProvider));this.providers=Object.assign({},Q$k);var n;e.defaultProvider.includes("deno")&&(null!==(n=(it$6=this.providers)[ot$5="npm:"])&&void 0!==n?n:it$6[ot$5]="jspm.io");e.providers&&Object.assign(this.providers,e.providers);}}function parseProviderStr(t){const e=t.split("#");return {provider:e[0],layer:e[1]||"default"}}function combineSubpaths(t,e){return null===t||"."===t||"."===e?t||e:`${t}${e.slice(1)}`}class TraceMap{async addInputMap(t,e=this.mapUrl,s=this.rootUrl,r){return this.processInputMap=this.processInputMap.then((async()=>{const n=new ImportMap({map:t,mapUrl:e,rootUrl:s}).rebase(this.mapUrl,this.rootUrl);const a=Object.keys(n.imports||[]);for(const t of a)this.pins.includes(t)||this.pins.push(t);const{maps:o,locks:l,constraints:c}=await extractLockConstraintsAndMap(n,r,e,s,this.installer.defaultRegistry,this.resolver,this.installer.defaultProvider);this.inputMap.extend(o);mergeLocks(this.installer.installs,l);mergeConstraints(this.installer.constraints,c);}))} /** * Resolves, analyses and recursively visits the given module specifier and all of its dependencies. * @@ -197,7 +196,7 @@ const u$1c=["__dirname","__filename","exports","module","require"];let h$X;async /** * Lock to ensure no races against input map processing. * @type {Promise} - */this.processInputMap=Promise.resolve();this.log=e;this.resolver=s;this.mapUrl=t.mapUrl;this.baseUrl=t.baseUrl;this.rootUrl=t.rootUrl||null;this.opts=t;this.inputMap=new ImportMap({mapUrl:this.mapUrl,rootUrl:this.rootUrl});this.installer=new Installer(this.mapUrl.pathname.endsWith("/")?this.mapUrl.href:`${this.mapUrl.href}/`,this.opts,this.log,this.resolver);}}function createLogger(){let t;let e=new Promise((e=>t=e));let s=[];const logStream=async function*(){while(true){while(s.length)yield s.shift();await e;}};function log(r,n){if(s.length)s.push({type:r,message:n});else {s=[{type:r,message:n}];const a=t;e=new Promise((e=>t=e));a();}}return {log:log,logStream:logStream}}const lt$6=/^\s+/;class Replacer{replace(t,e,s){const r=findOffset(this.offsetTable,t);const n=findOffset(this.offsetTable,e);this.source=this.source.slice(0,t+r)+s+this.source.slice(e+n);addOffset(this.offsetTable,e,s.length-(e+n-t-r));}remove(t,e,s=false){this.replace(t,e,"");if(s){"boolean"===typeof s&&(s=lt$6);const t=this.idx(e);var r;const[i]=null!==(r=this.source.slice(t).match(s))&&void 0!==r?r:[];var n;this.source=this.source.slice(0,t)+this.source.slice(null!==(n=t+(null===i||void 0===i?void 0:i.length))&&void 0!==n?n:0);var a;addOffset(this.offsetTable,e,null!==(a=-(null===i||void 0===i?void 0:i.length))&&void 0!==a?a:0);}}idx(t){return t+findOffset(this.offsetTable,t)}constructor(t){this.offsetTable=[];this.source=t;}}function addOffset(t,e,s){let r=t.length,n=false;while(r-- >0){const[s]=t[r];if(se)break;s+=n;}return s}var ct$6,pt$6,ut$6;const ht$6="win32"===(null===(ct$6=globalThis.process)||void 0===ct$6?void 0:ct$6.platform);ht$6?Object.keys(null===(pt$6=globalThis.process)||void 0===pt$6?void 0:pt$6.env).find((t=>Boolean(t.match(/^PATH$/i))))||"Path":"PATH";"win32"===(null===(ut$6=globalThis.process)||void 0===ut$6?void 0:ut$6.platform)?";":":";const ft$6={tab:" ",newline:ht$6?"\r\n":"\n",trailingNewline:ht$6?"\r\n":"\n",indent:"",quote:'"'};function detectNewline(t){let e=t.match(/\r?\n|\r(?!\n)/);return e?e[0]:ht$6?"\r\n":"\n"}function detectIndent$1(t,e){let s;let r=t.split(e);for(const t of r){const e=t.match(/^\s*[^\s]/);e&&(void 0===s||e.lengtht.slice(s.length)));let n=r.map((t=>{var e;return (null===(e=t.match(/^[ \t]*/))||void 0===e?void 0:e[0])||""}))||[];let a=new Map;let i=0;n.forEach((t=>{let e=Math.abs(t.length-i);0!==e&&a.set(e,(a.get(e)||0)+1);i=t.length;}));let o=0;for(const t of a.keys())(!o||a.get(t)>=a.get(o))&&(o=t);let l=new Map;n.forEach((t=>{let e=t.substr(t.length-o);l.set(e,(l.get(e)||0)+1);}));let c="";for(const[t,e]of l)(!c||e>l.get(c))&&(c=t);r.length<5&&r.reduce(((t,e)=>t+e.length),0)<100&&(c=" ");return {indent:s||"",tab:c}}function detectStyle(t){let e=Object.assign({},ft$6);e.newline=detectNewline(t);let{indent:s,tab:r}=detectIndent$1(t,e.newline);e.indent=s;e.tab=r;let n=t.match(/"|'/);n&&(e.quote=n[0]);e.trailingNewline=t&&t.match(new RegExp(e.newline+"$"))?e.newline:"";return e}function parseStyled(t,e){t.startsWith("\ufeff")&&(t=t.substr(1));let s=detectStyle(t);try{return {json:JSON.parse(t),style:s}}catch(t){throw new JspmError("Error parsing JSON file"+(e?" "+e:""))}}let dt$6,gt$6;const mt$6=["link","base"];function parseHtml(t,e=["script","link","base","!--"]){const s=[];dt$6=t;gt$6=0;let r={tagName:void 0,start:-1,end:-1,attributes:[],innerStart:-1,innerEnd:-1};while(gt$68}function getAttr(t,e,s){for(const r of e.attributes)if(t.slice(r.nameStart,r.nameEnd)===s)return t.slice(r.valueStart,r.valueEnd);return null}const wt$5=/(^|\/)(es-module-shims|esms)(\.min)?\.js$/;function toHtmlAttrs(t,e){return Object.fromEntries(e.map((e=>readAttr(t,e))).map((t=>[t.name,t])))}function analyzeHtml(t,e=v$T){const s={base:e,newlineTab:"\n",map:{json:null,style:null,start:-1,end:-1,newScript:false,attrs:null},staticImports:new Set,dynamicImports:new Set,preloads:[],modules:[],esModuleShims:null,comments:[]};const r=parseHtml(t,["!--","base","script","link"]);let n=false;for(const a of r)switch(a.tagName){case"!--":s.comments.push({start:a.start,end:a.end,attrs:{}});break;case"base":const r=getAttr(t,a,"href");r&&(s.base=new URL(r,e));break;case"script":const i=getAttr(t,a,"type");if("importmap"===i){const r=t.slice(a.innerStart,a.innerEnd);const i=0===r.trim().length;const{json:o,style:l}=i?{json:{},style:ft$6}:parseStyled(r,e.href+"#importmap");const{start:c,end:p}=a;const u=toHtmlAttrs(t,a.attributes);let h=a.start;while(isWs(t.charCodeAt(--h)));s.newlineTab=detectIndent(t,h+1);s.map={json:o,style:l,start:c,end:p,attrs:u,newScript:false};n=true;}else if("module"===i){const e=getAttr(t,a,"src");if(e)if(wt$5.test(e))s.esModuleShims={start:a.start,end:a.end,attrs:toHtmlAttrs(t,a.attributes)};else {s.staticImports.add(isPlain(e)?"./"+e:e);s.modules.push({start:a.start,end:a.end,attrs:toHtmlAttrs(t,a.attributes)});}else {const[e]=parse$2(t.slice(a.innerStart,a.innerEnd))||[];for(const{n:t,d:r}of e)t&&(-1===r?s.staticImports:s.dynamicImports).add(t);}}else if(!i||"javascript"===i){const e=getAttr(t,a,"src");if(e)wt$5.test(e)&&(s.esModuleShims={start:a.start,end:a.end,attrs:toHtmlAttrs(t,a.attributes)});else {const[e]=parse$2(t.slice(a.innerStart,a.innerEnd))||[];for(const{n:t,d:r}of e)t&&(-1===r?s.staticImports:s.dynamicImports).add(t);}}if(!n){createInjectionPoint(t,a.start,s.map,a,s);n=true;}break;case"link":if("modulepreload"===getAttr(t,a,"rel")){const{start:e,end:r}=a;const n=toHtmlAttrs(t,a.attributes);s.preloads.push({start:e,end:r,attrs:n});}if(!n){createInjectionPoint(t,a.start,s.map,a,s);n=true;}}if(!n){var a;const e=null===(a=parseHtml(t,["head"]))||void 0===a?void 0:a[0];if(e){let r=e.innerStart;while("<"!==t[r])r++;createInjectionPoint(t,r,s.map,e,s);n=true;}}n||createInjectionPoint(t,t.length,s.map,{tagName:"html",start:t.length,end:t.length,attributes:[],innerStart:t.length,innerEnd:t.length},s);return s}function createInjectionPoint(t,e,s,r,n){let a=e;while(isWs(t.charCodeAt(--a)));n.newlineTab=detectIndent(t,a+1);if(-1===n.newlineTab.indexOf("\n")){a=r.start;while(isWs(t.charCodeAt(--a)));n.newlineTab=detectIndent(t,a+1);}s.newScript=true;s.attrs=toHtmlAttrs(t,r.attributes);s.start=s.end=e;}function readAttr(t,{nameStart:e,nameEnd:s,valueStart:r,valueEnd:n}){return {start:e,end:-1!==n?n:s,quote:-1===r||'"'!==t[r-1]&&"'"!==t[r-1]?"":t[r-1],name:t.slice(e,s),value:-1===r?null:t.slice(r,n)}}function detectIndent(t,e){if(""===t||-1===e)return "";const s=e;"\r"===t[e]&&"\n"===t[e+1]&&e++;"\n"===t[e]&&e++;while(" "===t[e]||"\t"===t[e])e++;return t.slice(s,e)||""}function createProvider(t,e){return {ownsUrl:ownsUrl,pkgToUrl:pkgToUrl,parseUrlPkg:parseUrlPkg,resolveLatestTarget:resolveLatestTarget,getPackageConfig:getPackageConfig};function ownsUrl(s){return e&&s===t||s.includes("/node_modules/")}async function pkgToUrl(e){if("node_modules"===e.registry)return `${decodeBase64(e.version)}`;const s=await nodeResolve.call(this,e.name,t);if(!s)throw new JspmError(`Failed to resolve ${e.name} against node_modules from ${t}`);return `${decodeBase64(s.version)}`}function parseUrlPkg(t){const e=t.lastIndexOf("/node_modules/");if(-1===e)return null;const s=t.slice(e+14).split("/");const r="@"===s[0][0]?`${s[0]}/${s[1]}`:s[0];const n=`${t.slice(0,e+14)}${r}/`;const a=`./${t.slice(n.length)}`;return r&&n?{pkg:{name:r,registry:"node_modules",version:encodeBase64(n)},subpath:"./"===a?null:a,layer:"default"}:void 0}async function resolveLatestTarget(t,e,s){return nodeResolve.call(this,t.name,s)}async function getPackageConfig(t){if(!ownsUrl.call(this,t))return null;const e=new URL("package.json",t);const s=await o$1s(e.href,this.fetchOpts);switch(s.status){case 200:case 304:break;default:return null}async function remap(e){if(e)for(const[s,r]of Object.entries(e)){if(!isLocal(r))continue;const n=new URL(`./node_modules/${s}`,t);await dirExists.call(this,n)&&(e[s]=n.href);}}const r=await s.json();await remap.call(this,r.dependencies);await remap.call(this,r.peerDependencies);await remap.call(this,r.optionalDependencies);await remap.call(this,r.devDependencies);return r}}async function nodeResolve(t,e){let s=new URL(`node_modules/${t}`,e);const r=new URL(`/node_modules/${t}`,e).href;const n="@"===t[0];while(!await dirExists.call(this,s)){if(s.href===r)return null;s=new URL(`../../${n?"../":""}node_modules/${t}`,s);}return {name:t,registry:"node_modules",version:encodeBase64(`${s.href}/`)}}async function dirExists(t,e){const s=await o$1s(t,this.fetchOpts);switch(s.status){case 304:case 200:return true;case 404:return false;default:throw new JspmError(`Invalid status code ${s.status} looking up "${t}" - ${s.statusText}${importedFrom(e)}`)}}function isLocal(t){return t.startsWith("file:")}class Generator$1{ + */this.processInputMap=Promise.resolve();this.log=e;this.resolver=s;this.mapUrl=t.mapUrl;this.baseUrl=t.baseUrl;this.rootUrl=t.rootUrl||null;this.opts=t;this.inputMap=new ImportMap({mapUrl:this.mapUrl,rootUrl:this.rootUrl});this.installer=new Installer(this.mapUrl.pathname.endsWith("/")?this.mapUrl.href:`${this.mapUrl.href}/`,this.opts,this.log,this.resolver);}}function createLogger(){let t;let e=new Promise((e=>t=e));let s=[];const logStream=async function*(){while(true){while(s.length)yield s.shift();await e;}};function log(r,n){if(s.length)s.push({type:r,message:n});else {s=[{type:r,message:n}];const a=t;e=new Promise((e=>t=e));a();}}return {log:log,logStream:logStream}}const lt$5=/^\s+/;class Replacer{replace(t,e,s){const r=findOffset(this.offsetTable,t);const n=findOffset(this.offsetTable,e);this.source=this.source.slice(0,t+r)+s+this.source.slice(e+n);addOffset(this.offsetTable,e,s.length-(e+n-t-r));}remove(t,e,s=false){this.replace(t,e,"");if(s){"boolean"===typeof s&&(s=lt$5);const t=this.idx(e);var r;const[i]=null!==(r=this.source.slice(t).match(s))&&void 0!==r?r:[];var n;this.source=this.source.slice(0,t)+this.source.slice(null!==(n=t+(null===i||void 0===i?void 0:i.length))&&void 0!==n?n:0);var a;addOffset(this.offsetTable,e,null!==(a=-(null===i||void 0===i?void 0:i.length))&&void 0!==a?a:0);}}idx(t){return t+findOffset(this.offsetTable,t)}constructor(t){this.offsetTable=[];this.source=t;}}function addOffset(t,e,s){let r=t.length,n=false;while(r-- >0){const[s]=t[r];if(se)break;s+=n;}return s}var ct$5,pt$5,ut$5;const ht$5="win32"===(null===(ct$5=globalThis.process)||void 0===ct$5?void 0:ct$5.platform);ht$5?Object.keys(null===(pt$5=globalThis.process)||void 0===pt$5?void 0:pt$5.env).find((t=>Boolean(t.match(/^PATH$/i))))||"Path":"PATH";"win32"===(null===(ut$5=globalThis.process)||void 0===ut$5?void 0:ut$5.platform)?";":":";const ft$5={tab:" ",newline:ht$5?"\r\n":"\n",trailingNewline:ht$5?"\r\n":"\n",indent:"",quote:'"'};function detectNewline(t){let e=t.match(/\r?\n|\r(?!\n)/);return e?e[0]:ht$5?"\r\n":"\n"}function detectIndent$1(t,e){let s;let r=t.split(e);for(const t of r){const e=t.match(/^\s*[^\s]/);e&&(void 0===s||e.lengtht.slice(s.length)));let n=r.map((t=>{var e;return (null===(e=t.match(/^[ \t]*/))||void 0===e?void 0:e[0])||""}))||[];let a=new Map;let i=0;n.forEach((t=>{let e=Math.abs(t.length-i);0!==e&&a.set(e,(a.get(e)||0)+1);i=t.length;}));let o=0;for(const t of a.keys())(!o||a.get(t)>=a.get(o))&&(o=t);let l=new Map;n.forEach((t=>{let e=t.substr(t.length-o);l.set(e,(l.get(e)||0)+1);}));let c="";for(const[t,e]of l)(!c||e>l.get(c))&&(c=t);r.length<5&&r.reduce(((t,e)=>t+e.length),0)<100&&(c=" ");return {indent:s||"",tab:c}}function detectStyle(t){let e=Object.assign({},ft$5);e.newline=detectNewline(t);let{indent:s,tab:r}=detectIndent$1(t,e.newline);e.indent=s;e.tab=r;let n=t.match(/"|'/);n&&(e.quote=n[0]);e.trailingNewline=t&&t.match(new RegExp(e.newline+"$"))?e.newline:"";return e}function parseStyled(t,e){t.startsWith("\ufeff")&&(t=t.substr(1));let s=detectStyle(t);try{return {json:JSON.parse(t),style:s}}catch(t){throw new JspmError("Error parsing JSON file"+(e?" "+e:""))}}let dt$5,gt$5;const mt$5=["link","base"];function parseHtml(t,e=["script","link","base","!--"]){const s=[];dt$5=t;gt$5=0;let r={tagName:void 0,start:-1,end:-1,attributes:[],innerStart:-1,innerEnd:-1};while(gt$58}function getAttr(t,e,s){for(const r of e.attributes)if(t.slice(r.nameStart,r.nameEnd)===s)return t.slice(r.valueStart,r.valueEnd);return null}const wt$4=/(^|\/)(es-module-shims|esms)(\.min)?\.js$/;function toHtmlAttrs(t,e){return Object.fromEntries(e.map((e=>readAttr(t,e))).map((t=>[t.name,t])))}function analyzeHtml(t,e=v$S){const s={base:e,newlineTab:"\n",map:{json:null,style:null,start:-1,end:-1,newScript:false,attrs:null},staticImports:new Set,dynamicImports:new Set,preloads:[],modules:[],esModuleShims:null,comments:[]};const r=parseHtml(t,["!--","base","script","link"]);let n=false;for(const a of r)switch(a.tagName){case"!--":s.comments.push({start:a.start,end:a.end,attrs:{}});break;case"base":const r=getAttr(t,a,"href");r&&(s.base=new URL(r,e));break;case"script":const i=getAttr(t,a,"type");if("importmap"===i){const r=t.slice(a.innerStart,a.innerEnd);const i=0===r.trim().length;const{json:o,style:l}=i?{json:{},style:ft$5}:parseStyled(r,e.href+"#importmap");const{start:c,end:p}=a;const u=toHtmlAttrs(t,a.attributes);let h=a.start;while(isWs(t.charCodeAt(--h)));s.newlineTab=detectIndent(t,h+1);s.map={json:o,style:l,start:c,end:p,attrs:u,newScript:false};n=true;}else if("module"===i){const e=getAttr(t,a,"src");if(e)if(wt$4.test(e))s.esModuleShims={start:a.start,end:a.end,attrs:toHtmlAttrs(t,a.attributes)};else {s.staticImports.add(isPlain(e)?"./"+e:e);s.modules.push({start:a.start,end:a.end,attrs:toHtmlAttrs(t,a.attributes)});}else {const[e]=parse$2(t.slice(a.innerStart,a.innerEnd))||[];for(const{n:t,d:r}of e)t&&(-1===r?s.staticImports:s.dynamicImports).add(t);}}else if(!i||"javascript"===i){const e=getAttr(t,a,"src");if(e)wt$4.test(e)&&(s.esModuleShims={start:a.start,end:a.end,attrs:toHtmlAttrs(t,a.attributes)});else {const[e]=parse$2(t.slice(a.innerStart,a.innerEnd))||[];for(const{n:t,d:r}of e)t&&(-1===r?s.staticImports:s.dynamicImports).add(t);}}if(!n){createInjectionPoint(t,a.start,s.map,a,s);n=true;}break;case"link":if("modulepreload"===getAttr(t,a,"rel")){const{start:e,end:r}=a;const n=toHtmlAttrs(t,a.attributes);s.preloads.push({start:e,end:r,attrs:n});}if(!n){createInjectionPoint(t,a.start,s.map,a,s);n=true;}}if(!n){var a;const e=null===(a=parseHtml(t,["head"]))||void 0===a?void 0:a[0];if(e){let r=e.innerStart;while("<"!==t[r])r++;createInjectionPoint(t,r,s.map,e,s);n=true;}}n||createInjectionPoint(t,t.length,s.map,{tagName:"html",start:t.length,end:t.length,attributes:[],innerStart:t.length,innerEnd:t.length},s);return s}function createInjectionPoint(t,e,s,r,n){let a=e;while(isWs(t.charCodeAt(--a)));n.newlineTab=detectIndent(t,a+1);if(-1===n.newlineTab.indexOf("\n")){a=r.start;while(isWs(t.charCodeAt(--a)));n.newlineTab=detectIndent(t,a+1);}s.newScript=true;s.attrs=toHtmlAttrs(t,r.attributes);s.start=s.end=e;}function readAttr(t,{nameStart:e,nameEnd:s,valueStart:r,valueEnd:n}){return {start:e,end:-1!==n?n:s,quote:-1===r||'"'!==t[r-1]&&"'"!==t[r-1]?"":t[r-1],name:t.slice(e,s),value:-1===r?null:t.slice(r,n)}}function detectIndent(t,e){if(""===t||-1===e)return "";const s=e;"\r"===t[e]&&"\n"===t[e+1]&&e++;"\n"===t[e]&&e++;while(" "===t[e]||"\t"===t[e])e++;return t.slice(s,e)||""}function createProvider(t,e){return {ownsUrl:ownsUrl,pkgToUrl:pkgToUrl,parseUrlPkg:parseUrlPkg,resolveLatestTarget:resolveLatestTarget,getPackageConfig:getPackageConfig};function ownsUrl(s){return e&&s===t||s.includes("/node_modules/")}async function pkgToUrl(e){if("node_modules"===e.registry)return `${decodeBase64(e.version)}`;const s=await nodeResolve.call(this,e.name,t);if(!s)throw new JspmError(`Failed to resolve ${e.name} against node_modules from ${t}`);return `${decodeBase64(s.version)}`}function parseUrlPkg(t){const e=t.lastIndexOf("/node_modules/");if(-1===e)return null;const s=t.slice(e+14).split("/");const r="@"===s[0][0]?`${s[0]}/${s[1]}`:s[0];const n=`${t.slice(0,e+14)}${r}/`;const a=`./${t.slice(n.length)}`;return r&&n?{pkg:{name:r,registry:"node_modules",version:encodeBase64(n)},subpath:"./"===a?null:a,layer:"default"}:void 0}async function resolveLatestTarget(t,e,s){return nodeResolve.call(this,t.name,s)}async function getPackageConfig(t){if(!ownsUrl.call(this,t))return null;const e=new URL("package.json",t);const s=await e$1d(e.href,this.fetchOpts);switch(s.status){case 200:case 304:break;default:return null}async function remap(e){if(e)for(const[s,r]of Object.entries(e)){if(!isLocal(r))continue;const n=new URL(`./node_modules/${s}`,t);await dirExists.call(this,n)&&(e[s]=n.href);}}const r=await s.json();await remap.call(this,r.dependencies);await remap.call(this,r.peerDependencies);await remap.call(this,r.optionalDependencies);await remap.call(this,r.devDependencies);return r}}async function nodeResolve(t,e){let s=new URL(`node_modules/${t}`,e);const r=new URL(`/node_modules/${t}`,e).href;const n="@"===t[0];while(!await dirExists.call(this,s)){if(s.href===r)return null;s=new URL(`../../${n?"../":""}node_modules/${t}`,s);}return {name:t,registry:"node_modules",version:encodeBase64(`${s.href}/`)}}async function dirExists(t,e){const s=await e$1d(t,this.fetchOpts);switch(s.status){case 304:case 200:return true;case 404:return false;default:throw new JspmError(`Invalid status code ${s.status} looking up "${t}" - ${s.statusText}${importedFrom(e)}`)}}function isLocal(t){return t.startsWith("file:")}let Generator$1 = class Generator{ /** * Add new custom mappings and lock resolutions to the input map * of the generator, which are then applied in subsequent installs. @@ -279,7 +278,7 @@ async addMappings(t,e=this.mapUrl,s=this.rootUrl,r){"string"===typeof e&&(e=new * @param html HTML source to inject into * @param opts Injection options * @returns HTML source with import map injection - */async htmlInject(t,{trace:s=false,pins:r=!s,htmlUrl:n,rootUrl:a,preload:i=false,integrity:o=false,whitespace:l=true,esModuleShims:c=true,comment:p=true}={}){true===p&&(p=" Generated by @jspm/generator - https://github.com/jspm/generator ");"string"===typeof n&&(n=new URL(n));o&&(i=true);if(0!==this.installCnt)throw new JspmError("htmlGenerate cannot run alongside other install ops");const u=analyzeHtml(t,n);let h=true===r?this.traceMap.pins:Array.isArray(r)?r:[];if(s){const e=await this.linkHtml(t,n);h=[...new Set([...h,...e])];}try{var{map:f,staticDeps:d,dynamicDeps:g}=await this.extractMap(h,n,a);}catch(t){throw new JspmError(`${t.message}\n\nIf you are linking locally against your node_modules folder, make sure that you have all the necessary dependencies installed.`)}const m=true===i&&o||"all"===i?[...new Set([...d,...g])]:d;const w=l?u.newlineTab.includes("\n")?u.newlineTab:"\n"+u.newlineTab:u.newlineTab;const v=new Replacer(t);let y="";if(c){let t;try{t=await this.traceMap.resolver.resolveLatestTarget({name:"es-module-shims",registry:"npm",ranges:[new R$v("*")],unstable:false},this.traceMap.installer.defaultProvider,this.baseUrl.href);}catch(t){let e=`Unable to resolve "es-module-shims@*" under current provider "${this.traceMap.installer.defaultProvider.provider}".`;"nodemodules"===this.traceMap.installer.defaultProvider.provider&&(e+='\n\nJspm automatically injects a shim so that the import map in your HTML file will be usable by older browsers.\nYou may need to run "npm install es-module-shims" to install the shim if you want to link against your local node_modules folder.');e+="\nTo disable the import maps polyfill injection, set esModuleShims: false.";throw new JspmError(e)}let s=await this.traceMap.resolver.pkgToUrl(t,this.traceMap.installer.defaultProvider)+"dist/es-module-shims.js";(n||a)&&(s=relativeUrl(new URL(s),new URL(null!==a&&void 0!==a?a:n),!!a));y=`