UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

8 lines (7 loc) 106 kB
var Mo=Object.create;var fr=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var No=Object.getPrototypeOf,Po=Object.prototype.hasOwnProperty;var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),jo=(r,e)=>{for(var t in e)fr(r,t,{get:e[t],enumerable:!0})},Ut=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Io(e))!Po.call(r,i)&&i!==t&&fr(r,i,{get:()=>e[i],enumerable:!(n=To(e,i))||n.enumerable});return r};var Gt=(r,e,t)=>(t=r!=null?Mo(No(r)):{},Ut(e||!r||!r.__esModule?fr(t,"default",{value:r,enumerable:!0}):t,r)),Bo=r=>Ut(fr({},"__esModule",{value:!0}),r);var zt=w((cu,Nr)=>{var qo=Object.prototype.hasOwnProperty;function Vt(r){return"[Throws: "+(r?r.message:"?")+"]"}function Fo(r,e){if(qo.call(r,e))try{return r[e]}catch(t){return Vt(t)}return r[e]}function $t(r){var e=[];function t(n){if(n===null||typeof n!="object")return n;if(e.indexOf(n)!==-1)return"[Circular]";if(e.push(n),typeof n.toJSON=="function")try{var i=t(n.toJSON());return e.pop(),i}catch(a){return Vt(a)}if(Array.isArray(n)){var o=n.map(t);return e.pop(),o}var s=Object.keys(n).reduce(function(a,u){return a[u]=t(Fo(n,u)),a},{});return e.pop(),s}return t(r)}Nr.exports=function(r,e,t){return JSON.stringify($t(r),e,t)};Nr.exports.ensureProperties=$t});var Qt=w((fu,Wt)=>{var G=require("fs"),Qe=require("path");Wt.exports=hr;hr.ncp=hr;function hr(r,e,t,n){var i=n;n||(i=t,t={});var o=process.cwd(),s=Qe.resolve(o,r),a=Qe.resolve(o,e),u=t.filter,l=t.rename,c=t.transform,d=t.clobber!==!1,f=t.modified,h=t.dereference,g=null,m=0,O=0,v=0,S=t.limit||hr.limit||16;S=S<1?1:S>512?512:S,T(s);function T(y){if(m++,u){if(u instanceof RegExp){if(!u.test(y))return J(!0)}else if(typeof u=="function"&&!u(y))return J(!0)}return b(y)}function b(y){var E=h?G.stat:G.lstat;if(v>=S)return setImmediate(function(){b(y)});v++,E(y,function(R,L){var $={};if(R)return Q(R);if($.name=y,$.mode=L.mode,$.mtime=L.mtime,$.atime=L.atime,L.isDirectory())return V($);if(L.isFile())return C($);if(L.isSymbolicLink())return _(y)})}function C(y){var E=y.name.replace(s,a);l&&(E=l(E)),te(E,function(R){if(R)return ee(y,E);if(d&&W(E,function(){ee(y,E)}),f){var L=h?G.stat:G.lstat;L(E,function($,We){if(y.mtime.getTime()>We.mtime.getTime())ee(y,E);else return J()})}else return J()})}function ee(y,E){var R=G.createReadStream(y.name),L=G.createWriteStream(E,{mode:y.mode});R.on("error",Q),L.on("error",Q),c?c(R,L,y):L.on("open",function(){R.pipe(L)}),L.once("finish",function(){f&&G.utimesSync(E,y.atime,y.mtime),J()})}function W(y,E){G.unlink(y,function(R){return R?Q(R):E()})}function V(y){var E=y.name.replace(s,a);te(E,function(R){if(R)return M(y,E);ie(y.name)})}function M(y,E){G.mkdir(E,y.mode,function(R){if(R)return Q(R);ie(y.name)})}function ie(y){G.readdir(y,function(E,R){return E?Q(E):(R.forEach(function(L){T(Qe.join(y,L))}),J())})}function _(y){var E=y.replace(s,a);G.readlink(y,function(R,L){if(R)return Q(R);K(L,E)})}function K(y,E){h&&(y=Qe.resolve(o,y)),te(E,function(R){if(R)return re(y,E);G.readlink(E,function(L,$){return L?Q(L):(h&&($=Qe.resolve(o,$)),$===y?J():W(E,function(){re(y,E)}))})})}function re(y,E){G.symlink(y,E,function(R){return R?Q(R):J()})}function te(y,E){G.lstat(y,function(R){return R&&R.code==="ENOENT"?E(!0):E(!1)})}function Q(y){return t.stopOnError?i(y):(!g&&t.errs?g=G.createWriteStream(t.errs):g||(g=[]),typeof g.write>"u"?g.push(y):g.write(y.stack+` `),J())}function J(y){if(y||v--,O++,m===O&&v===0&&i!==void 0)return i(g||null)}}});var Yt=w((hu,Jt)=>{Jt.exports=function(r,e){for(var t=[],n=0;n<r.length;n++){var i=e(r[n],n);Uo(i)?t.push.apply(t,i):t.push(i)}return t};var Uo=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}});var en=w((du,Zt)=>{"use strict";Zt.exports=Ht;function Ht(r,e,t){r instanceof RegExp&&(r=Xt(r,t)),e instanceof RegExp&&(e=Xt(e,t));var n=Kt(r,e,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+r.length,n[1]),post:t.slice(n[1]+e.length)}}function Xt(r,e){var t=e.match(r);return t?t[0]:null}Ht.range=Kt;function Kt(r,e,t){var n,i,o,s,a,u=t.indexOf(r),l=t.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(r===e)return[u,l];for(n=[],o=t.length;c>=0&&!a;)c==u?(n.push(c),u=t.indexOf(r,c+1)):n.length==1?a=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,s=l),l=t.indexOf(e,c+1)),c=u<l&&u>=0?u:l;n.length&&(a=[o,s])}return a}});var ln=w((gu,un)=>{var Go=Yt(),rn=en();un.exports=zo;var tn="\0SLASH"+Math.random()+"\0",nn="\0OPEN"+Math.random()+"\0",jr="\0CLOSE"+Math.random()+"\0",on="\0COMMA"+Math.random()+"\0",sn="\0PERIOD"+Math.random()+"\0";function Pr(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function Vo(r){return r.split("\\\\").join(tn).split("\\{").join(nn).split("\\}").join(jr).split("\\,").join(on).split("\\.").join(sn)}function $o(r){return r.split(tn).join("\\").split(nn).join("{").split(jr).join("}").split(on).join(",").split(sn).join(".")}function an(r){if(!r)return[""];var e=[],t=rn("{","}",r);if(!t)return r.split(",");var n=t.pre,i=t.body,o=t.post,s=n.split(",");s[s.length-1]+="{"+i+"}";var a=an(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function zo(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),Re(Vo(r),!0).map($o)):[]}function Wo(r){return"{"+r+"}"}function Qo(r){return/^-?0\d/.test(r)}function Jo(r,e){return r<=e}function Yo(r,e){return r>=e}function Re(r,e){var t=[],n=rn("{","}",r);if(!n||/\$$/.test(n.pre))return[r];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),s=i||o,a=n.body.indexOf(",")>=0;if(!s&&!a)return n.post.match(/,.*\}/)?(r=n.pre+"{"+n.body+jr+n.post,Re(r)):[r];var u;if(s)u=n.body.split(/\.\./);else if(u=an(n.body),u.length===1&&(u=Re(u[0],!1).map(Wo),u.length===1)){var c=n.post.length?Re(n.post,!1):[""];return c.map(function(_){return n.pre+u[0]+_})}var l=n.pre,c=n.post.length?Re(n.post,!1):[""],d;if(s){var f=Pr(u[0]),h=Pr(u[1]),g=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(Pr(u[2])):1,O=Jo,v=h<f;v&&(m*=-1,O=Yo);var S=u.some(Qo);d=[];for(var T=f;O(T,h);T+=m){var b;if(o)b=String.fromCharCode(T),b==="\\"&&(b="");else if(b=String(T),S){var C=g-b.length;if(C>0){var ee=new Array(C+1).join("0");T<0?b="-"+ee+b.slice(1):b=ee+b}}d.push(b)}}else d=Go(u,function(ie){return Re(ie,!1)});for(var W=0;W<d.length;W++)for(var V=0;V<c.length;V++){var M=l+d[W]+c[V];(!e||s||M)&&t.push(M)}return t}});var pr=w((pu,gn)=>{gn.exports=Y;Y.Minimatch=P;var Je=function(){try{return require("path")}catch{}}()||{sep:"/"};Y.sep=Je.sep;var Fr=Y.GLOBSTAR=P.GLOBSTAR={},Xo=ln(),cn={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Br="[^/]",qr=Br+"*?",Ho="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ko="(?:(?!(?:\\/|^)\\.).)*?",fn=Zo("().*{}+?[]^$\\!");function Zo(r){return r.split("").reduce(function(e,t){return e[t]=!0,e},{})}var hn=/\/+/;Y.filter=es;function es(r,e){return e=e||{},function(t,n,i){return Y(t,r,e)}}function he(r,e){e=e||{};var t={};return Object.keys(r).forEach(function(n){t[n]=r[n]}),Object.keys(e).forEach(function(n){t[n]=e[n]}),t}Y.defaults=function(r){if(!r||typeof r!="object"||!Object.keys(r).length)return Y;var e=Y,t=function(i,o,s){return e(i,o,he(r,s))};return t.Minimatch=function(i,o){return new e.Minimatch(i,he(r,o))},t.Minimatch.defaults=function(i){return e.defaults(he(r,i)).Minimatch},t.filter=function(i,o){return e.filter(i,he(r,o))},t.defaults=function(i){return e.defaults(he(r,i))},t.makeRe=function(i,o){return e.makeRe(i,he(r,o))},t.braceExpand=function(i,o){return e.braceExpand(i,he(r,o))},t.match=function(n,i,o){return e.match(n,i,he(r,o))},t};P.defaults=function(r){return Y.defaults(r).Minimatch};function Y(r,e,t){return gr(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new P(e,t).match(r)}function P(r,e){if(!(this instanceof P))return new P(r,e);gr(r),e||(e={}),r=r.trim(),!e.allowWindowsEscape&&Je.sep!=="/"&&(r=r.split(Je.sep).join("/")),this.options=e,this.set=[],this.pattern=r,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}P.prototype.debug=function(){};P.prototype.make=rs;function rs(){var r=this.pattern,e=this.options;if(!e.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(n){return n.split(hn)}),this.debug(this.pattern,t),t=t.map(function(n,i,o){return n.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}P.prototype.parseNegate=ts;function ts(){var r=this.pattern,e=!1,t=this.options,n=0;if(!t.nonegate){for(var i=0,o=r.length;i<o&&r.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=r.substr(n)),this.negate=e}}Y.braceExpand=function(r,e){return dn(r,e)};P.prototype.braceExpand=dn;function dn(r,e){return e||(this instanceof P?e=this.options:e={}),r=typeof r>"u"?this.pattern:r,gr(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:Xo(r)}var ns=1024*64,gr=function(r){if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>ns)throw new TypeError("pattern is too long")};P.prototype.parse=is;var dr={};function is(r,e){gr(r);var t=this.options;if(r==="**")if(t.noglobstar)r="*";else return Fr;if(r==="")return"";var n="",i=!!t.nocase,o=!1,s=[],a=[],u,l=!1,c=-1,d=-1,f=r.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",h=this;function g(){if(u){switch(u){case"*":n+=qr,i=!0;break;case"?":n+=Br,i=!0;break;default:n+="\\"+u;break}h.debug("clearStateChar %j %j",u,n),u=!1}}for(var m=0,O=r.length,v;m<O&&(v=r.charAt(m));m++){if(this.debug("%s %s %s %j",r,m,n,v),o&&fn[v]){n+="\\"+v,o=!1;continue}switch(v){case"/":return!1;case"\\":g(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",r,m,n,v),l){this.debug(" in class"),v==="!"&&m===d+1&&(v="^"),n+=v;continue}h.debug("call clearStateChar %j",u),g(),u=v,t.noext&&g();continue;case"(":if(l){n+="(";continue}if(!u){n+="\\(";continue}s.push({type:u,start:m-1,reStart:n.length,open:cn[u].open,close:cn[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!s.length){n+="\\)";continue}g(),i=!0;var S=s.pop();n+=S.close,S.type==="!"&&a.push(S),S.reEnd=n.length;continue;case"|":if(l||!s.length||o){n+="\\|",o=!1;continue}g(),n+="|";continue;case"[":if(g(),l){n+="\\"+v;continue}l=!0,d=m,c=n.length,n+=v;continue;case"]":if(m===d+1||!l){n+="\\"+v,o=!1;continue}var T=r.substring(d+1,m);try{RegExp("["+T+"]")}catch{var b=this.parse(T,dr);n=n.substr(0,c)+"\\["+b[0]+"\\]",i=i||b[1],l=!1;continue}i=!0,l=!1,n+=v;continue;default:g(),o?o=!1:fn[v]&&!(v==="^"&&l)&&(n+="\\"),n+=v}}for(l&&(T=r.substr(d+1),b=this.parse(T,dr),n=n.substr(0,c)+"\\["+b[0],i=i||b[1]),S=s.pop();S;S=s.pop()){var C=n.slice(S.reStart+S.open.length);this.debug("setting tail",n,S),C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(L,$,We){return We||(We="\\"),$+$+We+"|"}),this.debug(`tail=%j %s`,C,C,S,n);var ee=S.type==="*"?qr:S.type==="?"?Br:"\\"+S.type;i=!0,n=n.slice(0,S.reStart)+ee+"\\("+C}g(),o&&(n+="\\\\");var W=!1;switch(n.charAt(0)){case"[":case".":case"(":W=!0}for(var V=a.length-1;V>-1;V--){var M=a[V],ie=n.slice(0,M.reStart),_=n.slice(M.reStart,M.reEnd-8),K=n.slice(M.reEnd-8,M.reEnd),re=n.slice(M.reEnd);K+=re;var te=ie.split("(").length-1,Q=re;for(m=0;m<te;m++)Q=Q.replace(/\)[+*?]?/,"");re=Q;var J="";re===""&&e!==dr&&(J="$");var y=ie+_+re+J+K;n=y}if(n!==""&&i&&(n="(?=.)"+n),W&&(n=f+n),e===dr)return[n,i];if(!i)return ss(r);var E=t.nocase?"i":"";try{var R=new RegExp("^"+n+"$",E)}catch{return new RegExp("$.")}return R._glob=r,R._src=n,R}Y.makeRe=function(r,e){return new P(r,e||{}).makeRe()};P.prototype.makeRe=os;function os(){if(this.regexp||this.regexp===!1)return this.regexp;var r=this.set;if(!r.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?qr:e.dot?Ho:Ko,n=e.nocase?"i":"",i=r.map(function(o){return o.map(function(s){return s===Fr?t:typeof s=="string"?as(s):s._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}Y.match=function(r,e,t){t=t||{};var n=new P(e,t);return r=r.filter(function(i){return n.match(i)}),n.options.nonull&&!r.length&&r.push(e),r};P.prototype.match=function(e,t){if(typeof t>"u"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var n=this.options;Je.sep!=="/"&&(e=e.split(Je.sep).join("/")),e=e.split(hn),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var o,s;for(s=e.length-1;s>=0&&(o=e[s],!o);s--);for(s=0;s<i.length;s++){var a=i[s],u=e;n.matchBase&&a.length===1&&(u=[o]);var l=this.matchOne(u,a,t);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};P.prototype.matchOne=function(r,e,t){var n=this.options;this.debug("matchOne",{this:this,file:r,pattern:e}),this.debug("matchOne",r.length,e.length);for(var i=0,o=0,s=r.length,a=e.length;i<s&&o<a;i++,o++){this.debug("matchOne loop");var u=e[o],l=r[i];if(this.debug(e,u,l),u===!1)return!1;if(u===Fr){this.debug("GLOBSTAR",[e,u,l]);var c=i,d=o+1;if(d===a){for(this.debug("** at the end");i<s;i++)if(r[i]==="."||r[i]===".."||!n.dot&&r[i].charAt(0)===".")return!1;return!0}for(;c<s;){var f=r[c];if(this.debug(` globstar while`,r,c,e,d,f),this.matchOne(r.slice(c),e.slice(d),t))return this.debug("globstar found match!",c,s,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",r,c,e,d);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(t&&(this.debug(` >>> no match, partial?`,r,c,e,d),c===s))}var h;if(typeof u=="string"?(h=l===u,this.debug("string match",u,l,h)):(h=l.match(u),this.debug("pattern match",u,l,h)),!h)return!1}if(i===s&&o===a)return!0;if(i===s)return t;if(o===a)return i===s-1&&r[i]==="";throw new Error("wtf?")};function ss(r){return r.replace(/\\(.)/g,"$1")}function as(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var pn=w((mu,Ur)=>{typeof Object.create=="function"?Ur.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ur.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var mn=w((vu,Vr)=>{try{if(Gr=require("util"),typeof Gr.inherits!="function")throw"";Vr.exports=Gr.inherits}catch{Vr.exports=pn()}var Gr});var vr=w((yu,mr)=>{"use strict";function vn(r){return r.charAt(0)==="/"}function yn(r){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,t=e.exec(r),n=t[1]||"",i=!!(n&&n.charAt(1)!==":");return!!(t[2]||i)}mr.exports=process.platform==="win32"?yn:vn;mr.exports.posix=vn;mr.exports.win32=yn});var Wr=w(oe=>{oe.alphasort=_n;oe.alphasorti=wn;oe.setopts=hs;oe.ownProp=Sn;oe.makeAbs=zr;oe.finish=ds;oe.mark=gs;oe.isIgnored=bn;oe.childrenIgnored=ps;function Sn(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Ce=require("path"),us=pr(),ls=vr(),$r=us.Minimatch;function wn(r,e){return r.toLowerCase().localeCompare(e.toLowerCase())}function _n(r,e){return r.localeCompare(e)}function cs(r,e){r.ignore=e.ignore||[],Array.isArray(r.ignore)||(r.ignore=[r.ignore]),r.ignore.length&&(r.ignore=r.ignore.map(fs))}function fs(r){var e=null;if(r.slice(-3)==="/**"){var t=r.replace(/(\/\*\*)+$/,"");e=new $r(t,{dot:!0})}return{matcher:new $r(r,{dot:!0}),gmatcher:e}}function hs(r,e,t){if(t||(t={}),t.matchBase&&e.indexOf("/")===-1){if(t.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}r.silent=!!t.silent,r.pattern=e,r.strict=t.strict!==!1,r.realpath=!!t.realpath,r.realpathCache=t.realpathCache||Object.create(null),r.follow=!!t.follow,r.dot=!!t.dot,r.mark=!!t.mark,r.nodir=!!t.nodir,r.nodir&&(r.mark=!0),r.sync=!!t.sync,r.nounique=!!t.nounique,r.nonull=!!t.nonull,r.nosort=!!t.nosort,r.nocase=!!t.nocase,r.stat=!!t.stat,r.noprocess=!!t.noprocess,r.maxLength=t.maxLength||1/0,r.cache=t.cache||Object.create(null),r.statCache=t.statCache||Object.create(null),r.symlinks=t.symlinks||Object.create(null),cs(r,t),r.changedCwd=!1;var n=process.cwd();Sn(t,"cwd")?(r.cwd=t.cwd,r.changedCwd=Ce.resolve(t.cwd)!==n):r.cwd=n,r.root=t.root||Ce.resolve(r.cwd,"/"),r.root=Ce.resolve(r.root),process.platform==="win32"&&(r.root=r.root.replace(/\\/g,"/")),r.nomount=!!t.nomount,t.nonegate=!0,t.nocomment=!0,r.minimatch=new $r(e,t),r.options=r.minimatch.options}function ds(r){for(var e=r.nounique,t=e?[]:Object.create(null),n=0,i=r.matches.length;n<i;n++){var o=r.matches[n];if(!o||Object.keys(o).length===0){if(r.nonull){var s=r.minimatch.globSet[n];e?t.push(s):t[s]=!0}}else{var a=Object.keys(o);e?t.push.apply(t,a):a.forEach(function(u){t[u]=!0})}}if(e||(t=Object.keys(t)),r.nosort||(t=t.sort(r.nocase?wn:_n)),r.mark){for(var n=0;n<t.length;n++)t[n]=r._mark(t[n]);r.nodir&&(t=t.filter(function(u){return!/\/$/.test(u)}))}r.ignore.length&&(t=t.filter(function(u){return!bn(r,u)})),r.found=t}function gs(r,e){var t=zr(r,e),n=r.cache[t],i=e;if(n){var o=n==="DIR"||Array.isArray(n),s=e.slice(-1)==="/";if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=zr(r,i);r.statCache[a]=r.statCache[t],r.cache[a]=r.cache[t]}}return i}function zr(r,e){var t=e;return e.charAt(0)==="/"?t=Ce.join(r.root,e):ls(e)||e===""?t=e:r.changedCwd?t=Ce.resolve(r.cwd,e):t=Ce.resolve(e),t}function bn(r,e){return r.ignore.length?r.ignore.some(function(t){return t.matcher.match(e)||!!(t.gmatcher&&t.gmatcher.match(e))}):!1}function ps(r,e){return r.ignore.length?r.ignore.some(function(t){return!!(t.gmatcher&&t.gmatcher.match(e))}):!1}});var kn=w((Cu,An)=>{An.exports=Cn;Cn.GlobSync=N;var Ye=require("fs"),En=pr(),wu=En.Minimatch,_u=Yr().Glob,bu=require("util"),Qr=require("path"),Rn=require("assert"),yr=vr(),de=Wr(),Eu=de.alphasort,Ru=de.alphasorti,ms=de.setopts,Jr=de.ownProp,vs=de.childrenIgnored;function Cn(r,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob See: https://github.com/isaacs/node-glob/issues/167`);return new N(r,e).found}function N(r,e){if(!r)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof N))return new N(r,e);if(ms(this,r,e),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var n=0;n<t;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}N.prototype._finish=function(){if(Rn(this instanceof N),this.realpath){var r=this;this.matches.forEach(function(e,t){var n=r.matches[t]=Object.create(null);for(var i in e)try{i=r._makeAbs(i);var o=Ye.realpathSync(i,r.realpathCache);n[o]=!0}catch(s){if(s.syscall==="stat")n[r._makeAbs(i)]=!0;else throw s}})}de.finish(this)};N.prototype._process=function(r,e,t){Rn(this instanceof N);for(var n=0;typeof r[n]=="string";)n++;var i;switch(n){case r.length:this._processSimple(r.join("/"),e);return;case 0:i=null;break;default:i=r.slice(0,n).join("/");break}var o=r.slice(n),s;i===null?s=".":((yr(i)||yr(r.join("/")))&&(!i||!yr(i))&&(i="/"+i),s=i);var a=this._makeAbs(s);if(!vs(this,s)){var u=o[0]===En.GLOBSTAR;u?this._processGlobStar(i,s,a,o,e,t):this._processReaddir(i,s,a,o,e,t)}};N.prototype._processReaddir=function(r,e,t,n,i,o){var s=this._readdir(t,o);if(s){for(var a=n[0],u=!!this.minimatch.negate,l=a._glob,c=this.dot||l.charAt(0)===".",d=[],f=0;f<s.length;f++){var h=s[f];if(h.charAt(0)!=="."||c){var g;u&&!r?g=!h.match(a):g=h.match(a),g&&d.push(h)}}var m=d.length;if(m!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var f=0;f<m;f++){var h=d[f];r&&(r.slice(-1)!=="/"?h=r+"/"+h:h=r+h),h.charAt(0)==="/"&&!this.nomount&&(h=Qr.join(this.root,h)),this.matches[i][h]=!0}return}n.shift();for(var f=0;f<m;f++){var h=d[f],O;r?O=[r,h]:O=[h],this._process(O.concat(n),i,o)}}}};N.prototype._emitMatch=function(r,e){var t=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),!this.matches[r][e]){if(this.nodir){var n=this.cache[this._makeAbs(e)];if(n==="DIR"||Array.isArray(n))return}this.matches[r][e]=!0,this.stat&&this._stat(e)}};N.prototype._readdirInGlobStar=function(r){if(this.follow)return this._readdir(r,!1);var e,t,n;try{t=Ye.lstatSync(r)}catch{return null}var i=t.isSymbolicLink();return this.symlinks[r]=i,!i&&!t.isDirectory()?this.cache[r]="FILE":e=this._readdir(r,!1),e};N.prototype._readdir=function(r,e){var t;if(e&&!Jr(this.symlinks,r))return this._readdirInGlobStar(r);if(Jr(this.cache,r)){var n=this.cache[r];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(r,Ye.readdirSync(r))}catch(i){return this._readdirError(r,i),null}};N.prototype._readdirEntries=function(r,e){if(!this.mark&&!this.stat)for(var t=0;t<e.length;t++){var n=e[t];r==="/"?n=r+n:n=r+"/"+n,this.cache[n]=!0}return this.cache[r]=e,e};N.prototype._readdirError=function(r,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":this.cache[this._makeAbs(r)]="FILE";break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=!1;break;default:if(this.cache[this._makeAbs(r)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};N.prototype._processGlobStar=function(r,e,t,n,i,o){var s=this._readdir(t,o);if(s){var a=n.slice(1),u=r?[r]:[],l=u.concat(a);this._process(l,i,!1);var c=s.length,d=this.symlinks[t];if(!(d&&o))for(var f=0;f<c;f++){var h=s[f];if(!(h.charAt(0)==="."&&!this.dot)){var g=u.concat(s[f],a);this._process(g,i,!0);var m=u.concat(s[f],n);this._process(m,i,!0)}}}};N.prototype._processSimple=function(r,e){var t=this._stat(r);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!t){if(r&&yr(r)&&!this.nomount){var n=/[\/\\]$/.test(r);r.charAt(0)==="/"?r=Qr.join(this.root,r):(r=Qr.resolve(this.root,r),n&&(r+="/"))}process.platform==="win32"&&(r=r.replace(/\\/g,"/")),this.matches[e][r]=!0}};N.prototype._stat=function(r){var e=this._makeAbs(r),t=r.slice(-1)==="/";if(r.length>this.maxLength)return!1;if(!this.stat&&Jr(this.cache,e)){var s=this.cache[e];if(Array.isArray(s)&&(s="DIR"),!t||s==="DIR")return s;if(t&&s==="FILE")return!1}var n,i=this.statCache[e];if(!i){var o;try{o=Ye.lstatSync(e)}catch{return!1}if(o.isSymbolicLink())try{i=Ye.statSync(e)}catch{i=o}else i=o}this.statCache[e]=i;var s=i.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||s,t&&s!=="DIR"?!1:s};N.prototype._mark=function(r){return de.mark(this,r)};N.prototype._makeAbs=function(r){return de.makeAbs(this,r)}});var Xr=w((Au,Dn)=>{Dn.exports=On;function On(r,e){if(r&&e)return On(r)(e);if(typeof r!="function")throw new TypeError("need wrapper function");return Object.keys(r).forEach(function(n){t[n]=r[n]}),t;function t(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var o=r.apply(this,n),s=n[n.length-1];return typeof o=="function"&&o!==s&&Object.keys(s).forEach(function(a){o[a]=s[a]}),o}}});var Kr=w((ku,Hr)=>{var xn=Xr();Hr.exports=xn(Sr);Hr.exports.strict=xn(Ln);Sr.proto=Sr(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Sr(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ln(this)},configurable:!0})});function Sr(r){var e=function(){return e.called?e.value:(e.called=!0,e.value=r.apply(this,arguments))};return e.called=!1,e}function Ln(r){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=r.apply(this,arguments)},t=r.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}});var Tn=w((Ou,Mn)=>{var ys=Xr(),Xe=Object.create(null),Ss=Kr();Mn.exports=ys(ws);function ws(r,e){return Xe[r]?(Xe[r].push(e),null):(Xe[r]=[e],_s(r))}function _s(r){return Ss(function e(){var t=Xe[r],n=t.length,i=bs(arguments);try{for(var o=0;o<n;o++)t[o].apply(null,i)}finally{t.length>n?(t.splice(0,n),process.nextTick(function(){e.apply(null,i)})):delete Xe[r]}})}function bs(r){for(var e=r.length,t=[],n=0;n<e;n++)t[n]=r[n];return t}});var Yr=w((Tu,Nn)=>{Nn.exports=ve;var He=require("fs"),In=pr(),Du=In.Minimatch,Es=mn(),Rs=require("events").EventEmitter,Zr=require("path"),et=require("assert"),wr=vr(),tt=kn(),ae=Wr(),xu=ae.alphasort,Lu=ae.alphasorti,Cs=ae.setopts,rt=ae.ownProp,nt=Tn(),Mu=require("util"),As=ae.childrenIgnored,ks=ae.isIgnored,Os=Kr();function ve(r,e,t){if(typeof e=="function"&&(t=e,e={}),e||(e={}),e.sync){if(t)throw new TypeError("callback provided to sync glob");return tt(r,e)}return new k(r,e,t)}ve.sync=tt;var Ds=ve.GlobSync=tt.GlobSync;ve.glob=ve;function xs(r,e){if(e===null||typeof e!="object")return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}ve.hasMagic=function(r,e){var t=xs({},e);t.noprocess=!0;var n=new k(r,t),i=n.minimatch.set;if(i.length>1)return!0;for(var o=0;o<i[0].length;o++)if(typeof i[0][o]!="string")return!0;return!1};ve.Glob=k;Es(k,Rs);function k(r,e,t){if(typeof e=="function"&&(t=e,e=null),e&&e.sync){if(t)throw new TypeError("callback provided to sync glob");return new Ds(r,e)}if(!(this instanceof k))return new k(r,e,t);Cs(this,r,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof t=="function"&&(t=Os(t),this.on("error",t),this.on("end",function(a){t(null,a)}));var n=this,i=this.minimatch.set.length;if(this._processing=0,this.matches=new Array(i),this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return s();for(var o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--n._processing,n._processing<=0&&n._finish()}}k.prototype._finish=function(){if(et(this instanceof k),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();ae.finish(this),this.emit("end",this.found)}};k.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var r=this.matches.length;if(r===0)return this._finish();for(var e=this,t=0;t<this.matches.length;t++)this._realpathSet(t,n);function n(){--r===0&&e._finish()}};k.prototype._realpathSet=function(r,e){var t=this.matches[r];if(!t)return e();var n=Object.keys(t),i=this,o=n.length;if(o===0)return e();var s=this.matches[r]=Object.create(null);n.forEach(function(a,u){a=i._makeAbs(a),He.realpath(a,i.realpathCache,function(l,c){l?l.syscall==="stat"?s[a]=!0:i.emit("error",l):s[c]=!0,--o===0&&(i.matches[r]=s,e())})})};k.prototype._mark=function(r){return ae.mark(this,r)};k.prototype._makeAbs=function(r){return ae.makeAbs(this,r)};k.prototype.abort=function(){this.aborted=!0,this.emit("abort")};k.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};k.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var r=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<r.length;e++){var t=r[e];this._emitMatch(t[0],t[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};k.prototype._process=function(r,e,t,n){if(et(this instanceof k),et(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([r,e,t,n]);return}for(var i=0;typeof r[i]=="string";)i++;var o;switch(i){case r.length:this._processSimple(r.join("/"),e,n);return;case 0:o=null;break;default:o=r.slice(0,i).join("/");break}var s=r.slice(i),a;o===null?a=".":((wr(o)||wr(r.join("/")))&&(!o||!wr(o))&&(o="/"+o),a=o);var u=this._makeAbs(a);if(As(this,a))return n();var l=s[0]===In.GLOBSTAR;l?this._processGlobStar(o,a,u,s,e,t,n):this._processReaddir(o,a,u,s,e,t,n)}};k.prototype._processReaddir=function(r,e,t,n,i,o,s){var a=this;this._readdir(t,o,function(u,l){return a._processReaddir2(r,e,t,n,i,o,l,s)})};k.prototype._processReaddir2=function(r,e,t,n,i,o,s,a){if(!s)return a();for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,d=this.dot||c.charAt(0)===".",f=[],h=0;h<s.length;h++){var g=s[h];if(g.charAt(0)!=="."||d){var m;l&&!r?m=!g.match(u):m=g.match(u),m&&f.push(g)}}var O=f.length;if(O===0)return a();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var h=0;h<O;h++){var g=f[h];r&&(r!=="/"?g=r+"/"+g:g=r+g),g.charAt(0)==="/"&&!this.nomount&&(g=Zr.join(this.root,g)),this._emitMatch(i,g)}return a()}n.shift();for(var h=0;h<O;h++){var g=f[h],v;r&&(r!=="/"?g=r+"/"+g:g=r+g),this._process([g].concat(n),i,o,a)}a()};k.prototype._emitMatch=function(r,e){if(!this.aborted&&!this.matches[r][e]&&!ks(this,e)){if(this.paused){this._emitQueue.push([r,e]);return}var t=this._makeAbs(e);if(this.nodir){var n=this.cache[t];if(n==="DIR"||Array.isArray(n))return}this.mark&&(e=this._mark(e)),this.matches[r][e]=!0;var i=this.statCache[t];i&&this.emit("stat",e,i),this.emit("match",e)}};k.prototype._readdirInGlobStar=function(r,e){if(this.aborted)return;if(this.follow)return this._readdir(r,!1,e);var t="lstat\0"+r,n=this,i=nt(t,o);i&&He.lstat(r,i);function o(s,a){if(s)return e();var u=a.isSymbolicLink();n.symlinks[r]=u,!u&&!a.isDirectory()?(n.cache[r]="FILE",e()):n._readdir(r,!1,e)}};k.prototype._readdir=function(r,e,t){if(!this.aborted&&(t=nt("readdir\0"+r+"\0"+e,t),!!t)){if(e&&!rt(this.symlinks,r))return this._readdirInGlobStar(r,t);if(rt(this.cache,r)){var n=this.cache[r];if(!n||n==="FILE")return t();if(Array.isArray(n))return t(null,n)}var i=this;He.readdir(r,Ls(this,r,t))}};function Ls(r,e,t){return function(n,i){n?r._readdirError(e,n,t):r._readdirEntries(e,i,t)}}k.prototype._readdirEntries=function(r,e,t){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];r==="/"?i=r+i:i=r+"/"+i,this.cache[i]=!0}return this.cache[r]=e,t(null,e)}};k.prototype._readdirError=function(r,e,t){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":this.cache[this._makeAbs(r)]="FILE";break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=!1;break;default:this.cache[this._makeAbs(r)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return t()}};k.prototype._processGlobStar=function(r,e,t,n,i,o,s){var a=this;this._readdir(t,o,function(u,l){a._processGlobStar2(r,e,t,n,i,o,l,s)})};k.prototype._processGlobStar2=function(r,e,t,n,i,o,s,a){if(!s)return a();var u=n.slice(1),l=r?[r]:[],c=l.concat(u);this._process(c,i,!1,a);var d=this.symlinks[t],f=s.length;if(d&&o)return a();for(var h=0;h<f;h++){var g=s[h];if(!(g.charAt(0)==="."&&!this.dot)){var m=l.concat(s[h],u);this._process(m,i,!0,a);var O=l.concat(s[h],n);this._process(O,i,!0,a)}}a()};k.prototype._processSimple=function(r,e,t){var n=this;this._stat(r,function(i,o){n._processSimple2(r,e,i,o,t)})};k.prototype._processSimple2=function(r,e,t,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(r&&wr(r)&&!this.nomount){var o=/[\/\\]$/.test(r);r.charAt(0)==="/"?r=Zr.join(this.root,r):(r=Zr.resolve(this.root,r),o&&(r+="/"))}process.platform==="win32"&&(r=r.replace(/\\/g,"/")),this._emitMatch(e,r),i()};k.prototype._stat=function(r,e){var t=this._makeAbs(r),n=r.slice(-1)==="/";if(r.length>this.maxLength)return e();if(!this.stat&&rt(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return e(null,i);if(n&&i==="FILE")return e()}var o,s=this.statCache[t];if(s!==void 0){if(s===!1)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return n&&a==="FILE"?e():e(null,a,s)}var u=this,l=nt("stat\0"+t,c);l&&He.lstat(t,l);function c(d,f){if(f&&f.isSymbolicLink())return He.stat(t,function(h,g){h?u._stat2(r,t,null,f,e):u._stat2(r,t,h,g,e)});u._stat2(r,t,d,f,e)}};k.prototype._stat2=function(r,e,t,n,i){if(t)return this.statCache[e]=!1,i();var o=r.slice(-1)==="/";if(this.statCache[e]=n,e.slice(-1)==="/"&&!n.isDirectory())return i(null,!1,n);var s=n.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||s,o&&s!=="DIR"?i():i(null,s,n)}});var Un=w((Iu,Fn)=>{Fn.exports=at;at.sync=qn;var A=require("assert"),Pn=require("path"),Er=require("fs"),Rr=Yr(),jn={nosort:!0,nocomment:!0,nonegate:!0,silent:!0},it=0,st=process.platform==="win32";function Bn(r){var e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(function(t){r[t]=r[t]||Er[t],t=t+"Sync",r[t]=r[t]||Er[t]}),r.maxBusyTries=r.maxBusyTries||3,r.emfileWait=r.emfileWait||1e3,r.disableGlob=r.disableGlob||!1}function at(r,e,t){typeof e=="function"&&(t=e,e={}),A(r,"rimraf: missing path"),A.equal(typeof r,"string","rimraf: path should be a string"),A(e,"rimraf: missing options"),A.equal(typeof e,"object","rimraf: options should be object"),A.equal(typeof t,"function","rimraf: callback function required"),Bn(e);var n=0,i=null,o=0;if(e.disableGlob||!Rr.hasMagic(r))return a(null,[r]);Er.lstat(r,function(u,l){if(!u)return a(null,[r]);Rr(r,jn,a)});function s(u){i=i||u,--o===0&&t(i)}function a(u,l){if(u)return t(u);if(o=l.length,o===0)return t();l.forEach(function(c){ot(c,e,function d(f){if(f){if(st&&(f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<e.maxBusyTries){n++;var h=n*100;return setTimeout(function(){ot(c,e,d)},h)}if(f.code==="EMFILE"&&it<e.emfileWait)return setTimeout(function(){ot(c,e,d)},it++);f.code==="ENOENT"&&(f=null)}it=0,s(f)})})}}function ot(r,e,t){A(r),A(e),A(typeof t=="function"),e.lstat(r,function(n,i){if(n&&n.code==="ENOENT")return t(null);if(i&&i.isDirectory())return _r(r,e,n,t);e.unlink(r,function(o){if(o){if(o.code==="ENOENT")return t(null);if(o.code==="EPERM")return st?Ms(r,e,o,t):_r(r,e,o,t);if(o.code==="EISDIR")return _r(r,e,o,t)}return t(o)})})}function Ms(r,e,t,n){A(r),A(e),A(typeof n=="function"),t&&A(t instanceof Error),e.chmod(r,666,function(i){i?n(i.code==="ENOENT"?null:t):e.stat(r,function(o,s){o?n(o.code==="ENOENT"?null:t):s.isDirectory()?_r(r,e,t,n):e.unlink(r,n)})})}function Ts(r,e,t){A(r),A(e),t&&A(t instanceof Error);try{e.chmodSync(r,666)}catch(i){if(i.code==="ENOENT")return;throw t}try{var n=e.statSync(r)}catch(i){if(i.code==="ENOENT")return;throw t}n.isDirectory()?br(r,e,t):e.unlinkSync(r)}function _r(r,e,t,n){A(r),A(e),t&&A(t instanceof Error),A(typeof n=="function"),e.rmdir(r,function(i){i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?Is(r,e,n):i&&i.code==="ENOTDIR"?n(t):n(i)})}function Is(r,e,t){A(r),A(e),A(typeof t=="function"),e.readdir(r,function(n,i){if(n)return t(n);var o=i.length;if(o===0)return e.rmdir(r,t);var s;i.forEach(function(a){at(Pn.join(r,a),e,function(u){if(!s){if(u)return t(s=u);--o===0&&e.rmdir(r,t)}})})})}function qn(r,e){e=e||{},Bn(e),A(r,"rimraf: missing path"),A.equal(typeof r,"string","rimraf: path should be a string"),A(e,"rimraf: missing options"),A.equal(typeof e,"object","rimraf: options should be object");var t;if(e.disableGlob||!Rr.hasMagic(r))t=[r];else try{Er.lstatSync(r),t=[r]}catch{t=Rr.sync(r,jn)}if(t.length)for(var n=0;n<t.length;n++){var r=t[n];try{var i=e.lstatSync(r)}catch(s){if(s.code==="ENOENT")return}try{i&&i.isDirectory()?br(r,e,null):e.unlinkSync(r)}catch(s){if(s.code==="ENOENT")return;if(s.code==="EPERM")return st?Ts(r,e,s):br(r,e,s);if(s.code!=="EISDIR")throw s;br(r,e,s)}}}function br(r,e,t){A(r),A(e),t&&A(t instanceof Error);try{e.rmdirSync(r)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw t;(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")&&Ns(r,e)}}function Ns(r,e){A(r),A(e),e.readdirSync(r).forEach(function(t){qn(Pn.join(r,t),e)}),e.rmdirSync(r,e)}});var zn=w((Nu,$n)=>{var Ke=require("path"),Gn=require("fs"),Vn=parseInt("0777",8);$n.exports=Ae.mkdirp=Ae.mkdirP=Ae;function Ae(r,e,t,n){typeof e=="function"?(t=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var i=e.mode,o=e.fs||Gn;i===void 0&&(i=Vn),n||(n=null);var s=t||function(){};r=Ke.resolve(r),o.mkdir(r,i,function(a){if(!a)return n=n||r,s(null,n);switch(a.code){case"ENOENT":if(Ke.dirname(r)===r)return s(a);Ae(Ke.dirname(r),e,function(u,l){u?s(u,l):Ae(r,e,s,l)});break;default:o.stat(r,function(u,l){u||!l.isDirectory()?s(a,n):s(null,n)});break}})}Ae.sync=function r(e,t,n){(!t||typeof t!="object")&&(t={mode:t});var i=t.mode,o=t.fs||Gn;i===void 0&&(i=Vn),n||(n=null),e=Ke.resolve(e);try{o.mkdirSync(e,i),n=n||e}catch(a){switch(a.code){case"ENOENT":n=r(Ke.dirname(e),t,n),r(e,t,n);break;default:var s;try{s=o.statSync(e)}catch{throw a}if(!s.isDirectory())throw a;break}}return n}});var Xn=w((Pu,Yn)=>{var ke=require("fs"),Ps=Qt().ncp,js=require("path"),Wn=Un(),Bs=zn();Yn.exports=qs;function qs(r,e,t,n){typeof t=="function"&&(n=t,t={});var i=!!t.mkdirp,o=t.clobber!==!1,s=t.limit||16;i?a():u();function a(){Bs(js.dirname(e),function(l){if(l)return n(l);u()})}function u(){o?ke.rename(r,e,function(l){if(!l)return n();if(l.code!=="EXDEV")return n(l);Qn(r,e,o,s,n)}):ke.link(r,e,function(l){if(l){if(l.code==="EXDEV"){Qn(r,e,o,s,n);return}if(l.code==="EISDIR"||l.code==="EPERM"){Jn(r,e,o,s,n);return}n(l);return}ke.unlink(r,n)})}}function Qn(r,e,t,n,i){var o=t?"w":"wx",s=ke.createReadStream(r),a=ke.createWriteStream(e,{flags:o});s.on("error",function(l){s.destroy(),a.destroy(),a.removeListener("close",u),l.code==="EISDIR"||l.code==="EPERM"?Jn(r,e,t,n,i):i(l)}),a.on("error",function(l){s.destroy(),a.destroy(),a.removeListener("close",u),i(l)}),a.once("close",u),s.pipe(a);function u(){ke.unlink(r,i)}}function Jn(r,e,t,n,i){var o={stopOnErr:!0,clobber:!1,limit:n};t?Wn(e,{disableGlob:!0},function(a){if(a)return i(a);s()}):s();function s(){Ps(r,e,o,function(a){if(a)return i(a[0]);Wn(r,{disableGlob:!0},i)})}}});var Kn=w(ut=>{var Hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ut.encode=function(r){if(0<=r&&r<Hn.length)return Hn[r];throw new TypeError("Must be between 0 and 63: "+r)};ut.decode=function(r){var e=65,t=90,n=97,i=122,o=48,s=57,a=43,u=47,l=26,c=52;return e<=r&&r<=t?r-e:n<=r&&r<=i?r-n+l:o<=r&&r<=s?r-o+c:r==a?62:r==u?63:-1}});var ft=w(ct=>{var Zn=Kn(),lt=5,ei=1<<lt,ri=ei-1,ti=ei;function Fs(r){return r<0?(-r<<1)+1:(r<<1)+0}function Us(r){var e=(r&1)===1,t=r>>1;return e?-t:t}ct.encode=function(e){var t="",n,i=Fs(e);do n=i&ri,i>>>=lt,i>0&&(n|=ti),t+=Zn.encode(n);while(i>0);return t};ct.decode=function(e,t,n){var i=e.length,o=0,s=0,a,u;do{if(t>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Zn.decode(e.charCodeAt(t++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));a=!!(u&ti),u&=ri,o=o+(u<<s),s+=lt}while(a);n.value=Us(o),n.rest=t}});var xe=w(U=>{function Gs(r,e,t){if(e in r)return r[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}U.getArg=Gs;var ni=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Vs=/^data:.+\,.+$/;function Ze(r){var e=r.match(ni);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}U.urlParse=Ze;function Oe(r){var e="";return r.scheme&&(e+=r.scheme+":"),e+="//",r.auth&&(e+=r.auth+"@"),r.host&&(e+=r.host),r.port&&(e+=":"+r.port),r.path&&(e+=r.path),e}U.urlGenerate=Oe;function ht(r){var e=r,t=Ze(r);if(t){if(!t.path)return r;e=t.path}for(var n=U.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=n?"/":"."),t?(t.path=e,Oe(t)):e}U.normalize=ht;function ii(r,e){r===""&&(r="."),e===""&&(e=".");var t=Ze(e),n=Ze(r);if(n&&(r=n.path||"/"),t&&!t.scheme)return n&&(t.scheme=n.scheme),Oe(t);if(t||e.match(Vs))return e;if(n&&!n.host&&!n.path)return n.host=e,Oe(n);var i=e.charAt(0)==="/"?e:ht(r.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Oe(n)):i}U.join=ii;U.isAbsolute=function(r){return r.charAt(0)==="/"||ni.test(r)};function $s(r,e){r===""&&(r="."),r=r.replace(/\/$/,"");for(var t=0;e.indexOf(r+"/")!==0;){var n=r.lastIndexOf("/");if(n<0||(r=r.slice(0,n),r.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(r.length+1)}U.relative=$s;var oi=function(){var r=Object.create(null);return!("__proto__"in r)}();function si(r){return r}function zs(r){return ai(r)?"$"+r:r}U.toSetString=oi?si:zs;function Ws(r){return ai(r)?r.slice(1):r}U.fromSetString=oi?si:Ws;function ai(r){if(!r)return!1;var e=r.length;if(e<9||r.charCodeAt(e-1)!==95||r.charCodeAt(e-2)!==95||r.charCodeAt(e-3)!==111||r.charCodeAt(e-4)!==116||r.charCodeAt(e-5)!==111||r.charCodeAt(e-6)!==114||r.charCodeAt(e-7)!==112||r.charCodeAt(e-8)!==95||r.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(r.charCodeAt(t)!==36)return!1;return!0}function Qs(r,e,t){var n=De(r.source,e.source);return n!==0||(n=r.originalLine-e.originalLine,n!==0)||(n=r.originalColumn-e.originalColumn,n!==0||t)||(n=r.generatedColumn-e.generatedColumn,n!==0)||(n=r.generatedLine-e.generatedLine,n!==0)?n:De(r.name,e.name)}U.compareByOriginalPositions=Qs;function Js(r,e,t){var n=r.generatedLine-e.generatedLine;return n!==0||(n=r.generatedColumn-e.generatedColumn,n!==0||t)||(n=De(r.source,e.source),n!==0)||(n=r.originalLine-e.originalLine,n!==0)||(n=r.originalColumn-e.originalColumn,n!==0)?n:De(r.name,e.name)}U.compareByGeneratedPositionsDeflated=Js;function De(r,e){return r===e?0:r===null?1:e===null?-1:r>e?1:-1}function Ys(r,e){var t=r.generatedLine-e.generatedLine;return t!==0||(t=r.generatedColumn-e.generatedColumn,t!==0)||(t=De(r.source,e.source),t!==0)||(t=r.originalLine-e.originalLine,t!==0)||(t=r.originalColumn-e.originalColumn,t!==0)?t:De(r.name,e.name)}U.compareByGeneratedPositionsInflated=Ys;function Xs(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}U.parseSourceMapInput=Xs;function Hs(r,e,t){if(e=e||"",r&&(r[r.length-1]!=="/"&&e[0]!=="/"&&(r+="/"),e=r+e),t){var n=Ze(t);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=ii(Oe(n),e)}return ht(e)}U.computeSourceURL=Hs});var pt=w(ui=>{var dt=xe(),gt=Object.prototype.hasOwnProperty,ye=typeof Map<"u";function ue(){this._array=[],this._set=ye?new Map:Object.create(null)}ue.fromArray=function(e,t){for(var n=new ue,i=0,o=e.length;i<o;i++)n.add(e[i],t);return n};ue.prototype.size=function(){return ye?this._set.size:Object.getOwnPropertyNames(this._set).length};ue.prototype.add=function(e,t){var n=ye?e:dt.toSetString(e),i=ye?this.has(e):gt.call(this._set,n),o=this._array.length;(!i||t)&&this._array.push(e),i||(ye?this._set.set(e,o):this._set[n]=o)};ue.prototype.has=function(e){if(ye)return this._set.has(e);var t=dt.toSetString(e);return gt.call(this._set,t)};ue.prototype.indexOf=function(e){if(ye){var t=this._set.get(e);if(t>=0)return t}else{var n=dt.toSetString(e);if(gt.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};ue.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};ue.prototype.toArray=function(){return this._array.slice()};ui.ArraySet=ue});var fi=w(ci=>{var li=xe();function Ks(r,e){var t=r.generatedLine,n=e.generatedLine,i=r.generatedColumn,o=e.generatedColumn;return n>t||n==t&&o>=i||li.compareByGeneratedPositionsInflated(r,e)<=0}function Cr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Cr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};Cr.prototype.add=function(e){Ks(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Cr.prototype.toArray=function(){return this._sorted||(this._array.sort(li.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ci.MappingList=Cr});var mt=w(hi=>{var er=ft(),I=xe(),Ar=pt().ArraySet,Zs=fi().MappingList;function Z(r){r||(r={}),this._file=I.getArg(r,"file",null),this._sourceRoot=I.getArg(r,"sourceRoot",null),this._skipValidation=I.getArg(r,"skipValidation",!1),this._sources=new Ar,this._names=new Ar,this._mappings=new Zs,this._sourcesContents=null}Z.prototype._version=3;Z.fromSourceMap=function(e){var t=e.sourceRoot,n=new Z({file:e.file,sourceRoot:t});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,t!=null&&(o.source=I.relative(t,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;t!==null&&(o=I.relative(t,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};Z.prototype.addMapping=function(e){var t=I.getArg(e,"generated"),n=I.getArg(e,"original",null),i=I.getArg(e,"source",null),o=I.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};Z.prototype.setSourceContent=function(e,t){var n=e;this._sourceRoot!=null&&(n=I.relative(this._sourceRoot,n)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[I.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[I.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Z.prototype.applySourceMap=function(e,t,n){var i=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=I.relative(o,i));var s=new Ar,a=new Ar;this._mappings.unsortedForEach(function(u){if(u.source===i&&u.originalLine!=null){var l=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});l.source!=null&&(u.source=l.source,n!=null&&(u.source=I.join(n,u.source)),o!=null&&(u.source=I.relative(o,u.source)),u.originalLine=l.line,u.originalColumn=l.column,l.name!=null&&(u.name=l.name))}var c=u.source;c!=null&&!s.has(c)&&s.add(c);var d=u.name;d!=null&&!a.has(d)&&a.add(d)},this),this._sources=s,this._names=a,e.sources.forEach(function(u){var l=e.sourceContentFor(u);l!=null&&(n!=null&&(u=I.join(n,u)),o!=null&&(u=I.relative(o,u)),this.setSourceContent(u,l))},this)};Z.prototype._validateMapping=function(e,t,n,i){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!i)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:i}))}};Z.prototype._serializeMappings=function(){for(var e=0,t=1,n=0,i=0,o=0,s=0,a="",u,l,c,d,f=this._mappings.toArray(),h=0,g=f.length;h<g;h++){if(l=f[h],u="",l.generatedLine!==t)for(e=0;l.generatedLine!==t;)u+=";",t++;else if(h>0){if(!I.compareByGeneratedPositionsInflated(l,f[h-1]))continue;u+=","}u+=er.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),u+=er.encode(d-s),s=d,u+=er.encode(l.originalLine-1-i),i=l.originalLine-1,u+=er.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(c=this._names.indexOf(l.name),u+=er.encode(c-o),o=c)),a+=u}return a};Z.prototype._generateSourcesContent=function(e,t){return e.map(function(n){if(!this._sourcesContents)return null;t!=null&&(n=I.relative(t,n));var i=I.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Z.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Z.prototype.toString=function(){return JSON.stringify(this.toJSON())};hi.SourceMapGenerator=Z});var di=w(Se=>{Se.GREATEST_LOWER_BOUND=1;Se.LEAST_UPPER_BOUND=2;function vt(r,e,t,n,i,o){var s=Math.floor((e-r)/2)+r,a=i(t,n[s],!0);return a===0?s:a>0?e-s>1?vt(s,e,t,n,i,o):o==Se.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-r>1?vt(r,s,t,n,i,o):o==Se.LEAST_UPPER_BOUND?s:r<0?-1:r}Se.search=function(e,t,n,i){if(t.length===0)return-1;var o=vt(-1,t.length,e,t,n,i||Se.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(t[o],t[o-1],!0)===0;)--o;return o}});var pi=w(gi=>{function yt(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function ea(r,e){return Math.round(r+Math.random()*(e-r))}function St(r,e,t,n){if(t<n){var i=ea(t,n),o=t-1;yt(r,i,n);for(var s=r[n],a=t;a<n;a++)e(r[a],s)<=0&&(o+=1,yt(r,o,a));yt(r,o+1,a);var u=o+1;St(r,e,t,u-1),St(r,e,u+1,n)}}gi.quickSort=function(r,e){St(r,e,0,r.length-1)}});var vi=w(kr=>{var p=xe(),wt=di(),Le=pt().ArraySet,ra=ft(),rr=pi().quickSort;function D(r,e){var t=r;return typeof r=="string"&&(t=p.parseSourceMapInput(r)),t.sections!=null?new ne(t,e):new j(t,e)}D.fromSourceMap=function(r,e){return j.fromSourceMap(r,e)};D.prototype._version=3;D.prototype.__generatedMappings=null;Object.defineProperty(D.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});D.prototype.__originalMappings=null;Object.defineProperty(D.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});D.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===";"||n===","};D.prototype._parseMappings=function(e,t){throw new Error("Subclass