@visulima/cerebro 1.1.29 → 1.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## @visulima/cerebro [1.1.31](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.30...@visulima/cerebro@1.1.31) (2025-01-09)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/pail:** upgraded to 2.1.16
7
+
8
+ ## @visulima/cerebro [1.1.30](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.29...@visulima/cerebro@1.1.30) (2025-01-08)
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * **@visulima/boxen:** upgraded to 1.0.25
14
+ * **@visulima/colorize:** upgraded to 1.4.16
15
+ * **@visulima/find-cache-dir:** upgraded to 1.0.20
16
+ * **@visulima/pail:** upgraded to 2.1.15
17
+ * **@visulima/path:** upgraded to 1.3.1
18
+
1
19
  ## @visulima/cerebro [1.1.29](https://github.com/visulima/visulima/compare/@visulima/cerebro@1.1.28...@visulima/cerebro@1.1.29) (2025-01-08)
2
20
 
3
21
 
package/LICENSE.md CHANGED
@@ -101,42 +101,40 @@ Repository: git+https://github.com/visulima/visulima.git
101
101
  > OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
102
102
  > USE OR OTHER DEALINGS IN THE SOFTWARE.
103
103
  >
104
+ > ---
104
105
  >
106
+ > Bundled zeptomatch (https://github.com/fabiospampinato/zeptomatch)
105
107
  >
106
- > # Licenses of bundled dependencies
107
- > The published @visulima/path artifact additionally contains code with the following licenses:
108
- > ISC, MIT
108
+ > The MIT License (MIT)
109
109
  >
110
- > # Bundled dependencies:
111
- > ## balanced-match
112
- > License: MIT
113
- > By: Julian Gruber
114
- > Repository: git://github.com/juliangruber/balanced-match.git
110
+ > Copyright (c) 2023-present Fabio Spampinato
111
+ >
112
+ > Permission is hereby granted, free of charge, to any person obtaining a
113
+ > copy of this software and associated documentation files (the "Software"),
114
+ > to deal in the Software without restriction, including without limitation
115
+ > the rights to use, copy, modify, merge, publish, distribute, sublicense,
116
+ > and/or sell copies of the Software, and to permit persons to whom the
117
+ > Software is furnished to do so, subject to the following conditions:
118
+ >
119
+ > The above copyright notice and this permission notice shall be included in
120
+ > all copies or substantial portions of the Software.
121
+ >
122
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
123
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
124
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
125
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
126
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
127
+ > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
128
+ > DEALINGS IN THE SOFTWARE.
115
129
  >
116
- > > (MIT)
117
- > >
118
- > > Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
119
- > >
120
- > > Permission is hereby granted, free of charge, to any person obtaining a copy of
121
- > > this software and associated documentation files (the "Software"), to deal in
122
- > > the Software without restriction, including without limitation the rights to
123
- > > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
124
- > > of the Software, and to permit persons to whom the Software is furnished to do
125
- > > so, subject to the following conditions:
126
- > >
127
- > > The above copyright notice and this permission notice shall be included in all
128
- > > copies or substantial portions of the Software.
129
- > >
130
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
131
- > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
132
- > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
133
- > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
134
- > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
135
- > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
136
- > > SOFTWARE.
137
130
  >
138
- > ---------------------------------------
139
131
  >
132
+ >
133
+ > # Licenses of bundled dependencies
134
+ > The published @visulima/path artifact additionally contains code with the following licenses:
135
+ > MIT
136
+ >
137
+ > # Bundled dependencies:
140
138
  > ## binary-extensions
141
139
  > License: MIT
142
140
  > By: Sindre Sorhus
@@ -152,58 +150,6 @@ Repository: git+https://github.com/visulima/visulima.git
152
150
  > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
153
151
  > >
154
152
  > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
155
- >
156
- > ---------------------------------------
157
- >
158
- > ## brace-expansion
159
- > License: MIT
160
- > By: Julian Gruber
161
- > Repository: git://github.com/juliangruber/brace-expansion.git
162
- >
163
- > > MIT License
164
- > >
165
- > > Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
166
- > >
167
- > > Permission is hereby granted, free of charge, to any person obtaining a copy
168
- > > of this software and associated documentation files (the "Software"), to deal
169
- > > in the Software without restriction, including without limitation the rights
170
- > > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
171
- > > copies of the Software, and to permit persons to whom the Software is
172
- > > furnished to do so, subject to the following conditions:
173
- > >
174
- > > The above copyright notice and this permission notice shall be included in all
175
- > > copies or substantial portions of the Software.
176
- > >
177
- > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
178
- > > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
179
- > > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
180
- > > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
181
- > > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
182
- > > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
183
- > > SOFTWARE.
184
- >
185
- > ---------------------------------------
186
- >
187
- > ## minimatch
188
- > License: ISC
189
- > By: Isaac Z. Schlueter
190
- > Repository: git://github.com/isaacs/minimatch.git
191
- >
192
- > > The ISC License
193
- > >
194
- > > Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
195
- > >
196
- > > Permission to use, copy, modify, and/or distribute this software for any
197
- > > purpose with or without fee is hereby granted, provided that the above
198
- > > copyright notice and this permission notice appear in all copies.
199
- > >
200
- > > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
201
- > > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
202
- > > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
203
- > > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
204
- > > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
205
- > > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
206
- > > IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
207
153
 
208
154
  ---------------------------------------
209
155
 
@@ -1,3 +1 @@
1
- "use strict";var zt=Object.defineProperty;var v=(s,t)=>zt(s,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("node:fs"),Dt=require("@visulima/find-cache-dir"),Rt=require("node:https");var Gt=Object.defineProperty,Bt=v((s,t)=>Gt(s,"name",{value:t,configurable:!0}),"o$1");const Ut=Bt((s,t)=>{const e=s.split(".").map(Number),n=t.split(".").map(Number);for(const[i,r]of e.entries()){if(r>n[i])return!0;if(r<n[i])return!1}return!1},"semverGt");var _t=Object.defineProperty,x=v((s,t)=>_t(s,"name",{value:t,configurable:!0}),"w"),Ft=Object.defineProperty,y=x((s,t)=>Ft(s,"name",{value:t,configurable:!0}),"y");function Y(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}v(Y,"Y");x(Y,"Wt");y(Y,"getDefaultExportFromCjs");var K,ut;function tt(){if(ut)return K;ut=1;var s=Object.defineProperty,t=y((r,o)=>s(r,"name",{value:o,configurable:!0}),"u");K=e;function e(r,o,a){r instanceof RegExp&&(r=n(r,a)),o instanceof RegExp&&(o=n(o,a));var h=i(r,o,a);return h&&{start:h[0],end:h[1],pre:a.slice(0,h[0]),body:a.slice(h[0]+r.length,h[1]),post:a.slice(h[1]+o.length)}}v(e,"e"),x(e,"e"),y(e,"balanced"),t(e,"balanced");function n(r,o){var a=o.match(r);return a?a[0]:null}v(n,"s"),x(n,"s"),y(n,"maybeMatch"),t(n,"maybeMatch"),e.range=i;function i(r,o,a){var h,c,l,g,u,p=a.indexOf(r),f=a.indexOf(o,p+1),m=p;if(p>=0&&f>0){if(r===o)return[p,f];for(h=[],l=a.length;m>=0&&!u;)m==p?(h.push(m),p=a.indexOf(r,m+1)):h.length==1?u=[h.pop(),f]:(c=h.pop(),c<l&&(l=c,g=f),f=a.indexOf(o,m+1)),m=p<f&&p>=0?p:f;h.length&&(u=[l,g])}return u}return v(i,"n"),x(i,"r"),y(i,"range"),t(i,"range"),K}v(tt,"xt");x(tt,"Ct");y(tt,"requireBalancedMatch");var Q,ft;function et(){if(ft)return Q;ft=1;var s=Object.defineProperty,t=y((d,O)=>s(d,"name",{value:O,configurable:!0}),"o"),e=tt();Q=u;var n="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function h(d){return parseInt(d,10)==d?parseInt(d,10):d.charCodeAt(0)}v(h,"h"),x(h,"h"),y(h,"numeric"),t(h,"numeric");function c(d){return d.split("\\\\").join(n).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(a)}v(c,"c"),x(c,"c"),y(c,"escapeBraces"),t(c,"escapeBraces");function l(d){return d.split(n).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(a).join(".")}v(l,"l"),x(l,"l"),y(l,"unescapeBraces"),t(l,"unescapeBraces");function g(d){if(!d)return[""];var O=[],S=e("{","}",d);if(!S)return d.split(",");var w=S.pre,G=S.body,W=S.post,P=w.split(",");P[P.length-1]+="{"+G+"}";var L=g(W);return W.length&&(P[P.length-1]+=L.shift(),P.push.apply(P,L)),O.push.apply(O,P),O}v(g,"g"),x(g,"g"),y(g,"parseCommaParts"),t(g,"parseCommaParts");function u(d){return d?(d.substr(0,2)==="{}"&&(d="\\{\\}"+d.substr(2)),T(c(d),!0).map(l)):[]}v(u,"u"),x(u,"u"),y(u,"expandTop"),t(u,"expandTop");function p(d){return"{"+d+"}"}v(p,"p"),x(p,"p"),y(p,"embrace"),t(p,"embrace");function f(d){return/^-?0\d/.test(d)}v(f,"f"),x(f,"f"),y(f,"isPadded"),t(f,"isPadded");function m(d,O){return d<=O}v(m,"m"),x(m,"m"),y(m,"lte"),t(m,"lte");function j(d,O){return d>=O}v(j,"O"),x(j,"M"),y(j,"gte"),t(j,"gte");function T(d,O){var S=[],w=e("{","}",d);if(!w)return[d];var G=w.pre,W=w.post.length?T(w.post,!1):[""];if(/\$$/.test(w.pre))for(var P=0;P<W.length;P++){var L=G+"{"+w.body+"}"+W[P];S.push(L)}else{var Tt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),it=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),q=Tt||it,At=w.body.indexOf(",")>=0;if(!q&&!At)return w.post.match(/,.*\}/)?(d=w.pre+"{"+w.body+r+w.post,T(d)):[d];var $;if(q)$=w.body.split(/\.\./);else if($=g(w.body),$.length===1&&($=T($[0],!1).map(p),$.length===1))return W.map(function(Lt){return w.pre+$[0]+Lt});var z;if(q){var ot=h($[0]),at=h($[1]),Ct=Math.max($[0].length,$[1].length),ht=$.length==3?Math.abs(h($[2])):1,ct=m,kt=at<ot;kt&&(ht*=-1,ct=j);var Wt=$.some(f);z=[];for(var B=ot;ct(B,at);B+=ht){var k;if(it)k=String.fromCharCode(B),k==="\\"&&(k="");else if(k=String(B),Wt){var lt=Ct-k.length;if(lt>0){var pt=new Array(lt+1).join("0");B<0?k="-"+pt+k.slice(1):k=pt+k}}z.push(k)}}else{z=[];for(var D=0;D<$.length;D++)z.push.apply(z,T($[D],!1))}for(var D=0;D<z.length;D++)for(var P=0;P<W.length;P++){var L=G+z[D]+W[P];(!O||q||L)&&S.push(L)}}return S}return v(T,"$"),x(T,"A"),y(T,"expand"),t(T,"expand"),Q}v(et,"St");x(et,"Rt");y(et,"requireBraceExpansion");var Zt=et();const qt=Y(Zt);var It=Object.defineProperty,Jt=y((s,t)=>It(s,"name",{value:t,configurable:!0}),"r");const J=Jt(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var Ht=Object.defineProperty,H=y((s,t)=>Ht(s,"name",{value:t,configurable:!0}),"p$1");const Vt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},U=H(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Kt=H(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),gt=H(s=>s.join(""),"rangesToString"),Qt=H((s,t)=>{const e=t;if(s.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let r=e+1,o=!1,a=!1,h=!1,c=!1,l=e,g="";t:for(;r<s.length;){const f=s.charAt(r);if((f==="!"||f==="^")&&r===e+1){c=!0,r++;continue}if(f==="]"&&o&&!h){l=r+1;break}if(o=!0,f==="\\"&&!h){h=!0,r++;continue}if(f==="["&&!h){for(const[m,[j,T,d]]of Object.entries(Vt))if(s.startsWith(m,r)){if(g)return["$.",!1,s.length-e,!0];r+=m.length,d?i.push(j):n.push(j),a=a||T;continue t}}if(h=!1,g){f>g?n.push(U(g)+"-"+U(f)):f===g&&n.push(U(f)),g="",r++;continue}if(s.startsWith("-]",r+1)){n.push(U(f+"-")),r+=2;continue}if(s.startsWith("-",r+1)){g=f,r+=2;continue}n.push(U(f)),r++}if(l<r)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,s.length-e,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){const f=n[0].length===2?n[0].slice(-1):n[0];return[Kt(f),!1,l-e,!1]}const u="["+(c?"^":"")+gt(n)+"]",p="["+(c?"":"^")+gt(i)+"]";return[n.length&&i.length?"("+u+"|"+p+")":n.length?u:p,a,l-e,!0]},"parseClass");var Xt=Object.defineProperty,Yt=y((s,t)=>Xt(s,"name",{value:t,configurable:!0}),"a$2");const _=Yt((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var te=Object.defineProperty,st=y((s,t)=>te(s,"name",{value:t,configurable:!0}),"E$1");const ee=new Set(["!","?","+","*","@"]),dt=st(s=>ee.has(s),"isExtglobType"),se="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",ne=new Set(["[","."]),re=new Set(["..","."]),ie=new Set("().*{}+?[]^$\\!"),oe=st(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),nt="[^/]",mt=nt+"*?",bt=nt+"+?";class M{static{v(this,"A")}static{x(this,"O")}static{y(this,"AST")}static{st(this,"AST")}type;#s;#n;#i=!1;#t=[];#e;#o;#h;#a=!1;#r;#c;#p=!1;constructor(t,e,n={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?n:this.#s.#r,this.#h=this.#s===this?[]:this.#s.#h,t==="!"&&!this.#s.#a&&this.#h.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#f(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#h.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let i=e.#o+1;!n.type&&i<n.#t.length;i++)for(const r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(n.#t[i])}e=n,n=e.#e}}return this}push(...t){for(const e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof M&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){const t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#o===0)return!0;const t=this.#e;for(let e=0;e<this.#o;e++){const n=t.#t[e];if(!(n instanceof M&&n.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new M(this.type,t);for(const n of this.#t)e.copyIn(n);return e}static#l(t,e,n,i){let r=!1,o=!1,a=-1,h=!1;if(e.type===null){let p=n,f="";for(;p<t.length;){const m=t.charAt(p++);if(r||m==="\\"){r=!r,f+=m;continue}if(o){p===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(p===a+2&&h)&&(o=!1),f+=m;continue}else if(m==="["){o=!0,a=p,h=!1,f+=m;continue}if(!i.noext&&dt(m)&&t.charAt(p)==="("){e.push(f),f="";const j=new M(m,e);p=M.#l(t,j,p,i),e.push(j);continue}f+=m}return e.push(f),p}let c=n+1,l=new M(null,e);const g=[];let u="";for(;c<t.length;){const p=t.charAt(c++);if(r||p==="\\"){r=!r,u+=p;continue}if(o){c===a+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(c===a+2&&h)&&(o=!1),u+=p;continue}else if(p==="["){o=!0,a=c,h=!1,u+=p;continue}if(dt(p)&&t.charAt(c)==="("){l.push(u),u="";const f=new M(p,l);l.push(f),c=M.#l(t,f,c,i);continue}if(p==="|"){l.push(u),u="",g.push(l),l=new M(null,e);continue}if(p===")")return u===""&&e.#t.length===0&&(e.#p=!0),l.push(u),u="",e.push(...g,l),c;u+=p}return e.type=null,e.#n=void 0,e.#t=[t.substring(n-1)],c}static fromGlob(t,e={}){const n=new M(null,void 0,e);return M.#l(t,n,0,e),n}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();const t=this.toString(),[e,n,i,r]=this.toRegExpSource();if(!(i||this.#n||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){const e=t??!!this.#r.dot;if(this.#s===this&&this.#f(),!this.type){const h=this.isStart()&&this.isEnd(),c=this.#t.map(u=>{const[p,f,m,j]=typeof u=="string"?M.#g(u,this.#n,h):u.toRegExpSource(t);return this.#n=this.#n||m,this.#i=this.#i||j,p}).join("");let l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&re.has(this.#t[0]))){const u=ne,p=e&&u.has(c.charAt(0))||c.startsWith("\\.")&&u.has(c.charAt(2))||c.startsWith("\\.\\.")&&u.has(c.charAt(4)),f=!e&&!t&&u.has(c.charAt(0));l=p?se:f?I:""}let g="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(g="(?:$|\\/)"),[l+c+g,_(c),this.#n=!!this.#n,this.#i]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#u(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const h=this.toString();return this.#t=[h],this.type=null,this.#n=void 0,[h,_(this.toString()),!1,!1]}let o=!n||t||e||!I?"":this.#u(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let a="";if(this.type==="!"&&this.#p)a=(this.isStart()&&!e?I:"")+bt;else{const h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+mt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+r+h}return[a,_(r),this.#n=!!this.#n,this.#i]}#u(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,i,r,o]=e.toRegExpSource(t);return this.#i=this.#i||o,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#g(t,e,n=!1){let i=!1,r="",o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(i){i=!1,r+=(ie.has(h)?"\\":"")+h;continue}if(h==="\\"){a===t.length-1?r+="\\\\":i=!0;continue}if(h==="["){const[c,l,g,u]=Qt(t,a);if(g){r+=c,o=o||l,a+=g-1,e=e||u;continue}}if(h==="*"){n&&t==="*"?r+=bt:r+=mt,e=!0;continue}if(h==="?"){r+=nt,e=!0;continue}r+=oe(h)}return[r,_(t),!!e,o]}}var ae=Object.defineProperty,he=y((s,t)=>ae(s,"name",{value:t,configurable:!0}),"a$1");const ce=he((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var le=Object.defineProperty,b=y((s,t)=>le(s,"name",{value:t,configurable:!0}),"h$1");const E=b((s,t,e={})=>(J(t),!e.nocomment&&t.charAt(0)==="#"?!1:new V(t,e).match(s)),"minimatch"),pe=/^\*+([^+@!?\*\[\(]*)$/,ue=b(s=>t=>!t.startsWith(".")&&t.endsWith(s),"starDotExtTest"),fe=b(s=>t=>t.endsWith(s),"starDotExtTestDot"),ge=b(s=>(s=s.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(s)),"starDotExtTestNocase"),de=b(s=>(s=s.toLowerCase(),t=>t.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),me=/^\*+\.\*+$/,be=b(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),ye=b(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),ve=/^\.\*+$/,we=b(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),xe=/^\*+$/,Oe=b(s=>s.length!==0&&!s.startsWith("."),"starTest"),$e=b(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),Ee=/^\?+([^+@!?\*\[\(]*)?$/,Se=b(([s,t=""])=>{const e=xt([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocase"),Pe=b(([s,t=""])=>{const e=Ot([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocaseDot"),Me=b(([s,t=""])=>{const e=Ot([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTestDot"),je=b(([s,t=""])=>{const e=xt([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTest"),xt=b(([s])=>{const t=s.length;return e=>e.length===t&&!e.startsWith(".")},"qmarksTestNoExt"),Ot=b(([s])=>{const t=s.length;return e=>e.length===t&&e!=="."&&e!==".."},"qmarksTestNoExtDot"),$t=process?process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",yt={win32:{sep:"\\"},posix:{sep:"/"}},Ne=$t==="win32"?yt.win32.sep:yt.posix.sep;E.sep=Ne;const C=Symbol("globstar **");E.GLOBSTAR=C;const Te="[^/]",Ae=Te+"*?",Ce="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ke="(?:(?!(?:\\/|^)\\.).)*?",We=b((s,t={})=>e=>E(e,s,t),"filter");E.filter=We;const A=b((s,t={})=>Object.assign({},s,t),"ext"),Le=b(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return E;const t=E;return Object.assign(b((e,n,i={})=>t(e,n,A(s,i)),"m"),{Minimatch:class extends t.Minimatch{static{v(this,"Minimatch")}static{x(this,"Minimatch")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}constructor(e,n={}){super(e,A(s,n))}static defaults(e){return t.defaults(A(s,e)).Minimatch}},AST:class extends t.AST{static{v(this,"AST")}static{x(this,"AST")}static{y(this,"AST")}static{b(this,"AST")}constructor(e,n,i={}){super(e,n,A(s,i))}static fromGlob(e,n={}){return t.AST.fromGlob(e,A(s,n))}},unescape:b((e,n={})=>t.unescape(e,A(s,n)),"unescape"),escape:b((e,n={})=>t.escape(e,A(s,n)),"escape"),filter:b((e,n={})=>t.filter(e,A(s,n)),"filter"),defaults:b(e=>t.defaults(A(s,e)),"defaults"),makeRe:b((e,n={})=>t.makeRe(e,A(s,n)),"makeRe"),braceExpand:b((e,n={})=>t.braceExpand(e,A(s,n)),"braceExpand"),match:b((e,n,i={})=>t.match(e,n,A(s,i)),"match"),sep:t.sep,GLOBSTAR:C})},"defaults");E.defaults=Le;const Et=b((s,t={})=>(J(s),t.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:qt(s)),"braceExpand");E.braceExpand=Et;const ze=b((s,t={})=>new V(s,t).makeRe(),"makeRe");E.makeRe=ze;const De=b((s,t,e={})=>{const n=new V(t,e);return s=s.filter(i=>n.match(i)),n.options.nonull&&!s.length&&s.push(t),s},"match");E.match=De;const vt=/[?*]|[+@!]\(.*?\)|\[|\]/,Re=b(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape");class V{static{v(this,"U")}static{x(this,"H")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){J(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||$t,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=r[0]===""&&r[1]===""&&(r[2]==="?"||!vt.test(r[2]))&&!vt.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(c)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){const o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let i=n;for(;e[i+1]==="**";)i++;i!==n&&e.splice(n,i-n)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((n,i)=>{const r=n[n.length-1];return i==="**"&&r==="**"?n:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(n.pop(),n):(n.push(i),n)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let a=n[i+1];const h=n[i+2],c=n[i+3];if(a!==".."||!h||h==="."||h===".."||!c||c==="."||c==="..")continue;e=!0,n.splice(i,1);const l=n.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(e=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(e=!0,n.pop())}let r=0;for(;(r=n.indexOf("..",r+1))!==-1;){const o=n[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;const a=r===1&&n[r+1]==="**"?["."]:[];n.splice(r-1,2,...a),n.length===0&&n.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const i=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(i){t[e]=[],t[n]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,n=!1){let i=0,r=0,o=[],a="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])o.push(a==="b"?e[r]:t[i]),i++,r++;else if(n&&t[i]==="**"&&e[r]===t[i+1])o.push(t[i]),i++;else if(n&&e[r]==="**"&&t[i]===e[r+1])o.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="b")return!1;a="a",o.push(t[i]),i++,r++}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(a==="a")return!1;a="b",o.push(e[r]),i++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const i=this.options;if(this.isWindows){const m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),j=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),T=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),d=!T&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),O=j?3:m?0:void 0,S=d?3:T?0:void 0;if(typeof O=="number"&&typeof S=="number"){const[w,G]=[t[O],e[S]];w.toLowerCase()===G.toLowerCase()&&(e[S]=w,S>O?e=e.slice(S):O>S&&(t=t.slice(O)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,a=0,h=t.length,c=e.length;o<h&&a<c;o++,a++){this.debug("matchOne loop");var l=e[a],g=t[o];if(this.debug(e,l,g),l===!1)return!1;if(l===C){this.debug("GLOBSTAR",[e,l,g]);var u=o,p=a+1;if(p===c){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!i.dot&&t[o].charAt(0)===".")return!1;return!0}for(;u<h;){var f=t[u];if(this.debug(`
2
- globstar while`,t,u,e,p,f),this.matchOne(t.slice(u),e.slice(p),n))return this.debug("globstar found match!",u,h,f),!0;if(f==="."||f===".."||!i.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,u,e,p);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(n&&(this.debug(`
3
- >>> no match, partial?`,t,u,e,p),u===h))}let m;if(typeof l=="string"?(m=g===l,this.debug("string match",l,g,m)):(m=l.test(g),this.debug("pattern match",l,g,m)),!m)return!1}if(o===h&&a===c)return!0;if(o===h)return n;if(a===c)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Et(this.pattern,this.options)}parse(t){J(t);const e=this.options;if(t==="**")return C;if(t==="")return"";let n,i=null;(n=t.match(xe))?i=e.dot?$e:Oe:(n=t.match(pe))?i=(e.nocase?e.dot?de:ge:e.dot?fe:ue)(n[1]):(n=t.match(Ee))?i=(e.nocase?e.dot?Pe:Se:e.dot?Me:je)(n):(n=t.match(me))?i=e.dot?ye:be:(n=t.match(ve))&&(i=we);const r=M.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?Ae:e.dot?Ce:ke,i=new Set(e.nocase?["i"]:[]);let r=t.map(h=>{const c=h.map(l=>{if(l instanceof RegExp)for(const g of l.flags.split(""))i.add(g);return typeof l=="string"?Re(l):l===C?C:l._src});return c.forEach((l,g)=>{const u=c[g+1],p=c[g-1];l!==C||p===C||(p===void 0?u!==void 0&&u!==C?c[g+1]="(?:\\/|"+n+"\\/)?"+u:c[g]=n:u===void 0?c[g-1]=p+"(?:\\/|"+n+")?":u!==C&&(c[g-1]=p+"(?:\\/|\\/"+n+"\\/)"+u,c[g+1]=C))}),c.filter(l=>l!==C).join("/")}).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a=0;a<r.length;a++){const h=r[a];let c=i;if(n.matchBase&&h.length===1&&(c=[o]),this.matchOne(c,h,e))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return E.defaults(t).Minimatch}}E.AST=M;E.Minimatch=V;E.escape=ce;E.unescape=_;var Ge=Object.defineProperty,Be=y((s,t)=>Ge(s,"name",{value:t,configurable:!0}),"t");const Ue=/^[A-Z]:\//i,R=Be((s="")=>s&&s.replaceAll("\\","/").replace(Ue,t=>t.toUpperCase()),"normalizeWindowsPath");var _e=Object.defineProperty,N=y((s,t)=>_e(s,"name",{value:t,configurable:!0}),"s");const Fe=/^[/\\]{2}/,Ze=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,St=/^[A-Z]:$/i,wt=/^\/([A-Z]:)?$/i,qe=/.(\.[^./]+)$/,Ie=/^[/\\]|^[a-z]:[/\\]/i,Je=N(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pt=N((s,t)=>{let e="",n=0,i=-1,r=0,o=null;for(let a=0;a<=s.length;++a){if(a<s.length)o=s[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(i===a-1||r===1))if(r===2){if(e.length<2||n!==2||!e.endsWith(".")||e.at(-2)!=="."){if(e.length>2){const h=e.lastIndexOf("/");h===-1?(e="",n=0):(e=e.slice(0,h),n=e.length-1-e.lastIndexOf("/")),i=a,r=0;continue}else if(e.length>0){e="",n=0,i=a,r=0;continue}}t&&(e+=e.length>0?"/..":"..",n=2)}else e.length>0?e+=`/${s.slice(i+1,a)}`:e=s.slice(i+1,a),n=a-i-1;i=a,r=0}else o==="."&&r!==-1?++r:r=-1}return e},"normalizeString"),Z=N(s=>Ze.test(s),"isAbsolute"),Mt=N(function(s){if(s.length===0)return".";s=R(s);const t=Fe.exec(s),e=Z(s),n=s.at(-1)==="/";return s=Pt(s,!e),s.length===0?e?"/":n?"./":".":(n&&(s+="/"),St.test(s)&&(s+="/"),t?e?`//${s}`:`//./${s}`:e&&!Z(s)?`/${s}`:s)},"normalize"),He=N(function(...s){if(s.length===0)return".";let t;for(const e of s)e&&e.length>0&&(t===void 0?t=e:t+=`/${e}`);return t===void 0?".":Mt(t.replaceAll(/\/{2,}/g,"/"))},"join"),X=N(function(...s){s=s.map(n=>R(n));let t="",e=!1;for(let n=s.length-1;n>=-1&&!e;n--){const i=n>=0?s[n]:Je();!i||i.length===0||(t=`${i}/${t}`,e=Z(i))}return t=Pt(t,!e),e&&!Z(t)?`/${t}`:t.length>0?t:"."},"resolve");N(function(s){return R(s)},"toNamespacedPath");const Ve=N(function(s){return qe.exec(R(s))?.[1]??""},"extname");N(function(s,t){const e=X(s).replace(wt,"$1").split("/"),n=X(t).replace(wt,"$1").split("/");if(n[0][1]===":"&&e[0][1]===":"&&e[0]!==n[0])return n.join("/");const i=[...e];for(const r of i){if(n[0]!==r)break;e.shift(),n.shift()}return[...e.map(()=>".."),...n].join("/")},"relative");const jt=N(s=>{const t=R(s).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&St.test(t[0])&&(t[0]+="/"),t.join("/")||(Z(s)?"/":".")},"dirname");N(function(s){const t=[s.root,s.dir,s.base??s.name+s.ext].filter(Boolean);return R(s.root?X(...t):t.join("/"))},"format");const Ke=N((s,t)=>{const e=R(s).split("/").pop();return t&&e.endsWith(t)?e.slice(0,-t.length):e},"basename");N(function(s){const t=Ie.exec(s)?.[0]?.replace(/\\/g,"/")??"",e=Ke(s),n=Ve(e);return{base:e,dir:jt(s),ext:n,name:e.slice(0,e.length-n.length),root:t}},"parse");N((s,t)=>E(Mt(s),t,{nocaseMagicOnly:!0,nocomment:!0,nonegate:!0,optimizationLevel:2,windowsPathsNoEscape:!0}),"matchesGlob");var Qe=Object.defineProperty,rt=v((s,t)=>Qe(s,"name",{value:t,configurable:!0}),"r");const Xe="last-update-check.json",Nt=rt(s=>{const t=Dt.findCacheDirSync(s);if(t===void 0)throw new Error("Could not find cache directory");return He(t,Xe)},"getConfigFile"),Ye=rt(s=>{const t=Nt(s);try{if(!F.existsSync(t))return;const{lastUpdateCheck:e}=JSON.parse(F.readFileSync(t,"utf8"));return e}catch{return}},"getLastUpdate"),ts=rt(s=>{const t=Nt(s),e=jt(t);F.existsSync(e)||F.mkdirSync(e,{recursive:!0}),F.writeFileSync(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var es=Object.defineProperty,ss=v((s,t)=>es(s,"name",{value:t,configurable:!0}),"g");const ns=ss(async(s,t,e)=>{const n=e.replace("__NAME__",s);return await new Promise((i,r)=>{Rt.get(n,o=>{let a="";o.on("data",h=>a+=h),o.on("end",()=>{try{const h=JSON.parse(a)[t];h||r(new Error("Error getting version")),i(h)}catch{r(new Error("Could not parse version response"))}})}).on("error",o=>r(o))})},"getDistributionVersion");var rs=Object.defineProperty,is=v((s,t)=>rs(s,"name",{value:t,configurable:!0}),"i");const os=is(async({alwaysRun:s,debug:t,distTag:e="latest",pkg:n,registryUrl:i="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:r=1e3*60*60*24})=>{const o=Ye(n.name);if(s||!o||o<Date.now()-r){const a=await ns(n.name,e,i);if(ts(n.name),Ut(a,n.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${n.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${r}ms but only ${Date.now()-o}ms since last check.`);return null},"hasNewVersion");exports.default=os;
1
+ "use strict";var yt=Object.defineProperty;var M=(t,r)=>yt(t,"name",{value:r,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("node:fs"),bt=require("@visulima/find-cache-dir"),wt=require("node:https");var jt=Object.defineProperty,At=M((t,r)=>jt(t,"name",{value:r,configurable:!0}),"o$1");const Ot=At((t,r)=>{const i=t.split(".").map(Number),l=r.split(".").map(Number);for(const[f,h]of i.entries()){if(h>l[f])return!0;if(h<l[f])return!1}return!1},"semverGt");var Mt=Object.defineProperty,zt=M((t,r)=>Mt(t,"name",{value:r,configurable:!0}),"le"),St=Object.defineProperty,L=zt((t,r)=>St(t,"name",{value:r,configurable:!0}),"Z"),_t=Object.defineProperty,Pt=L((t,r)=>_t(t,"name",{value:r,configurable:!0}),"t");const Ct=/^[A-Z]:\//i,O=Pt((t="")=>t&&t.replaceAll("\\","/").replace(Ct,r=>r.toUpperCase()),"normalizeWindowsPath");var kt=Object.defineProperty,u=L((t,r)=>kt(t,"name",{value:r,configurable:!0}),"u$1");let ae=u(()=>{var t=(()=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,h=u((e,n)=>{for(var o in n)r(e,o,{get:n[o],enumerable:!0})},"q"),m=u((e,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of l(n))!f.call(e,s)&&s!==o&&r(e,s,{get:u(()=>n[s],"get"),enumerable:!(a=i(n,s))||a.enumerable});return e},"H"),g=u(e=>m(r({},"__esModule",{value:!0}),e),"J"),v={};h(v,{zeptomatch:u(()=>$t,"zeptomatch")});var R=u(e=>Array.isArray(e),"A"),_=u(e=>typeof e=="function","d"),de=u(e=>e.length===0,"Q"),he=u(e=>typeof e=="number","W"),ge=u(e=>typeof e=="object"&&e!==null,"K"),me=u(e=>e instanceof RegExp,"X"),W=u(e=>typeof e=="string","b"),A=u(e=>e===void 0,"h"),xe=u(e=>{const n=new Map;return o=>{const a=n.get(o);if(a)return a;const s=e(o);return n.set(o,s),s}},"Y"),$e=u((e,n,o={})=>{const a={cache:{},input:e,index:0,indexMax:0,options:o,output:[]};if(j(n)(a)&&a.index===e.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},"rr"),c=u((e,n)=>R(e)?ve(e,n):W(e)?be(e,n):ye(e,n),"i"),ve=u((e,n)=>{const o={};for(const a of e){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const s=a.charCodeAt(0);o[s]=!0}return a=>{const s=a.index,p=a.input;for(;a.index<p.length&&p.charCodeAt(a.index)in o;)a.index+=1;const d=a.index;if(d>s){if(!A(n)&&!a.options.silent){const $=a.input.slice(s,d),y=_(n)?n($,p,String(s)):n;A(y)||a.output.push(y)}a.indexMax=Math.max(a.indexMax,a.index)}return!0}},"er"),ye=u((e,n)=>{const o=e.source,a=e.flags.replace(/y|$/,"y"),s=new RegExp(o,a);return k(p=>{s.lastIndex=p.index;const d=s.exec(p.input);if(d){if(!A(n)&&!p.options.silent){const $=_(n)?n(...d,p.input,String(p.index)):n;A($)||p.output.push($)}return p.index+=d[0].length,p.indexMax=Math.max(p.indexMax,p.index),!0}else return!1})},"nr"),be=u((e,n)=>o=>{if(o.input.startsWith(e,o.index)){if(!A(n)&&!o.options.silent){const a=_(n)?n(e,o.input,String(o.index)):n;A(a)||o.output.push(a)}return o.index+=e.length,o.indexMax=Math.max(o.indexMax,o.index),!0}else return!1},"tr"),F=u((e,n,o,a)=>{const s=j(e);return k(E(J(p=>{let d=0;for(;d<o;){const $=p.index;if(!s(p)||(d+=1,p.index===$))break}return d>=n}),a))},"C"),we=u((e,n)=>F(e,0,1,n),"ar"),P=u((e,n)=>F(e,0,1/0,n),"f"),C=u((e,n)=>{const o=e.map(j);return k(E(J(a=>{for(let s=0,p=o.length;s<p;s++)if(!o[s](a))return!1;return!0}),n))},"x"),b=u((e,n)=>{const o=e.map(j);return k(E(a=>{for(let s=0,p=o.length;s<p;s++)if(o[s](a))return!0;return!1},n))},"l"),J=u((e,n=!1)=>{const o=j(e);return a=>{const s=a.index,p=a.output.length,d=o(a);return(!d||n)&&(a.index=s,a.output.length!==p&&(a.output.length=p)),d}},"M"),E=u((e,n)=>{const o=j(e);return n?a=>{if(a.options.silent)return o(a);const s=a.output.length;if(o(a)){const p=a.output.splice(s,1/0),d=n(p);return A(d)||a.output.push(d),!0}else return!1}:o},"_"),k=(()=>{let e=0;return n=>{const o=j(n),a=e+=1;return s=>{var p;if(s.options.memoization===!1)return o(s);const d=s.index,$=(p=s.cache)[a]||(p[a]=new Map),y=$.get(d);if(y===!1)return!1;if(he(y))return s.index=y,!0;if(y)return s.index=y.index,y.output?.length&&s.output.push(...y.output),!0;{const re=s.output.length;if(o(s)){const oe=s.index,ie=s.output.length;if(ie>re){const vt=s.output.slice(re,ie);$.set(d,{index:oe,output:vt})}else $.set(d,oe);return!0}else return $.set(d,!1),!1}}}})(),T=u(e=>{let n;return o=>(n||(n=j(e())),n(o))},"E"),j=xe(e=>{if(_(e))return de(e)?T(e):e;if(W(e)||me(e))return c(e);if(R(e))return C(e);if(ge(e))return b(Object.values(e));throw new Error("Invalid rule")}),G="abcdefghijklmnopqrstuvwxyz",je=u(e=>{let n="";for(;e>0;){const o=(e-1)%26;n=G[o]+n,e=Math.floor((e-1)/26)}return n},"ir"),V=u(e=>{let n=0;for(let o=0,a=e.length;o<a;o++)n=n*26+G.indexOf(e[o])+1;return n},"z"),N=u((e,n)=>{if(n<e)return N(n,e);const o=[];for(;e<=n;)o.push(e++);return o},"S"),Ae=u((e,n,o)=>N(e,n).map(a=>String(a).padStart(o,"0")),"or"),B=u((e,n)=>N(V(e),V(n)).map(je),"O"),w=u(e=>e,"p"),H=u(e=>Oe(n=>$e(n,e,{memoization:!1}).join("")),"R"),Oe=u(e=>{const n={};return o=>n[o]??(n[o]=e(o))},"ur"),Me=c(/^\*\*\/\*$/,".*"),ze=c(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(e,n,o)=>`.*${n?"":"(?:^|/)"}${o.replaceAll(".","\\.")}`),Se=c(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(e,n,o,a)=>`.*${n?"":"(?:^|/)"}${o.replaceAll(".","\\.")}(?:${a.replaceAll(",","|").replaceAll(".","\\.")})`),Z=c(/\\./,w),_e=c(/[$.*+?^(){}[\]\|]/,e=>`\\${e}`),Pe=c(/./,w),Ce=c(/^(?:!!)*!(.*)$/,(e,n)=>`(?!^${ne(n)}$).*?`),ke=c(/^(!!)+/,""),Ee=b([Ce,ke]),Ne=c(/\/(\*\*\/)+/,"(?:/.+/|/)"),Ze=c(/^(\*\*\/)+/,"(?:^|.*/)"),Ue=c(/\/(\*\*)$/,"(?:/.*|$)"),De=c(/\*\*/,".*"),K=b([Ne,Ze,Ue,De]),Ie=c(/\*\/(?!\*\*\/)/,"[^/]*/"),Le=c(/\*/,"[^/]*"),Q=b([Ie,Le]),X=c("?","[^/]"),qe=c("[",w),Re=c("]",w),We=c(/[!^]/,"^/"),Fe=c(/[a-z]-[a-z]|[0-9]-[0-9]/i,w),Je=c(/[$.*+?^(){}[\|]/,e=>`\\${e}`),Te=c(/[^\]]/,w),Ge=b([Z,Je,Fe,Te]),Y=C([qe,we(We),P(Ge),Re]),Ve=c("{","(?:"),Be=c("}",")"),He=c(/(\d+)\.\.(\d+)/,(e,n,o)=>Ae(+n,+o,Math.min(n.length,o.length)).join("|")),Ke=c(/([a-z]+)\.\.([a-z]+)/,(e,n,o)=>B(n,o).join("|")),Qe=c(/([A-Z]+)\.\.([A-Z]+)/,(e,n,o)=>B(n.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),Xe=b([He,Ke,Qe]),ee=C([Ve,Xe,Be]),Ye=c("{","(?:"),et=c("}",")"),tt=c(",","|"),nt=c(/[$.*+?^(){[\]\|]/,e=>`\\${e}`),rt=c(/[^}]/,w),ot=T(()=>te),it=b([K,Q,X,Y,ee,ot,Z,nt,tt,rt]),te=C([Ye,P(it),et]),at=P(b([Me,ze,Se,Ee,K,Q,X,Y,ee,te,Z,_e,Pe])),st=at,lt=H(st),ne=lt,ut=c(/\\./,w),ct=c(/./,w),pt=c(/\*\*\*+/,"*"),ft=c(/([^/{[(!])\*\*/,(e,n)=>`${n}*`),dt=c(/(^|.)\*\*(?=[^*/)\]}])/,(e,n)=>`${n}*`),ht=P(b([ut,pt,ft,dt,ct])),gt=ht,mt=H(gt),xt=mt,U=u((e,n)=>{const o=Array.isArray(e)?e:[e];if(!o.length)return!1;const a=o.map(U.compile),s=o.every(d=>/(\/(?:\*\*)?|\[\/\])$/.test(d)),p=n.replace(/[\\\/]+/g,"/").replace(/\/$/,s?"/":"");return a.some(d=>d.test(p))},"$");U.compile=e=>new RegExp(`^${ne(xt(e))}$`,"s");var $t=U;return g(v)})();return t.default||t},"_lazyMatch"),D;const Et=u((t,r)=>(D||(D=ae(),ae=null),D(t,r)),"default");var Nt=Object.defineProperty,x=L((t,r)=>Nt(t,"name",{value:r,configurable:!0}),"r");const Zt=/^[/\\]{2}/,Ut=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,le=/^[A-Z]:$/i,se=/^\/([A-Z]:)?$/i,Dt=/.(\.[^./]+)$/,It=/^[/\\]|^[a-z]:[/\\]/i,Lt=x(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),ue=x((t,r)=>{let i="",l=0,f=-1,h=0,m=null;for(let g=0;g<=t.length;++g){if(g<t.length)m=t[g];else{if(m==="/")break;m="/"}if(m==="/"){if(!(f===g-1||h===1))if(h===2){if(i.length<2||l!==2||!i.endsWith(".")||i.at(-2)!=="."){if(i.length>2){const v=i.lastIndexOf("/");v===-1?(i="",l=0):(i=i.slice(0,v),l=i.length-1-i.lastIndexOf("/")),f=g,h=0;continue}else if(i.length>0){i="",l=0,f=g,h=0;continue}}r&&(i+=i.length>0?"/..":"..",l=2)}else i.length>0?i+=`/${t.slice(f+1,g)}`:i=t.slice(f+1,g),l=g-f-1;f=g,h=0}else m==="."&&h!==-1?++h:h=-1}return i},"normalizeString"),S=x(t=>Ut.test(t),"isAbsolute"),ce=x(function(t){if(t.length===0)return".";t=O(t);const r=Zt.exec(t),i=S(t),l=t.at(-1)==="/";return t=ue(t,!i),t.length===0?i?"/":l?"./":".":(l&&(t+="/"),le.test(t)&&(t+="/"),r?i?`//${t}`:`//./${t}`:i&&!S(t)?`/${t}`:t)},"normalize"),qt=x((...t)=>{let r="";for(const i of t)if(i)if(r.length>0){const l=r[r.length-1]==="/",f=i[0]==="/";l&&f?r+=i.slice(1):r+=l||f?i:`/${i}`}else r+=i;return ce(r)},"join"),I=x(function(...t){t=t.map(l=>O(l));let r="",i=!1;for(let l=t.length-1;l>=-1&&!i;l--){const f=l>=0?t[l]:Lt();!f||f.length===0||(r=`${f}/${r}`,i=S(f))}return r=ue(r,!i),i&&!S(r)?`/${r}`:r.length>0?r:"."},"resolve");x(function(t){return O(t)},"toNamespacedPath");const Rt=x(function(t){return Dt.exec(O(t))?.[1]??""},"extname");x(function(t,r){const i=I(t).replace(se,"$1").split("/"),l=I(r).replace(se,"$1").split("/");if(l[0][1]===":"&&i[0][1]===":"&&i[0]!==l[0])return l.join("/");const f=[...i];for(const h of f){if(l[0]!==h)break;i.shift(),l.shift()}return[...i.map(()=>".."),...l].join("/")},"relative");const pe=x(t=>{const r=O(t).replace(/\/$/,"").split("/").slice(0,-1);return r.length===1&&le.test(r[0])&&(r[0]+="/"),r.join("/")||(S(t)?"/":".")},"dirname");x(function(t){const r=[t.root,t.dir,t.base??t.name+t.ext].filter(Boolean);return O(t.root?I(...r):r.join("/"))},"format");const Wt=x((t,r)=>{const i=O(t).split("/").pop();return r&&i.endsWith(r)?i.slice(0,-r.length):i},"basename");x(function(t){const r=It.exec(t)?.[0]?.replace(/\\/g,"/")??"",i=Wt(t),l=Rt(i);return{base:i,dir:pe(t),ext:l,name:i.slice(0,i.length-l.length),root:r}},"parse");x((t,r)=>Et(r,ce(t)),"matchesGlob");var Ft=Object.defineProperty,q=M((t,r)=>Ft(t,"name",{value:r,configurable:!0}),"r");const Jt="last-update-check.json",fe=q(t=>{const r=bt.findCacheDirSync(t);if(r===void 0)throw new Error("Could not find cache directory");return qt(r,Jt)},"getConfigFile"),Tt=q(t=>{const r=fe(t);try{if(!z.existsSync(r))return;const{lastUpdateCheck:i}=JSON.parse(z.readFileSync(r,"utf8"));return i}catch{return}},"getLastUpdate"),Gt=q(t=>{const r=fe(t),i=pe(r);z.existsSync(i)||z.mkdirSync(i,{recursive:!0}),z.writeFileSync(r,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var Vt=Object.defineProperty,Bt=M((t,r)=>Vt(t,"name",{value:r,configurable:!0}),"g");const Ht=Bt(async(t,r,i)=>{const l=i.replace("__NAME__",t);return await new Promise((f,h)=>{wt.get(l,m=>{let g="";m.on("data",v=>g+=v),m.on("end",()=>{try{const v=JSON.parse(g)[r];v||h(new Error("Error getting version")),f(v)}catch{h(new Error("Could not parse version response"))}})}).on("error",m=>h(m))})},"getDistributionVersion");var Kt=Object.defineProperty,Qt=M((t,r)=>Kt(t,"name",{value:r,configurable:!0}),"i");const Xt=Qt(async({alwaysRun:t,debug:r,distTag:i="latest",pkg:l,registryUrl:f="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:h=1e3*60*60*24})=>{const m=Tt(l.name);if(t||!m||m<Date.now()-h){const g=await Ht(l.name,i,f);if(Gt(l.name),Ot(g,l.version))return g;r&&console.error(`Latest version (${g}) not newer than current version (${l.version})`)}else r&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${h}ms but only ${Date.now()-m}ms since last check.`);return null},"hasNewVersion");exports.default=Xt;
@@ -1,3 +1 @@
1
- var zt=Object.defineProperty;var v=(s,t)=>zt(s,"name",{value:t,configurable:!0});import{existsSync as wt,readFileSync as Dt,mkdirSync as Rt,writeFileSync as Gt}from"node:fs";import{findCacheDirSync as Bt}from"@visulima/find-cache-dir";import{get as Ut}from"node:https";var Ft=Object.defineProperty,Zt=v((s,t)=>Ft(s,"name",{value:t,configurable:!0}),"o$1");const _t=Zt((s,t)=>{const e=s.split(".").map(Number),n=t.split(".").map(Number);for(const[i,r]of e.entries()){if(r>n[i])return!0;if(r<n[i])return!1}return!1},"semverGt");var It=Object.defineProperty,x=v((s,t)=>It(s,"name",{value:t,configurable:!0}),"w"),Jt=Object.defineProperty,y=x((s,t)=>Jt(s,"name",{value:t,configurable:!0}),"y");function X(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}v(X,"Y");x(X,"Wt");y(X,"getDefaultExportFromCjs");var V,pt;function Y(){if(pt)return V;pt=1;var s=Object.defineProperty,t=y((r,o)=>s(r,"name",{value:o,configurable:!0}),"u");V=e;function e(r,o,a){r instanceof RegExp&&(r=n(r,a)),o instanceof RegExp&&(o=n(o,a));var h=i(r,o,a);return h&&{start:h[0],end:h[1],pre:a.slice(0,h[0]),body:a.slice(h[0]+r.length,h[1]),post:a.slice(h[1]+o.length)}}v(e,"e"),x(e,"e"),y(e,"balanced"),t(e,"balanced");function n(r,o){var a=o.match(r);return a?a[0]:null}v(n,"s"),x(n,"s"),y(n,"maybeMatch"),t(n,"maybeMatch"),e.range=i;function i(r,o,a){var h,c,l,g,u,p=a.indexOf(r),f=a.indexOf(o,p+1),m=p;if(p>=0&&f>0){if(r===o)return[p,f];for(h=[],l=a.length;m>=0&&!u;)m==p?(h.push(m),p=a.indexOf(r,m+1)):h.length==1?u=[h.pop(),f]:(c=h.pop(),c<l&&(l=c,g=f),f=a.indexOf(o,m+1)),m=p<f&&p>=0?p:f;h.length&&(u=[l,g])}return u}return v(i,"n"),x(i,"r"),y(i,"range"),t(i,"range"),V}v(Y,"xt");x(Y,"Ct");y(Y,"requireBalancedMatch");var K,ut;function tt(){if(ut)return K;ut=1;var s=Object.defineProperty,t=y((d,O)=>s(d,"name",{value:O,configurable:!0}),"o"),e=Y();K=u;var n="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function h(d){return parseInt(d,10)==d?parseInt(d,10):d.charCodeAt(0)}v(h,"h"),x(h,"h"),y(h,"numeric"),t(h,"numeric");function c(d){return d.split("\\\\").join(n).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(a)}v(c,"c"),x(c,"c"),y(c,"escapeBraces"),t(c,"escapeBraces");function l(d){return d.split(n).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(a).join(".")}v(l,"l"),x(l,"l"),y(l,"unescapeBraces"),t(l,"unescapeBraces");function g(d){if(!d)return[""];var O=[],S=e("{","}",d);if(!S)return d.split(",");var w=S.pre,G=S.body,W=S.post,P=w.split(",");P[P.length-1]+="{"+G+"}";var L=g(W);return W.length&&(P[P.length-1]+=L.shift(),P.push.apply(P,L)),O.push.apply(O,P),O}v(g,"g"),x(g,"g"),y(g,"parseCommaParts"),t(g,"parseCommaParts");function u(d){return d?(d.substr(0,2)==="{}"&&(d="\\{\\}"+d.substr(2)),T(c(d),!0).map(l)):[]}v(u,"u"),x(u,"u"),y(u,"expandTop"),t(u,"expandTop");function p(d){return"{"+d+"}"}v(p,"p"),x(p,"p"),y(p,"embrace"),t(p,"embrace");function f(d){return/^-?0\d/.test(d)}v(f,"f"),x(f,"f"),y(f,"isPadded"),t(f,"isPadded");function m(d,O){return d<=O}v(m,"m"),x(m,"m"),y(m,"lte"),t(m,"lte");function j(d,O){return d>=O}v(j,"O"),x(j,"M"),y(j,"gte"),t(j,"gte");function T(d,O){var S=[],w=e("{","}",d);if(!w)return[d];var G=w.pre,W=w.post.length?T(w.post,!1):[""];if(/\$$/.test(w.pre))for(var P=0;P<W.length;P++){var L=G+"{"+w.body+"}"+W[P];S.push(L)}else{var Tt=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),rt=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),_=Tt||rt,At=w.body.indexOf(",")>=0;if(!_&&!At)return w.post.match(/,.*\}/)?(d=w.pre+"{"+w.body+r+w.post,T(d)):[d];var $;if(_)$=w.body.split(/\.\./);else if($=g(w.body),$.length===1&&($=T($[0],!1).map(p),$.length===1))return W.map(function(Lt){return w.pre+$[0]+Lt});var z;if(_){var it=h($[0]),ot=h($[1]),Ct=Math.max($[0].length,$[1].length),at=$.length==3?Math.abs(h($[2])):1,ht=m,kt=ot<it;kt&&(at*=-1,ht=j);var Wt=$.some(f);z=[];for(var B=it;ht(B,ot);B+=at){var k;if(rt)k=String.fromCharCode(B),k==="\\"&&(k="");else if(k=String(B),Wt){var ct=Ct-k.length;if(ct>0){var lt=new Array(ct+1).join("0");B<0?k="-"+lt+k.slice(1):k=lt+k}}z.push(k)}}else{z=[];for(var D=0;D<$.length;D++)z.push.apply(z,T($[D],!1))}for(var D=0;D<z.length;D++)for(var P=0;P<W.length;P++){var L=G+z[D]+W[P];(!O||_||L)&&S.push(L)}}return S}return v(T,"$"),x(T,"A"),y(T,"expand"),t(T,"expand"),K}v(tt,"St");x(tt,"Rt");y(tt,"requireBraceExpansion");var qt=tt();const Ht=X(qt);var Vt=Object.defineProperty,Kt=y((s,t)=>Vt(s,"name",{value:t,configurable:!0}),"r");const J=Kt(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern");var Qt=Object.defineProperty,q=y((s,t)=>Qt(s,"name",{value:t,configurable:!0}),"p$1");const Xt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},U=q(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Yt=q(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),ft=q(s=>s.join(""),"rangesToString"),te=q((s,t)=>{const e=t;if(s.charAt(e)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let r=e+1,o=!1,a=!1,h=!1,c=!1,l=e,g="";t:for(;r<s.length;){const f=s.charAt(r);if((f==="!"||f==="^")&&r===e+1){c=!0,r++;continue}if(f==="]"&&o&&!h){l=r+1;break}if(o=!0,f==="\\"&&!h){h=!0,r++;continue}if(f==="["&&!h){for(const[m,[j,T,d]]of Object.entries(Xt))if(s.startsWith(m,r)){if(g)return["$.",!1,s.length-e,!0];r+=m.length,d?i.push(j):n.push(j),a=a||T;continue t}}if(h=!1,g){f>g?n.push(U(g)+"-"+U(f)):f===g&&n.push(U(f)),g="",r++;continue}if(s.startsWith("-]",r+1)){n.push(U(f+"-")),r+=2;continue}if(s.startsWith("-",r+1)){g=f,r+=2;continue}n.push(U(f)),r++}if(l<r)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,s.length-e,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){const f=n[0].length===2?n[0].slice(-1):n[0];return[Yt(f),!1,l-e,!1]}const u="["+(c?"^":"")+ft(n)+"]",p="["+(c?"":"^")+ft(i)+"]";return[n.length&&i.length?"("+u+"|"+p+")":n.length?u:p,a,l-e,!0]},"parseClass");var ee=Object.defineProperty,se=y((s,t)=>ee(s,"name",{value:t,configurable:!0}),"a$2");const F=se((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");var ne=Object.defineProperty,et=y((s,t)=>ne(s,"name",{value:t,configurable:!0}),"E$1");const re=new Set(["!","?","+","*","@"]),gt=et(s=>re.has(s),"isExtglobType"),ie="(?!(?:^|/)\\.\\.?(?:$|/))",I="(?!\\.)",oe=new Set(["[","."]),ae=new Set(["..","."]),he=new Set("().*{}+?[]^$\\!"),ce=et(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),st="[^/]",dt=st+"*?",mt=st+"+?";class M{static{v(this,"A")}static{x(this,"O")}static{y(this,"AST")}static{et(this,"AST")}type;#s;#n;#i=!1;#t=[];#e;#o;#h;#a=!1;#r;#c;#p=!1;constructor(t,e,n={}){this.type=t,t&&(this.#n=!0),this.#e=e,this.#s=this.#e?this.#e.#s:this,this.#r=this.#s===this?n:this.#s.#r,this.#h=this.#s===this?[]:this.#s.#h,t==="!"&&!this.#s.#a&&this.#h.push(this),this.#o=this.#e?this.#e.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(const t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#c=this.#t.map(t=>String(t)).join("")}#f(){if(this!==this.#s)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#h.pop();){if(t.type!=="!")continue;let e=t,n=e.#e;for(;n;){for(let i=e.#o+1;!n.type&&i<n.#t.length;i++)for(const r of t.#t){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(n.#t[i])}e=n,n=e.#e}}return this}push(...t){for(const e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof M&&e.#e===this))throw new Error("invalid part: "+e);this.#t.push(e)}}toJSON(){const t=this.type===null?this.#t.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#t.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#s||this.#s.#a&&this.#e?.type==="!")&&t.push({}),t}isStart(){if(this.#s===this)return!0;if(!this.#e?.isStart())return!1;if(this.#o===0)return!0;const t=this.#e;for(let e=0;e<this.#o;e++){const n=t.#t[e];if(!(n instanceof M&&n.type==="!"))return!1}return!0}isEnd(){if(this.#s===this||this.#e?.type==="!")return!0;if(!this.#e?.isEnd())return!1;if(!this.type)return this.#e?.isEnd();const t=this.#e?this.#e.#t.length:0;return this.#o===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const e=new M(this.type,t);for(const n of this.#t)e.copyIn(n);return e}static#l(t,e,n,i){let r=!1,o=!1,a=-1,h=!1;if(e.type===null){let p=n,f="";for(;p<t.length;){const m=t.charAt(p++);if(r||m==="\\"){r=!r,f+=m;continue}if(o){p===a+1?(m==="^"||m==="!")&&(h=!0):m==="]"&&!(p===a+2&&h)&&(o=!1),f+=m;continue}else if(m==="["){o=!0,a=p,h=!1,f+=m;continue}if(!i.noext&&gt(m)&&t.charAt(p)==="("){e.push(f),f="";const j=new M(m,e);p=M.#l(t,j,p,i),e.push(j);continue}f+=m}return e.push(f),p}let c=n+1,l=new M(null,e);const g=[];let u="";for(;c<t.length;){const p=t.charAt(c++);if(r||p==="\\"){r=!r,u+=p;continue}if(o){c===a+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(c===a+2&&h)&&(o=!1),u+=p;continue}else if(p==="["){o=!0,a=c,h=!1,u+=p;continue}if(gt(p)&&t.charAt(c)==="("){l.push(u),u="";const f=new M(p,l);l.push(f),c=M.#l(t,f,c,i);continue}if(p==="|"){l.push(u),u="",g.push(l),l=new M(null,e);continue}if(p===")")return u===""&&e.#t.length===0&&(e.#p=!0),l.push(u),u="",e.push(...g,l),c;u+=p}return e.type=null,e.#n=void 0,e.#t=[t.substring(n-1)],c}static fromGlob(t,e={}){const n=new M(null,void 0,e);return M.#l(t,n,0,e),n}toMMPattern(){if(this!==this.#s)return this.#s.toMMPattern();const t=this.toString(),[e,n,i,r]=this.toRegExpSource();if(!(i||this.#n||this.#r.nocase&&!this.#r.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const o=(this.#r.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,o),{_src:e,_glob:t})}get options(){return this.#r}toRegExpSource(t){const e=t??!!this.#r.dot;if(this.#s===this&&this.#f(),!this.type){const h=this.isStart()&&this.isEnd(),c=this.#t.map(u=>{const[p,f,m,j]=typeof u=="string"?M.#g(u,this.#n,h):u.toRegExpSource(t);return this.#n=this.#n||m,this.#i=this.#i||j,p}).join("");let l="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&ae.has(this.#t[0]))){const u=oe,p=e&&u.has(c.charAt(0))||c.startsWith("\\.")&&u.has(c.charAt(2))||c.startsWith("\\.\\.")&&u.has(c.charAt(4)),f=!e&&!t&&u.has(c.charAt(0));l=p?ie:f?I:""}let g="";return this.isEnd()&&this.#s.#a&&this.#e?.type==="!"&&(g="(?:$|\\/)"),[l+c+g,F(c),this.#n=!!this.#n,this.#i]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let r=this.#u(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){const h=this.toString();return this.#t=[h],this.type=null,this.#n=void 0,[h,F(this.toString()),!1,!1]}let o=!n||t||e||!I?"":this.#u(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let a="";if(this.type==="!"&&this.#p)a=(this.isStart()&&!e?I:"")+mt;else{const h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?I:"")+dt+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=i+r+h}return[a,F(r),this.#n=!!this.#n,this.#i]}#u(t){return this.#t.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");const[n,i,r,o]=e.toRegExpSource(t);return this.#i=this.#i||o,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#g(t,e,n=!1){let i=!1,r="",o=!1;for(let a=0;a<t.length;a++){const h=t.charAt(a);if(i){i=!1,r+=(he.has(h)?"\\":"")+h;continue}if(h==="\\"){a===t.length-1?r+="\\\\":i=!0;continue}if(h==="["){const[c,l,g,u]=te(t,a);if(g){r+=c,o=o||l,a+=g-1,e=e||u;continue}}if(h==="*"){n&&t==="*"?r+=mt:r+=dt,e=!0;continue}if(h==="?"){r+=st,e=!0;continue}r+=ce(h)}return[r,F(t),!!e,o]}}var le=Object.defineProperty,pe=y((s,t)=>le(s,"name",{value:t,configurable:!0}),"a$1");const ue=pe((s,{windowsPathsNoEscape:t=!1}={})=>t?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");var fe=Object.defineProperty,b=y((s,t)=>fe(s,"name",{value:t,configurable:!0}),"h$1");const E=b((s,t,e={})=>(J(t),!e.nocomment&&t.charAt(0)==="#"?!1:new H(t,e).match(s)),"minimatch"),ge=/^\*+([^+@!?\*\[\(]*)$/,de=b(s=>t=>!t.startsWith(".")&&t.endsWith(s),"starDotExtTest"),me=b(s=>t=>t.endsWith(s),"starDotExtTestDot"),be=b(s=>(s=s.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(s)),"starDotExtTestNocase"),ye=b(s=>(s=s.toLowerCase(),t=>t.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),ve=/^\*+\.\*+$/,we=b(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),xe=b(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),Oe=/^\.\*+$/,$e=b(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),Ee=/^\*+$/,Se=b(s=>s.length!==0&&!s.startsWith("."),"starTest"),Pe=b(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),Me=/^\?+([^+@!?\*\[\(]*)?$/,je=b(([s,t=""])=>{const e=xt([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocase"),Ne=b(([s,t=""])=>{const e=Ot([s]);return t?(t=t.toLowerCase(),n=>e(n)&&n.toLowerCase().endsWith(t)):e},"qmarksTestNocaseDot"),Te=b(([s,t=""])=>{const e=Ot([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTestDot"),Ae=b(([s,t=""])=>{const e=xt([s]);return t?n=>e(n)&&n.endsWith(t):e},"qmarksTest"),xt=b(([s])=>{const t=s.length;return e=>e.length===t&&!e.startsWith(".")},"qmarksTestNoExt"),Ot=b(([s])=>{const t=s.length;return e=>e.length===t&&e!=="."&&e!==".."},"qmarksTestNoExtDot"),$t=process?process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",bt={win32:{sep:"\\"},posix:{sep:"/"}},Ce=$t==="win32"?bt.win32.sep:bt.posix.sep;E.sep=Ce;const C=Symbol("globstar **");E.GLOBSTAR=C;const ke="[^/]",We=ke+"*?",Le="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ze="(?:(?!(?:\\/|^)\\.).)*?",De=b((s,t={})=>e=>E(e,s,t),"filter");E.filter=De;const A=b((s,t={})=>Object.assign({},s,t),"ext"),Re=b(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return E;const t=E;return Object.assign(b((e,n,i={})=>t(e,n,A(s,i)),"m"),{Minimatch:class extends t.Minimatch{static{v(this,"Minimatch")}static{x(this,"Minimatch")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}constructor(e,n={}){super(e,A(s,n))}static defaults(e){return t.defaults(A(s,e)).Minimatch}},AST:class extends t.AST{static{v(this,"AST")}static{x(this,"AST")}static{y(this,"AST")}static{b(this,"AST")}constructor(e,n,i={}){super(e,n,A(s,i))}static fromGlob(e,n={}){return t.AST.fromGlob(e,A(s,n))}},unescape:b((e,n={})=>t.unescape(e,A(s,n)),"unescape"),escape:b((e,n={})=>t.escape(e,A(s,n)),"escape"),filter:b((e,n={})=>t.filter(e,A(s,n)),"filter"),defaults:b(e=>t.defaults(A(s,e)),"defaults"),makeRe:b((e,n={})=>t.makeRe(e,A(s,n)),"makeRe"),braceExpand:b((e,n={})=>t.braceExpand(e,A(s,n)),"braceExpand"),match:b((e,n,i={})=>t.match(e,n,A(s,i)),"match"),sep:t.sep,GLOBSTAR:C})},"defaults");E.defaults=Re;const Et=b((s,t={})=>(J(s),t.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:Ht(s)),"braceExpand");E.braceExpand=Et;const Ge=b((s,t={})=>new H(s,t).makeRe(),"makeRe");E.makeRe=Ge;const Be=b((s,t,e={})=>{const n=new H(t,e);return s=s.filter(i=>n.match(i)),n.options.nonull&&!s.length&&s.push(t),s},"match");E.match=Be;const yt=/[?*]|[+@!]\(.*?\)|\[|\]/,Ue=b(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape");class H{static{v(this,"U")}static{x(this,"H")}static{y(this,"Minimatch")}static{b(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){J(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||$t,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){const h=r[0]===""&&r[1]===""&&(r[2]==="?"||!yt.test(r[2]))&&!yt.test(r[3]),c=/^[a-z]:/i.test(r[0]);if(h)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(c)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(h=>this.parse(h))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){const o=this.set[r];o[0]===""&&o[1]===""&&this.globParts[r][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let n=-1;for(;(n=e.indexOf("**",n+1))!==-1;){let i=n;for(;e[i+1]==="**";)i++;i!==n&&e.splice(n,i-n)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((n,i)=>{const r=n[n.length-1];return i==="**"&&r==="**"?n:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(n.pop(),n):(n.push(i),n)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const r=t[i];i===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let a=n[i+1];const h=n[i+2],c=n[i+3];if(a!==".."||!h||h==="."||h===".."||!c||c==="."||c==="..")continue;e=!0,n.splice(i,1);const l=n.slice(0);l[i]="**",t.push(l),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(e=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(e=!0,n.pop())}let r=0;for(;(r=n.indexOf("..",r+1))!==-1;){const o=n[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;const a=r===1&&n[r+1]==="**"?["."]:[];n.splice(r-1,2,...a),n.length===0&&n.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const i=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);if(i){t[e]=[],t[n]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,n=!1){let i=0,r=0,o=[],a="";for(;i<t.length&&r<e.length;)if(t[i]===e[r])o.push(a==="b"?e[r]:t[i]),i++,r++;else if(n&&t[i]==="**"&&e[r]===t[i+1])o.push(t[i]),i++;else if(n&&e[r]==="**"&&t[i]===e[r+1])o.push(e[r]),r++;else if(t[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="b")return!1;a="a",o.push(t[i]),i++,r++}else if(e[r]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(a==="a")return!1;a="b",o.push(e[r]),i++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const i=this.options;if(this.isWindows){const m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),j=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),T=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),d=!T&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),O=j?3:m?0:void 0,S=d?3:T?0:void 0;if(typeof O=="number"&&typeof S=="number"){const[w,G]=[t[O],e[S]];w.toLowerCase()===G.toLowerCase()&&(e[S]=w,S>O?e=e.slice(S):O>S&&(t=t.slice(O)))}}const{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,a=0,h=t.length,c=e.length;o<h&&a<c;o++,a++){this.debug("matchOne loop");var l=e[a],g=t[o];if(this.debug(e,l,g),l===!1)return!1;if(l===C){this.debug("GLOBSTAR",[e,l,g]);var u=o,p=a+1;if(p===c){for(this.debug("** at the end");o<h;o++)if(t[o]==="."||t[o]===".."||!i.dot&&t[o].charAt(0)===".")return!1;return!0}for(;u<h;){var f=t[u];if(this.debug(`
2
- globstar while`,t,u,e,p,f),this.matchOne(t.slice(u),e.slice(p),n))return this.debug("globstar found match!",u,h,f),!0;if(f==="."||f===".."||!i.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,u,e,p);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(n&&(this.debug(`
3
- >>> no match, partial?`,t,u,e,p),u===h))}let m;if(typeof l=="string"?(m=g===l,this.debug("string match",l,g,m)):(m=l.test(g),this.debug("pattern match",l,g,m)),!m)return!1}if(o===h&&a===c)return!0;if(o===h)return n;if(a===c)return o===h-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Et(this.pattern,this.options)}parse(t){J(t);const e=this.options;if(t==="**")return C;if(t==="")return"";let n,i=null;(n=t.match(Ee))?i=e.dot?Pe:Se:(n=t.match(ge))?i=(e.nocase?e.dot?ye:be:e.dot?me:de)(n[1]):(n=t.match(Me))?i=(e.nocase?e.dot?Ne:je:e.dot?Te:Ae)(n):(n=t.match(ve))?i=e.dot?xe:we:(n=t.match(Oe))&&(i=$e);const r=M.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?We:e.dot?Le:ze,i=new Set(e.nocase?["i"]:[]);let r=t.map(h=>{const c=h.map(l=>{if(l instanceof RegExp)for(const g of l.flags.split(""))i.add(g);return typeof l=="string"?Ue(l):l===C?C:l._src});return c.forEach((l,g)=>{const u=c[g+1],p=c[g-1];l!==C||p===C||(p===void 0?u!==void 0&&u!==C?c[g+1]="(?:\\/|"+n+"\\/)?"+u:c[g]=n:u===void 0?c[g-1]=p+"(?:\\/|"+n+")?":u!==C&&(c[g-1]=p+"(?:\\/|\\/"+n+"\\/)"+u,c[g+1]=C))}),c.filter(l=>l!==C).join("/")}).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+a+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let a=i.length-2;!o&&a>=0;a--)o=i[a];for(let a=0;a<r.length;a++){const h=r[a];let c=i;if(n.matchBase&&h.length===1&&(c=[o]),this.matchOne(c,h,e))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return E.defaults(t).Minimatch}}E.AST=M;E.Minimatch=H;E.escape=ue;E.unescape=F;var Fe=Object.defineProperty,Ze=y((s,t)=>Fe(s,"name",{value:t,configurable:!0}),"t");const _e=/^[A-Z]:\//i,R=Ze((s="")=>s&&s.replaceAll("\\","/").replace(_e,t=>t.toUpperCase()),"normalizeWindowsPath");var Ie=Object.defineProperty,N=y((s,t)=>Ie(s,"name",{value:t,configurable:!0}),"s");const Je=/^[/\\]{2}/,qe=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,St=/^[A-Z]:$/i,vt=/^\/([A-Z]:)?$/i,He=/.(\.[^./]+)$/,Ve=/^[/\\]|^[a-z]:[/\\]/i,Ke=N(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pt=N((s,t)=>{let e="",n=0,i=-1,r=0,o=null;for(let a=0;a<=s.length;++a){if(a<s.length)o=s[a];else{if(o==="/")break;o="/"}if(o==="/"){if(!(i===a-1||r===1))if(r===2){if(e.length<2||n!==2||!e.endsWith(".")||e.at(-2)!=="."){if(e.length>2){const h=e.lastIndexOf("/");h===-1?(e="",n=0):(e=e.slice(0,h),n=e.length-1-e.lastIndexOf("/")),i=a,r=0;continue}else if(e.length>0){e="",n=0,i=a,r=0;continue}}t&&(e+=e.length>0?"/..":"..",n=2)}else e.length>0?e+=`/${s.slice(i+1,a)}`:e=s.slice(i+1,a),n=a-i-1;i=a,r=0}else o==="."&&r!==-1?++r:r=-1}return e},"normalizeString"),Z=N(s=>qe.test(s),"isAbsolute"),Mt=N(function(s){if(s.length===0)return".";s=R(s);const t=Je.exec(s),e=Z(s),n=s.at(-1)==="/";return s=Pt(s,!e),s.length===0?e?"/":n?"./":".":(n&&(s+="/"),St.test(s)&&(s+="/"),t?e?`//${s}`:`//./${s}`:e&&!Z(s)?`/${s}`:s)},"normalize"),Qe=N(function(...s){if(s.length===0)return".";let t;for(const e of s)e&&e.length>0&&(t===void 0?t=e:t+=`/${e}`);return t===void 0?".":Mt(t.replaceAll(/\/{2,}/g,"/"))},"join"),Q=N(function(...s){s=s.map(n=>R(n));let t="",e=!1;for(let n=s.length-1;n>=-1&&!e;n--){const i=n>=0?s[n]:Ke();!i||i.length===0||(t=`${i}/${t}`,e=Z(i))}return t=Pt(t,!e),e&&!Z(t)?`/${t}`:t.length>0?t:"."},"resolve");N(function(s){return R(s)},"toNamespacedPath");const Xe=N(function(s){return He.exec(R(s))?.[1]??""},"extname");N(function(s,t){const e=Q(s).replace(vt,"$1").split("/"),n=Q(t).replace(vt,"$1").split("/");if(n[0][1]===":"&&e[0][1]===":"&&e[0]!==n[0])return n.join("/");const i=[...e];for(const r of i){if(n[0]!==r)break;e.shift(),n.shift()}return[...e.map(()=>".."),...n].join("/")},"relative");const jt=N(s=>{const t=R(s).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&St.test(t[0])&&(t[0]+="/"),t.join("/")||(Z(s)?"/":".")},"dirname");N(function(s){const t=[s.root,s.dir,s.base??s.name+s.ext].filter(Boolean);return R(s.root?Q(...t):t.join("/"))},"format");const Ye=N((s,t)=>{const e=R(s).split("/").pop();return t&&e.endsWith(t)?e.slice(0,-t.length):e},"basename");N(function(s){const t=Ve.exec(s)?.[0]?.replace(/\\/g,"/")??"",e=Ye(s),n=Xe(e);return{base:e,dir:jt(s),ext:n,name:e.slice(0,e.length-n.length),root:t}},"parse");N((s,t)=>E(Mt(s),t,{nocaseMagicOnly:!0,nocomment:!0,nonegate:!0,optimizationLevel:2,windowsPathsNoEscape:!0}),"matchesGlob");var ts=Object.defineProperty,nt=v((s,t)=>ts(s,"name",{value:t,configurable:!0}),"r");const es="last-update-check.json",Nt=nt(s=>{const t=Bt(s);if(t===void 0)throw new Error("Could not find cache directory");return Qe(t,es)},"getConfigFile"),ss=nt(s=>{const t=Nt(s);try{if(!wt(t))return;const{lastUpdateCheck:e}=JSON.parse(Dt(t,"utf8"));return e}catch{return}},"getLastUpdate"),ns=nt(s=>{const t=Nt(s),e=jt(t);wt(e)||Rt(e,{recursive:!0}),Gt(t,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var rs=Object.defineProperty,is=v((s,t)=>rs(s,"name",{value:t,configurable:!0}),"g");const os=is(async(s,t,e)=>{const n=e.replace("__NAME__",s);return await new Promise((i,r)=>{Ut(n,o=>{let a="";o.on("data",h=>a+=h),o.on("end",()=>{try{const h=JSON.parse(a)[t];h||r(new Error("Error getting version")),i(h)}catch{r(new Error("Could not parse version response"))}})}).on("error",o=>r(o))})},"getDistributionVersion");var as=Object.defineProperty,hs=v((s,t)=>as(s,"name",{value:t,configurable:!0}),"i");const fs=hs(async({alwaysRun:s,debug:t,distTag:e="latest",pkg:n,registryUrl:i="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:r=1e3*60*60*24})=>{const o=ss(n.name);if(s||!o||o<Date.now()-r){const a=await os(n.name,e,i);if(ns(n.name),_t(a,n.version))return a;t&&console.error(`Latest version (${a}) not newer than current version (${n.version})`)}else t&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${r}ms but only ${Date.now()-o}ms since last check.`);return null},"hasNewVersion");export{fs as default};
1
+ var yt=Object.defineProperty;var M=(t,r)=>yt(t,"name",{value:r,configurable:!0});import{existsSync as se,readFileSync as bt,mkdirSync as wt,writeFileSync as jt}from"node:fs";import{findCacheDirSync as At}from"@visulima/find-cache-dir";import{get as Ot}from"node:https";var Mt=Object.defineProperty,zt=M((t,r)=>Mt(t,"name",{value:r,configurable:!0}),"o$1");const Pt=zt((t,r)=>{const a=t.split(".").map(Number),l=r.split(".").map(Number);for(const[f,h]of a.entries()){if(h>l[f])return!0;if(h<l[f])return!1}return!1},"semverGt");var _t=Object.defineProperty,St=M((t,r)=>_t(t,"name",{value:r,configurable:!0}),"le"),Ct=Object.defineProperty,L=St((t,r)=>Ct(t,"name",{value:r,configurable:!0}),"Z"),kt=Object.defineProperty,Et=L((t,r)=>kt(t,"name",{value:r,configurable:!0}),"t");const Nt=/^[A-Z]:\//i,O=Et((t="")=>t&&t.replaceAll("\\","/").replace(Nt,r=>r.toUpperCase()),"normalizeWindowsPath");var Zt=Object.defineProperty,u=L((t,r)=>Zt(t,"name",{value:r,configurable:!0}),"u$1");let ae=u(()=>{var t=(()=>{var r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,f=Object.prototype.hasOwnProperty,h=u((e,n)=>{for(var o in n)r(e,o,{get:n[o],enumerable:!0})},"q"),m=u((e,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of l(n))!f.call(e,s)&&s!==o&&r(e,s,{get:u(()=>n[s],"get"),enumerable:!(i=a(n,s))||i.enumerable});return e},"H"),g=u(e=>m(r({},"__esModule",{value:!0}),e),"J"),v={};h(v,{zeptomatch:u(()=>$t,"zeptomatch")});var R=u(e=>Array.isArray(e),"A"),P=u(e=>typeof e=="function","d"),de=u(e=>e.length===0,"Q"),he=u(e=>typeof e=="number","W"),ge=u(e=>typeof e=="object"&&e!==null,"K"),me=u(e=>e instanceof RegExp,"X"),W=u(e=>typeof e=="string","b"),A=u(e=>e===void 0,"h"),xe=u(e=>{const n=new Map;return o=>{const i=n.get(o);if(i)return i;const s=e(o);return n.set(o,s),s}},"Y"),$e=u((e,n,o={})=>{const i={cache:{},input:e,index:0,indexMax:0,options:o,output:[]};if(j(n)(i)&&i.index===e.length)return i.output;throw new Error(`Failed to parse at index ${i.indexMax}`)},"rr"),c=u((e,n)=>R(e)?ve(e,n):W(e)?be(e,n):ye(e,n),"i"),ve=u((e,n)=>{const o={};for(const i of e){if(i.length!==1)throw new Error(`Invalid character: "${i}"`);const s=i.charCodeAt(0);o[s]=!0}return i=>{const s=i.index,p=i.input;for(;i.index<p.length&&p.charCodeAt(i.index)in o;)i.index+=1;const d=i.index;if(d>s){if(!A(n)&&!i.options.silent){const $=i.input.slice(s,d),y=P(n)?n($,p,String(s)):n;A(y)||i.output.push(y)}i.indexMax=Math.max(i.indexMax,i.index)}return!0}},"er"),ye=u((e,n)=>{const o=e.source,i=e.flags.replace(/y|$/,"y"),s=new RegExp(o,i);return C(p=>{s.lastIndex=p.index;const d=s.exec(p.input);if(d){if(!A(n)&&!p.options.silent){const $=P(n)?n(...d,p.input,String(p.index)):n;A($)||p.output.push($)}return p.index+=d[0].length,p.indexMax=Math.max(p.indexMax,p.index),!0}else return!1})},"nr"),be=u((e,n)=>o=>{if(o.input.startsWith(e,o.index)){if(!A(n)&&!o.options.silent){const i=P(n)?n(e,o.input,String(o.index)):n;A(i)||o.output.push(i)}return o.index+=e.length,o.indexMax=Math.max(o.indexMax,o.index),!0}else return!1},"tr"),F=u((e,n,o,i)=>{const s=j(e);return C(k(J(p=>{let d=0;for(;d<o;){const $=p.index;if(!s(p)||(d+=1,p.index===$))break}return d>=n}),i))},"C"),we=u((e,n)=>F(e,0,1,n),"ar"),_=u((e,n)=>F(e,0,1/0,n),"f"),S=u((e,n)=>{const o=e.map(j);return C(k(J(i=>{for(let s=0,p=o.length;s<p;s++)if(!o[s](i))return!1;return!0}),n))},"x"),b=u((e,n)=>{const o=e.map(j);return C(k(i=>{for(let s=0,p=o.length;s<p;s++)if(o[s](i))return!0;return!1},n))},"l"),J=u((e,n=!1)=>{const o=j(e);return i=>{const s=i.index,p=i.output.length,d=o(i);return(!d||n)&&(i.index=s,i.output.length!==p&&(i.output.length=p)),d}},"M"),k=u((e,n)=>{const o=j(e);return n?i=>{if(i.options.silent)return o(i);const s=i.output.length;if(o(i)){const p=i.output.splice(s,1/0),d=n(p);return A(d)||i.output.push(d),!0}else return!1}:o},"_"),C=(()=>{let e=0;return n=>{const o=j(n),i=e+=1;return s=>{var p;if(s.options.memoization===!1)return o(s);const d=s.index,$=(p=s.cache)[i]||(p[i]=new Map),y=$.get(d);if(y===!1)return!1;if(he(y))return s.index=y,!0;if(y)return s.index=y.index,y.output?.length&&s.output.push(...y.output),!0;{const ne=s.output.length;if(o(s)){const re=s.index,oe=s.output.length;if(oe>ne){const vt=s.output.slice(ne,oe);$.set(d,{index:re,output:vt})}else $.set(d,re);return!0}else return $.set(d,!1),!1}}}})(),q=u(e=>{let n;return o=>(n||(n=j(e())),n(o))},"E"),j=xe(e=>{if(P(e))return de(e)?q(e):e;if(W(e)||me(e))return c(e);if(R(e))return S(e);if(ge(e))return b(Object.values(e));throw new Error("Invalid rule")}),G="abcdefghijklmnopqrstuvwxyz",je=u(e=>{let n="";for(;e>0;){const o=(e-1)%26;n=G[o]+n,e=Math.floor((e-1)/26)}return n},"ir"),T=u(e=>{let n=0;for(let o=0,i=e.length;o<i;o++)n=n*26+G.indexOf(e[o])+1;return n},"z"),E=u((e,n)=>{if(n<e)return E(n,e);const o=[];for(;e<=n;)o.push(e++);return o},"S"),Ae=u((e,n,o)=>E(e,n).map(i=>String(i).padStart(o,"0")),"or"),V=u((e,n)=>E(T(e),T(n)).map(je),"O"),w=u(e=>e,"p"),B=u(e=>Oe(n=>$e(n,e,{memoization:!1}).join("")),"R"),Oe=u(e=>{const n={};return o=>n[o]??(n[o]=e(o))},"ur"),Me=c(/^\*\*\/\*$/,".*"),ze=c(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(e,n,o)=>`.*${n?"":"(?:^|/)"}${o.replaceAll(".","\\.")}`),Pe=c(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(e,n,o,i)=>`.*${n?"":"(?:^|/)"}${o.replaceAll(".","\\.")}(?:${i.replaceAll(",","|").replaceAll(".","\\.")})`),N=c(/\\./,w),_e=c(/[$.*+?^(){}[\]\|]/,e=>`\\${e}`),Se=c(/./,w),Ce=c(/^(?:!!)*!(.*)$/,(e,n)=>`(?!^${te(n)}$).*?`),ke=c(/^(!!)+/,""),Ee=b([Ce,ke]),Ne=c(/\/(\*\*\/)+/,"(?:/.+/|/)"),Ze=c(/^(\*\*\/)+/,"(?:^|.*/)"),Ue=c(/\/(\*\*)$/,"(?:/.*|$)"),Ie=c(/\*\*/,".*"),H=b([Ne,Ze,Ue,Ie]),Le=c(/\*\/(?!\*\*\/)/,"[^/]*/"),De=c(/\*/,"[^/]*"),K=b([Le,De]),Q=c("?","[^/]"),Re=c("[",w),We=c("]",w),Fe=c(/[!^]/,"^/"),Je=c(/[a-z]-[a-z]|[0-9]-[0-9]/i,w),qe=c(/[$.*+?^(){}[\|]/,e=>`\\${e}`),Ge=c(/[^\]]/,w),Te=b([N,qe,Je,Ge]),X=S([Re,we(Fe),_(Te),We]),Ve=c("{","(?:"),Be=c("}",")"),He=c(/(\d+)\.\.(\d+)/,(e,n,o)=>Ae(+n,+o,Math.min(n.length,o.length)).join("|")),Ke=c(/([a-z]+)\.\.([a-z]+)/,(e,n,o)=>V(n,o).join("|")),Qe=c(/([A-Z]+)\.\.([A-Z]+)/,(e,n,o)=>V(n.toLowerCase(),o.toLowerCase()).join("|").toUpperCase()),Xe=b([He,Ke,Qe]),Y=S([Ve,Xe,Be]),Ye=c("{","(?:"),et=c("}",")"),tt=c(",","|"),nt=c(/[$.*+?^(){[\]\|]/,e=>`\\${e}`),rt=c(/[^}]/,w),ot=q(()=>ee),at=b([H,K,Q,X,Y,ot,N,nt,tt,rt]),ee=S([Ye,_(at),et]),it=_(b([Me,ze,Pe,Ee,H,K,Q,X,Y,ee,N,_e,Se])),st=it,lt=B(st),te=lt,ut=c(/\\./,w),ct=c(/./,w),pt=c(/\*\*\*+/,"*"),ft=c(/([^/{[(!])\*\*/,(e,n)=>`${n}*`),dt=c(/(^|.)\*\*(?=[^*/)\]}])/,(e,n)=>`${n}*`),ht=_(b([ut,pt,ft,dt,ct])),gt=ht,mt=B(gt),xt=mt,Z=u((e,n)=>{const o=Array.isArray(e)?e:[e];if(!o.length)return!1;const i=o.map(Z.compile),s=o.every(d=>/(\/(?:\*\*)?|\[\/\])$/.test(d)),p=n.replace(/[\\\/]+/g,"/").replace(/\/$/,s?"/":"");return i.some(d=>d.test(p))},"$");Z.compile=e=>new RegExp(`^${te(xt(e))}$`,"s");var $t=Z;return g(v)})();return t.default||t},"_lazyMatch"),U;const Ut=u((t,r)=>(U||(U=ae(),ae=null),U(t,r)),"default");var It=Object.defineProperty,x=L((t,r)=>It(t,"name",{value:r,configurable:!0}),"r");const Lt=/^[/\\]{2}/,Dt=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,le=/^[A-Z]:$/i,ie=/^\/([A-Z]:)?$/i,Rt=/.(\.[^./]+)$/,Wt=/^[/\\]|^[a-z]:[/\\]/i,Ft=x(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),ue=x((t,r)=>{let a="",l=0,f=-1,h=0,m=null;for(let g=0;g<=t.length;++g){if(g<t.length)m=t[g];else{if(m==="/")break;m="/"}if(m==="/"){if(!(f===g-1||h===1))if(h===2){if(a.length<2||l!==2||!a.endsWith(".")||a.at(-2)!=="."){if(a.length>2){const v=a.lastIndexOf("/");v===-1?(a="",l=0):(a=a.slice(0,v),l=a.length-1-a.lastIndexOf("/")),f=g,h=0;continue}else if(a.length>0){a="",l=0,f=g,h=0;continue}}r&&(a+=a.length>0?"/..":"..",l=2)}else a.length>0?a+=`/${t.slice(f+1,g)}`:a=t.slice(f+1,g),l=g-f-1;f=g,h=0}else m==="."&&h!==-1?++h:h=-1}return a},"normalizeString"),z=x(t=>Dt.test(t),"isAbsolute"),ce=x(function(t){if(t.length===0)return".";t=O(t);const r=Lt.exec(t),a=z(t),l=t.at(-1)==="/";return t=ue(t,!a),t.length===0?a?"/":l?"./":".":(l&&(t+="/"),le.test(t)&&(t+="/"),r?a?`//${t}`:`//./${t}`:a&&!z(t)?`/${t}`:t)},"normalize"),Jt=x((...t)=>{let r="";for(const a of t)if(a)if(r.length>0){const l=r[r.length-1]==="/",f=a[0]==="/";l&&f?r+=a.slice(1):r+=l||f?a:`/${a}`}else r+=a;return ce(r)},"join"),I=x(function(...t){t=t.map(l=>O(l));let r="",a=!1;for(let l=t.length-1;l>=-1&&!a;l--){const f=l>=0?t[l]:Ft();!f||f.length===0||(r=`${f}/${r}`,a=z(f))}return r=ue(r,!a),a&&!z(r)?`/${r}`:r.length>0?r:"."},"resolve");x(function(t){return O(t)},"toNamespacedPath");const qt=x(function(t){return Rt.exec(O(t))?.[1]??""},"extname");x(function(t,r){const a=I(t).replace(ie,"$1").split("/"),l=I(r).replace(ie,"$1").split("/");if(l[0][1]===":"&&a[0][1]===":"&&a[0]!==l[0])return l.join("/");const f=[...a];for(const h of f){if(l[0]!==h)break;a.shift(),l.shift()}return[...a.map(()=>".."),...l].join("/")},"relative");const pe=x(t=>{const r=O(t).replace(/\/$/,"").split("/").slice(0,-1);return r.length===1&&le.test(r[0])&&(r[0]+="/"),r.join("/")||(z(t)?"/":".")},"dirname");x(function(t){const r=[t.root,t.dir,t.base??t.name+t.ext].filter(Boolean);return O(t.root?I(...r):r.join("/"))},"format");const Gt=x((t,r)=>{const a=O(t).split("/").pop();return r&&a.endsWith(r)?a.slice(0,-r.length):a},"basename");x(function(t){const r=Wt.exec(t)?.[0]?.replace(/\\/g,"/")??"",a=Gt(t),l=qt(a);return{base:a,dir:pe(t),ext:l,name:a.slice(0,a.length-l.length),root:r}},"parse");x((t,r)=>Ut(r,ce(t)),"matchesGlob");var Tt=Object.defineProperty,D=M((t,r)=>Tt(t,"name",{value:r,configurable:!0}),"r");const Vt="last-update-check.json",fe=D(t=>{const r=At(t);if(r===void 0)throw new Error("Could not find cache directory");return Jt(r,Vt)},"getConfigFile"),Bt=D(t=>{const r=fe(t);try{if(!se(r))return;const{lastUpdateCheck:a}=JSON.parse(bt(r,"utf8"));return a}catch{return}},"getLastUpdate"),Ht=D(t=>{const r=fe(t),a=pe(r);se(a)||wt(a,{recursive:!0}),jt(r,JSON.stringify({lastUpdateCheck:Date.now()}))},"saveLastUpdate");var Kt=Object.defineProperty,Qt=M((t,r)=>Kt(t,"name",{value:r,configurable:!0}),"g");const Xt=Qt(async(t,r,a)=>{const l=a.replace("__NAME__",t);return await new Promise((f,h)=>{Ot(l,m=>{let g="";m.on("data",v=>g+=v),m.on("end",()=>{try{const v=JSON.parse(g)[r];v||h(new Error("Error getting version")),f(v)}catch{h(new Error("Could not parse version response"))}})}).on("error",m=>h(m))})},"getDistributionVersion");var Yt=Object.defineProperty,en=M((t,r)=>Yt(t,"name",{value:r,configurable:!0}),"i");const an=en(async({alwaysRun:t,debug:r,distTag:a="latest",pkg:l,registryUrl:f="https://registry.npmjs.org/-/package/__NAME__/dist-tags",updateCheckInterval:h=1e3*60*60*24})=>{const m=Bt(l.name);if(t||!m||m<Date.now()-h){const g=await Xt(l.name,a,f);if(Ht(l.name),Pt(g,l.version))return g;r&&console.error(`Latest version (${g}) not newer than current version (${l.version})`)}else r&&console.error(`Too recent to check for a new update. simpleUpdateNotifier() interval set to ${h}ms but only ${Date.now()-m}ms since last check.`);return null},"hasNewVersion");export{an as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/cerebro",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "description": "A delightful toolkit for building Node-powered CLIs.",
5
5
  "keywords": [
6
6
  "command",
@@ -86,10 +86,10 @@
86
86
  "LICENSE.md"
87
87
  ],
88
88
  "dependencies": {
89
- "@visulima/boxen": "1.0.24",
90
- "@visulima/colorize": "1.4.15",
91
- "@visulima/find-cache-dir": "1.0.19",
92
- "@visulima/pail": "2.1.14",
89
+ "@visulima/boxen": "1.0.25",
90
+ "@visulima/colorize": "1.4.16",
91
+ "@visulima/find-cache-dir": "1.0.20",
92
+ "@visulima/pail": "2.1.16",
93
93
  "cli-table3": "^0.6.5",
94
94
  "command-line-args": "^6.0.0",
95
95
  "fastest-levenshtein": "^1.0.16"
@@ -112,7 +112,7 @@
112
112
  "@types/node": "18.19.15",
113
113
  "@visulima/nextra-theme-docs": "4.0.26",
114
114
  "@visulima/packem": "1.9.2",
115
- "@visulima/path": "1.3.0",
115
+ "@visulima/path": "1.3.1",
116
116
  "@vitest/coverage-v8": "^2.1.8",
117
117
  "camelcase": "8.0.0",
118
118
  "conventional-changelog-conventionalcommits": "8.0.0",