Comparing version 2.0.2 to 2.0.3
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.ItGlob = factory()}(typeof self !== 'undefined' ? self : this, function () { | ||
"use strict";var ItGlob=(()=>{var Ot=Object.create;var L=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Pt=Object.getOwnPropertyNames;var Mt=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty;var M=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rt=(e,t)=>{for(var n in t)L(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Pt(t))!Ct.call(e,s)&&s!==n&&L(e,s,{get:()=>t[s],enumerable:!(r=At(t,s))||r.enumerable});return e};var N=(e,t,n)=>(n=e!=null?Ot(Mt(e)):{},q(t||!e||!e.__esModule?L(n,"default",{value:e,enumerable:!0}):n,e)),$t=e=>q(L({},"__esModule",{value:!0}),e);var J=M(()=>{});var K=M(()=>{});var Y=M((ee,Q)=>{var kt=typeof process=="object"&&process&&process.platform==="win32";Q.exports=kt?{sep:"\\"}:{sep:"/"}});var nt=M((se,rt)=>{"use strict";rt.exports=et;function et(e,t,n){e instanceof RegExp&&(e=tt(e,n)),t instanceof RegExp&&(t=tt(t,n));var r=st(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function tt(e,t){var n=t.match(e);return n?n[0]:null}et.range=st;function st(e,t,n){var r,s,a,i,o,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!o;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?o=[r.pop(),l]:(s=r.pop(),s<a&&(a=s,i=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(o=[a,i])}return o}});var ft=M((re,ut)=>{var at=nt();ut.exports=Lt;var it="\0SLASH"+Math.random()+"\0",ot="\0OPEN"+Math.random()+"\0",U="\0CLOSE"+Math.random()+"\0",ct="\0COMMA"+Math.random()+"\0",lt="\0PERIOD"+Math.random()+"\0";function G(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Tt(e){return e.split("\\\\").join(it).split("\\{").join(ot).split("\\}").join(U).split("\\,").join(ct).split("\\.").join(lt)}function Bt(e){return e.split(it).join("\\").split(ot).join("{").split(U).join("}").split(ct).join(",").split(lt).join(".")}function ht(e){if(!e)return[""];var t=[],n=at("{","}",e);if(!n)return e.split(",");var r=n.pre,s=n.body,a=n.post,i=r.split(",");i[i.length-1]+="{"+s+"}";var o=ht(a);return a.length&&(i[i.length-1]+=o.shift(),i.push.apply(i,o)),t.push.apply(t,i),t}function Lt(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),$(Tt(e),!0).map(Bt)):[]}function Dt(e){return"{"+e+"}"}function _t(e){return/^-?0\d/.test(e)}function Nt(e,t){return e<=t}function Gt(e,t){return e>=t}function $(e,t){var n=[],r=at("{","}",e);if(!r)return[e];var s=r.pre,a=r.post.length?$(r.post,!1):[""];if(/\$$/.test(r.pre))for(var i=0;i<a.length;i++){var o=s+"{"+r.body+"}"+a[i];n.push(o)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),u=c||l,b=r.body.indexOf(",")>=0;if(!u&&!b)return r.post.match(/,.*\}/)?(e=r.pre+"{"+r.body+U+r.post,$(e)):[e];var p;if(u)p=r.body.split(/\.\./);else if(p=ht(r.body),p.length===1&&(p=$(p[0],!1).map(Dt),p.length===1))return a.map(function(P){return r.pre+p[0]+P});var m;if(u){var d=G(p[0]),O=G(p[1]),A=Math.max(p[0].length,p[1].length),k=p.length==3?Math.abs(G(p[2])):1,T=Nt,B=O<d;B&&(k*=-1,T=Gt);var E=p.some(_t);m=[];for(var S=d;T(S,O);S+=k){var y;if(l)y=String.fromCharCode(S),y==="\\"&&(y="");else if(y=String(S),E){var f=A-y.length;if(f>0){var h=new Array(f+1).join("0");S<0?y="-"+h+y.slice(1):y=h+y}}m.push(y)}}else{m=[];for(var g=0;g<p.length;g++)m.push.apply(m,$(p[g],!1))}for(var g=0;g<m.length;g++)for(var i=0;i<a.length;i++){var o=s+m[g]+a[i];(!t||u||o)&&n.push(o)}}return n}});var vt=M((ae,Z)=>{var v=Z.exports=(e,t,n={})=>(D(t),!n.nocomment&&t.charAt(0)==="#"?!1:new C(t,n).match(e));Z.exports=v;var H=Y();v.sep=H.sep;var x=Symbol("globstar **");v.GLOBSTAR=x;var Ut=ft(),pt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},W="[^/]",I=W+"*?",It="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ft="(?:(?!(?:\\/|^)\\.).)*?",mt=e=>e.split("").reduce((t,n)=>(t[n]=!0,t),{}),gt=mt("().*{}+?[]^$\\!"),Ht=mt("[.("),dt=/\/+/;v.filter=(e,t={})=>(n,r,s)=>v(n,e,t);var j=(e,t={})=>{let n={};return Object.keys(e).forEach(r=>n[r]=e[r]),Object.keys(t).forEach(r=>n[r]=t[r]),n};v.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return v;let t=v,n=(r,s,a)=>t(r,s,j(e,a));return n.Minimatch=class extends t.Minimatch{constructor(s,a){super(s,j(e,a))}},n.Minimatch.defaults=r=>t.defaults(j(e,r)).Minimatch,n.filter=(r,s)=>t.filter(r,j(e,s)),n.defaults=r=>t.defaults(j(e,r)),n.makeRe=(r,s)=>t.makeRe(r,j(e,s)),n.braceExpand=(r,s)=>t.braceExpand(r,j(e,s)),n.match=(r,s,a)=>t.match(r,s,j(e,a)),n};v.braceExpand=(e,t)=>bt(e,t);var bt=(e,t={})=>(D(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ut(e)),Wt=1024*64,D=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Wt)throw new TypeError("pattern is too long")},F=Symbol("subparse");v.makeRe=(e,t)=>new C(e,t||{}).makeRe();v.match=(e,t,n={})=>{let r=new C(t,n);return e=e.filter(s=>r.match(s)),r.options.nonull&&!e.length&&e.push(t),e};var Zt=e=>e.replace(/\\(.)/g,"$1"),zt=e=>e.replace(/\\([^-\]])/g,"$1"),Vt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xt=e=>e.replace(/[[\]\\]/g,"\\$&"),C=class{constructor(t,n){D(t),n||(n={}),this.options=n,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.make()}debug(){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();let r=this.globSet=this.braceExpand();n.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,r),r=this.globParts=r.map(s=>s.split(dt)),this.debug(this.pattern,r),r=r.map((s,a,i)=>s.map(this.parse,this)),this.debug(this.pattern,r),r=r.filter(s=>s.indexOf(!1)===-1),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;let t=this.pattern,n=!1,r=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r){var s=this.options;this.debug("matchOne",{this:this,file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var a=0,i=0,o=t.length,c=n.length;a<o&&i<c;a++,i++){this.debug("matchOne loop");var l=n[i],u=t[a];if(this.debug(n,l,u),l===!1)return!1;if(l===x){this.debug("GLOBSTAR",[n,l,u]);var b=a,p=i+1;if(p===c){for(this.debug("** at the end");a<o;a++)if(t[a]==="."||t[a]===".."||!s.dot&&t[a].charAt(0)===".")return!1;return!0}for(;b<o;){var m=t[b];if(this.debug(` | ||
globstar while`,t,b,n,p,m),this.matchOne(t.slice(b),n.slice(p),r))return this.debug("globstar found match!",b,o,m),!0;if(m==="."||m===".."||!s.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,b,n,p);break}this.debug("globstar swallow a segment, and continue"),b++}return!!(r&&(this.debug(` | ||
>>> no match, partial?`,t,b,n,p),b===o))}var d;if(typeof l=="string"?(d=u===l,this.debug("string match",l,u,d)):(d=u.match(l),this.debug("pattern match",l,u,d)),!d)return!1}if(a===o&&i===c)return!0;if(a===o)return r;if(i===c)return a===o-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return bt(this.pattern,this.options)}parse(t,n){D(t);let r=this.options;if(t==="**")if(r.noglobstar)t="*";else return x;if(t==="")return"";let s="",a=!1,i=!1,o=[],c=[],l,u=!1,b=-1,p=-1,m,d,O,A=t.charAt(0)===".",k=r.dot||A,T=()=>A?"":k?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",B=f=>f.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=()=>{if(l){switch(l){case"*":s+=I,a=!0;break;case"?":s+=W,a=!0;break;default:s+="\\"+l;break}this.debug("clearStateChar %j %j",l,s),l=!1}};for(let f=0,h;f<t.length&&(h=t.charAt(f));f++){if(this.debug("%s %s %s %j",t,f,s,h),i){if(h==="/")return!1;gt[h]&&(s+="\\"),s+=h,i=!1;continue}switch(h){case"/":return!1;case"\\":if(u&&t.charAt(f+1)==="-"){s+=h;continue}E(),i=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,f,s,h),u){this.debug(" in class"),h==="!"&&f===p+1&&(h="^"),s+=h;continue}this.debug("call clearStateChar %j",l),E(),l=h,r.noext&&E();continue;case"(":{if(u){s+="(";continue}if(!l){s+="\\(";continue}let g={type:l,start:f-1,reStart:s.length,open:pt[l].open,close:pt[l].close};this.debug(this.pattern," ",g),o.push(g),s+=g.open,g.start===0&&g.type!=="!"&&(A=!0,s+=B(t.slice(f+1))),this.debug("plType %j %j",l,s),l=!1;continue}case")":{let g=o[o.length-1];if(u||!g){s+="\\)";continue}o.pop(),E(),a=!0,d=g,s+=d.close,d.type==="!"&&c.push(Object.assign(d,{reEnd:s.length}));continue}case"|":{let g=o[o.length-1];if(u||!g){s+="\\|";continue}E(),s+="|",g.start===0&&g.type!=="!"&&(A=!0,s+=B(t.slice(f+1)));continue}case"[":if(E(),u){s+="\\"+h;continue}u=!0,p=f,b=s.length,s+=h;continue;case"]":if(f===p+1||!u){s+="\\"+h;continue}m=t.substring(p+1,f);try{RegExp("["+Xt(zt(m))+"]"),s+=h}catch{s=s.substring(0,b)+"(?:$.)"}a=!0,u=!1;continue;default:E(),gt[h]&&!(h==="^"&&u)&&(s+="\\"),s+=h;break}}for(u&&(m=t.slice(p+1),O=this.parse(m,F),s=s.substring(0,b)+"\\["+O[0],a=a||O[1]),d=o.pop();d;d=o.pop()){let f;f=s.slice(d.reStart+d.open.length),this.debug("setting tail",s,d),f=f.replace(/((?:\\{2}){0,64})(\\?)\|/g,(g,P,w)=>(w||(w="\\"),P+P+w+"|")),this.debug(`tail=%j | ||
%s`,f,f,d,s);let h=d.type==="*"?I:d.type==="?"?W:"\\"+d.type;a=!0,s=s.slice(0,d.reStart)+h+"\\("+f}E(),i&&(s+="\\\\");let S=Ht[s.charAt(0)];for(let f=c.length-1;f>-1;f--){let h=c[f],g=s.slice(0,h.reStart),P=s.slice(h.reStart,h.reEnd-8),w=s.slice(h.reEnd),Et=s.slice(h.reEnd-8,h.reEnd)+w,wt=g.split(")").length,jt=g.split("(").length-wt,_=w;for(let X=0;X<jt;X++)_=_.replace(/\)[+*?]?/,"");w=_;let St=w===""&&n!==F?"(?:$|\\/)":"";s=g+P+w+St+Et}if(s!==""&&a&&(s="(?=.)"+s),S&&(s=T()+s),n===F)return[s,a];if(r.nocase&&!a&&(a=t.toUpperCase()!==t.toLowerCase()),!a)return Zt(t);let y=r.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",y),{_glob:t,_src:s})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?I:n.dot?It:Ft,s=n.nocase?"i":"",a=t.map(i=>(i=i.map(o=>typeof o=="string"?Vt(o):o===x?x:o._src).reduce((o,c)=>(o[o.length-1]===x&&c===x||o.push(c),o),[]),i.forEach((o,c)=>{o!==x||i[c-1]===x||(c===0?i.length>1?i[c+1]="(?:\\/|"+r+"\\/)?"+i[c+1]:i[c]=r:c===i.length-1?i[c-1]+="(?:\\/|"+r+")?":(i[c-1]+="(?:\\/|\\/"+r+"\\/)"+i[c+1],i[c+1]=x))}),i.filter(o=>o!==x).join("/"))).join("|");a="^(?:"+a+")$",this.negate&&(a="^(?!"+a+").*$");try{this.regexp=new RegExp(a,s)}catch{this.regexp=!1}return this.regexp}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;H.sep!=="/"&&(t=t.split(H.sep).join("/")),t=t.split(dt),this.debug(this.pattern,"split",t);let s=this.set;this.debug(this.pattern,"set",s);let a;for(let i=t.length-1;i>=0&&(a=t[i],!a);i--);for(let i=0;i<s.length;i++){let o=s[i],c=t;if(r.matchBase&&o.length===1&&(c=[a]),this.matchOne(c,o,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return v.defaults(t).Minimatch}};v.Minimatch=C});var qt={};Rt(qt,{default:()=>yt});var z=N(J(),1),R=N(K(),1),V=N(vt(),1);async function*yt(e,t,n={}){let r=R.default.resolve(e),s=R.default.relative(n.cwd??process.cwd(),e);if((await z.default.stat(r)).isDirectory()){for await(let i of xt(r,"",t,n))yield i;return}(0,V.default)(s,t,n)&&(yield n.absolute===!0?r:s)}async function*xt(e,t,n,r){for await(let s of await z.default.opendir(R.default.join(e,t))){let a=R.default.join(t,s.name),i=R.default.join(e,t,s.name),o=(0,V.default)(a,n,r),c=s.isDirectory();c&&r.nodir===!0&&(o=!1),o&&(yield r.absolute===!0?i:a),c&&(yield*xt(e,a,n,r))}}return $t(qt);})(); | ||
"use strict";var ItGlob=(()=>{var Ft=Object.create;var Z=Object.defineProperty;var Ht=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Vt=Object.getPrototypeOf,Xt=Object.prototype.hasOwnProperty;var Kt=(i,t,e)=>t in i?Z(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var X=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Qt=(i,t)=>{for(var e in t)Z(i,e,{get:t[e],enumerable:!0})},ut=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Jt(t))!Xt.call(i,n)&&n!==e&&Z(i,n,{get:()=>t[n],enumerable:!(s=Ht(t,n))||s.enumerable});return i};var et=(i,t,e)=>(e=i!=null?Ft(Vt(i)):{},ut(t||!i||!i.__esModule?Z(e,"default",{value:i,enumerable:!0}):e,i)),Yt=i=>ut(Z({},"__esModule",{value:!0}),i);var ft=(i,t,e)=>(Kt(i,typeof t!="symbol"?t+"":t,e),e),st=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var a=(i,t,e)=>(st(i,t,"read from private field"),e?e.call(i):t.get(i)),M=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},y=(i,t,e,s)=>(st(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e);var I=(i,t,e)=>(st(i,t,"access private method"),e);var pt=X(()=>{});var gt=X(()=>{});var xt=X((Ve,yt)=>{"use strict";yt.exports=mt;function mt(i,t,e){i instanceof RegExp&&(i=dt(i,e)),t instanceof RegExp&&(t=dt(t,e));var s=wt(i,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+i.length,s[1]),post:e.slice(s[1]+t.length)}}function dt(i,t){var e=t.match(i);return e?e[0]:null}mt.range=wt;function wt(i,t,e){var s,n,r,o,h,c=e.indexOf(i),u=e.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(i===t)return[c,u];for(s=[],r=e.length;l>=0&&!h;)l==c?(s.push(l),c=e.indexOf(i,l+1)):s.length==1?h=[s.pop(),u]:(n=s.pop(),n<r&&(r=n,o=u),u=e.indexOf(t,l+1)),l=c<u&&c>=0?c:u;s.length&&(h=[r,o])}return h}});var At=X((Xe,Ot)=>{var vt=xt();Ot.exports=se;var St="\0SLASH"+Math.random()+"\0",Et="\0OPEN"+Math.random()+"\0",nt="\0CLOSE"+Math.random()+"\0",bt="\0COMMA"+Math.random()+"\0",Tt="\0PERIOD"+Math.random()+"\0";function it(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function te(i){return i.split("\\\\").join(St).split("\\{").join(Et).split("\\}").join(nt).split("\\,").join(bt).split("\\.").join(Tt)}function ee(i){return i.split(St).join("\\").split(Et).join("{").split(nt).join("}").split(bt).join(",").split(Tt).join(".")}function Mt(i){if(!i)return[""];var t=[],e=vt("{","}",i);if(!e)return i.split(",");var s=e.pre,n=e.body,r=e.post,o=s.split(",");o[o.length-1]+="{"+n+"}";var h=Mt(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function se(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),F(te(i),!0).map(ee)):[]}function ie(i){return"{"+i+"}"}function ne(i){return/^-?0\d/.test(i)}function re(i,t){return i<=t}function oe(i,t){return i>=t}function F(i,t){var e=[],s=vt("{","}",i);if(!s)return[i];var n=s.pre,r=s.post.length?F(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<r.length;o++){var h=n+"{"+s.body+"}"+r[o];e.push(h)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),l=c||u,g=s.body.indexOf(",")>=0;if(!l&&!g)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+nt+s.post,F(i)):[i];var f;if(l)f=s.body.split(/\.\./);else if(f=Mt(s.body),f.length===1&&(f=F(f[0],!1).map(ie),f.length===1))return r.map(function(Zt){return s.pre+f[0]+Zt});var d;if(l){var T=it(f[0]),p=it(f[1]),S=Math.max(f[0].length,f[1].length),m=f.length==3?Math.abs(it(f[2])):1,A=re,tt=p<T;tt&&(m*=-1,A=oe);var Ut=f.some(ne);d=[];for(var U=T;A(U,p);U+=m){var C;if(u)C=String.fromCharCode(U),C==="\\"&&(C="");else if(C=String(U),Ut){var ct=S-C.length;if(ct>0){var lt=new Array(ct+1).join("0");U<0?C="-"+lt+C.slice(1):C=lt+C}}d.push(C)}}else{d=[];for(var k=0;k<f.length;k++)d.push.apply(d,F(f[k],!1))}for(var k=0;k<d.length;k++)for(var o=0;o<r.length;o++){var h=n+d[k]+r[o];(!t||l||h)&&e.push(h)}}return e}});var qe={};Qt(qe,{default:()=>_t});var ht=et(pt(),1),q=et(gt(),1);var kt=et(At(),1);var H=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")};var ae={"[: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]},J=i=>i.replace(/[[\]\\-]/g,"\\$&"),he=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Nt=i=>i.join(""),$t=(i,t)=>{let e=t;if(i.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],n=[],r=e+1,o=!1,h=!1,c=!1,u=!1,l=e,g="";t:for(;r<i.length;){let p=i.charAt(r);if((p==="!"||p==="^")&&r===e+1){u=!0,r++;continue}if(p==="]"&&o&&!c){l=r+1;break}if(o=!0,p==="\\"&&!c){c=!0,r++;continue}if(p==="["&&!c){for(let[S,[m,A,tt]]of Object.entries(ae))if(i.startsWith(S,r)){if(g)return["$.",!1,i.length-e,!0];r+=S.length,tt?n.push(m):s.push(m),h=h||A;continue t}}if(c=!1,g){p>g?s.push(J(g)+"-"+J(p)):p===g&&s.push(J(p)),g="",r++;continue}if(i.startsWith("-]",r+1)){s.push(J(p+"-")),r+=2;continue}if(i.startsWith("-",r+1)){g=p,r+=2;continue}s.push(J(p)),r++}if(l<r)return["",!1,0,!1];if(!s.length&&!n.length)return["$.",!1,i.length-e,!0];if(n.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!u){let p=s[0].length===2?s[0].slice(-1):s[0];return[he(p),!1,l-e,!1]}let f="["+(u?"^":"")+Nt(s)+"]",d="["+(u?"":"^")+Nt(n)+"]";return[s.length&&n.length?"("+f+"|"+d+")":s.length?f:d,h,l-e,!0]};var L=(i,{windowsPathsNoEscape:t=!1}={})=>t?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var ce=new Set(["!","?","+","*","@"]),jt=i=>ce.has(i),le="(?!\\.\\.?(?:$|/))",rt="(?!\\.)",ue=new Set(["[","."]),fe=new Set(["..","."]),pe=new Set("().*{}+?[]^$\\!"),ge=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ot="[^/]",Ct=ot+"*?",Rt=ot+"+?",v,E,R,w,x,W,G,D,N,z,V,Q,Lt,B,K,Y,Wt,O=class{constructor(t,e,s={}){M(this,Q);ft(this,"type");M(this,v,void 0);M(this,E,void 0);M(this,R,!1);M(this,w,[]);M(this,x,void 0);M(this,W,void 0);M(this,G,void 0);M(this,D,!1);M(this,N,void 0);M(this,z,void 0);M(this,V,!1);this.type=t,t&&y(this,E,!0),y(this,x,e),y(this,v,a(this,x)?a(a(this,x),v):this),y(this,N,a(this,v)===this?s:a(a(this,v),N)),y(this,G,a(this,v)===this?[]:a(a(this,v),G)),t==="!"&&!a(a(this,v),D)&&a(this,G).push(this),y(this,W,a(this,x)?a(a(this,x),w).length:0)}get hasMagic(){if(a(this,E)!==void 0)return a(this,E);for(let t of a(this,w))if(typeof t!="string"&&(t.type||t.hasMagic))return y(this,E,!0);return a(this,E)}toString(){return a(this,z)!==void 0?a(this,z):this.type?y(this,z,this.type+"("+a(this,w).map(t=>String(t)).join("|")+")"):y(this,z,a(this,w).map(t=>String(t)).join(""))}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof O&&a(e,x)===this))throw new Error("invalid part: "+e);a(this,w).push(e)}}toJSON(){let t=this.type===null?a(this,w).slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...a(this,w).map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===a(this,v)||a(a(this,v),D)&&a(this,x)?.type==="!")&&t.push({}),t}isStart(){if(a(this,v)===this)return!0;if(!a(this,x)?.isStart())return!1;if(a(this,W)===0)return!0;let t=a(this,x);for(let e=0;e<a(this,W);e++){let s=a(t,w)[e];if(!(s instanceof O&&s.type==="!"))return!1}return!0}isEnd(){if(a(this,v)===this||a(this,x)?.type==="!")return!0;if(!a(this,x)?.isEnd())return!1;if(!this.type)return a(this,x)?.isEnd();let t=a(this,x)?a(a(this,x),w).length:0;return a(this,W)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new O(this.type,t);for(let s of a(this,w))e.copyIn(s);return e}static fromGlob(t,e={}){var n;let s=new O(null,void 0,e);return I(n=O,B,K).call(n,t,s,0,e),s}toMMPattern(){if(this!==a(this,v))return a(this,v).toMMPattern();let t=this.toString(),[e,s,n,r]=this.toRegExpSource();if(!(n||a(this,E)||a(this,N).nocase&&!a(this,N).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return s;let h=(a(this,N).nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,h),{_src:e,_glob:t})}toRegExpSource(){if(a(this,v)===this&&I(this,Q,Lt).call(this),!this.type){let n=this.isStart()&&this.isEnd(),r=a(this,w).map(u=>{var T;let[l,g,f,d]=typeof u=="string"?I(T=O,Y,Wt).call(T,u,a(this,E),n):u.toRegExpSource();return y(this,E,a(this,E)||f),y(this,R,a(this,R)||d),l}).join(""),o="";if(this.isStart()&&typeof a(this,w)[0]=="string"&&!(a(this,w).length===1&&fe.has(a(this,w)[0]))){let l=ue,g=a(this,N).dot&&l.has(r.charAt(0))||r.startsWith("\\.")&&l.has(r.charAt(2))||r.startsWith("\\.\\.")&&l.has(r.charAt(4)),f=!a(this,N).dot&&l.has(r.charAt(0));o=g?le:f?rt:""}let h="";return this.isEnd()&&a(a(this,v),D)&&a(this,x)?.type==="!"&&(h="(?:$|\\/)"),[o+r+h,L(r),y(this,E,!!a(this,E)),a(this,R)]}let t=this.type==="!"?"(?:(?!(?:":"(?:",e=a(this,w).map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,h,c]=n.toRegExpSource();return y(this,R,a(this,R)||c),r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|");if(this.isStart()&&this.isEnd()&&!e&&this.type!=="!"){let n=this.toString();return y(this,w,[n]),this.type=null,y(this,E,void 0),[n,L(this.toString()),!1,!1]}let s="";if(this.type==="!"&&a(this,V))s=(this.isStart()&&!a(this,N).dot?rt:"")+Rt;else{let n=this.type==="!"?"))"+(this.isStart()&&!a(this,N).dot?rt:"")+Ct+")":this.type==="@"?")":`)${this.type}`;s=t+e+n}return[s,L(e),y(this,E,!!a(this,E)),a(this,R)]}},P=O;v=new WeakMap,E=new WeakMap,R=new WeakMap,w=new WeakMap,x=new WeakMap,W=new WeakMap,G=new WeakMap,D=new WeakMap,N=new WeakMap,z=new WeakMap,V=new WeakMap,Q=new WeakSet,Lt=function(){if(this!==a(this,v))throw new Error("should only call on root");if(a(this,D))return this;this.toString(),y(this,D,!0);let t;for(;t=a(this,G).pop();){if(t.type!=="!")continue;let e=t,s=a(e,x);for(;s;){for(let n=a(e,W)+1;!s.type&&n<a(s,w).length;n++)for(let r of a(t,w)){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(a(s,w)[n])}e=s,s=a(e,x)}}return this},B=new WeakSet,K=function(t,e,s,n){var d,T;let r=!1,o=!1,h=-1,c=!1;if(e.type===null){let p=s,S="";for(;p<t.length;){let m=t.charAt(p++);if(r||m==="\\"){r=!r,S+=m;continue}if(o){p===h+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(p===h+2&&c)&&(o=!1),S+=m;continue}else if(m==="["){o=!0,h=p,c=!1,S+=m;continue}if(!n.noext&&jt(m)&&t.charAt(p)==="("){e.push(S),S="";let A=new O(m,e);p=I(d=O,B,K).call(d,t,A,p,n),e.push(A);continue}S+=m}return e.push(S),p}let u=s+1,l=new O(null,e),g=[],f="";for(;u<t.length;){let p=t.charAt(u++);if(r||p==="\\"){r=!r,f+=p;continue}if(o){u===h+1?(p==="^"||p==="!")&&(c=!0):p==="]"&&!(u===h+2&&c)&&(o=!1),f+=p;continue}else if(p==="["){o=!0,h=u,c=!1,f+=p;continue}if(jt(p)&&t.charAt(u)==="("){l.push(f),f="";let S=new O(p,l);l.push(S),u=I(T=O,B,K).call(T,t,S,u,n);continue}if(p==="|"){l.push(f),f="",g.push(l),l=new O(null,e);continue}if(p===")")return f===""&&a(e,w).length===0&&y(e,V,!0),l.push(f),f="",e.push(...g,l),u;f+=p}return e.type=null,y(e,E,void 0),y(e,w,[t.substring(s-1)]),u},Y=new WeakSet,Wt=function(t,e,s=!1){let n=!1,r="",o=!1;for(let h=0;h<t.length;h++){let c=t.charAt(h);if(n){n=!1,r+=(pe.has(c)?"\\":"")+c;continue}if(c==="\\"){h===t.length-1?r+="\\\\":n=!0;continue}if(c==="["){let[u,l,g,f]=$t(t,h);if(g){r+=u,o=o||l,h+=g-1,e=e||f;continue}}if(c==="*"){s&&t==="*"?r+=Rt:r+=Ct,e=!0;continue}if(c==="?"){r+=ot,e=!0;continue}r+=ge(c)}return[r,L(t),!!e,o]},M(P,B),M(P,Y);var at=(i,{windowsPathsNoEscape:t=!1}={})=>t?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&");var b=(i,t,e={})=>(H(t),!e.nocomment&&t.charAt(0)==="#"?!1:new _(t,e).match(i)),de=/^\*+([^+@!?\*\[\(]*)$/,me=i=>t=>!t.startsWith(".")&&t.endsWith(i),we=i=>t=>t.endsWith(i),ye=i=>(i=i.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(i)),xe=i=>(i=i.toLowerCase(),t=>t.toLowerCase().endsWith(i)),ve=/^\*+\.\*+$/,Se=i=>!i.startsWith(".")&&i.includes("."),Ee=i=>i!=="."&&i!==".."&&i.includes("."),be=/^\.\*+$/,Te=i=>i!=="."&&i!==".."&&i.startsWith("."),Me=/^\*+$/,Oe=i=>i.length!==0&&!i.startsWith("."),Ae=i=>i.length!==0&&i!=="."&&i!=="..",Ne=/^\?+([^+@!?\*\[\(]*)?$/,$e=([i,t=""])=>{let e=Gt([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},je=([i,t=""])=>{let e=zt([i]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Ce=([i,t=""])=>{let e=zt([i]);return t?s=>e(s)&&s.endsWith(t):e},Re=([i,t=""])=>{let e=Gt([i]);return t?s=>e(s)&&s.endsWith(t):e},Gt=([i])=>{let t=i.length;return e=>e.length===t&&!e.startsWith(".")},zt=([i])=>{let t=i.length;return e=>e.length===t&&e!=="."&&e!==".."},It=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Dt={win32:{sep:"\\"},posix:{sep:"/"}},Le=It==="win32"?Dt.win32.sep:Dt.posix.sep;b.sep=Le;var j=Symbol("globstar **");b.GLOBSTAR=j;var We="[^/]",De=We+"*?",Pe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ke="(?:(?!(?:\\/|^)\\.).)*?",Ge=(i,t={})=>e=>b(e,i,t);b.filter=Ge;var $=(i,t={})=>Object.assign({},i,t),ze=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return b;let t=b;return Object.assign((s,n,r={})=>t(s,n,$(i,r)),{Minimatch:class extends t.Minimatch{constructor(n,r={}){super(n,$(i,r))}static defaults(n){return t.defaults($(i,n)).Minimatch}},AST:class extends t.AST{constructor(n,r,o={}){super(n,r,$(i,o))}static fromGlob(n,r={}){return t.AST.fromGlob(n,$(i,r))}},unescape:(s,n={})=>t.unescape(s,$(i,n)),escape:(s,n={})=>t.escape(s,$(i,n)),filter:(s,n={})=>t.filter(s,$(i,n)),defaults:s=>t.defaults($(i,s)),makeRe:(s,n={})=>t.makeRe(s,$(i,n)),braceExpand:(s,n={})=>t.braceExpand(s,$(i,n)),match:(s,n,r={})=>t.match(s,n,$(i,r)),sep:t.sep,GLOBSTAR:j})};b.defaults=ze;var Bt=(i,t={})=>(H(i),t.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:(0,kt.default)(i));b.braceExpand=Bt;var Ie=(i,t={})=>new _(i,t).makeRe();b.makeRe=Ie;var Be=(i,t,e={})=>{let s=new _(t,e);return i=i.filter(n=>s.match(n)),s.options.nonull&&!i.length&&i.push(t),i};b.match=Be;var Pt=/[?*]|[+@!]\(.*?\)|\[|\]/,_e=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){H(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||It,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(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let 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);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let n=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=r[0]===""&&r[1]===""&&(r[2]==="?"||!Pt.test(r[2]))&&!Pt.test(r[3]),u=/^[a-z]:/i.test(r[0]);if(c)return[...r.slice(0,4),...r.slice(4).map(l=>this.parse(l))];if(u)return[r[0],...r.slice(1).map(l=>this.parse(l))]}return r.map(c=>this.parse(c))});if(this.debug(this.pattern,n),this.set=n.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let 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 s=0;s<t.length;s++)for(let n=0;n<t[s].length;n++)t[s][n]==="**"&&(t[s][n]="*");let{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 s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let n=s;for(;e[n+1]==="**";)n++;n!==s&&e.splice(s,n-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,n)=>{let r=s[s.length-1];return n==="**"&&r==="**"?s:n===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(n),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let r=t[n];n===1&&r===""&&t[0]===""||(r==="."||r==="")&&(e=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let s=0;for(;(s=t.indexOf("..",s+1))!==-1;){let n=t[s-1];n&&n!=="."&&n!==".."&&n!=="**"&&(e=!0,t.splice(s-1,2),s-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let s of t){let n=-1;for(;(n=s.indexOf("**",n+1))!==-1;){let o=n;for(;s[o+1]==="**";)o++;o>n&&s.splice(n+1,o-n);let h=s[n+1],c=s[n+2],u=s[n+3];if(h!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;e=!0,s.splice(n,1);let l=s.slice(0);l[n]="**",t.push(l),n--}if(!this.preserveMultipleSlashes){for(let o=1;o<s.length-1;o++){let h=s[o];o===1&&h===""&&s[0]===""||(h==="."||h==="")&&(e=!0,s.splice(o,1),o--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let o=s[r-1];if(o&&o!=="."&&o!==".."&&o!=="**"){e=!0;let c=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...c),s.length===0&&s.push(""),r-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let s=e+1;s<t.length;s++){let n=this.partsMatch(t[e],t[s],!this.preserveMultipleSlashes);n&&(t[e]=n,t[s]=[])}return t.filter(e=>e.length)}partsMatch(t,e,s=!1){let n=0,r=0,o=[],h="";for(;n<t.length&&r<e.length;)if(t[n]===e[r])o.push(h==="b"?e[r]:t[n]),n++,r++;else if(s&&t[n]==="**"&&e[r]===t[n+1])o.push(t[n]),n++;else if(s&&e[r]==="**"&&t[n]===e[r+1])o.push(e[r]),r++;else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(h==="b")return!1;h="a",o.push(t[n]),n++,r++}else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(h==="a")return!1;h="b",o.push(e[r]),n++,r++}else return!1;return t.length===e.length&&o}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,s=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)e=!e,s++;s&&(this.pattern=t.slice(s)),this.negate=e}matchOne(t,e,s=!1){let n=this.options;if(this.isWindows){let p=t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),S=e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]);if(p&&S){let m=t[3],A=e[3];m.toLowerCase()===A.toLowerCase()&&(t[3]=A)}else if(S&&typeof t[0]=="string"){let m=e[3],A=t[0];m.toLowerCase()===A.toLowerCase()&&(e[3]=A,e=e.slice(3))}else if(p&&typeof e[0]=="string"){let m=t[3];m.toLowerCase()===e[0].toLowerCase()&&(e[0]=m,t=t.slice(3))}}let{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,h=0,c=t.length,u=e.length;o<c&&h<u;o++,h++){this.debug("matchOne loop");var l=e[h],g=t[o];if(this.debug(e,l,g),l===!1)return!1;if(l===j){this.debug("GLOBSTAR",[e,l,g]);var f=o,d=h+1;if(d===u){for(this.debug("** at the end");o<c;o++)if(t[o]==="."||t[o]===".."||!n.dot&&t[o].charAt(0)===".")return!1;return!0}for(;f<c;){var T=t[f];if(this.debug(` | ||
globstar while`,t,f,e,d,T),this.matchOne(t.slice(f),e.slice(d),s))return this.debug("globstar found match!",f,c,T),!0;if(T==="."||T===".."||!n.dot&&T.charAt(0)==="."){this.debug("dot detected!",t,f,e,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(s&&(this.debug(` | ||
>>> no match, partial?`,t,f,e,d),f===c))}let p;if(typeof l=="string"?(p=g===l,this.debug("string match",l,g,p)):(p=l.test(g),this.debug("pattern match",l,g,p)),!p)return!1}if(o===c&&h===u)return!0;if(o===c)return s;if(h===u)return o===c-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Bt(this.pattern,this.options)}parse(t){H(t);let e=this.options;if(t==="**")return j;if(t==="")return"";let s,n=null;(s=t.match(Me))?n=e.dot?Ae:Oe:(s=t.match(de))?n=(e.nocase?e.dot?xe:ye:e.dot?we:me)(s[1]):(s=t.match(Ne))?n=(e.nocase?e.dot?je:$e:e.dot?Ce:Re)(s):(s=t.match(ve))?n=e.dot?Ee:Se:(s=t.match(be))&&(n=Te);let r=P.fromGlob(t,this.options).toMMPattern();return n?Object.assign(r,{test:n}):r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?De:e.dot?Pe:ke,n=new Set(e.nocase?["i"]:[]),r=t.map(c=>{let u=c.map(l=>{if(l instanceof RegExp)for(let g of l.flags.split(""))n.add(g);return typeof l=="string"?_e(l):l===j?j:l._src});return u.forEach((l,g)=>{let f=u[g+1],d=u[g-1];l!==j||d===j||(d===void 0?f!==void 0&&f!==j?u[g+1]="(?:\\/|"+s+"\\/)?"+f:u[g]=s:f===void 0?u[g-1]=d+"(?:\\/|"+s+")?":f!==j&&(u[g-1]=d+"(?:\\/|\\/"+s+"\\/)"+f,u[g+1]=j))}),u.filter(l=>l!==j).join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...n].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;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let r=this.set;this.debug(this.pattern,"set",r);let o=n[n.length-1];if(!o)for(let h=n.length-2;!o&&h>=0;h--)o=n[h];for(let h=0;h<r.length;h++){let c=r[h],u=n;if(s.matchBase&&c.length===1&&(u=[o]),this.matchOne(u,c,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(t){return b.defaults(t).Minimatch}};b.AST=P;b.Minimatch=_;b.escape=at;b.unescape=L;async function*_t(i,t,e={}){let s=q.default.resolve(i),n=q.default.relative(e.cwd??process.cwd(),i);if((await ht.default.stat(s)).isDirectory()){for await(let o of qt(s,"",t,e))yield o;return}b(n,t,e)&&(yield e.absolute===!0?s:n)}async function*qt(i,t,e,s){for await(let n of await ht.default.opendir(q.default.join(i,t))){let r=q.default.join(t,n.name),o=q.default.join(i,t,n.name),h=b(r,e,s),c=n.isDirectory();c&&s.nodir===!0&&(h=!1),h&&(yield s.absolute===!0?o:r),c&&(yield*qt(i,r,e,s))}}return Yt(qe);})(); | ||
return ItGlob})); |
@@ -1,3 +0,3 @@ | ||
import type { IOptions } from 'minimatch'; | ||
export interface GlobOptions extends IOptions { | ||
import type { MinimatchOptions } from 'minimatch'; | ||
export interface GlobOptions extends MinimatchOptions { | ||
/** | ||
@@ -4,0 +4,0 @@ * The current working directory |
import fs from 'fs/promises'; | ||
import path from 'path'; | ||
import minimatch from 'minimatch'; | ||
import { minimatch } from 'minimatch'; | ||
/** | ||
@@ -5,0 +5,0 @@ * Async iterable filename pattern matcher |
{ | ||
"name": "it-glob", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Async iterable filename pattern matcher", | ||
@@ -134,3 +134,3 @@ "author": "Alex Potsides <alex@achingbrain.net>", | ||
"@types/minimatch": "^5.1.2", | ||
"minimatch": "^5.1.0" | ||
"minimatch": "^9.0.0" | ||
}, | ||
@@ -137,0 +137,0 @@ "devDependencies": { |
import fs from 'fs/promises' | ||
import path from 'path' | ||
import minimatch from 'minimatch' | ||
import type { IOptions } from 'minimatch' | ||
import { minimatch } from 'minimatch' | ||
import type { MinimatchOptions } from 'minimatch' | ||
export interface GlobOptions extends IOptions { | ||
export interface GlobOptions extends MinimatchOptions { | ||
/** | ||
@@ -8,0 +8,0 @@ * The current working directory |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34253
201
+ Addedminimatch@9.0.5(transitive)
- Removedminimatch@5.1.6(transitive)
Updatedminimatch@^9.0.0