@griddo/cx 10.5.3 → 10.6.0

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/build/index.js CHANGED
@@ -1,60 +1,60 @@
1
- "use strict";var fp=Object.create;var Ur=Object.defineProperty;var dp=Object.getOwnPropertyDescriptor;var hp=Object.getOwnPropertyNames;var pp=Object.getPrototypeOf,mp=Object.prototype.hasOwnProperty;var Ks=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qs=(t,e)=>{for(var r in e)Ur(t,r,{get:e[r],enumerable:!0})},Zs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hp(e))!mp.call(t,i)&&i!==r&&Ur(t,i,{get:()=>e[i],enumerable:!(n=dp(e,i))||n.enumerable});return t};var F=(t,e,r)=>(r=t!=null?fp(pp(t)):{},Zs(e||!t||!t.__esModule?Ur(r,"default",{value:t,enumerable:!0}):r,t)),ea=t=>Zs(Ur({},"__esModule",{value:!0}),t);var nt=y(($b,gi)=>{var gp=require("fs"),yp=require("path");function ta(t){console.log(`[dotenv][DEBUG] ${t}`)}var vp=`
2
- `,bp=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,_p=/\\n/g,wp=/\n|\r|\r\n/;function ra(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(wp).forEach(function(i,o){let s=i.match(bp);if(s!=null){let a=s[1],c=s[2]||"",d=c.length-1,u=c[0]==='"'&&c[d]==='"';c[0]==="'"&&c[d]==="'"||u?(c=c.substring(1,d),u&&(c=c.replace(_p,vp))):c=c.trim(),n[a]=c}else r&&ta(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function Sp(t){let e=yp.resolve(process.cwd(),".env"),r="utf8",n=!1;t&&(t.path!=null&&(e=t.path),t.encoding!=null&&(r=t.encoding),t.debug!=null&&(n=!0));try{let i=ra(gp.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&ta(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}gi.exports.config=Sp;gi.exports.parse=ra});var Ce=y(yi=>{"use strict";yi.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{t.call(this,...e,(i,o)=>i!=null?n(i):r(o))})},"name",{value:t.name})};yi.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);t.apply(this,e.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:t.name})}});var ia=y((Ub,na)=>{var it=require("constants"),xp=process.cwd,Xr=null,Ep=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Xr||(Xr=xp.call(process)),Xr};try{process.cwd()}catch{}typeof process.chdir=="function"&&(vi=process.chdir,process.chdir=function(t){Xr=null,vi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,vi));var vi;na.exports=Cp;function Cp(t){it.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,p,g){g&&process.nextTick(g)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,p,g,m){m&&process.nextTick(m)},t.lchownSync=function(){}),Ep==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var w=Date.now(),x=0;u(g,m,function A(j){if(j&&(j.code==="EACCES"||j.code==="EPERM")&&Date.now()-w<6e4){setTimeout(function(){t.stat(m,function(B,$){B&&B.code==="ENOENT"?u(g,m,A):b(j)})},x),x<100&&(x+=10);return}b&&b(j)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function p(g,m,b,w,x,A){var j;if(A&&typeof A=="function"){var B=0;j=function($,V,ue){if($&&$.code==="EAGAIN"&&B<10)return B++,u.call(t,g,m,b,w,x,j);A.apply(this,arguments)}}return u.call(t,g,m,b,w,x,j)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(p,g,m,b,w){for(var x=0;;)try{return u.call(t,p,g,m,b,w)}catch(A){if(A.code==="EAGAIN"&&x<10){x++;continue}throw A}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,it.O_WRONLY|it.O_SYMLINK,g,function(b,w){if(b){m&&m(b);return}u.fchmod(w,g,function(x){u.close(w,function(A){m&&m(x||A)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,it.O_WRONLY|it.O_SYMLINK,g),b=!0,w;try{w=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return w}}function r(u){it.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,it.O_SYMLINK,function(w,x){if(w){b&&b(w);return}u.futimes(x,g,m,function(A){u.close(x,function(j){b&&b(A||j)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,it.O_SYMLINK),w,x=!0;try{w=u.futimesSync(b,g,m),x=!1}finally{if(x)try{u.closeSync(b)}catch{}else u.closeSync(b)}return w}):u.futimes&&(u.lutimes=function(p,g,m,b){b&&process.nextTick(b)},u.lutimesSync=function(){})}function n(u){return u&&function(p,g,m){return u.call(t,p,g,function(b){d(b)&&(b=null),m&&m.apply(this,arguments)})}}function i(u){return u&&function(p,g){try{return u.call(t,p,g)}catch(m){if(!d(m))throw m}}}function o(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(w){d(w)&&(w=null),b&&b.apply(this,arguments)})}}function s(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!d(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(w,x){x&&(x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.gid+=4294967296)),m&&m.apply(this,arguments)}return g?u.call(t,p,g,b):u.call(t,p,b)}}function c(u){return u&&function(p,g){var m=g?u.call(t,p,g):u.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function d(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var aa=y((Xb,sa)=>{var oa=require("stream").Stream;sa.exports=Pp;function Pp(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);oa.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;a<c;a++){var d=s[a];this[d]=i[d]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){o.emit("error",u),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);oa.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var c=o[s];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var ua=y((Gb,ca)=>{"use strict";ca.exports=Op;var Dp=Object.getPrototypeOf||function(t){return t.__proto__};function Op(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:Dp(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var de=y((Hb,wi)=>{var J=require("fs"),Ip=ia(),Ap=aa(),Fp=ua(),Gr=require("util"),ie,zr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ie=Symbol.for("graceful-fs.queue"),zr=Symbol.for("graceful-fs.previous")):(ie="___graceful-fs.queue",zr="___graceful-fs.previous");function Rp(){}function da(t,e){Object.defineProperty(t,ie,{get:function(){return e}})}var vt=Rp;Gr.debuglog?vt=Gr.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vt=function(){var t=Gr.format.apply(Gr,arguments);t="GFS4: "+t.split(/\n/).join(`
3
- GFS4: `),console.error(t)});J[ie]||(la=global[ie]||[],da(J,la),J.close=function(t){function e(r,n){return t.call(J,r,function(i){i||fa(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,zr,{value:t}),e}(J.close),J.closeSync=function(t){function e(r){t.apply(J,arguments),fa()}return Object.defineProperty(e,zr,{value:t}),e}(J.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vt(J[ie]),require("assert").equal(J[ie].length,0)}));var la;global[ie]||da(global,J[ie]);wi.exports=bi(Fp(J));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!J.__patched&&(wi.exports=bi(J),J.__patched=!0);function bi(t){Ip(t),t.gracefulify=bi,t.createReadStream=V,t.createWriteStream=ue;var e=t.readFile;t.readFile=r;function r(D,q,k){return typeof q=="function"&&(k=q,q=null),z(D,q,k);function z(I,G,O,U){return e(I,G,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Rt([z,[I,G,O],M,U||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return n(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return o(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(D,q,k,z){return typeof k=="function"&&(z=k,k=0),I(D,q,k,z);function I(G,O,U,M,P){return a(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var d=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(D,q,k){typeof q=="function"&&(k=q,q=null);var z=u.test(process.version)?function(O,U,M,P){return d(O,I(O,U,M,P))}:function(O,U,M,P){return d(O,U,I(O,U,M,P))};return z(D,q,k);function I(G,O,U,M){return function(P,R){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Rt([z,[G,O,U],P,M||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof U=="function"&&U.call(this,P,R))}}}if(process.version.substr(0,4)==="v0.8"){var g=Ap(t);A=g.ReadStream,B=g.WriteStream}var m=t.ReadStream;m&&(A.prototype=Object.create(m.prototype),A.prototype.open=j);var b=t.WriteStream;b&&(B.prototype=Object.create(b.prototype),B.prototype.open=$),Object.defineProperty(t,"ReadStream",{get:function(){return A},set:function(D){A=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return B},set:function(D){B=D},enumerable:!0,configurable:!0});var w=A;Object.defineProperty(t,"FileReadStream",{get:function(){return w},set:function(D){w=D},enumerable:!0,configurable:!0});var x=B;Object.defineProperty(t,"FileWriteStream",{get:function(){return x},set:function(D){x=D},enumerable:!0,configurable:!0});function A(D,q){return this instanceof A?(m.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function j(){var D=this;ee(D.path,D.flags,D.mode,function(q,k){q?(D.autoClose&&D.destroy(),D.emit("error",q)):(D.fd=k,D.emit("open",k),D.read())})}function B(D,q){return this instanceof B?(b.apply(this,arguments),this):B.apply(Object.create(B.prototype),arguments)}function $(){var D=this;ee(D.path,D.flags,D.mode,function(q,k){q?(D.destroy(),D.emit("error",q)):(D.fd=k,D.emit("open",k))})}function V(D,q){return new t.ReadStream(D,q)}function ue(D,q){return new t.WriteStream(D,q)}var Te=t.open;t.open=ee;function ee(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return Te(G,O,U,function(R,He){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Rt(t){vt("ENQUEUE",t[0].name,t[1]),J[ie].push(t),_i()}var Hr;function fa(){for(var t=Date.now(),e=0;e<J[ie].length;++e)J[ie][e].length>2&&(J[ie][e][3]=t,J[ie][e][4]=t);_i()}function _i(){if(clearTimeout(Hr),Hr=void 0,J[ie].length!==0){var t=J[ie].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)vt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){vt("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,c=Math.max(o-i,1),d=Math.min(c*1.2,100);a>=d?(vt("RETRY",e.name,r),e.apply(null,r.concat([i]))):J[ie].push(t)}Hr===void 0&&(Hr=setTimeout(_i,0))}}});var sr=y(ot=>{"use strict";var ha=Ce().fromCallback,ve=de(),Tp=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof ve[t]=="function");Object.keys(ve).forEach(t=>{t!=="promises"&&(ot[t]=ve[t])});Tp.forEach(t=>{ot[t]=ha(ve[t])});ot.exists=function(t,e){return typeof e=="function"?ve.exists(t,e):new Promise(r=>ve.exists(t,r))};ot.read=function(t,e,r,n,i,o){return typeof o=="function"?ve.read(t,e,r,n,i,o):new Promise((s,a)=>{ve.read(t,e,r,n,i,(c,d,u)=>{if(c)return a(c);s({bytesRead:d,buffer:u})})})};ot.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ve.write(t,e,...r):new Promise((n,i)=>{ve.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof ve.writev=="function"&&(ot.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ve.writev(t,e,...r):new Promise((n,i)=>{ve.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof ve.realpath.native=="function"&&(ot.realpath.native=ha(ve.realpath.native))});var Si=y((Wb,pa)=>{pa.exports=t=>{let e=process.versions.node.split(".").map(r=>parseInt(r,10));return t=t.split(".").map(r=>parseInt(r,10)),e[0]>t[0]||e[0]===t[0]&&(e[1]>t[1]||e[1]===t[1]&&e[2]>=t[2])}});var ba=y((Jb,xi)=>{"use strict";var Tt=sr(),Ke=require("path"),kp=Si(),ma=kp("10.12.0"),ga=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Ke.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},ya=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},va=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};xi.exports.makeDir=async(t,e)=>{if(ga(t),e=ya(e),ma){let n=Ke.resolve(t);return Tt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Tt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ke.dirname(n)===n)throw va(n);if(i.message.includes("null bytes"))throw i;return await r(Ke.dirname(n)),r(n)}try{if(!(await Tt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ke.resolve(t))};xi.exports.makeDirSync=(t,e)=>{if(ga(t),e=ya(e),ma){let n=Ke.resolve(t);return Tt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Tt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ke.dirname(n)===n)throw va(n);if(i.message.includes("null bytes"))throw i;return r(Ke.dirname(n)),r(n)}try{if(!Tt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ke.resolve(t))}});var je=y((Vb,_a)=>{"use strict";var Mp=Ce().fromPromise,{makeDir:qp,makeDirSync:Ei}=ba(),Ci=Mp(qp);_a.exports={mkdirs:Ci,mkdirsSync:Ei,mkdirp:Ci,mkdirpSync:Ei,ensureDir:Ci,ensureDirSync:Ei}});var Pi=y((Yb,wa)=>{"use strict";var kt=de();function jp(t,e,r,n){kt.open(t,"r+",(i,o)=>{if(i)return n(i);kt.futimes(o,e,r,s=>{kt.close(o,a=>{n&&n(s||a)})})})}function Np(t,e,r){let n=kt.openSync(t,"r+");return kt.futimesSync(n,e,r),kt.closeSync(n)}wa.exports={utimesMillis:jp,utimesMillisSync:Np}});var ar=y((Kb,Ca)=>{"use strict";var Mt=sr(),Pe=require("path"),Lp=require("util"),$p=Si(),Wr=$p("10.5.0"),Sa=t=>Wr?Mt.stat(t,{bigint:!0}):Mt.stat(t),Di=t=>Wr?Mt.statSync(t,{bigint:!0}):Mt.statSync(t);function Bp(t,e){return Promise.all([Sa(t),Sa(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Up(t,e){let r,n=Di(t);try{r=Di(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function Xp(t,e,r,n){Lp.callbackify(Bp)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&Jr(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&Oi(t,e)?n(new Error(Vr(t,e,r))):n(null,{srcStat:s,destStat:a})})}function Gp(t,e,r){let{srcStat:n,destStat:i}=Up(t,e);if(i&&Jr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Oi(t,e))throw new Error(Vr(t,e,r));return{srcStat:n,destStat:i}}function xa(t,e,r,n,i){let o=Pe.resolve(Pe.dirname(t)),s=Pe.resolve(Pe.dirname(r));if(s===o||s===Pe.parse(s).root)return i();let a=(c,d)=>c?c.code==="ENOENT"?i():i(c):Jr(e,d)?i(new Error(Vr(t,r,n))):xa(t,e,s,n,i);Wr?Mt.stat(s,{bigint:!0},a):Mt.stat(s,a)}function Ea(t,e,r,n){let i=Pe.resolve(Pe.dirname(t)),o=Pe.resolve(Pe.dirname(r));if(o===i||o===Pe.parse(o).root)return;let s;try{s=Di(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(Jr(e,s))throw new Error(Vr(t,r,n));return Ea(t,e,o,n)}function Jr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(Wr||e.ino<Number.MAX_SAFE_INTEGER||e.size===t.size&&e.mode===t.mode&&e.nlink===t.nlink&&e.atimeMs===t.atimeMs&&e.mtimeMs===t.mtimeMs&&e.ctimeMs===t.ctimeMs&&e.birthtimeMs===t.birthtimeMs))}function Oi(t,e){let r=Pe.resolve(t).split(Pe.sep).filter(i=>i),n=Pe.resolve(e).split(Pe.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function Vr(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}Ca.exports={checkPaths:Xp,checkPathsSync:Gp,checkParentPaths:xa,checkParentPathsSync:Ea,isSrcSubdir:Oi}});var Aa=y((Qb,Ia)=>{"use strict";var he=de(),cr=require("path"),Hp=je().mkdirsSync,zp=Pi().utimesMillisSync,ur=ar();function Wp(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
1
+ "use strict";var dp=Object.create;var Ur=Object.defineProperty;var hp=Object.getOwnPropertyDescriptor;var pp=Object.getOwnPropertyNames;var mp=Object.getPrototypeOf,gp=Object.prototype.hasOwnProperty;var Ks=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qs=(t,e)=>{for(var r in e)Ur(t,r,{get:e[r],enumerable:!0})},Zs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of pp(e))!gp.call(t,i)&&i!==r&&Ur(t,i,{get:()=>e[i],enumerable:!(n=hp(e,i))||n.enumerable});return t};var F=(t,e,r)=>(r=t!=null?dp(mp(t)):{},Zs(e||!t||!t.__esModule?Ur(r,"default",{value:t,enumerable:!0}):r,t)),ea=t=>Zs(Ur({},"__esModule",{value:!0}),t);var it=y(($b,yi)=>{var yp=require("fs"),vp=require("path");function ta(t){console.log(`[dotenv][DEBUG] ${t}`)}var bp=`
2
+ `,_p=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,wp=/\\n/g,Sp=/\n|\r|\r\n/;function ra(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(Sp).forEach(function(i,o){let s=i.match(_p);if(s!=null){let a=s[1],c=s[2]||"",d=c.length-1,u=c[0]==='"'&&c[d]==='"';c[0]==="'"&&c[d]==="'"||u?(c=c.substring(1,d),u&&(c=c.replace(wp,bp))):c=c.trim(),n[a]=c}else r&&ta(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function xp(t){let e=vp.resolve(process.cwd(),".env"),r="utf8",n=!1;t&&(t.path!=null&&(e=t.path),t.encoding!=null&&(r=t.encoding),t.debug!=null&&(n=!0));try{let i=ra(yp.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&ta(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}yi.exports.config=xp;yi.exports.parse=ra});var Ce=y(vi=>{"use strict";vi.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{t.call(this,...e,(i,o)=>i!=null?n(i):r(o))})},"name",{value:t.name})};vi.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);t.apply(this,e.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:t.name})}});var ia=y((Ub,na)=>{var ot=require("constants"),Ep=process.cwd,Xr=null,Cp=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Xr||(Xr=Ep.call(process)),Xr};try{process.cwd()}catch{}typeof process.chdir=="function"&&(bi=process.chdir,process.chdir=function(t){Xr=null,bi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,bi));var bi;na.exports=Pp;function Pp(t){ot.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,p,g){g&&process.nextTick(g)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,p,g,m){m&&process.nextTick(m)},t.lchownSync=function(){}),Cp==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var w=Date.now(),x=0;u(g,m,function A(j){if(j&&(j.code==="EACCES"||j.code==="EPERM")&&Date.now()-w<6e4){setTimeout(function(){t.stat(m,function(B,$){B&&B.code==="ENOENT"?u(g,m,A):b(j)})},x),x<100&&(x+=10);return}b&&b(j)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function p(g,m,b,w,x,A){var j;if(A&&typeof A=="function"){var B=0;j=function($,V,ue){if($&&$.code==="EAGAIN"&&B<10)return B++,u.call(t,g,m,b,w,x,j);A.apply(this,arguments)}}return u.call(t,g,m,b,w,x,j)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,u),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(p,g,m,b,w){for(var x=0;;)try{return u.call(t,p,g,m,b,w)}catch(A){if(A.code==="EAGAIN"&&x<10){x++;continue}throw A}}}(t.readSync);function e(u){u.lchmod=function(p,g,m){u.open(p,ot.O_WRONLY|ot.O_SYMLINK,g,function(b,w){if(b){m&&m(b);return}u.fchmod(w,g,function(x){u.close(w,function(A){m&&m(x||A)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,ot.O_WRONLY|ot.O_SYMLINK,g),b=!0,w;try{w=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return w}}function r(u){ot.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,ot.O_SYMLINK,function(w,x){if(w){b&&b(w);return}u.futimes(x,g,m,function(A){u.close(x,function(j){b&&b(A||j)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,ot.O_SYMLINK),w,x=!0;try{w=u.futimesSync(b,g,m),x=!1}finally{if(x)try{u.closeSync(b)}catch{}else u.closeSync(b)}return w}):u.futimes&&(u.lutimes=function(p,g,m,b){b&&process.nextTick(b)},u.lutimesSync=function(){})}function n(u){return u&&function(p,g,m){return u.call(t,p,g,function(b){d(b)&&(b=null),m&&m.apply(this,arguments)})}}function i(u){return u&&function(p,g){try{return u.call(t,p,g)}catch(m){if(!d(m))throw m}}}function o(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(w){d(w)&&(w=null),b&&b.apply(this,arguments)})}}function s(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!d(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(w,x){x&&(x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.gid+=4294967296)),m&&m.apply(this,arguments)}return g?u.call(t,p,g,b):u.call(t,p,b)}}function c(u){return u&&function(p,g){var m=g?u.call(t,p,g):u.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function d(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var aa=y((Xb,sa)=>{var oa=require("stream").Stream;sa.exports=Dp;function Dp(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);oa.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;a<c;a++){var d=s[a];this[d]=i[d]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){o.emit("error",u),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);oa.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var c=o[s];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var ua=y((Gb,ca)=>{"use strict";ca.exports=Ip;var Op=Object.getPrototypeOf||function(t){return t.__proto__};function Ip(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:Op(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var de=y((Hb,Si)=>{var J=require("fs"),Ap=ia(),Fp=aa(),Rp=ua(),Gr=require("util"),ie,zr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ie=Symbol.for("graceful-fs.queue"),zr=Symbol.for("graceful-fs.previous")):(ie="___graceful-fs.queue",zr="___graceful-fs.previous");function Tp(){}function da(t,e){Object.defineProperty(t,ie,{get:function(){return e}})}var vt=Tp;Gr.debuglog?vt=Gr.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vt=function(){var t=Gr.format.apply(Gr,arguments);t="GFS4: "+t.split(/\n/).join(`
3
+ GFS4: `),console.error(t)});J[ie]||(la=global[ie]||[],da(J,la),J.close=function(t){function e(r,n){return t.call(J,r,function(i){i||fa(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,zr,{value:t}),e}(J.close),J.closeSync=function(t){function e(r){t.apply(J,arguments),fa()}return Object.defineProperty(e,zr,{value:t}),e}(J.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vt(J[ie]),require("assert").equal(J[ie].length,0)}));var la;global[ie]||da(global,J[ie]);Si.exports=_i(Rp(J));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!J.__patched&&(Si.exports=_i(J),J.__patched=!0);function _i(t){Ap(t),t.gracefulify=_i,t.createReadStream=V,t.createWriteStream=ue;var e=t.readFile;t.readFile=r;function r(D,q,k){return typeof q=="function"&&(k=q,q=null),z(D,q,k);function z(I,G,O,U){return e(I,G,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Rt([z,[I,G,O],M,U||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return n(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return o(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(D,q,k,z){return typeof k=="function"&&(z=k,k=0),I(D,q,k,z);function I(G,O,U,M,P){return a(G,O,U,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var d=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(D,q,k){typeof q=="function"&&(k=q,q=null);var z=u.test(process.version)?function(O,U,M,P){return d(O,I(O,U,M,P))}:function(O,U,M,P){return d(O,U,I(O,U,M,P))};return z(D,q,k);function I(G,O,U,M){return function(P,R){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Rt([z,[G,O,U],P,M||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof U=="function"&&U.call(this,P,R))}}}if(process.version.substr(0,4)==="v0.8"){var g=Fp(t);A=g.ReadStream,B=g.WriteStream}var m=t.ReadStream;m&&(A.prototype=Object.create(m.prototype),A.prototype.open=j);var b=t.WriteStream;b&&(B.prototype=Object.create(b.prototype),B.prototype.open=$),Object.defineProperty(t,"ReadStream",{get:function(){return A},set:function(D){A=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return B},set:function(D){B=D},enumerable:!0,configurable:!0});var w=A;Object.defineProperty(t,"FileReadStream",{get:function(){return w},set:function(D){w=D},enumerable:!0,configurable:!0});var x=B;Object.defineProperty(t,"FileWriteStream",{get:function(){return x},set:function(D){x=D},enumerable:!0,configurable:!0});function A(D,q){return this instanceof A?(m.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function j(){var D=this;ee(D.path,D.flags,D.mode,function(q,k){q?(D.autoClose&&D.destroy(),D.emit("error",q)):(D.fd=k,D.emit("open",k),D.read())})}function B(D,q){return this instanceof B?(b.apply(this,arguments),this):B.apply(Object.create(B.prototype),arguments)}function $(){var D=this;ee(D.path,D.flags,D.mode,function(q,k){q?(D.destroy(),D.emit("error",q)):(D.fd=k,D.emit("open",k))})}function V(D,q){return new t.ReadStream(D,q)}function ue(D,q){return new t.WriteStream(D,q)}var Te=t.open;t.open=ee;function ee(D,q,k,z){return typeof k=="function"&&(z=k,k=null),I(D,q,k,z);function I(G,O,U,M,P){return Te(G,O,U,function(R,He){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Rt([I,[G,O,U,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Rt(t){vt("ENQUEUE",t[0].name,t[1]),J[ie].push(t),wi()}var Hr;function fa(){for(var t=Date.now(),e=0;e<J[ie].length;++e)J[ie][e].length>2&&(J[ie][e][3]=t,J[ie][e][4]=t);wi()}function wi(){if(clearTimeout(Hr),Hr=void 0,J[ie].length!==0){var t=J[ie].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)vt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){vt("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,c=Math.max(o-i,1),d=Math.min(c*1.2,100);a>=d?(vt("RETRY",e.name,r),e.apply(null,r.concat([i]))):J[ie].push(t)}Hr===void 0&&(Hr=setTimeout(wi,0))}}});var sr=y(st=>{"use strict";var ha=Ce().fromCallback,ve=de(),kp=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof ve[t]=="function");Object.keys(ve).forEach(t=>{t!=="promises"&&(st[t]=ve[t])});kp.forEach(t=>{st[t]=ha(ve[t])});st.exists=function(t,e){return typeof e=="function"?ve.exists(t,e):new Promise(r=>ve.exists(t,r))};st.read=function(t,e,r,n,i,o){return typeof o=="function"?ve.read(t,e,r,n,i,o):new Promise((s,a)=>{ve.read(t,e,r,n,i,(c,d,u)=>{if(c)return a(c);s({bytesRead:d,buffer:u})})})};st.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ve.write(t,e,...r):new Promise((n,i)=>{ve.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof ve.writev=="function"&&(st.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ve.writev(t,e,...r):new Promise((n,i)=>{ve.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof ve.realpath.native=="function"&&(st.realpath.native=ha(ve.realpath.native))});var xi=y((Wb,pa)=>{pa.exports=t=>{let e=process.versions.node.split(".").map(r=>parseInt(r,10));return t=t.split(".").map(r=>parseInt(r,10)),e[0]>t[0]||e[0]===t[0]&&(e[1]>t[1]||e[1]===t[1]&&e[2]>=t[2])}});var ba=y((Jb,Ei)=>{"use strict";var Tt=sr(),Qe=require("path"),Mp=xi(),ma=Mp("10.12.0"),ga=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Qe.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},ya=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},va=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};Ei.exports.makeDir=async(t,e)=>{if(ga(t),e=ya(e),ma){let n=Qe.resolve(t);return Tt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Tt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Qe.dirname(n)===n)throw va(n);if(i.message.includes("null bytes"))throw i;return await r(Qe.dirname(n)),r(n)}try{if(!(await Tt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Qe.resolve(t))};Ei.exports.makeDirSync=(t,e)=>{if(ga(t),e=ya(e),ma){let n=Qe.resolve(t);return Tt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Tt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Qe.dirname(n)===n)throw va(n);if(i.message.includes("null bytes"))throw i;return r(Qe.dirname(n)),r(n)}try{if(!Tt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Qe.resolve(t))}});var je=y((Vb,_a)=>{"use strict";var qp=Ce().fromPromise,{makeDir:jp,makeDirSync:Ci}=ba(),Pi=qp(jp);_a.exports={mkdirs:Pi,mkdirsSync:Ci,mkdirp:Pi,mkdirpSync:Ci,ensureDir:Pi,ensureDirSync:Ci}});var Di=y((Yb,wa)=>{"use strict";var kt=de();function Np(t,e,r,n){kt.open(t,"r+",(i,o)=>{if(i)return n(i);kt.futimes(o,e,r,s=>{kt.close(o,a=>{n&&n(s||a)})})})}function Lp(t,e,r){let n=kt.openSync(t,"r+");return kt.futimesSync(n,e,r),kt.closeSync(n)}wa.exports={utimesMillis:Np,utimesMillisSync:Lp}});var ar=y((Kb,Ca)=>{"use strict";var Mt=sr(),Pe=require("path"),$p=require("util"),Bp=xi(),Wr=Bp("10.5.0"),Sa=t=>Wr?Mt.stat(t,{bigint:!0}):Mt.stat(t),Oi=t=>Wr?Mt.statSync(t,{bigint:!0}):Mt.statSync(t);function Up(t,e){return Promise.all([Sa(t),Sa(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Xp(t,e){let r,n=Oi(t);try{r=Oi(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function Gp(t,e,r,n){$p.callbackify(Up)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&Jr(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&Ii(t,e)?n(new Error(Vr(t,e,r))):n(null,{srcStat:s,destStat:a})})}function Hp(t,e,r){let{srcStat:n,destStat:i}=Xp(t,e);if(i&&Jr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Ii(t,e))throw new Error(Vr(t,e,r));return{srcStat:n,destStat:i}}function xa(t,e,r,n,i){let o=Pe.resolve(Pe.dirname(t)),s=Pe.resolve(Pe.dirname(r));if(s===o||s===Pe.parse(s).root)return i();let a=(c,d)=>c?c.code==="ENOENT"?i():i(c):Jr(e,d)?i(new Error(Vr(t,r,n))):xa(t,e,s,n,i);Wr?Mt.stat(s,{bigint:!0},a):Mt.stat(s,a)}function Ea(t,e,r,n){let i=Pe.resolve(Pe.dirname(t)),o=Pe.resolve(Pe.dirname(r));if(o===i||o===Pe.parse(o).root)return;let s;try{s=Oi(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(Jr(e,s))throw new Error(Vr(t,r,n));return Ea(t,e,o,n)}function Jr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(Wr||e.ino<Number.MAX_SAFE_INTEGER||e.size===t.size&&e.mode===t.mode&&e.nlink===t.nlink&&e.atimeMs===t.atimeMs&&e.mtimeMs===t.mtimeMs&&e.ctimeMs===t.ctimeMs&&e.birthtimeMs===t.birthtimeMs))}function Ii(t,e){let r=Pe.resolve(t).split(Pe.sep).filter(i=>i),n=Pe.resolve(e).split(Pe.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function Vr(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}Ca.exports={checkPaths:Gp,checkPathsSync:Hp,checkParentPaths:xa,checkParentPathsSync:Ea,isSrcSubdir:Ii}});var Aa=y((Qb,Ia)=>{"use strict";var he=de(),cr=require("path"),zp=je().mkdirsSync,Wp=Di().utimesMillisSync,ur=ar();function Jp(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
4
4
 
5
- see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=ur.checkPathsSync(t,e,"copy");return ur.checkParentPathsSync(t,n,e,"copy"),Jp(i,t,e,r)}function Jp(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=cr.dirname(r);return he.existsSync(i)||Hp(i),Pa(t,e,r,n)}function Pa(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return Vp(t,e,r,n)}function Vp(t,e,r,n){let o=(n.dereference?he.statSync:he.lstatSync)(e);if(o.isDirectory())return r0(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Yp(o,t,e,r,n);if(o.isSymbolicLink())return o0(t,e,r,n)}function Yp(t,e,r,n,i){return e?Kp(t,r,n,i):Da(t,r,n,i)}function Kp(t,e,r,n){if(n.overwrite)return he.unlinkSync(r),Da(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Da(t,e,r,n){return he.copyFileSync(e,r),n.preserveTimestamps&&Qp(t.mode,e,r),Ii(r,t.mode)}function Qp(t,e,r){return Zp(t)&&e0(r,t),t0(e,r)}function Zp(t){return(t&128)===0}function e0(t,e){return Ii(t,e|128)}function Ii(t,e){return he.chmodSync(t,e)}function t0(t,e){let r=he.statSync(t);return zp(e,r.atime,r.mtime)}function r0(t,e,r,n,i){if(!e)return n0(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Oa(r,n,i)}function n0(t,e,r,n){return he.mkdirSync(r),Oa(e,r,n),Ii(r,t)}function Oa(t,e,r){he.readdirSync(t).forEach(n=>i0(n,t,e,r))}function i0(t,e,r,n){let i=cr.join(e,t),o=cr.join(r,t),{destStat:s}=ur.checkPathsSync(i,o,"copy");return Pa(s,i,o,n)}function o0(t,e,r,n){let i=he.readlinkSync(e);if(n.dereference&&(i=cr.resolve(process.cwd(),i)),t){let o;try{o=he.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return he.symlinkSync(i,r);throw s}if(n.dereference&&(o=cr.resolve(process.cwd(),o)),ur.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(he.statSync(r).isDirectory()&&ur.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return s0(i,r)}else return he.symlinkSync(i,r)}function s0(t,e){return he.unlinkSync(e),he.symlinkSync(t,e)}Ia.exports=Wp});var Ai=y((Zb,Fa)=>{"use strict";Fa.exports={copySync:Aa()}});var st=y((e2,Ta)=>{"use strict";var a0=Ce().fromPromise,Ra=sr();function c0(t){return Ra.access(t).then(()=>!0).catch(()=>!1)}Ta.exports={pathExists:a0(c0),pathExistsSync:Ra.existsSync}});var Ua=y((t2,Ba)=>{"use strict";var De=de(),lr=require("path"),u0=je().mkdirs,l0=st().pathExists,f0=Pi().utimesMillis,fr=ar();function d0(t,e,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
5
+ see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=ur.checkPathsSync(t,e,"copy");return ur.checkParentPathsSync(t,n,e,"copy"),Vp(i,t,e,r)}function Vp(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=cr.dirname(r);return he.existsSync(i)||zp(i),Pa(t,e,r,n)}function Pa(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return Yp(t,e,r,n)}function Yp(t,e,r,n){let o=(n.dereference?he.statSync:he.lstatSync)(e);if(o.isDirectory())return n0(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Kp(o,t,e,r,n);if(o.isSymbolicLink())return s0(t,e,r,n)}function Kp(t,e,r,n,i){return e?Qp(t,r,n,i):Da(t,r,n,i)}function Qp(t,e,r,n){if(n.overwrite)return he.unlinkSync(r),Da(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Da(t,e,r,n){return he.copyFileSync(e,r),n.preserveTimestamps&&Zp(t.mode,e,r),Ai(r,t.mode)}function Zp(t,e,r){return e0(t)&&t0(r,t),r0(e,r)}function e0(t){return(t&128)===0}function t0(t,e){return Ai(t,e|128)}function Ai(t,e){return he.chmodSync(t,e)}function r0(t,e){let r=he.statSync(t);return Wp(e,r.atime,r.mtime)}function n0(t,e,r,n,i){if(!e)return i0(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Oa(r,n,i)}function i0(t,e,r,n){return he.mkdirSync(r),Oa(e,r,n),Ai(r,t)}function Oa(t,e,r){he.readdirSync(t).forEach(n=>o0(n,t,e,r))}function o0(t,e,r,n){let i=cr.join(e,t),o=cr.join(r,t),{destStat:s}=ur.checkPathsSync(i,o,"copy");return Pa(s,i,o,n)}function s0(t,e,r,n){let i=he.readlinkSync(e);if(n.dereference&&(i=cr.resolve(process.cwd(),i)),t){let o;try{o=he.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return he.symlinkSync(i,r);throw s}if(n.dereference&&(o=cr.resolve(process.cwd(),o)),ur.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(he.statSync(r).isDirectory()&&ur.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return a0(i,r)}else return he.symlinkSync(i,r)}function a0(t,e){return he.unlinkSync(e),he.symlinkSync(t,e)}Ia.exports=Jp});var Fi=y((Zb,Fa)=>{"use strict";Fa.exports={copySync:Aa()}});var at=y((e2,Ta)=>{"use strict";var c0=Ce().fromPromise,Ra=sr();function u0(t){return Ra.access(t).then(()=>!0).catch(()=>!1)}Ta.exports={pathExists:c0(u0),pathExistsSync:Ra.existsSync}});var Ua=y((t2,Ba)=>{"use strict";var De=de(),lr=require("path"),l0=je().mkdirs,f0=at().pathExists,d0=Di().utimesMillis,fr=ar();function h0(t,e,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
6
6
 
7
- see https://github.com/jprichardson/node-fs-extra/issues/269`),fr.checkPaths(t,e,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;fr.checkParentPaths(t,s,e,"copy",c=>c?n(c):r.filter?ja(ka,a,t,e,r,n):ka(a,t,e,r,n))})}function ka(t,e,r,n,i){let o=lr.dirname(r);l0(o,(s,a)=>{if(s)return i(s);if(a)return Fi(t,e,r,n,i);u0(o,c=>c?i(c):Fi(t,e,r,n,i))})}function ja(t,e,r,n,i,o){Promise.resolve(i.filter(r,n)).then(s=>s?t(e,r,n,i,o):o(),s=>o(s))}function Fi(t,e,r,n,i){return n.filter?ja(Ma,t,e,r,n,i):Ma(t,e,r,n,i)}function Ma(t,e,r,n,i){(n.dereference?De.stat:De.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return b0(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return h0(a,t,e,r,n,i);if(a.isSymbolicLink())return S0(t,e,r,n,i)})}function h0(t,e,r,n,i,o){return e?p0(t,r,n,i,o):Na(t,r,n,i,o)}function p0(t,e,r,n,i){if(n.overwrite)De.unlink(r,o=>o?i(o):Na(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Na(t,e,r,n,i){De.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?m0(t.mode,e,r,i):Yr(r,t.mode,i))}function m0(t,e,r,n){return g0(t)?y0(r,t,i=>i?n(i):qa(t,e,r,n)):qa(t,e,r,n)}function g0(t){return(t&128)===0}function y0(t,e,r){return Yr(t,e|128,r)}function qa(t,e,r,n){v0(e,r,i=>i?n(i):Yr(r,t,n))}function Yr(t,e,r){return De.chmod(t,e,r)}function v0(t,e,r){De.stat(t,(n,i)=>n?r(n):f0(e,i.atime,i.mtime,r))}function b0(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):La(r,n,i,o):_0(t.mode,r,n,i,o)}function _0(t,e,r,n,i){De.mkdir(r,o=>{if(o)return i(o);La(e,r,n,s=>s?i(s):Yr(r,t,i))})}function La(t,e,r,n){De.readdir(t,(i,o)=>i?n(i):$a(o,t,e,r,n))}function $a(t,e,r,n,i){let o=t.pop();return o?w0(t,o,e,r,n,i):i()}function w0(t,e,r,n,i,o){let s=lr.join(r,e),a=lr.join(n,e);fr.checkPaths(s,a,"copy",(c,d)=>{if(c)return o(c);let{destStat:u}=d;Fi(u,s,a,i,p=>p?o(p):$a(t,r,n,i,o))})}function S0(t,e,r,n,i){De.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=lr.resolve(process.cwd(),s)),t)De.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?De.symlink(s,r,i):i(a):(n.dereference&&(c=lr.resolve(process.cwd(),c)),fr.isSrcSubdir(s,c)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&fr.isSrcSubdir(c,s)?i(new Error(`Cannot overwrite '${c}' with '${s}'.`)):x0(s,r,i)));else return De.symlink(s,r,i)})}function x0(t,e,r){De.unlink(e,n=>n?r(n):De.symlink(t,e,r))}Ba.exports=d0});var Ri=y((r2,Xa)=>{"use strict";var E0=Ce().fromCallback;Xa.exports={copy:E0(Ua())}});var Qa=y((n2,Ka)=>{"use strict";var Ga=de(),Ja=require("path"),H=require("assert"),dr=process.platform==="win32";function Va(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ga[r],r=r+"Sync",t[r]=t[r]||Ga[r]}),t.maxBusyTries=t.maxBusyTries||3}function Ti(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H.strictEqual(typeof r,"function","rimraf: callback function required"),H(e,"rimraf: invalid options argument provided"),H.strictEqual(typeof e,"object","rimraf: options should be object"),Va(e),Ha(t,e,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<e.maxBusyTries){n++;let s=n*100;return setTimeout(()=>Ha(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function Ha(t,e,r){H(t),H(e),H(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&dr)return za(t,e,n,r);if(i&&i.isDirectory())return Kr(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return dr?za(t,e,o,r):Kr(t,e,o,r);if(o.code==="EISDIR")return Kr(t,e,o,r)}return r(o)})})}function za(t,e,r,n){H(t),H(e),H(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(o,s)=>{o?n(o.code==="ENOENT"?null:r):s.isDirectory()?Kr(t,e,r,n):e.unlink(t,n)})})}function Wa(t,e,r){let n;H(t),H(e);try{e.chmodSync(t,438)}catch(i){if(i.code==="ENOENT")return;throw r}try{n=e.statSync(t)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?Qr(t,e,r):e.unlinkSync(t)}function Kr(t,e,r,n){H(t),H(e),H(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?C0(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function C0(t,e,r){H(t),H(e),H(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let o=i.length,s;if(o===0)return e.rmdir(t,r);i.forEach(a=>{Ti(Ja.join(t,a),e,c=>{if(!s){if(c)return r(s=c);--o===0&&e.rmdir(t,r)}})})})}function Ya(t,e){let r;e=e||{},Va(e),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H(e,"rimraf: missing options"),H.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&dr&&Wa(t,e,n)}try{r&&r.isDirectory()?Qr(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return dr?Wa(t,e,n):Qr(t,e,n);if(n.code!=="EISDIR")throw n;Qr(t,e,n)}}function Qr(t,e,r){H(t),H(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")P0(t,e);else if(n.code!=="ENOENT")throw n}}function P0(t,e){if(H(t),H(e),e.readdirSync(t).forEach(r=>Ya(Ja.join(t,r),e)),dr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Ka.exports=Ti;Ti.sync=Ya});var hr=y((i2,ec)=>{"use strict";var D0=Ce().fromCallback,Za=Qa();ec.exports={remove:D0(Za),removeSync:Za.sync}});var cc=y((o2,ac)=>{"use strict";var O0=Ce().fromCallback,nc=de(),ic=require("path"),oc=je(),sc=hr(),tc=O0(function(e,r){r=r||function(){},nc.readdir(e,(n,i)=>{if(n)return oc.mkdirs(e,r);i=i.map(s=>ic.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();sc.remove(s,a=>{if(a)return r(a);o()})}})});function rc(t){let e;try{e=nc.readdirSync(t)}catch{return oc.mkdirsSync(t)}e.forEach(r=>{r=ic.join(t,r),sc.removeSync(r)})}ac.exports={emptyDirSync:rc,emptydirSync:rc,emptyDir:tc,emptydir:tc}});var dc=y((s2,fc)=>{"use strict";var I0=Ce().fromCallback,uc=require("path"),at=de(),lc=je();function A0(t,e){function r(){at.writeFile(t,"",n=>{if(n)return e(n);e()})}at.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=uc.dirname(t);at.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?lc.mkdirs(o,c=>{if(c)return e(c);r()}):e(s);a.isDirectory()?r():at.readdir(o,c=>{if(c)return e(c)})})})}function F0(t){let e;try{e=at.statSync(t)}catch{}if(e&&e.isFile())return;let r=uc.dirname(t);try{at.statSync(r).isDirectory()||at.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")lc.mkdirsSync(r);else throw n}at.writeFileSync(t,"")}fc.exports={createFile:I0(A0),createFileSync:F0}});var yc=y((a2,gc)=>{"use strict";var R0=Ce().fromCallback,pc=require("path"),bt=de(),mc=je(),hc=st().pathExists;function T0(t,e,r){function n(i,o){bt.link(i,o,s=>{if(s)return r(s);r(null)})}hc(e,(i,o)=>{if(i)return r(i);if(o)return r(null);bt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=pc.dirname(e);hc(a,(c,d)=>{if(c)return r(c);if(d)return n(t,e);mc.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function k0(t,e){if(bt.existsSync(e))return;try{bt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=pc.dirname(e);return bt.existsSync(n)||mc.mkdirsSync(n),bt.linkSync(t,e)}gc.exports={createLink:R0(T0),createLinkSync:k0}});var bc=y((c2,vc)=>{"use strict";var ct=require("path"),pr=de(),M0=st().pathExists;function q0(t,e,r){if(ct.isAbsolute(t))return pr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=ct.dirname(e),i=ct.join(n,t);return M0(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:t}):pr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:ct.relative(n,t)})))}}function j0(t,e){let r;if(ct.isAbsolute(t)){if(r=pr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=ct.dirname(e),i=ct.join(n,t);if(r=pr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=pr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:ct.relative(n,t)}}}vc.exports={symlinkPaths:q0,symlinkPathsSync:j0}});var Sc=y((u2,wc)=>{"use strict";var _c=de();function N0(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);_c.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function L0(t,e){let r;if(e)return e;try{r=_c.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}wc.exports={symlinkType:N0,symlinkTypeSync:L0}});var Ic=y((l2,Oc)=>{"use strict";var $0=Ce().fromCallback,Ec=require("path"),qt=de(),Cc=je(),B0=Cc.mkdirs,U0=Cc.mkdirsSync,Pc=bc(),X0=Pc.symlinkPaths,G0=Pc.symlinkPathsSync,Dc=Sc(),H0=Dc.symlinkType,z0=Dc.symlinkTypeSync,xc=st().pathExists;function W0(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,xc(e,(i,o)=>{if(i)return n(i);if(o)return n(null);X0(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,H0(a.toCwd,r,(c,d)=>{if(c)return n(c);let u=Ec.dirname(e);xc(u,(p,g)=>{if(p)return n(p);if(g)return qt.symlink(t,e,d,n);B0(u,m=>{if(m)return n(m);qt.symlink(t,e,d,n)})})})})})}function J0(t,e,r){if(qt.existsSync(e))return;let i=G0(t,e);t=i.toDst,r=z0(i.toCwd,r);let o=Ec.dirname(e);return qt.existsSync(o)||U0(o),qt.symlinkSync(t,e,r)}Oc.exports={createSymlink:$0(W0),createSymlinkSync:J0}});var Fc=y((f2,Ac)=>{"use strict";var Zr=dc(),en=yc(),tn=Ic();Ac.exports={createFile:Zr.createFile,createFileSync:Zr.createFileSync,ensureFile:Zr.createFile,ensureFileSync:Zr.createFileSync,createLink:en.createLink,createLinkSync:en.createLinkSync,ensureLink:en.createLink,ensureLinkSync:en.createLinkSync,createSymlink:tn.createSymlink,createSymlinkSync:tn.createSymlinkSync,ensureSymlink:tn.createSymlink,ensureSymlinkSync:tn.createSymlinkSync}});var rn=y((d2,Rc)=>{function V0(t,{EOL:e=`
8
- `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+o}function Y0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Rc.exports={stringify:V0,stripBom:Y0}});var qc=y((h2,Mc)=>{var jt;try{jt=de()}catch{jt=require("fs")}var nn=Ce(),{stringify:Tc,stripBom:kc}=rn();async function K0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0,i=await nn.fromCallback(r.readFile)(t,e);i=kc(i);let o;try{o=JSON.parse(i,e?e.reviver:null)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}return o}var Q0=nn.fromPromise(K0);function Z0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=kc(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function em(t,e,r={}){let n=r.fs||jt,i=Tc(e,r);await nn.fromCallback(n.writeFile)(t,i,r)}var tm=nn.fromPromise(em);function rm(t,e,r={}){let n=r.fs||jt,i=Tc(e,r);return n.writeFileSync(t,i,r)}var nm={readFile:Q0,readFileSync:Z0,writeFile:tm,writeFileSync:rm};Mc.exports=nm});var Nc=y((p2,jc)=>{"use strict";var on=qc();jc.exports={readJson:on.readFile,readJsonSync:on.readFileSync,writeJson:on.writeFile,writeJsonSync:on.writeFileSync}});var sn=y((m2,Bc)=>{"use strict";var im=Ce().fromCallback,mr=de(),Lc=require("path"),$c=je(),om=st().pathExists;function sm(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Lc.dirname(t);om(i,(o,s)=>{if(o)return n(o);if(s)return mr.writeFile(t,e,r,n);$c.mkdirs(i,a=>{if(a)return n(a);mr.writeFile(t,e,r,n)})})}function am(t,...e){let r=Lc.dirname(t);if(mr.existsSync(r))return mr.writeFileSync(t,...e);$c.mkdirsSync(r),mr.writeFileSync(t,...e)}Bc.exports={outputFile:im(sm),outputFileSync:am}});var Xc=y((g2,Uc)=>{"use strict";var{stringify:cm}=rn(),{outputFile:um}=sn();async function lm(t,e,r={}){let n=cm(e,r);await um(t,n,r)}Uc.exports=lm});var Hc=y((y2,Gc)=>{"use strict";var{stringify:fm}=rn(),{outputFileSync:dm}=sn();function hm(t,e,r){let n=fm(e,r);dm(t,n,r)}Gc.exports=hm});var Wc=y((v2,zc)=>{"use strict";var pm=Ce().fromPromise,be=Nc();be.outputJson=pm(Xc());be.outputJsonSync=Hc();be.outputJSON=be.outputJson;be.outputJSONSync=be.outputJsonSync;be.writeJSON=be.writeJson;be.writeJSONSync=be.writeJsonSync;be.readJSON=be.readJson;be.readJSONSync=be.readJsonSync;zc.exports=be});var Zc=y((b2,Qc)=>{"use strict";var Yc=de(),mm=require("path"),gm=Ai().copySync,Kc=hr().removeSync,ym=je().mkdirpSync,Jc=ar();function vm(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=Jc.checkPathsSync(t,e,"move");return Jc.checkParentPathsSync(t,i,e,"move"),ym(mm.dirname(e)),bm(t,e,n)}function bm(t,e,r){if(r)return Kc(e),Vc(t,e,r);if(Yc.existsSync(e))throw new Error("dest already exists.");return Vc(t,e,r)}function Vc(t,e,r){try{Yc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return _m(t,e,r)}}function _m(t,e,r){return gm(t,e,{overwrite:r,errorOnExist:!0}),Kc(t)}Qc.exports=vm});var tu=y((_2,eu)=>{"use strict";eu.exports={moveSync:Zc()}});var su=y((w2,ou)=>{"use strict";var wm=de(),Sm=require("path"),xm=Ri().copy,iu=hr().remove,Em=je().mkdirp,Cm=st().pathExists,ru=ar();function Pm(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;ru.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;ru.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);Em(Sm.dirname(e),d=>d?n(d):Dm(t,e,i,n))})})}function Dm(t,e,r,n){if(r)return iu(e,i=>i?n(i):nu(t,e,r,n));Cm(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):nu(t,e,r,n))}function nu(t,e,r,n){wm.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Om(t,e,r,n):n())}function Om(t,e,r,n){xm(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):iu(t,n))}ou.exports=Pm});var cu=y((S2,au)=>{"use strict";var Im=Ce().fromCallback;au.exports={move:Im(su())}});var _t=y((x2,ki)=>{"use strict";ki.exports={...sr(),...Ai(),...Ri(),...cc(),...Fc(),...Wc(),...je(),...tu(),...cu(),...sn(),...st(),...hr()};var uu=require("fs");Object.getOwnPropertyDescriptor(uu,"promises")&&Object.defineProperty(ki.exports,"promises",{get(){return uu.promises}})});var fu=y((E2,lu)=>{"use strict";var Am=/[|\\{}()[\]^$+*?.]/g;lu.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Am,"\\$&")}});var hu=y((C2,du)=>{"use strict";du.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Mi=y((P2,yu)=>{var wt=hu(),gu={};for(an in wt)wt.hasOwnProperty(an)&&(gu[wt[an]]=an);var an,E=yu.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(_e in E)if(E.hasOwnProperty(_e)){if(!("channels"in E[_e]))throw new Error("missing channels property: "+_e);if(!("labels"in E[_e]))throw new Error("missing channel labels property: "+_e);if(E[_e].labels.length!==E[_e].channels)throw new Error("channel and label counts mismatch: "+_e);pu=E[_e].channels,mu=E[_e].labels,delete E[_e].channels,delete E[_e].labels,Object.defineProperty(E[_e],"channels",{value:pu}),Object.defineProperty(E[_e],"labels",{value:mu})}var pu,mu,_e;E.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c,d;return o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360),d=(i+o)/2,o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};E.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?i=o=0:(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*100]};E.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=E.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};E.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,o,s,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,[i*100,o*100,s*100,a*100]};function Fm(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}E.rgb.keyword=function(t){var e=gu[t];if(e)return e;var r=1/0,n;for(var i in wt)if(wt.hasOwnProperty(i)){var o=wt[i],s=Fm(t,o);s<r&&(r=s,n=i)}return n};E.keyword.rgb=function(t){return wt[t]};E.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};E.rgb.lab=function(t){var e=E.rgb.xyz(t),r=e[0],n=e[1],i=e[2],o,s,a;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*n-16,s=500*(r-n),a=200*(n-i),[o,s,a]};E.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,a=[0,0,0];for(var d=0;d<3;d++)s=e+1/3*-(d-1),s<0&&s++,s>1&&s--,6*s<1?c=i+(o-i)*6*s:2*s<1?c=o:3*s<2?c=i+(o-i)*(2/3-s)*6:c=i,a[d]=c*255;return a};E.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01),s,a;return n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o,a=(n+r)/2,s=n===0?2*i/(o+i):2*r/(n+r),[e,s*100,a*100]};E.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};E.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s,a;return a=(2-r)*n,o=(2-r)*i,s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]};E.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o,s,a,c;i>1&&(r/=i,n/=i),o=Math.floor(6*e),s=1-n,a=6*e-o,o&1&&(a=1-a),c=r+a*(s-r);var d,u,p;switch(o){default:case 6:case 0:d=s,u=c,p=r;break;case 1:d=c,u=s,p=r;break;case 2:d=r,u=s,p=c;break;case 3:d=r,u=c,p=s;break;case 4:d=c,u=r,p=s;break;case 5:d=s,u=r,p=c;break}return[d*255,u*255,p*255]};E.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o,s,a;return o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[o*255,s*255,a*255]};E.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};E.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,o=500*(e-r),s=200*(r-n),[i,o,s]};E.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;var a=Math.pow(o,3),c=Math.pow(i,3),d=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};E.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return i=Math.atan2(n,r),o=i*360/2/Math.PI,o<0&&(o+=360),s=Math.sqrt(r*r+n*n),[e,s,o]};E.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return s=n/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s),[e,i,o]};E.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:E.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(o+=60),o};E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])};E.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};E.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};E.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,o=r%6/5*255;return[n,i,o]};E.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};E.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(a){return a+a}).join(""));var n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};E.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s+4,c/=6,c%=1,[c*360,s*100,a*100]};E.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,i=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};E.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};E.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};E.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};E.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};E.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};E.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};E.gray.hsl=E.gray.hsv=function(t){return[0,0,t[0]]};E.gray.hwb=function(t){return[0,100,t[0]]};E.gray.cmyk=function(t){return[0,0,0,t[0]]};E.gray.lab=function(t){return[t[0],0,0]};E.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};E.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var bu=y((D2,vu)=>{var cn=Mi();function Rm(){for(var t={},e=Object.keys(cn),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Tm(t){var e=Rm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(cn[n]),o=i.length,s=0;s<o;s++){var a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function km(t,e){return function(r){return e(t(r))}}function Mm(t,e){for(var r=[e[t].parent,t],n=cn[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=km(cn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}vu.exports=function(t){for(var e=Tm(t),r={},n=Object.keys(e),i=n.length,o=0;o<i;o++){var s=n[o],a=e[s];a.parent!==null&&(r[s]=Mm(s,e))}return r}});var wu=y((O2,_u)=>{var qi=Mi(),qm=bu(),Nt={},jm=Object.keys(qi);function Nm(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Lm(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,o=0;o<i;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}jm.forEach(function(t){Nt[t]={},Object.defineProperty(Nt[t],"channels",{value:qi[t].channels}),Object.defineProperty(Nt[t],"labels",{value:qi[t].labels});var e=qm(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];Nt[t][n]=Lm(i),Nt[t][n].raw=Nm(i)})});_u.exports=Nt});var xu=y((I2,Su)=>{"use strict";var Lt=wu(),un=(t,e)=>function(){return`\x1B[${t.apply(Lt,arguments)+e}m`},ln=(t,e)=>function(){let r=t.apply(Lt,arguments);return`\x1B[${38+e};5;${r}m`},fn=(t,e)=>function(){let r=t.apply(Lt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function $m(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let o=e[i];for(let s of Object.keys(o)){let a=o[s];e[s]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},o[s]=e[s],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:o,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,o,s)=>[i,o,s];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:un(r,0)},e.color.ansi256={ansi256:ln(r,0)},e.color.ansi16m={rgb:fn(n,0)},e.bgColor.ansi={ansi:un(r,10)},e.bgColor.ansi256={ansi256:ln(r,10)},e.bgColor.ansi16m={rgb:fn(n,10)};for(let i of Object.keys(Lt)){if(typeof Lt[i]!="object")continue;let o=Lt[i];i==="ansi16"&&(i="ansi"),"ansi16"in o&&(e.color.ansi[i]=un(o.ansi16,0),e.bgColor.ansi[i]=un(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=ln(o.ansi256,0),e.bgColor.ansi256[i]=ln(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=fn(o.rgb,0),e.bgColor.ansi16m[i]=fn(o.rgb,10))}return e}Object.defineProperty(Su,"exports",{enumerable:!0,get:$m})});var Cu=y((A2,Eu)=>{"use strict";Eu.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Du=y((F2,Pu)=>{"use strict";var Bm=require("os"),Ne=Cu(),pe=process.env,$t;Ne("no-color")||Ne("no-colors")||Ne("color=false")?$t=!1:(Ne("color")||Ne("colors")||Ne("color=true")||Ne("color=always"))&&($t=!0);"FORCE_COLOR"in pe&&($t=pe.FORCE_COLOR.length===0||parseInt(pe.FORCE_COLOR,10)!==0);function Um(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Xm(t){if($t===!1)return 0;if(Ne("color=16m")||Ne("color=full")||Ne("color=truecolor"))return 3;if(Ne("color=256"))return 2;if(t&&!t.isTTY&&$t!==!0)return 0;let e=$t?1:0;if(process.platform==="win32"){let r=Bm.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in pe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in pe)||pe.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in pe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(pe.TEAMCITY_VERSION)?1:0;if(pe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in pe){let r=parseInt((pe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(pe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(pe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(pe.TERM)||"COLORTERM"in pe?1:(pe.TERM==="dumb",e)}function ji(t){let e=Xm(t);return Um(e)}Pu.exports={supportsColor:ji,stdout:ji(process.stdout),stderr:ji(process.stderr)}});var Ru=y((R2,Fu)=>{"use strict";var Gm=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Ou=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Hm=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,zm=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Wm=new Map([["n",`
9
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Au(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Wm.get(t)||t}function Jm(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n)if(!isNaN(o))r.push(Number(o));else if(i=o.match(Hm))r.push(i[2].replace(zm,(s,a,c)=>a?Au(a):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function Vm(t){Ou.lastIndex=0;let e=[],r;for(;(r=Ou.exec(t))!==null;){let n=r[1];if(r[2]){let i=Jm(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Iu(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let i of Object.keys(r))if(Array.isArray(r[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);r[i].length>0?n=n[i].apply(n,r[i]):n=n[i]}return n}Fu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Gm,(o,s,a,c,d,u)=>{if(s)i.push(Au(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Iu(t,r)(p)),r.push({inverse:a,styles:Vm(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Iu(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var hn=y((T2,yr)=>{"use strict";var Li=fu(),Q=xu(),Ni=Du().stdout,Ym=Ru(),ku=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Mu=["ansi","ansi","ansi256","ansi16m"],qu=new Set(["gray"]),Bt=Object.create(null);function Tu(t,e){e=e||{};let r=Ni?Ni.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function gr(t){if(!this||!(this instanceof gr)||this.template){let e={};return Tu(e,t),e.template=function(){let r=[].slice.call(arguments);return Zm.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,gr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=gr,e.template}Tu(this,t)}ku&&(Q.blue.open="\x1B[94m");for(let t of Object.keys(Q))Q[t].closeRe=new RegExp(Li(Q[t].close),"g"),Bt[t]={get(){let e=Q[t];return dn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Bt.visible={get(){return dn.call(this,this._styles||[],!0,"visible")}};Q.color.closeRe=new RegExp(Li(Q.color.close),"g");for(let t of Object.keys(Q.color.ansi))qu.has(t)||(Bt[t]={get(){let e=this.level;return function(){let n={open:Q.color[Mu[e]][t].apply(null,arguments),close:Q.color.close,closeRe:Q.color.closeRe};return dn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Q.bgColor.closeRe=new RegExp(Li(Q.bgColor.close),"g");for(let t of Object.keys(Q.bgColor.ansi)){if(qu.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Bt[e]={get(){let r=this.level;return function(){let i={open:Q.bgColor[Mu[r]][t].apply(null,arguments),close:Q.bgColor.close,closeRe:Q.bgColor.closeRe};return dn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var Km=Object.defineProperties(()=>{},Bt);function dn(t,e,r){let n=function(){return Qm.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(o){i.level=o}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(o){i.enabled=o}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=Km,n}function Qm(){let t=arguments,e=t.length,r=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)r+=" "+t[i];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let n=Q.dim.open;ku&&this.hasGrey&&(Q.dim.open="");for(let i of this._styles.slice().reverse())r=i.open+r.replace(i.closeRe,i.open)+i.close,r=r.replace(/\r?\n/g,`${i.close}$&${i.open}`);return Q.dim.open=n,r}function Zm(t,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(r[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return Ym(t,n.join(""))}Object.defineProperties(gr.prototype,Bt);yr.exports=gr();yr.exports.supportsColor=Ni;yr.exports.default=yr.exports});var Nu=y((k2,ju)=>{"use strict";ju.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var $i=y((M2,$u)=>{var vr=Nu(),Lu={};for(let t of Object.keys(vr))Lu[vr[t]]=t;var C={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};$u.exports=C;for(let t of Object.keys(C)){if(!("channels"in C[t]))throw new Error("missing channels property: "+t);if(!("labels"in C[t]))throw new Error("missing channel labels property: "+t);if(C[t].labels.length!==C[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=C[t];delete C[t].channels,delete C[t].labels,Object.defineProperty(C[t],"channels",{value:e}),Object.defineProperty(C[t],"labels",{value:r})}C.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c;o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let d=(i+o)/2;return o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};C.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?(i=0,o=0):(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*100]};C.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=C.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};C.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function eg(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}C.rgb.keyword=function(t){let e=Lu[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(vr)){let o=vr[i],s=eg(t,o);s<r&&(r=s,n=i)}return n};C.keyword.rgb=function(t){return vr[t]};C.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};C.rgb.lab=function(t){let e=C.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};C.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let d=0;d<3;d++)o=e+1/3*-(d-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,c[d]=s*255;return c};C.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};C.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};C.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};C.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,s&1&&(o=1-o);let c=r+o*(a-r),d,u,p;switch(s){default:case 6:case 0:d=a,u=c,p=r;break;case 1:d=c,u=a,p=r;break;case 2:d=r,u=a,p=c;break;case 3:d=r,u=c,p=a;break;case 4:d=c,u=r,p=a;break;case 5:d=a,u=r,p=c;break}return[d*255,u*255,p*255]};C.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};C.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};C.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};C.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,c=i**3,d=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};C.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};C.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};C.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?C.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};C.hsv.ansi16=function(t){return C.rgb.ansi16(C.hsv.rgb(t),t[2])};C.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};C.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};C.ansi256.rgb=function(t){if(t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};C.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};C.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};C.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s,c/=6,c%=1,[c*360,s*100,a*100]};C.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};C.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};C.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};C.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};C.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};C.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};C.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};C.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};C.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};C.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};C.gray.hsl=function(t){return[0,0,t[0]]};C.gray.hsv=C.gray.hsl;C.gray.hwb=function(t){return[0,100,t[0]]};C.gray.cmyk=function(t){return[0,0,0,t[0]]};C.gray.lab=function(t){return[t[0],0,0]};C.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n};C.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Uu=y((q2,Bu)=>{var pn=$i();function tg(){let t={},e=Object.keys(pn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function rg(t){let e=tg(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(pn[n]);for(let o=i.length,s=0;s<o;s++){let a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function ng(t,e){return function(r){return e(t(r))}}function ig(t,e){let r=[e[t].parent,t],n=pn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=ng(pn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Bu.exports=function(t){let e=rg(t),r={},n=Object.keys(e);for(let i=n.length,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=ig(s,e))}return r}});var Gu=y((j2,Xu)=>{var Bi=$i(),og=Uu(),Ut={},sg=Object.keys(Bi);function ag(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function cg(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}sg.forEach(t=>{Ut[t]={},Object.defineProperty(Ut[t],"channels",{value:Bi[t].channels}),Object.defineProperty(Ut[t],"labels",{value:Bi[t].labels});let e=og(t);Object.keys(e).forEach(n=>{let i=e[n];Ut[t][n]=cg(i),Ut[t][n].raw=ag(i)})});Xu.exports=Ut});var Yu=y((N2,Vu)=>{"use strict";var Hu=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,zu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Wu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},mn=t=>t,Ju=(t,e,r)=>[t,e,r],Xt=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},Ui,Gt=(t,e,r,n)=>{Ui===void 0&&(Ui=Gu());let i=n?10:0,o={};for(let[s,a]of Object.entries(Ui)){let c=s==="ansi16"?"ansi":s;s===e?o[c]=t(r,i):typeof a=="object"&&(o[c]=t(a[e],i))}return o};function ug(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,n]of Object.entries(e)){for(let[i,o]of Object.entries(n))e[i]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[i]=e[i],t.set(o[0],o[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Xt(e.color,"ansi",()=>Gt(Hu,"ansi16",mn,!1)),Xt(e.color,"ansi256",()=>Gt(zu,"ansi256",mn,!1)),Xt(e.color,"ansi16m",()=>Gt(Wu,"rgb",Ju,!1)),Xt(e.bgColor,"ansi",()=>Gt(Hu,"ansi16",mn,!0)),Xt(e.bgColor,"ansi256",()=>Gt(zu,"ansi256",mn,!0)),Xt(e.bgColor,"ansi16m",()=>Gt(Wu,"rgb",Ju,!0)),e}Object.defineProperty(Vu,"exports",{enumerable:!0,get:ug})});var Qu=y((L2,Ku)=>{"use strict";Ku.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Hi=y(($2,el)=>{"use strict";var lg=require("os"),Zu=require("tty"),ke=Qu(),{env:te}=process,ut;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?ut=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(ut=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?ut=1:te.FORCE_COLOR==="false"?ut=0:ut=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function Xi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Gi(t,e){if(ut===0)return 0;if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2;if(t&&!e&&ut===void 0)return 0;let r=ut||0;if(te.TERM==="dumb")return r;if(process.platform==="win32"){let n=lg.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function fg(t){let e=Gi(t,t&&t.isTTY);return Xi(e)}el.exports={supportsColor:fg,stdout:Xi(Gi(!0,Zu.isatty(1))),stderr:Xi(Gi(!0,Zu.isatty(2)))}});var rl=y((B2,tl)=>{"use strict";var dg=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,o=0,s="";do s+=t.substr(o,n-o)+e+r,o=n+i,n=t.indexOf(e,o);while(n!==-1);return s+=t.substr(o),s},hg=(t,e,r,n)=>{let i=0,o="";do{let s=t[n-1]==="\r";o+=t.substr(i,(s?n-1:n)-i)+e+(s?`\r
7
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),fr.checkPaths(t,e,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;fr.checkParentPaths(t,s,e,"copy",c=>c?n(c):r.filter?ja(ka,a,t,e,r,n):ka(a,t,e,r,n))})}function ka(t,e,r,n,i){let o=lr.dirname(r);f0(o,(s,a)=>{if(s)return i(s);if(a)return Ri(t,e,r,n,i);l0(o,c=>c?i(c):Ri(t,e,r,n,i))})}function ja(t,e,r,n,i,o){Promise.resolve(i.filter(r,n)).then(s=>s?t(e,r,n,i,o):o(),s=>o(s))}function Ri(t,e,r,n,i){return n.filter?ja(Ma,t,e,r,n,i):Ma(t,e,r,n,i)}function Ma(t,e,r,n,i){(n.dereference?De.stat:De.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return _0(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return p0(a,t,e,r,n,i);if(a.isSymbolicLink())return x0(t,e,r,n,i)})}function p0(t,e,r,n,i,o){return e?m0(t,r,n,i,o):Na(t,r,n,i,o)}function m0(t,e,r,n,i){if(n.overwrite)De.unlink(r,o=>o?i(o):Na(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Na(t,e,r,n,i){De.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?g0(t.mode,e,r,i):Yr(r,t.mode,i))}function g0(t,e,r,n){return y0(t)?v0(r,t,i=>i?n(i):qa(t,e,r,n)):qa(t,e,r,n)}function y0(t){return(t&128)===0}function v0(t,e,r){return Yr(t,e|128,r)}function qa(t,e,r,n){b0(e,r,i=>i?n(i):Yr(r,t,n))}function Yr(t,e,r){return De.chmod(t,e,r)}function b0(t,e,r){De.stat(t,(n,i)=>n?r(n):d0(e,i.atime,i.mtime,r))}function _0(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):La(r,n,i,o):w0(t.mode,r,n,i,o)}function w0(t,e,r,n,i){De.mkdir(r,o=>{if(o)return i(o);La(e,r,n,s=>s?i(s):Yr(r,t,i))})}function La(t,e,r,n){De.readdir(t,(i,o)=>i?n(i):$a(o,t,e,r,n))}function $a(t,e,r,n,i){let o=t.pop();return o?S0(t,o,e,r,n,i):i()}function S0(t,e,r,n,i,o){let s=lr.join(r,e),a=lr.join(n,e);fr.checkPaths(s,a,"copy",(c,d)=>{if(c)return o(c);let{destStat:u}=d;Ri(u,s,a,i,p=>p?o(p):$a(t,r,n,i,o))})}function x0(t,e,r,n,i){De.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=lr.resolve(process.cwd(),s)),t)De.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?De.symlink(s,r,i):i(a):(n.dereference&&(c=lr.resolve(process.cwd(),c)),fr.isSrcSubdir(s,c)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&fr.isSrcSubdir(c,s)?i(new Error(`Cannot overwrite '${c}' with '${s}'.`)):E0(s,r,i)));else return De.symlink(s,r,i)})}function E0(t,e,r){De.unlink(e,n=>n?r(n):De.symlink(t,e,r))}Ba.exports=h0});var Ti=y((r2,Xa)=>{"use strict";var C0=Ce().fromCallback;Xa.exports={copy:C0(Ua())}});var Qa=y((n2,Ka)=>{"use strict";var Ga=de(),Ja=require("path"),H=require("assert"),dr=process.platform==="win32";function Va(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ga[r],r=r+"Sync",t[r]=t[r]||Ga[r]}),t.maxBusyTries=t.maxBusyTries||3}function ki(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H.strictEqual(typeof r,"function","rimraf: callback function required"),H(e,"rimraf: invalid options argument provided"),H.strictEqual(typeof e,"object","rimraf: options should be object"),Va(e),Ha(t,e,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<e.maxBusyTries){n++;let s=n*100;return setTimeout(()=>Ha(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function Ha(t,e,r){H(t),H(e),H(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&dr)return za(t,e,n,r);if(i&&i.isDirectory())return Kr(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return dr?za(t,e,o,r):Kr(t,e,o,r);if(o.code==="EISDIR")return Kr(t,e,o,r)}return r(o)})})}function za(t,e,r,n){H(t),H(e),H(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(o,s)=>{o?n(o.code==="ENOENT"?null:r):s.isDirectory()?Kr(t,e,r,n):e.unlink(t,n)})})}function Wa(t,e,r){let n;H(t),H(e);try{e.chmodSync(t,438)}catch(i){if(i.code==="ENOENT")return;throw r}try{n=e.statSync(t)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?Qr(t,e,r):e.unlinkSync(t)}function Kr(t,e,r,n){H(t),H(e),H(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?P0(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function P0(t,e,r){H(t),H(e),H(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let o=i.length,s;if(o===0)return e.rmdir(t,r);i.forEach(a=>{ki(Ja.join(t,a),e,c=>{if(!s){if(c)return r(s=c);--o===0&&e.rmdir(t,r)}})})})}function Ya(t,e){let r;e=e||{},Va(e),H(t,"rimraf: missing path"),H.strictEqual(typeof t,"string","rimraf: path should be a string"),H(e,"rimraf: missing options"),H.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&dr&&Wa(t,e,n)}try{r&&r.isDirectory()?Qr(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return dr?Wa(t,e,n):Qr(t,e,n);if(n.code!=="EISDIR")throw n;Qr(t,e,n)}}function Qr(t,e,r){H(t),H(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")D0(t,e);else if(n.code!=="ENOENT")throw n}}function D0(t,e){if(H(t),H(e),e.readdirSync(t).forEach(r=>Ya(Ja.join(t,r),e)),dr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Ka.exports=ki;ki.sync=Ya});var hr=y((i2,ec)=>{"use strict";var O0=Ce().fromCallback,Za=Qa();ec.exports={remove:O0(Za),removeSync:Za.sync}});var cc=y((o2,ac)=>{"use strict";var I0=Ce().fromCallback,nc=de(),ic=require("path"),oc=je(),sc=hr(),tc=I0(function(e,r){r=r||function(){},nc.readdir(e,(n,i)=>{if(n)return oc.mkdirs(e,r);i=i.map(s=>ic.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();sc.remove(s,a=>{if(a)return r(a);o()})}})});function rc(t){let e;try{e=nc.readdirSync(t)}catch{return oc.mkdirsSync(t)}e.forEach(r=>{r=ic.join(t,r),sc.removeSync(r)})}ac.exports={emptyDirSync:rc,emptydirSync:rc,emptyDir:tc,emptydir:tc}});var dc=y((s2,fc)=>{"use strict";var A0=Ce().fromCallback,uc=require("path"),ct=de(),lc=je();function F0(t,e){function r(){ct.writeFile(t,"",n=>{if(n)return e(n);e()})}ct.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=uc.dirname(t);ct.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?lc.mkdirs(o,c=>{if(c)return e(c);r()}):e(s);a.isDirectory()?r():ct.readdir(o,c=>{if(c)return e(c)})})})}function R0(t){let e;try{e=ct.statSync(t)}catch{}if(e&&e.isFile())return;let r=uc.dirname(t);try{ct.statSync(r).isDirectory()||ct.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")lc.mkdirsSync(r);else throw n}ct.writeFileSync(t,"")}fc.exports={createFile:A0(F0),createFileSync:R0}});var yc=y((a2,gc)=>{"use strict";var T0=Ce().fromCallback,pc=require("path"),bt=de(),mc=je(),hc=at().pathExists;function k0(t,e,r){function n(i,o){bt.link(i,o,s=>{if(s)return r(s);r(null)})}hc(e,(i,o)=>{if(i)return r(i);if(o)return r(null);bt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=pc.dirname(e);hc(a,(c,d)=>{if(c)return r(c);if(d)return n(t,e);mc.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function M0(t,e){if(bt.existsSync(e))return;try{bt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=pc.dirname(e);return bt.existsSync(n)||mc.mkdirsSync(n),bt.linkSync(t,e)}gc.exports={createLink:T0(k0),createLinkSync:M0}});var bc=y((c2,vc)=>{"use strict";var ut=require("path"),pr=de(),q0=at().pathExists;function j0(t,e,r){if(ut.isAbsolute(t))return pr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=ut.dirname(e),i=ut.join(n,t);return q0(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:t}):pr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:ut.relative(n,t)})))}}function N0(t,e){let r;if(ut.isAbsolute(t)){if(r=pr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=ut.dirname(e),i=ut.join(n,t);if(r=pr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=pr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:ut.relative(n,t)}}}vc.exports={symlinkPaths:j0,symlinkPathsSync:N0}});var Sc=y((u2,wc)=>{"use strict";var _c=de();function L0(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);_c.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function $0(t,e){let r;if(e)return e;try{r=_c.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}wc.exports={symlinkType:L0,symlinkTypeSync:$0}});var Ic=y((l2,Oc)=>{"use strict";var B0=Ce().fromCallback,Ec=require("path"),qt=de(),Cc=je(),U0=Cc.mkdirs,X0=Cc.mkdirsSync,Pc=bc(),G0=Pc.symlinkPaths,H0=Pc.symlinkPathsSync,Dc=Sc(),z0=Dc.symlinkType,W0=Dc.symlinkTypeSync,xc=at().pathExists;function J0(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,xc(e,(i,o)=>{if(i)return n(i);if(o)return n(null);G0(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,z0(a.toCwd,r,(c,d)=>{if(c)return n(c);let u=Ec.dirname(e);xc(u,(p,g)=>{if(p)return n(p);if(g)return qt.symlink(t,e,d,n);U0(u,m=>{if(m)return n(m);qt.symlink(t,e,d,n)})})})})})}function V0(t,e,r){if(qt.existsSync(e))return;let i=H0(t,e);t=i.toDst,r=W0(i.toCwd,r);let o=Ec.dirname(e);return qt.existsSync(o)||X0(o),qt.symlinkSync(t,e,r)}Oc.exports={createSymlink:B0(J0),createSymlinkSync:V0}});var Fc=y((f2,Ac)=>{"use strict";var Zr=dc(),en=yc(),tn=Ic();Ac.exports={createFile:Zr.createFile,createFileSync:Zr.createFileSync,ensureFile:Zr.createFile,ensureFileSync:Zr.createFileSync,createLink:en.createLink,createLinkSync:en.createLinkSync,ensureLink:en.createLink,ensureLinkSync:en.createLinkSync,createSymlink:tn.createSymlink,createSymlinkSync:tn.createSymlinkSync,ensureSymlink:tn.createSymlink,ensureSymlinkSync:tn.createSymlinkSync}});var rn=y((d2,Rc)=>{function Y0(t,{EOL:e=`
8
+ `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+o}function K0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Rc.exports={stringify:Y0,stripBom:K0}});var qc=y((h2,Mc)=>{var jt;try{jt=de()}catch{jt=require("fs")}var nn=Ce(),{stringify:Tc,stripBom:kc}=rn();async function Q0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0,i=await nn.fromCallback(r.readFile)(t,e);i=kc(i);let o;try{o=JSON.parse(i,e?e.reviver:null)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}return o}var Z0=nn.fromPromise(Q0);function em(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=kc(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function tm(t,e,r={}){let n=r.fs||jt,i=Tc(e,r);await nn.fromCallback(n.writeFile)(t,i,r)}var rm=nn.fromPromise(tm);function nm(t,e,r={}){let n=r.fs||jt,i=Tc(e,r);return n.writeFileSync(t,i,r)}var im={readFile:Z0,readFileSync:em,writeFile:rm,writeFileSync:nm};Mc.exports=im});var Nc=y((p2,jc)=>{"use strict";var on=qc();jc.exports={readJson:on.readFile,readJsonSync:on.readFileSync,writeJson:on.writeFile,writeJsonSync:on.writeFileSync}});var sn=y((m2,Bc)=>{"use strict";var om=Ce().fromCallback,mr=de(),Lc=require("path"),$c=je(),sm=at().pathExists;function am(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=Lc.dirname(t);sm(i,(o,s)=>{if(o)return n(o);if(s)return mr.writeFile(t,e,r,n);$c.mkdirs(i,a=>{if(a)return n(a);mr.writeFile(t,e,r,n)})})}function cm(t,...e){let r=Lc.dirname(t);if(mr.existsSync(r))return mr.writeFileSync(t,...e);$c.mkdirsSync(r),mr.writeFileSync(t,...e)}Bc.exports={outputFile:om(am),outputFileSync:cm}});var Xc=y((g2,Uc)=>{"use strict";var{stringify:um}=rn(),{outputFile:lm}=sn();async function fm(t,e,r={}){let n=um(e,r);await lm(t,n,r)}Uc.exports=fm});var Hc=y((y2,Gc)=>{"use strict";var{stringify:dm}=rn(),{outputFileSync:hm}=sn();function pm(t,e,r){let n=dm(e,r);hm(t,n,r)}Gc.exports=pm});var Wc=y((v2,zc)=>{"use strict";var mm=Ce().fromPromise,be=Nc();be.outputJson=mm(Xc());be.outputJsonSync=Hc();be.outputJSON=be.outputJson;be.outputJSONSync=be.outputJsonSync;be.writeJSON=be.writeJson;be.writeJSONSync=be.writeJsonSync;be.readJSON=be.readJson;be.readJSONSync=be.readJsonSync;zc.exports=be});var Zc=y((b2,Qc)=>{"use strict";var Yc=de(),gm=require("path"),ym=Fi().copySync,Kc=hr().removeSync,vm=je().mkdirpSync,Jc=ar();function bm(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=Jc.checkPathsSync(t,e,"move");return Jc.checkParentPathsSync(t,i,e,"move"),vm(gm.dirname(e)),_m(t,e,n)}function _m(t,e,r){if(r)return Kc(e),Vc(t,e,r);if(Yc.existsSync(e))throw new Error("dest already exists.");return Vc(t,e,r)}function Vc(t,e,r){try{Yc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return wm(t,e,r)}}function wm(t,e,r){return ym(t,e,{overwrite:r,errorOnExist:!0}),Kc(t)}Qc.exports=bm});var tu=y((_2,eu)=>{"use strict";eu.exports={moveSync:Zc()}});var su=y((w2,ou)=>{"use strict";var Sm=de(),xm=require("path"),Em=Ti().copy,iu=hr().remove,Cm=je().mkdirp,Pm=at().pathExists,ru=ar();function Dm(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;ru.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;ru.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);Cm(xm.dirname(e),d=>d?n(d):Om(t,e,i,n))})})}function Om(t,e,r,n){if(r)return iu(e,i=>i?n(i):nu(t,e,r,n));Pm(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):nu(t,e,r,n))}function nu(t,e,r,n){Sm.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Im(t,e,r,n):n())}function Im(t,e,r,n){Em(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):iu(t,n))}ou.exports=Dm});var cu=y((S2,au)=>{"use strict";var Am=Ce().fromCallback;au.exports={move:Am(su())}});var _t=y((x2,Mi)=>{"use strict";Mi.exports={...sr(),...Fi(),...Ti(),...cc(),...Fc(),...Wc(),...je(),...tu(),...cu(),...sn(),...at(),...hr()};var uu=require("fs");Object.getOwnPropertyDescriptor(uu,"promises")&&Object.defineProperty(Mi.exports,"promises",{get(){return uu.promises}})});var fu=y((E2,lu)=>{"use strict";var Fm=/[|\\{}()[\]^$+*?.]/g;lu.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Fm,"\\$&")}});var hu=y((C2,du)=>{"use strict";du.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var qi=y((P2,yu)=>{var wt=hu(),gu={};for(an in wt)wt.hasOwnProperty(an)&&(gu[wt[an]]=an);var an,E=yu.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(_e in E)if(E.hasOwnProperty(_e)){if(!("channels"in E[_e]))throw new Error("missing channels property: "+_e);if(!("labels"in E[_e]))throw new Error("missing channel labels property: "+_e);if(E[_e].labels.length!==E[_e].channels)throw new Error("channel and label counts mismatch: "+_e);pu=E[_e].channels,mu=E[_e].labels,delete E[_e].channels,delete E[_e].labels,Object.defineProperty(E[_e],"channels",{value:pu}),Object.defineProperty(E[_e],"labels",{value:mu})}var pu,mu,_e;E.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c,d;return o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360),d=(i+o)/2,o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};E.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?i=o=0:(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*100]};E.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=E.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};E.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,o,s,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,[i*100,o*100,s*100,a*100]};function Rm(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}E.rgb.keyword=function(t){var e=gu[t];if(e)return e;var r=1/0,n;for(var i in wt)if(wt.hasOwnProperty(i)){var o=wt[i],s=Rm(t,o);s<r&&(r=s,n=i)}return n};E.keyword.rgb=function(t){return wt[t]};E.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};E.rgb.lab=function(t){var e=E.rgb.xyz(t),r=e[0],n=e[1],i=e[2],o,s,a;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*n-16,s=500*(r-n),a=200*(n-i),[o,s,a]};E.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,a=[0,0,0];for(var d=0;d<3;d++)s=e+1/3*-(d-1),s<0&&s++,s>1&&s--,6*s<1?c=i+(o-i)*6*s:2*s<1?c=o:3*s<2?c=i+(o-i)*(2/3-s)*6:c=i,a[d]=c*255;return a};E.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01),s,a;return n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o,a=(n+r)/2,s=n===0?2*i/(o+i):2*r/(n+r),[e,s*100,a*100]};E.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};E.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s,a;return a=(2-r)*n,o=(2-r)*i,s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]};E.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o,s,a,c;i>1&&(r/=i,n/=i),o=Math.floor(6*e),s=1-n,a=6*e-o,o&1&&(a=1-a),c=r+a*(s-r);var d,u,p;switch(o){default:case 6:case 0:d=s,u=c,p=r;break;case 1:d=c,u=s,p=r;break;case 2:d=r,u=s,p=c;break;case 3:d=r,u=c,p=s;break;case 4:d=c,u=r,p=s;break;case 5:d=s,u=r,p=c;break}return[d*255,u*255,p*255]};E.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o,s,a;return o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[o*255,s*255,a*255]};E.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};E.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,o=500*(e-r),s=200*(r-n),[i,o,s]};E.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;var a=Math.pow(o,3),c=Math.pow(i,3),d=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};E.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return i=Math.atan2(n,r),o=i*360/2/Math.PI,o<0&&(o+=360),s=Math.sqrt(r*r+n*n),[e,s,o]};E.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return s=n/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s),[e,i,o]};E.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:E.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(o+=60),o};E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])};E.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];if(e===r&&r===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return i};E.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};E.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,o=r%6/5*255;return[n,i,o]};E.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};E.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(a){return a+a}).join(""));var n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};E.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s+4,c/=6,c%=1,[c*360,s*100,a*100]};E.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1,i=0;return r<.5?n=2*e*r:n=2*e*(1-r),n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};E.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};E.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};E.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};E.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,n=r*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};E.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};E.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};E.gray.hsl=E.gray.hsv=function(t){return[0,0,t[0]]};E.gray.hwb=function(t){return[0,100,t[0]]};E.gray.cmyk=function(t){return[0,0,0,t[0]]};E.gray.lab=function(t){return[t[0],0,0]};E.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};E.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var bu=y((D2,vu)=>{var cn=qi();function Tm(){for(var t={},e=Object.keys(cn),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function km(t){var e=Tm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(cn[n]),o=i.length,s=0;s<o;s++){var a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function Mm(t,e){return function(r){return e(t(r))}}function qm(t,e){for(var r=[e[t].parent,t],n=cn[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=Mm(cn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}vu.exports=function(t){for(var e=km(t),r={},n=Object.keys(e),i=n.length,o=0;o<i;o++){var s=n[o],a=e[s];a.parent!==null&&(r[s]=qm(s,e))}return r}});var wu=y((O2,_u)=>{var ji=qi(),jm=bu(),Nt={},Nm=Object.keys(ji);function Lm(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function $m(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,o=0;o<i;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}Nm.forEach(function(t){Nt[t]={},Object.defineProperty(Nt[t],"channels",{value:ji[t].channels}),Object.defineProperty(Nt[t],"labels",{value:ji[t].labels});var e=jm(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];Nt[t][n]=$m(i),Nt[t][n].raw=Lm(i)})});_u.exports=Nt});var xu=y((I2,Su)=>{"use strict";var Lt=wu(),un=(t,e)=>function(){return`\x1B[${t.apply(Lt,arguments)+e}m`},ln=(t,e)=>function(){let r=t.apply(Lt,arguments);return`\x1B[${38+e};5;${r}m`},fn=(t,e)=>function(){let r=t.apply(Lt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function Bm(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let o=e[i];for(let s of Object.keys(o)){let a=o[s];e[s]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},o[s]=e[s],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:o,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,o,s)=>[i,o,s];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:un(r,0)},e.color.ansi256={ansi256:ln(r,0)},e.color.ansi16m={rgb:fn(n,0)},e.bgColor.ansi={ansi:un(r,10)},e.bgColor.ansi256={ansi256:ln(r,10)},e.bgColor.ansi16m={rgb:fn(n,10)};for(let i of Object.keys(Lt)){if(typeof Lt[i]!="object")continue;let o=Lt[i];i==="ansi16"&&(i="ansi"),"ansi16"in o&&(e.color.ansi[i]=un(o.ansi16,0),e.bgColor.ansi[i]=un(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=ln(o.ansi256,0),e.bgColor.ansi256[i]=ln(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=fn(o.rgb,0),e.bgColor.ansi16m[i]=fn(o.rgb,10))}return e}Object.defineProperty(Su,"exports",{enumerable:!0,get:Bm})});var Cu=y((A2,Eu)=>{"use strict";Eu.exports=(t,e)=>{e=e||process.argv;let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Du=y((F2,Pu)=>{"use strict";var Um=require("os"),Ne=Cu(),pe=process.env,$t;Ne("no-color")||Ne("no-colors")||Ne("color=false")?$t=!1:(Ne("color")||Ne("colors")||Ne("color=true")||Ne("color=always"))&&($t=!0);"FORCE_COLOR"in pe&&($t=pe.FORCE_COLOR.length===0||parseInt(pe.FORCE_COLOR,10)!==0);function Xm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Gm(t){if($t===!1)return 0;if(Ne("color=16m")||Ne("color=full")||Ne("color=truecolor"))return 3;if(Ne("color=256"))return 2;if(t&&!t.isTTY&&$t!==!0)return 0;let e=$t?1:0;if(process.platform==="win32"){let r=Um.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in pe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in pe)||pe.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in pe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(pe.TEAMCITY_VERSION)?1:0;if(pe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in pe){let r=parseInt((pe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(pe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(pe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(pe.TERM)||"COLORTERM"in pe?1:(pe.TERM==="dumb",e)}function Ni(t){let e=Gm(t);return Xm(e)}Pu.exports={supportsColor:Ni,stdout:Ni(process.stdout),stderr:Ni(process.stderr)}});var Ru=y((R2,Fu)=>{"use strict";var Hm=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Ou=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,zm=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Wm=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Jm=new Map([["n",`
9
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Au(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Jm.get(t)||t}function Vm(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n)if(!isNaN(o))r.push(Number(o));else if(i=o.match(zm))r.push(i[2].replace(Wm,(s,a,c)=>a?Au(a):c));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function Ym(t){Ou.lastIndex=0;let e=[],r;for(;(r=Ou.exec(t))!==null;){let n=r[1];if(r[2]){let i=Vm(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Iu(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let i of Object.keys(r))if(Array.isArray(r[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);r[i].length>0?n=n[i].apply(n,r[i]):n=n[i]}return n}Fu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Hm,(o,s,a,c,d,u)=>{if(s)i.push(Au(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Iu(t,r)(p)),r.push({inverse:a,styles:Ym(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Iu(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var hn=y((T2,yr)=>{"use strict";var $i=fu(),Q=xu(),Li=Du().stdout,Km=Ru(),ku=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Mu=["ansi","ansi","ansi256","ansi16m"],qu=new Set(["gray"]),Bt=Object.create(null);function Tu(t,e){e=e||{};let r=Li?Li.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function gr(t){if(!this||!(this instanceof gr)||this.template){let e={};return Tu(e,t),e.template=function(){let r=[].slice.call(arguments);return eg.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,gr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=gr,e.template}Tu(this,t)}ku&&(Q.blue.open="\x1B[94m");for(let t of Object.keys(Q))Q[t].closeRe=new RegExp($i(Q[t].close),"g"),Bt[t]={get(){let e=Q[t];return dn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Bt.visible={get(){return dn.call(this,this._styles||[],!0,"visible")}};Q.color.closeRe=new RegExp($i(Q.color.close),"g");for(let t of Object.keys(Q.color.ansi))qu.has(t)||(Bt[t]={get(){let e=this.level;return function(){let n={open:Q.color[Mu[e]][t].apply(null,arguments),close:Q.color.close,closeRe:Q.color.closeRe};return dn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Q.bgColor.closeRe=new RegExp($i(Q.bgColor.close),"g");for(let t of Object.keys(Q.bgColor.ansi)){if(qu.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Bt[e]={get(){let r=this.level;return function(){let i={open:Q.bgColor[Mu[r]][t].apply(null,arguments),close:Q.bgColor.close,closeRe:Q.bgColor.closeRe};return dn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var Qm=Object.defineProperties(()=>{},Bt);function dn(t,e,r){let n=function(){return Zm.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(o){i.level=o}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(o){i.enabled=o}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=Qm,n}function Zm(){let t=arguments,e=t.length,r=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)r+=" "+t[i];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let n=Q.dim.open;ku&&this.hasGrey&&(Q.dim.open="");for(let i of this._styles.slice().reverse())r=i.open+r.replace(i.closeRe,i.open)+i.close,r=r.replace(/\r?\n/g,`${i.close}$&${i.open}`);return Q.dim.open=n,r}function eg(t,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(r[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return Km(t,n.join(""))}Object.defineProperties(gr.prototype,Bt);yr.exports=gr();yr.exports.supportsColor=Li;yr.exports.default=yr.exports});var Nu=y((k2,ju)=>{"use strict";ju.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Bi=y((M2,$u)=>{var vr=Nu(),Lu={};for(let t of Object.keys(vr))Lu[vr[t]]=t;var C={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};$u.exports=C;for(let t of Object.keys(C)){if(!("channels"in C[t]))throw new Error("missing channels property: "+t);if(!("labels"in C[t]))throw new Error("missing channel labels property: "+t);if(C[t].labels.length!==C[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=C[t];delete C[t].channels,delete C[t].labels,Object.defineProperty(C[t],"channels",{value:e}),Object.defineProperty(C[t],"labels",{value:r})}C.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,c;o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let d=(i+o)/2;return o===i?c=0:d<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,d*100]};C.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,c=t[2]/255,d=Math.max(s,a,c),u=d-Math.min(s,a,c),p=function(g){return(d-g)/6/u+1/2};return u===0?(i=0,o=0):(o=u/d,e=p(s),r=p(a),n=p(c),s===d?i=n-r:a===d?i=1/3+e-n:c===d&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,d*100]};C.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=C.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};C.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function tg(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}C.rgb.keyword=function(t){let e=Lu[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(vr)){let o=vr[i],s=tg(t,o);s<r&&(r=s,n=i)}return n};C.keyword.rgb=function(t){return vr[t]};C.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};C.rgb.lab=function(t){let e=C.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};C.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let d=0;d<3;d++)o=e+1/3*-(d-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,c[d]=s*255;return c};C.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};C.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),c=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};C.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};C.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,s&1&&(o=1-o);let c=r+o*(a-r),d,u,p;switch(s){default:case 6:case 0:d=a,u=c,p=r;break;case 1:d=c,u=a,p=r;break;case 2:d=r,u=a,p=c;break;case 3:d=r,u=c,p=a;break;case 4:d=c,u=r,p=a;break;case 5:d=a,u=r,p=c;break}return[d*255,u*255,p*255]};C.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};C.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};C.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};C.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,c=i**3,d=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};C.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};C.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};C.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?C.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};C.hsv.ansi16=function(t){return C.rgb.ansi16(C.hsv.rgb(t),t[2])};C.rgb.ansi256=function(t){let e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};C.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};C.ansi256.rgb=function(t){if(t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};C.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};C.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};C.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(r-n)/s%6:i===r?c=2+(n-e)/s:c=4+(e-r)/s,c/=6,c%=1,[c*360,s*100,a*100]};C.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],n*100,i*100]};C.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],n*100,i*100]};C.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-r)*n,[(r*i[0]+c)*255,(r*i[1]+c)*255,(r*i[2]+c)*255]};C.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e),i=0;return n>0&&(i=e/n),[t[0],i*100,n*100]};C.hcg.hsl=function(t){let e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],i*100,n*100]};C.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,n=e+r*(1-e);return[t[0],(n-e)*100,(1-n)*100]};C.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};C.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};C.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};C.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};C.gray.hsl=function(t){return[0,0,t[0]]};C.gray.hsv=C.gray.hsl;C.gray.hwb=function(t){return[0,100,t[0]]};C.gray.cmyk=function(t){return[0,0,0,t[0]]};C.gray.lab=function(t){return[t[0],0,0]};C.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n};C.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Uu=y((q2,Bu)=>{var pn=Bi();function rg(){let t={},e=Object.keys(pn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function ng(t){let e=rg(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(pn[n]);for(let o=i.length,s=0;s<o;s++){let a=i[s],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function ig(t,e){return function(r){return e(t(r))}}function og(t,e){let r=[e[t].parent,t],n=pn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=ig(pn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Bu.exports=function(t){let e=ng(t),r={},n=Object.keys(e);for(let i=n.length,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=og(s,e))}return r}});var Gu=y((j2,Xu)=>{var Ui=Bi(),sg=Uu(),Ut={},ag=Object.keys(Ui);function cg(t){let e=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function ug(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}ag.forEach(t=>{Ut[t]={},Object.defineProperty(Ut[t],"channels",{value:Ui[t].channels}),Object.defineProperty(Ut[t],"labels",{value:Ui[t].labels});let e=sg(t);Object.keys(e).forEach(n=>{let i=e[n];Ut[t][n]=ug(i),Ut[t][n].raw=cg(i)})});Xu.exports=Ut});var Yu=y((N2,Vu)=>{"use strict";var Hu=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,zu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Wu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},mn=t=>t,Ju=(t,e,r)=>[t,e,r],Xt=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},Xi,Gt=(t,e,r,n)=>{Xi===void 0&&(Xi=Gu());let i=n?10:0,o={};for(let[s,a]of Object.entries(Xi)){let c=s==="ansi16"?"ansi":s;s===e?o[c]=t(r,i):typeof a=="object"&&(o[c]=t(a[e],i))}return o};function lg(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,n]of Object.entries(e)){for(let[i,o]of Object.entries(n))e[i]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[i]=e[i],t.set(o[0],o[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Xt(e.color,"ansi",()=>Gt(Hu,"ansi16",mn,!1)),Xt(e.color,"ansi256",()=>Gt(zu,"ansi256",mn,!1)),Xt(e.color,"ansi16m",()=>Gt(Wu,"rgb",Ju,!1)),Xt(e.bgColor,"ansi",()=>Gt(Hu,"ansi16",mn,!0)),Xt(e.bgColor,"ansi256",()=>Gt(zu,"ansi256",mn,!0)),Xt(e.bgColor,"ansi16m",()=>Gt(Wu,"rgb",Ju,!0)),e}Object.defineProperty(Vu,"exports",{enumerable:!0,get:lg})});var Qu=y((L2,Ku)=>{"use strict";Ku.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var zi=y(($2,el)=>{"use strict";var fg=require("os"),Zu=require("tty"),ke=Qu(),{env:te}=process,lt;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?lt=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(lt=1);"FORCE_COLOR"in te&&(te.FORCE_COLOR==="true"?lt=1:te.FORCE_COLOR==="false"?lt=0:lt=te.FORCE_COLOR.length===0?1:Math.min(parseInt(te.FORCE_COLOR,10),3));function Gi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Hi(t,e){if(lt===0)return 0;if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2;if(t&&!e&&lt===void 0)return 0;let r=lt||0;if(te.TERM==="dumb")return r;if(process.platform==="win32"){let n=fg.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in te)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in te)||te.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in te)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(te.TEAMCITY_VERSION)?1:0;if(te.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in te){let n=parseInt((te.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(te.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(te.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(te.TERM)||"COLORTERM"in te?1:r}function dg(t){let e=Hi(t,t&&t.isTTY);return Gi(e)}el.exports={supportsColor:dg,stdout:Gi(Hi(!0,Zu.isatty(1))),stderr:Gi(Hi(!0,Zu.isatty(2)))}});var rl=y((B2,tl)=>{"use strict";var hg=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,o=0,s="";do s+=t.substr(o,n-o)+e+r,o=n+i,n=t.indexOf(e,o);while(n!==-1);return s+=t.substr(o),s},pg=(t,e,r,n)=>{let i=0,o="";do{let s=t[n-1]==="\r";o+=t.substr(i,(s?n-1:n)-i)+e+(s?`\r
10
10
  `:`
11
11
  `)+r,i=n+1,n=t.indexOf(`
12
- `,i)}while(n!==-1);return o+=t.substr(i),o};tl.exports={stringReplaceAll:dg,stringEncaseCRLFWithFirstIndex:hg}});var al=y((U2,sl)=>{"use strict";var pg=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,nl=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,mg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,gg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,yg=new Map([["n",`
13
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ol(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):yg.get(t)||t}function vg(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n){let s=Number(o);if(!Number.isNaN(s))r.push(s);else if(i=o.match(mg))r.push(i[2].replace(gg,(a,c,d)=>c?ol(c):d));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function bg(t){nl.lastIndex=0;let e=[],r;for(;(r=nl.exec(t))!==null;){let n=r[1];if(r[2]){let i=vg(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function il(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let[i,o]of Object.entries(r))if(Array.isArray(o)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=o.length>0?n[i](...o):n[i]}return n}sl.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(pg,(o,s,a,c,d,u)=>{if(s)i.push(ol(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:il(t,r)(p)),r.push({inverse:a,styles:bg(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(il(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var pl=y((X2,hl)=>{"use strict";var br=Yu(),{stdout:Wi,stderr:Ji}=Hi(),{stringReplaceAll:_g,stringEncaseCRLFWithFirstIndex:wg}=rl(),{isArray:gn}=Array,ul=["ansi","ansi","ansi256","ansi16m"],Ht=Object.create(null),Sg=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Wi?Wi.level:0;t.level=e.level===void 0?r:e.level},Vi=class{constructor(e){return ll(e)}},ll=t=>{let e={};return Sg(e,t),e.template=(...r)=>dl(e.template,...r),Object.setPrototypeOf(e,yn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Vi,e.template};function yn(t){return ll(t)}for(let[t,e]of Object.entries(br))Ht[t]={get(){let r=vn(this,Yi(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Ht.visible={get(){let t=vn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var fl=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of fl)Ht[t]={get(){let{level:e}=this;return function(...r){let n=Yi(br.color[ul[e]][t](...r),br.color.close,this._styler);return vn(this,n,this._isEmpty)}}};for(let t of fl){let e="bg"+t[0].toUpperCase()+t.slice(1);Ht[e]={get(){let{level:r}=this;return function(...n){let i=Yi(br.bgColor[ul[r]][t](...n),br.bgColor.close,this._styler);return vn(this,i,this._isEmpty)}}}}var xg=Object.defineProperties(()=>{},{...Ht,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Yi=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},vn=(t,e,r)=>{let n=(...i)=>gn(i[0])&&gn(i[0].raw)?cl(n,dl(n,...i)):cl(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,xg),n._generator=t,n._styler=e,n._isEmpty=r,n},cl=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=_g(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
14
- `);return o!==-1&&(e=wg(e,i,n,o)),n+e+i},zi,dl=(t,...e)=>{let[r]=e;if(!gn(r)||!gn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let o=1;o<r.length;o++)i.push(String(n[o-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[o]));return zi===void 0&&(zi=al()),zi(t,i.join(""))};Object.defineProperties(yn.prototype,Ht);var bn=yn();bn.supportsColor=Wi;bn.stderr=yn({level:Ji?Ji.level:0});bn.stderr.supportsColor=Ji;hl.exports=bn});var ml=y((Ki,Qi)=>{(function(t,e){typeof Ki=="object"&&typeof Qi<"u"?Qi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Ki,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,h){if(l=l||"",h=h||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,h);var f=i(l);this._originalInput=l,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=h.format||f.format,this._gradientType=h.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),f,v,S,_,N,X;return f=h.r/255,v=h.g/255,S=h.b/255,f<=.03928?_=f/12.92:_=Math.pow((f+.055)/1.055,2.4),v<=.03928?N=v/12.92:N=Math.pow((v+.055)/1.055,2.4),S<=.03928?X=S/12.92:X=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*N+.0722*X},setAlpha:function(h){return this._a=z(h),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var h=c(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=c(this._r,this._g,this._b),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+S+"%)":"hsva("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var h=s(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=s(this._r,this._g,this._b),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+S+"%)":"hsla("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(h){return u(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return p(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(I(this._r,255)*100)+"%",g:Math.round(I(this._g,255)*100)+"%",b:Math.round(I(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%)":"rgba("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:q[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var f="#"+g(this._r,this._g,this._b,this._a),v=f,S=this._gradientType?"GradientType = 1, ":"";if(h){var _=n(h);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+f+",endColorstr="+v+")"},toString:function(h){var f=!!h;h=h||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!f&&S&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return _?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(h,f){var v=h.apply(null,[this].concat([].slice.call(f)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(j,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(h,f){return h.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(Te,arguments)},complement:function(){return this._applyCombination($,arguments)},monochromatic:function(){return this._applyCombination(ee,arguments)},splitcomplement:function(){return this._applyCombination(ue,arguments)},triad:function(){return this._applyCombination(V,[3])},tetrad:function(){return this._applyCombination(V,[4])}},n.fromRatio=function(l,h){if(t(l)=="object"){var f={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?f[v]=l[v]:f[v]=R(l[v]));l=f}return n(l,h)};function i(l){var h={r:0,g:0,b:0},f=1,v=null,S=null,_=null,N=!1,X=!1;return typeof l=="string"&&(l=yt(l)),t(l)=="object"&&(ye(l.r)&&ye(l.g)&&ye(l.b)?(h=o(l.r,l.g,l.b),N=!0,X=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ye(l.h)&&ye(l.s)&&ye(l.v)?(v=R(l.s),S=R(l.v),h=d(l.h,v,S),N=!0,X="hsv"):ye(l.h)&&ye(l.s)&&ye(l.l)&&(v=R(l.s),_=R(l.l),h=a(l.h,v,_),N=!0,X="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=z(f),{ok:N,format:l.format||X,r:Math.min(255,Math.max(h.r,0)),g:Math.min(255,Math.max(h.g,0)),b:Math.min(255,Math.max(h.b,0)),a:f}}function o(l,h,f){return{r:I(l,255)*255,g:I(h,255)*255,b:I(f,255)*255}}function s(l,h,f){l=I(l,255),h=I(h,255),f=I(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,N,X=(v+S)/2;if(v==S)_=N=0;else{var W=v-S;switch(N=X>.5?W/(2-v-S):W/(v+S),v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:N,l:X}}function a(l,h,f){var v,S,_;l=I(l,360),h=I(h,100),f=I(f,100);function N(Ee,fe,qe){return qe<0&&(qe+=1),qe>1&&(qe-=1),qe<1/6?Ee+(fe-Ee)*6*qe:qe<1/2?fe:qe<2/3?Ee+(fe-Ee)*(2/3-qe)*6:Ee}if(h===0)v=S=_=f;else{var X=f<.5?f*(1+h):f+h-f*h,W=2*f-X;v=N(W,X,l+1/3),S=N(W,X,l),_=N(W,X,l-1/3)}return{r:v*255,g:S*255,b:_*255}}function c(l,h,f){l=I(l,255),h=I(h,255),f=I(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,N,X=v,W=v-S;if(N=v===0?0:W/v,v==S)_=0;else{switch(v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:N,v:X}}function d(l,h,f){l=I(l,360)*6,h=I(h,100),f=I(f,100);var v=Math.floor(l),S=l-v,_=f*(1-h),N=f*(1-S*h),X=f*(1-(1-S)*h),W=v%6,Ee=[f,N,_,_,X,f][W],fe=[X,f,f,N,_,_][W],qe=[_,_,X,f,f,N][W];return{r:Ee*255,g:fe*255,b:qe*255}}function u(l,h,f,v){var S=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return v&&S[0].charAt(0)==S[0].charAt(1)&&S[1].charAt(0)==S[1].charAt(1)&&S[2].charAt(0)==S[2].charAt(1)?S[0].charAt(0)+S[1].charAt(0)+S[2].charAt(0):S.join("")}function p(l,h,f,v,S){var _=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16)),P(He(v))];return S&&_[0].charAt(0)==_[0].charAt(1)&&_[1].charAt(0)==_[1].charAt(1)&&_[2].charAt(0)==_[2].charAt(1)&&_[3].charAt(0)==_[3].charAt(1)?_[0].charAt(0)+_[1].charAt(0)+_[2].charAt(0)+_[3].charAt(0):_.join("")}function g(l,h,f,v){var S=[P(He(v)),P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return S.join("")}n.equals=function(l,h){return!l||!h?!1:n(l).toRgbString()==n(h).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s-=h/100,f.s=G(f.s),n(f)}function b(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s+=h/100,f.s=G(f.s),n(f)}function w(l){return n(l).desaturate(100)}function x(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l+=h/100,f.l=G(f.l),n(f)}function A(l,h){h=h===0?0:h||10;var f=n(l).toRgb();return f.r=Math.max(0,Math.min(255,f.r-Math.round(255*-(h/100)))),f.g=Math.max(0,Math.min(255,f.g-Math.round(255*-(h/100)))),f.b=Math.max(0,Math.min(255,f.b-Math.round(255*-(h/100)))),n(f)}function j(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l-=h/100,f.l=G(f.l),n(f)}function B(l,h){var f=n(l).toHsl(),v=(f.h+h)%360;return f.h=v<0?360+v:v,n(f)}function $(l){var h=n(l).toHsl();return h.h=(h.h+180)%360,n(h)}function V(l,h){if(isNaN(h)||h<=0)throw new Error("Argument to polyad must be a positive number");for(var f=n(l).toHsl(),v=[n(l)],S=360/h,_=1;_<h;_++)v.push(n({h:(f.h+_*S)%360,s:f.s,l:f.l}));return v}function ue(l){var h=n(l).toHsl(),f=h.h;return[n(l),n({h:(f+72)%360,s:h.s,l:h.l}),n({h:(f+216)%360,s:h.s,l:h.l})]}function Te(l,h,f){h=h||6,f=f||30;var v=n(l).toHsl(),S=360/f,_=[n(l)];for(v.h=(v.h-(S*h>>1)+720)%360;--h;)v.h=(v.h+S)%360,_.push(n(v));return _}function ee(l,h){h=h||6;for(var f=n(l).toHsv(),v=f.h,S=f.s,_=f.v,N=[],X=1/h;h--;)N.push(n({h:v,s:S,v:_})),_=(_+X)%1;return N}n.mix=function(l,h,f){f=f===0?0:f||50;var v=n(l).toRgb(),S=n(h).toRgb(),_=f/100,N={r:(S.r-v.r)*_+v.r,g:(S.g-v.g)*_+v.g,b:(S.b-v.b)*_+v.b,a:(S.a-v.a)*_+v.a};return n(N)},n.readability=function(l,h){var f=n(l),v=n(h);return(Math.max(f.getLuminance(),v.getLuminance())+.05)/(Math.min(f.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,h,f){var v=n.readability(l,h),S,_;switch(_=!1,S=xe(f),S.level+S.size){case"AAsmall":case"AAAlarge":_=v>=4.5;break;case"AAlarge":_=v>=3;break;case"AAAsmall":_=v>=7;break}return _},n.mostReadable=function(l,h,f){var v=null,S=0,_,N,X,W;f=f||{},N=f.includeFallbackColors,X=f.level,W=f.size;for(var Ee=0;Ee<h.length;Ee++)_=n.readability(l,h[Ee]),_>S&&(S=_,v=n(h[Ee]));return n.isReadable(l,v,{level:X,size:W})||!N?v:(f.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],f))};var D=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},q=n.hexNames=k(D);function k(l){var h={};for(var f in l)l.hasOwnProperty(f)&&(h[l[f]]=f);return h}function z(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function I(l,h){U(l)&&(l="100%");var f=M(l);return l=Math.min(h,Math.max(0,parseFloat(l))),f&&(l=parseInt(l*h,10)/100),Math.abs(l-h)<1e-6?1:l%h/parseFloat(h)}function G(l){return Math.min(1,Math.max(0,l))}function O(l){return parseInt(l,16)}function U(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function M(l){return typeof l=="string"&&l.indexOf("%")!=-1}function P(l){return l.length==1?"0"+l:""+l}function R(l){return l<=1&&(l=l*100+"%"),l}function He(l){return Math.round(parseFloat(l)*255).toString(16)}function Ye(l){return O(l)/255}var le=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",f="(?:"+h+")|(?:"+l+")",v="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?",S="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?";return{CSS_UNIT:new RegExp(f),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+S),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+S),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+S),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ye(l){return!!le.CSS_UNIT.exec(l)}function yt(l){l=l.replace(e,"").replace(r,"").toLowerCase();var h=!1;if(D[l])l=D[l],h=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f;return(f=le.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=le.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=le.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=le.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=le.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=le.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=le.hex8.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),a:Ye(f[4]),format:h?"name":"hex8"}:(f=le.hex6.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),format:h?"name":"hex"}:(f=le.hex4.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),a:Ye(f[4]+""+f[4]),format:h?"name":"hex8"}:(f=le.hex3.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),format:h?"name":"hex"}:!1}function xe(l){var h,f;return l=l||{level:"AA",size:"small"},h=(l.level||"AA").toUpperCase(),f=(l.size||"small").toLowerCase(),h!=="AA"&&h!=="AAA"&&(h="AA"),f!=="small"&&f!=="large"&&(f="small"),{level:h,size:f}}return n})});var Sl=y((G2,wl)=>{var _r=ml(),bl={r:256,g:256,b:256,a:1},_l={h:360,s:1,v:1,a:1};function eo(t,e,r){let n={};for(let i in t)t.hasOwnProperty(i)&&(n[i]=r===0?0:(e[i]-t[i])/r);return n}function to(t,e,r,n){let i={};for(let o in e)e.hasOwnProperty(o)&&(i[o]=t[o]*r+e[o],i[o]=i[o]<0?i[o]+n[o]:n[o]!==1?i[o]%n[o]:i[o]);return i}function Zi(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=eo(n,i,r),s=[t.color];for(let a=1;a<r;a++){let c=to(o,n,a,bl);s.push(_r(c))}return s}function gl(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return Zi(t,e,r);let s;if(typeof n=="boolean")s=n;else{let u=i.h<o.h&&o.h-i.h<180||i.h>o.h&&i.h-o.h>180;s=n==="long"&&u||n==="short"&&!u}let a=eo(i,o,r),c=[t.color],d;i.h<=o.h&&!s||i.h>=o.h&&s?d=o.h-i.h:s?d=360-o.h+i.h:d=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(d)/r;for(let u=1;u<r;u++){let p=to(a,i,u,_l);c.push(_r(p))}return c}function yl(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let n=[];for(let o=1;o<r;o++){let s=(e-1)*(t[o].pos-t[o-1].pos);n.push(Math.max(1,Math.round(s)))}let i=1;for(let o=r-1;o--;)i+=n[o];for(;i!==e;)if(i<e){let o=Math.min.apply(null,n);n[n.indexOf(o)]++,i++}else{let o=Math.max.apply(null,n);n[n.indexOf(o)]--,i--}return n}function vl(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,o;for(let c=0,d=t.length;c<d-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],o=t[c+1];break}i||(i=o=t[t.length-1]);let s=eo(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=to(s,i.color[r](),(e-i.pos)*100,n);return _r(a)}var zt=class{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,n=e.length,i=-1,o=!1;this.stops=e.map((s,a)=>{let c=s.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let d=s.color!==void 0;if(!d&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!d,s={color:d?_r(s.color):null,colorLess:!d,pos:s.pos},s.pos<0||s.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(s.pos<i)throw new Error("Color stops positions are not ordered");i=s.pos}else s={color:_r(s.color!==void 0?s.color:s),pos:a/(n-1)};return s}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),n++),this.stops[n-1].pos!==1&&this.stops.push({color:this.stops[n-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new zt(e.reverse())}loop(){let e=[],r=[];return this.stops.forEach(n=>{e.push({color:n.color,pos:n.pos/2})}),this.stops.slice(0,-1).forEach(n=>{r.push({color:n.color,pos:1-n.pos/2})}),new zt(e.concat(r.reverse()))}rgb(e){let r=yl(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=Zi(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=Zi(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...s)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=yl(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=gl(this.stops[s-1],this.stops[s+1],2,r)[1])});for(let o=0,s=this.stops.length;o<s-1;o++){let a=gl(this.stops[o],this.stops[o+1],n[o],r);i.splice(i.length,0,...a)}return i.push(this.stops[this.stops.length-1].color),i}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let n=e+"-gradient("+r;return this.stops.forEach(function(i){n+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),n+=")",n}rgbAt(e){return vl(this.stops,e,"toRgb",bl)}hsvAt(e){return vl(this.stops,e,"toHsv",_l)}};wl.exports=function(t){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new zt(t)}});var Dl=y((H2,_n)=>{"use strict";var El=pl(),Eg=Sl(),xl=/\s/g;function ro(...t){let e=Eg.apply(this,t),r=(n,i)=>Cg(n?n.toString():"",e,i);return r.multiline=(n,i)=>Pg(n?n.toString():"",e,i),r}var Cl=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function Cg(t,e,r){let n=Pl(r),i=Math.max(t.replace(xl,"").length,e.stops.length),o=Cl(e,n,i),s="";for(let a of t)s+=a.match(xl)?a:El.hex(o.shift().toHex())(a);return s}function Pg(t,e,r){let n=Pl(r),i=t.split(`
12
+ `,i)}while(n!==-1);return o+=t.substr(i),o};tl.exports={stringReplaceAll:hg,stringEncaseCRLFWithFirstIndex:pg}});var al=y((U2,sl)=>{"use strict";var mg=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,nl=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,gg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,yg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,vg=new Map([["n",`
13
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ol(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):vg.get(t)||t}function bg(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n){let s=Number(o);if(!Number.isNaN(s))r.push(s);else if(i=o.match(gg))r.push(i[2].replace(yg,(a,c,d)=>c?ol(c):d));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function _g(t){nl.lastIndex=0;let e=[],r;for(;(r=nl.exec(t))!==null;){let n=r[1];if(r[2]){let i=bg(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function il(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let[i,o]of Object.entries(r))if(Array.isArray(o)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=o.length>0?n[i](...o):n[i]}return n}sl.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(mg,(o,s,a,c,d,u)=>{if(s)i.push(ol(s));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:il(t,r)(p)),r.push({inverse:a,styles:_g(c)})}else if(d){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(il(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var pl=y((X2,hl)=>{"use strict";var br=Yu(),{stdout:Ji,stderr:Vi}=zi(),{stringReplaceAll:wg,stringEncaseCRLFWithFirstIndex:Sg}=rl(),{isArray:gn}=Array,ul=["ansi","ansi","ansi256","ansi16m"],Ht=Object.create(null),xg=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ji?Ji.level:0;t.level=e.level===void 0?r:e.level},Yi=class{constructor(e){return ll(e)}},ll=t=>{let e={};return xg(e,t),e.template=(...r)=>dl(e.template,...r),Object.setPrototypeOf(e,yn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Yi,e.template};function yn(t){return ll(t)}for(let[t,e]of Object.entries(br))Ht[t]={get(){let r=vn(this,Ki(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Ht.visible={get(){let t=vn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var fl=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of fl)Ht[t]={get(){let{level:e}=this;return function(...r){let n=Ki(br.color[ul[e]][t](...r),br.color.close,this._styler);return vn(this,n,this._isEmpty)}}};for(let t of fl){let e="bg"+t[0].toUpperCase()+t.slice(1);Ht[e]={get(){let{level:r}=this;return function(...n){let i=Ki(br.bgColor[ul[r]][t](...n),br.bgColor.close,this._styler);return vn(this,i,this._isEmpty)}}}}var Eg=Object.defineProperties(()=>{},{...Ht,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Ki=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},vn=(t,e,r)=>{let n=(...i)=>gn(i[0])&&gn(i[0].raw)?cl(n,dl(n,...i)):cl(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Eg),n._generator=t,n._styler=e,n._isEmpty=r,n},cl=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=wg(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
14
+ `);return o!==-1&&(e=Sg(e,i,n,o)),n+e+i},Wi,dl=(t,...e)=>{let[r]=e;if(!gn(r)||!gn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let o=1;o<r.length;o++)i.push(String(n[o-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[o]));return Wi===void 0&&(Wi=al()),Wi(t,i.join(""))};Object.defineProperties(yn.prototype,Ht);var bn=yn();bn.supportsColor=Ji;bn.stderr=yn({level:Vi?Vi.level:0});bn.stderr.supportsColor=Vi;hl.exports=bn});var ml=y((Qi,Zi)=>{(function(t,e){typeof Qi=="object"&&typeof Zi<"u"?Zi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Qi,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,h){if(l=l||"",h=h||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,h);var f=i(l);this._originalInput=l,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=h.format||f.format,this._gradientType=h.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}n.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),f,v,S,_,N,X;return f=h.r/255,v=h.g/255,S=h.b/255,f<=.03928?_=f/12.92:_=Math.pow((f+.055)/1.055,2.4),v<=.03928?N=v/12.92:N=Math.pow((v+.055)/1.055,2.4),S<=.03928?X=S/12.92:X=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*N+.0722*X},setAlpha:function(h){return this._a=z(h),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var h=c(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=c(this._r,this._g,this._b),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.v*100);return this._a==1?"hsv("+f+", "+v+"%, "+S+"%)":"hsva("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var h=s(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=s(this._r,this._g,this._b),f=Math.round(h.h*360),v=Math.round(h.s*100),S=Math.round(h.l*100);return this._a==1?"hsl("+f+", "+v+"%, "+S+"%)":"hsla("+f+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(h){return u(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return p(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(I(this._r,255)*100)+"%",g:Math.round(I(this._g,255)*100)+"%",b:Math.round(I(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%)":"rgba("+Math.round(I(this._r,255)*100)+"%, "+Math.round(I(this._g,255)*100)+"%, "+Math.round(I(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:q[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var f="#"+g(this._r,this._g,this._b,this._a),v=f,S=this._gradientType?"GradientType = 1, ":"";if(h){var _=n(h);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+f+",endColorstr="+v+")"},toString:function(h){var f=!!h;h=h||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!f&&S&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return _?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(v=this.toRgbString()),h==="prgb"&&(v=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(v=this.toHexString()),h==="hex3"&&(v=this.toHexString(!0)),h==="hex4"&&(v=this.toHex8String(!0)),h==="hex8"&&(v=this.toHex8String()),h==="name"&&(v=this.toName()),h==="hsl"&&(v=this.toHslString()),h==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(h,f){var v=h.apply(null,[this].concat([].slice.call(f)));return this._r=v._r,this._g=v._g,this._b=v._b,this.setAlpha(v._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(j,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(h,f){return h.apply(null,[this].concat([].slice.call(f)))},analogous:function(){return this._applyCombination(Te,arguments)},complement:function(){return this._applyCombination($,arguments)},monochromatic:function(){return this._applyCombination(ee,arguments)},splitcomplement:function(){return this._applyCombination(ue,arguments)},triad:function(){return this._applyCombination(V,[3])},tetrad:function(){return this._applyCombination(V,[4])}},n.fromRatio=function(l,h){if(t(l)=="object"){var f={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?f[v]=l[v]:f[v]=R(l[v]));l=f}return n(l,h)};function i(l){var h={r:0,g:0,b:0},f=1,v=null,S=null,_=null,N=!1,X=!1;return typeof l=="string"&&(l=yt(l)),t(l)=="object"&&(ye(l.r)&&ye(l.g)&&ye(l.b)?(h=o(l.r,l.g,l.b),N=!0,X=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ye(l.h)&&ye(l.s)&&ye(l.v)?(v=R(l.s),S=R(l.v),h=d(l.h,v,S),N=!0,X="hsv"):ye(l.h)&&ye(l.s)&&ye(l.l)&&(v=R(l.s),_=R(l.l),h=a(l.h,v,_),N=!0,X="hsl"),l.hasOwnProperty("a")&&(f=l.a)),f=z(f),{ok:N,format:l.format||X,r:Math.min(255,Math.max(h.r,0)),g:Math.min(255,Math.max(h.g,0)),b:Math.min(255,Math.max(h.b,0)),a:f}}function o(l,h,f){return{r:I(l,255)*255,g:I(h,255)*255,b:I(f,255)*255}}function s(l,h,f){l=I(l,255),h=I(h,255),f=I(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,N,X=(v+S)/2;if(v==S)_=N=0;else{var W=v-S;switch(N=X>.5?W/(2-v-S):W/(v+S),v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:N,l:X}}function a(l,h,f){var v,S,_;l=I(l,360),h=I(h,100),f=I(f,100);function N(Ee,fe,qe){return qe<0&&(qe+=1),qe>1&&(qe-=1),qe<1/6?Ee+(fe-Ee)*6*qe:qe<1/2?fe:qe<2/3?Ee+(fe-Ee)*(2/3-qe)*6:Ee}if(h===0)v=S=_=f;else{var X=f<.5?f*(1+h):f+h-f*h,W=2*f-X;v=N(W,X,l+1/3),S=N(W,X,l),_=N(W,X,l-1/3)}return{r:v*255,g:S*255,b:_*255}}function c(l,h,f){l=I(l,255),h=I(h,255),f=I(f,255);var v=Math.max(l,h,f),S=Math.min(l,h,f),_,N,X=v,W=v-S;if(N=v===0?0:W/v,v==S)_=0;else{switch(v){case l:_=(h-f)/W+(h<f?6:0);break;case h:_=(f-l)/W+2;break;case f:_=(l-h)/W+4;break}_/=6}return{h:_,s:N,v:X}}function d(l,h,f){l=I(l,360)*6,h=I(h,100),f=I(f,100);var v=Math.floor(l),S=l-v,_=f*(1-h),N=f*(1-S*h),X=f*(1-(1-S)*h),W=v%6,Ee=[f,N,_,_,X,f][W],fe=[X,f,f,N,_,_][W],qe=[_,_,X,f,f,N][W];return{r:Ee*255,g:fe*255,b:qe*255}}function u(l,h,f,v){var S=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return v&&S[0].charAt(0)==S[0].charAt(1)&&S[1].charAt(0)==S[1].charAt(1)&&S[2].charAt(0)==S[2].charAt(1)?S[0].charAt(0)+S[1].charAt(0)+S[2].charAt(0):S.join("")}function p(l,h,f,v,S){var _=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16)),P(He(v))];return S&&_[0].charAt(0)==_[0].charAt(1)&&_[1].charAt(0)==_[1].charAt(1)&&_[2].charAt(0)==_[2].charAt(1)&&_[3].charAt(0)==_[3].charAt(1)?_[0].charAt(0)+_[1].charAt(0)+_[2].charAt(0)+_[3].charAt(0):_.join("")}function g(l,h,f,v){var S=[P(He(v)),P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(f).toString(16))];return S.join("")}n.equals=function(l,h){return!l||!h?!1:n(l).toRgbString()==n(h).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s-=h/100,f.s=G(f.s),n(f)}function b(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.s+=h/100,f.s=G(f.s),n(f)}function w(l){return n(l).desaturate(100)}function x(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l+=h/100,f.l=G(f.l),n(f)}function A(l,h){h=h===0?0:h||10;var f=n(l).toRgb();return f.r=Math.max(0,Math.min(255,f.r-Math.round(255*-(h/100)))),f.g=Math.max(0,Math.min(255,f.g-Math.round(255*-(h/100)))),f.b=Math.max(0,Math.min(255,f.b-Math.round(255*-(h/100)))),n(f)}function j(l,h){h=h===0?0:h||10;var f=n(l).toHsl();return f.l-=h/100,f.l=G(f.l),n(f)}function B(l,h){var f=n(l).toHsl(),v=(f.h+h)%360;return f.h=v<0?360+v:v,n(f)}function $(l){var h=n(l).toHsl();return h.h=(h.h+180)%360,n(h)}function V(l,h){if(isNaN(h)||h<=0)throw new Error("Argument to polyad must be a positive number");for(var f=n(l).toHsl(),v=[n(l)],S=360/h,_=1;_<h;_++)v.push(n({h:(f.h+_*S)%360,s:f.s,l:f.l}));return v}function ue(l){var h=n(l).toHsl(),f=h.h;return[n(l),n({h:(f+72)%360,s:h.s,l:h.l}),n({h:(f+216)%360,s:h.s,l:h.l})]}function Te(l,h,f){h=h||6,f=f||30;var v=n(l).toHsl(),S=360/f,_=[n(l)];for(v.h=(v.h-(S*h>>1)+720)%360;--h;)v.h=(v.h+S)%360,_.push(n(v));return _}function ee(l,h){h=h||6;for(var f=n(l).toHsv(),v=f.h,S=f.s,_=f.v,N=[],X=1/h;h--;)N.push(n({h:v,s:S,v:_})),_=(_+X)%1;return N}n.mix=function(l,h,f){f=f===0?0:f||50;var v=n(l).toRgb(),S=n(h).toRgb(),_=f/100,N={r:(S.r-v.r)*_+v.r,g:(S.g-v.g)*_+v.g,b:(S.b-v.b)*_+v.b,a:(S.a-v.a)*_+v.a};return n(N)},n.readability=function(l,h){var f=n(l),v=n(h);return(Math.max(f.getLuminance(),v.getLuminance())+.05)/(Math.min(f.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,h,f){var v=n.readability(l,h),S,_;switch(_=!1,S=xe(f),S.level+S.size){case"AAsmall":case"AAAlarge":_=v>=4.5;break;case"AAlarge":_=v>=3;break;case"AAAsmall":_=v>=7;break}return _},n.mostReadable=function(l,h,f){var v=null,S=0,_,N,X,W;f=f||{},N=f.includeFallbackColors,X=f.level,W=f.size;for(var Ee=0;Ee<h.length;Ee++)_=n.readability(l,h[Ee]),_>S&&(S=_,v=n(h[Ee]));return n.isReadable(l,v,{level:X,size:W})||!N?v:(f.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],f))};var D=n.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},q=n.hexNames=k(D);function k(l){var h={};for(var f in l)l.hasOwnProperty(f)&&(h[l[f]]=f);return h}function z(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function I(l,h){U(l)&&(l="100%");var f=M(l);return l=Math.min(h,Math.max(0,parseFloat(l))),f&&(l=parseInt(l*h,10)/100),Math.abs(l-h)<1e-6?1:l%h/parseFloat(h)}function G(l){return Math.min(1,Math.max(0,l))}function O(l){return parseInt(l,16)}function U(l){return typeof l=="string"&&l.indexOf(".")!=-1&&parseFloat(l)===1}function M(l){return typeof l=="string"&&l.indexOf("%")!=-1}function P(l){return l.length==1?"0"+l:""+l}function R(l){return l<=1&&(l=l*100+"%"),l}function He(l){return Math.round(parseFloat(l)*255).toString(16)}function Ke(l){return O(l)/255}var le=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",f="(?:"+h+")|(?:"+l+")",v="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?",S="[\\s|\\(]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")[,|\\s]+("+f+")\\s*\\)?";return{CSS_UNIT:new RegExp(f),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+S),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+S),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+S),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ye(l){return!!le.CSS_UNIT.exec(l)}function yt(l){l=l.replace(e,"").replace(r,"").toLowerCase();var h=!1;if(D[l])l=D[l],h=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var f;return(f=le.rgb.exec(l))?{r:f[1],g:f[2],b:f[3]}:(f=le.rgba.exec(l))?{r:f[1],g:f[2],b:f[3],a:f[4]}:(f=le.hsl.exec(l))?{h:f[1],s:f[2],l:f[3]}:(f=le.hsla.exec(l))?{h:f[1],s:f[2],l:f[3],a:f[4]}:(f=le.hsv.exec(l))?{h:f[1],s:f[2],v:f[3]}:(f=le.hsva.exec(l))?{h:f[1],s:f[2],v:f[3],a:f[4]}:(f=le.hex8.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),a:Ke(f[4]),format:h?"name":"hex8"}:(f=le.hex6.exec(l))?{r:O(f[1]),g:O(f[2]),b:O(f[3]),format:h?"name":"hex"}:(f=le.hex4.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),a:Ke(f[4]+""+f[4]),format:h?"name":"hex8"}:(f=le.hex3.exec(l))?{r:O(f[1]+""+f[1]),g:O(f[2]+""+f[2]),b:O(f[3]+""+f[3]),format:h?"name":"hex"}:!1}function xe(l){var h,f;return l=l||{level:"AA",size:"small"},h=(l.level||"AA").toUpperCase(),f=(l.size||"small").toLowerCase(),h!=="AA"&&h!=="AAA"&&(h="AA"),f!=="small"&&f!=="large"&&(f="small"),{level:h,size:f}}return n})});var Sl=y((G2,wl)=>{var _r=ml(),bl={r:256,g:256,b:256,a:1},_l={h:360,s:1,v:1,a:1};function to(t,e,r){let n={};for(let i in t)t.hasOwnProperty(i)&&(n[i]=r===0?0:(e[i]-t[i])/r);return n}function ro(t,e,r,n){let i={};for(let o in e)e.hasOwnProperty(o)&&(i[o]=t[o]*r+e[o],i[o]=i[o]<0?i[o]+n[o]:n[o]!==1?i[o]%n[o]:i[o]);return i}function eo(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=to(n,i,r),s=[t.color];for(let a=1;a<r;a++){let c=ro(o,n,a,bl);s.push(_r(c))}return s}function gl(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return eo(t,e,r);let s;if(typeof n=="boolean")s=n;else{let u=i.h<o.h&&o.h-i.h<180||i.h>o.h&&i.h-o.h>180;s=n==="long"&&u||n==="short"&&!u}let a=to(i,o,r),c=[t.color],d;i.h<=o.h&&!s||i.h>=o.h&&s?d=o.h-i.h:s?d=360-o.h+i.h:d=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(d)/r;for(let u=1;u<r;u++){let p=ro(a,i,u,_l);c.push(_r(p))}return c}function yl(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let n=[];for(let o=1;o<r;o++){let s=(e-1)*(t[o].pos-t[o-1].pos);n.push(Math.max(1,Math.round(s)))}let i=1;for(let o=r-1;o--;)i+=n[o];for(;i!==e;)if(i<e){let o=Math.min.apply(null,n);n[n.indexOf(o)]++,i++}else{let o=Math.max.apply(null,n);n[n.indexOf(o)]--,i--}return n}function vl(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,o;for(let c=0,d=t.length;c<d-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],o=t[c+1];break}i||(i=o=t[t.length-1]);let s=to(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=ro(s,i.color[r](),(e-i.pos)*100,n);return _r(a)}var zt=class{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,n=e.length,i=-1,o=!1;this.stops=e.map((s,a)=>{let c=s.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let d=s.color!==void 0;if(!d&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!d,s={color:d?_r(s.color):null,colorLess:!d,pos:s.pos},s.pos<0||s.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(s.pos<i)throw new Error("Color stops positions are not ordered");i=s.pos}else s={color:_r(s.color!==void 0?s.color:s),pos:a/(n-1)};return s}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),n++),this.stops[n-1].pos!==1&&this.stops.push({color:this.stops[n-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new zt(e.reverse())}loop(){let e=[],r=[];return this.stops.forEach(n=>{e.push({color:n.color,pos:n.pos/2})}),this.stops.slice(0,-1).forEach(n=>{r.push({color:n.color,pos:1-n.pos/2})}),new zt(e.concat(r.reverse()))}rgb(e){let r=yl(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=eo(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=eo(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...s)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=yl(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=gl(this.stops[s-1],this.stops[s+1],2,r)[1])});for(let o=0,s=this.stops.length;o<s-1;o++){let a=gl(this.stops[o],this.stops[o+1],n[o],r);i.splice(i.length,0,...a)}return i.push(this.stops[this.stops.length-1].color),i}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let n=e+"-gradient("+r;return this.stops.forEach(function(i){n+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),n+=")",n}rgbAt(e){return vl(this.stops,e,"toRgb",bl)}hsvAt(e){return vl(this.stops,e,"toHsv",_l)}};wl.exports=function(t){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');t=arguments[0]}else t=Array.prototype.slice.call(arguments);return new zt(t)}});var Dl=y((H2,_n)=>{"use strict";var El=pl(),Cg=Sl(),xl=/\s/g;function no(...t){let e=Cg.apply(this,t),r=(n,i)=>Pg(n?n.toString():"",e,i);return r.multiline=(n,i)=>Dg(n?n.toString():"",e,i),r}var Cl=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function Pg(t,e,r){let n=Pl(r),i=Math.max(t.replace(xl,"").length,e.stops.length),o=Cl(e,n,i),s="";for(let a of t)s+=a.match(xl)?a:El.hex(o.shift().toHex())(a);return s}function Dg(t,e,r){let n=Pl(r),i=t.split(`
15
15
  `),o=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),s=Cl(e,n,o),a=[];for(let c of i){let d=s.slice(0),u="";for(let p of c)u+=El.hex(d.shift().toHex())(p);a.push(u)}return a.join(`
16
- `)}function Pl(t){let e={interpolation:"rgb",hsvSpin:"short",...t};if(t!==void 0&&typeof t!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if(typeof e.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof e.interpolation}\``);if(e.interpolation.toLowerCase()==="hsv"&&typeof e.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof e.hsvSpin}\``);return e}var wr={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};_n.exports=ro;for(let t in wr)_n.exports[t]=e=>new ro(wr[t].colors)(e,wr[t].options),_n.exports[t].multiline=e=>new ro(wr[t].colors).multiline(e,wr[t].options)});var Il=y((z2,Ol)=>{var no=class{constructor(e){this.value=e,this.next=void 0}},io=class{constructor(){this.clear()}enqueue(e){let r=new no(e);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){let e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}};Ol.exports=io});var oo=y((W2,Al)=>{"use strict";var Dg=Il(),Og=t=>{if(!((Number.isInteger(t)||t===1/0)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new Dg,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...d)=>{r++;let u=(async()=>a(...d))();c(u);try{await u}catch{}n()},o=(a,c,...d)=>{e.enqueue(i.bind(null,a,c,...d)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(d=>{o(a,d,...c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Al.exports=Og});var Tl=y((J2,Rl)=>{"use strict";var Fl=oo(),wn=class extends Error{constructor(e){super(),this.value=e}},Ig=async(t,e)=>e(await t),Ag=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new wn(e[0]);return!1},Fg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Fl(r.concurrency),i=[...t].map(s=>[s,n(Ig,s,e)]),o=Fl(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(Ag,s)))}catch(s){if(s instanceof wn)return s.value;throw s}};Rl.exports=Fg});var Ll=y((V2,so)=>{"use strict";var kl=require("path"),Sn=require("fs"),{promisify:Ml}=require("util"),Rg=Tl(),Tg=Ml(Sn.stat),kg=Ml(Sn.lstat),ql={directory:"isDirectory",file:"isFile"};function jl({type:t}){if(!(t in ql))throw new Error(`Invalid type specified: ${t}`)}var Nl=(t,e)=>t===void 0||e[ql[t]]();so.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},jl(e);let r=e.allowSymlinks?Tg:kg;return Rg(t,async n=>{try{let i=await r(kl.resolve(e.cwd,n));return Nl(e.type,i)}catch{return!1}},e)};so.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},jl(e);let r=e.allowSymlinks?Sn.statSync:Sn.lstatSync;for(let n of t)try{let i=r(kl.resolve(e.cwd,n));if(Nl(e.type,i))return n}catch{}}});var Bl=y((Y2,ao)=>{"use strict";var $l=require("fs"),{promisify:Mg}=require("util"),qg=Mg($l.access);ao.exports=async t=>{try{return await qg(t),!0}catch{return!1}};ao.exports.sync=t=>{try{return $l.accessSync(t),!0}catch{return!1}}});var uo=y((K2,Wt)=>{"use strict";var lt=require("path"),xn=Ll(),Ul=Bl(),co=Symbol("findUp.stop");Wt.exports=async(t,e={})=>{let r=lt.resolve(e.cwd||""),{root:n}=lt.parse(r),i=[].concat(t),o=async s=>{if(typeof t!="function")return xn(i,s);let a=await t(s.cwd);return typeof a=="string"?xn([a],s):a};for(;;){let s=await o({...e,cwd:r});if(s===co)return;if(s)return lt.resolve(r,s);if(r===n)return;r=lt.dirname(r)}};Wt.exports.sync=(t,e={})=>{let r=lt.resolve(e.cwd||""),{root:n}=lt.parse(r),i=[].concat(t),o=s=>{if(typeof t!="function")return xn.sync(i,s);let a=t(s.cwd);return typeof a=="string"?xn.sync([a],s):a};for(;;){let s=o({...e,cwd:r});if(s===co)return;if(s)return lt.resolve(r,s);if(r===n)return;r=lt.dirname(r)}};Wt.exports.exists=Ul;Wt.exports.sync.exists=Ul.sync;Wt.exports.stop=co});var En=y((Q2,lo)=>{"use strict";var Xl=require("path"),Gl=uo(),jg=async t=>{let e=await Gl("package.json",{cwd:t});return e&&Xl.dirname(e)};lo.exports=jg;lo.exports.sync=t=>{let e=Gl.sync("package.json",{cwd:t});return e&&Xl.dirname(e)}});function ft(t=""){return bo?go.default.resolve(vo.default.sync(__dirname),"../../../",t):go.default.resolve(vo.default.sync(__dirname),"../griddo-components",t)}function Bg(){let t=yo.default.sync("jsconfig.json",{cwd:ft()});return yo.default.sync("tsconfig.json",{cwd:ft()})||t}function Ug(){let t=require(Bg());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[o]=i.split("/*"),s=ft(o);return{...e,[n]:s}},{"@griddo-instance":`${ft()}/src/index.js`})}var go,yo,vo,bo,tf,_o=Ks(()=>{"use strict";go=F(require("node:path")),yo=F(uo()),vo=F(En()),bo=__dirname.includes("node_modules"),tf=Ug()});var of={};Qs(of,{CXDir:()=>Vg,default:()=>Jg});var dt,An,rf,wo,Xg,Gg,Hg,zg,Wg,nf,Jg,Vg,sf=Ks(()=>{"use strict";dt=F(require("node:path")),An=F(En());_o();rf=An.default.sync(dt.default.resolve(__dirname,"../..")),wo=An.default.sync(__dirname),Xg=dt.default.resolve(An.default.sync(__dirname)),Gg=dt.default.resolve(wo,"caches"),Hg=ft(),zg=dt.default.join(rf,"exports/sites"),{version:Wg}=require(dt.default.join(wo,"package.json")),nf={proDomain:"pro-",griddoVersion:Wg,CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root"},paths:t=>({__caches:dt.default.join(Gg,t||""),__components:Hg,__cx:wo,__exports:dt.default.join(zg,t||""),__root:rf,__ssg:Xg})},Jg=nf,Vg=nf.CXDir});var Io=y((m_,Cf)=>{"use strict";Cf.exports=function(e,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(r,i)}}});var Se=y((g_,Of)=>{"use strict";var ey=Io(),xt=Object.prototype.toString;function Ro(t){return xt.call(t)==="[object Array]"}function Ao(t){return typeof t>"u"}function ty(t){return t!==null&&!Ao(t)&&t.constructor!==null&&!Ao(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ry(t){return xt.call(t)==="[object ArrayBuffer]"}function ny(t){return typeof FormData<"u"&&t instanceof FormData}function iy(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function oy(t){return typeof t=="string"}function sy(t){return typeof t=="number"}function Pf(t){return t!==null&&typeof t=="object"}function Rn(t){if(xt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function ay(t){return xt.call(t)==="[object Date]"}function cy(t){return xt.call(t)==="[object File]"}function uy(t){return xt.call(t)==="[object Blob]"}function Df(t){return xt.call(t)==="[object Function]"}function ly(t){return Pf(t)&&Df(t.pipe)}function fy(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function dy(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function hy(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function To(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Ro(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function Fo(){var t={};function e(i,o){Rn(t[o])&&Rn(i)?t[o]=Fo(t[o],i):Rn(i)?t[o]=Fo({},i):Ro(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)To(arguments[r],e);return t}function py(t,e,r){return To(e,function(i,o){r&&typeof i=="function"?t[o]=ey(i,r):t[o]=i}),t}function my(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Of.exports={isArray:Ro,isArrayBuffer:ry,isBuffer:ty,isFormData:ny,isArrayBufferView:iy,isString:oy,isNumber:sy,isObject:Pf,isPlainObject:Rn,isUndefined:Ao,isDate:ay,isFile:cy,isBlob:uy,isFunction:Df,isStream:ly,isURLSearchParams:fy,isStandardBrowserEnv:hy,forEach:To,merge:Fo,extend:py,trim:dy,stripBOM:my}});var Tn=y((y_,Af)=>{"use strict";var Yt=Se();function If(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Af.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(Yt.isURLSearchParams(r))i=r.toString();else{var o=[];Yt.forEach(r,function(c,d){c===null||typeof c>"u"||(Yt.isArray(c)?d=d+"[]":c=[c],Yt.forEach(c,function(p){Yt.isDate(p)?p=p.toISOString():Yt.isObject(p)&&(p=JSON.stringify(p)),o.push(If(d)+"="+If(p))}))}),i=o.join("&")}if(i){var s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var Rf=y((v_,Ff)=>{"use strict";var gy=Se();function kn(){this.handlers=[]}kn.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};kn.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};kn.prototype.forEach=function(e){gy.forEach(this.handlers,function(n){n!==null&&e(n)})};Ff.exports=kn});var kf=y((b_,Tf)=>{"use strict";var yy=Se();Tf.exports=function(e,r){yy.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var Mn=y((__,Mf)=>{"use strict";Mf.exports=function(e,r,n,i,o){return e.config=r,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}});var qn=y((w_,qf)=>{"use strict";var vy=Mn();qf.exports=function(e,r,n,i,o){var s=new Error(e);return vy(s,r,n,i,o)}});var ko=y((S_,jf)=>{"use strict";var by=qn();jf.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(by("Request failed with status code "+n.status,n.config,null,n.request,n))}});var Lf=y((x_,Nf)=>{"use strict";var jn=Se();Nf.exports=jn.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var c=[];c.push(r+"="+encodeURIComponent(n)),jn.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),jn.isString(o)&&c.push("path="+o),jn.isString(s)&&c.push("domain="+s),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var Bf=y((E_,$f)=>{"use strict";$f.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Xf=y((C_,Uf)=>{"use strict";Uf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var Mo=y((P_,Gf)=>{"use strict";var _y=Bf(),wy=Xf();Gf.exports=function(e,r){return e&&!_y(r)?wy(e,r):r}});var zf=y((D_,Hf)=>{"use strict";var qo=Se(),Sy=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];Hf.exports=function(e){var r={},n,i,o;return e&&qo.forEach(e.split(`
17
- `),function(a){if(o=a.indexOf(":"),n=qo.trim(a.substr(0,o)).toLowerCase(),i=qo.trim(a.substr(o+1)),n){if(r[n]&&Sy.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([i]):r[n]=r[n]?r[n]+", "+i:i}}),r}});var Vf=y((O_,Jf)=>{"use strict";var Wf=Se();Jf.exports=Wf.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){var a=Wf.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Kf=y((I_,Yf)=>{"use strict";var Nn=Se(),xy=ko(),Ey=Lf(),Cy=Tn(),Py=Mo(),Dy=zf(),Oy=Vf(),jo=qn();Yf.exports=function(e){return new Promise(function(n,i){var o=e.data,s=e.headers,a=e.responseType;Nn.isFormData(o)&&delete s["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(d+":"+u)}var p=Py(e.baseURL,e.url);c.open(e.method.toUpperCase(),Cy(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?Dy(c.getAllResponseHeaders()):null,w=!a||a==="text"||a==="json"?c.responseText:c.response,x={data:w,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};xy(n,i,x),c=null}}if("onloadend"in c?c.onloadend=g:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(g)},c.onabort=function(){c&&(i(jo("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(jo("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),i(jo(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Nn.isStandardBrowserEnv()){var m=(e.withCredentials||Oy(p))&&e.xsrfCookieName?Ey.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&Nn.forEach(s,function(w,x){typeof o>"u"&&x.toLowerCase()==="content-type"?delete s[x]:c.setRequestHeader(x,w)}),Nn.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(w){c&&(c.abort(),i(w),c=null)}),o||(o=null),c.send(o)})}});var Zf=y((A_,Qf)=>{var Kt=1e3,Qt=Kt*60,Zt=Qt*60,Et=Zt*24,Iy=Et*7,Ay=Et*365.25;Qf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Fy(t);if(r==="number"&&isFinite(t))return e.long?Ty(t):Ry(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Fy(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ay;case"weeks":case"week":case"w":return r*Iy;case"days":case"day":case"d":return r*Et;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Zt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Qt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Kt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ry(t){var e=Math.abs(t);return e>=Et?Math.round(t/Et)+"d":e>=Zt?Math.round(t/Zt)+"h":e>=Qt?Math.round(t/Qt)+"m":e>=Kt?Math.round(t/Kt)+"s":t+"ms"}function Ty(t){var e=Math.abs(t);return e>=Et?Ln(t,e,Et,"day"):e>=Zt?Ln(t,e,Zt,"hour"):e>=Qt?Ln(t,e,Qt,"minute"):e>=Kt?Ln(t,e,Kt,"second"):t+" ms"}function Ln(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var No=y((F_,ed)=>{function ky(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=Zf(),r.destroy=d,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let p=0;for(let g=0;g<u.length;g++)p=(p<<5)-p+u.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(u){let p,g=null,m,b;function w(...x){if(!w.enabled)return;let A=w,j=Number(new Date),B=j-(p||j);A.diff=B,A.prev=p,A.curr=j,p=j,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let $=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(ue,Te)=>{if(ue==="%%")return"%";$++;let ee=r.formatters[Te];if(typeof ee=="function"){let D=x[$];ue=ee.call(A,D),x.splice($,1),$--}return ue}),r.formatArgs.call(A,x),(A.log||r.log).apply(A,x)}return w.namespace=u,w.useColors=r.useColors(),w.color=r.selectColor(u),w.extend=n,w.destroy=r.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(u)),b),set:x=>{g=x}}),typeof r.init=="function"&&r.init(w),w}function n(u,p){let g=r(this.namespace+(typeof p>"u"?":":p)+u);return g.log=this.log,g}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p,g=(typeof u=="string"?u:"").split(/[\s,]+/),m=g.length;for(p=0;p<m;p++)g[p]&&(u=g[p].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function o(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(u))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}ed.exports=ky});var td=y((Fe,$n)=>{Fe.formatArgs=qy;Fe.save=jy;Fe.load=Ny;Fe.useColors=My;Fe.storage=Ly();Fe.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Fe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function My(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function qy(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+$n.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Fe.log=console.debug||console.log||(()=>{});function jy(t){try{t?Fe.storage.setItem("debug",t):Fe.storage.removeItem("debug")}catch{}}function Ny(){let t;try{t=Fe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Ly(){try{return localStorage}catch{}}$n.exports=No()(Fe);var{formatters:$y}=$n.exports;$y.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var nd=y((se,Un)=>{var By=require("tty"),Bn=require("util");se.init=Jy;se.log=Hy;se.formatArgs=Xy;se.save=zy;se.load=Wy;se.useColors=Uy;se.destroy=Bn.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");se.colors=[6,2,3,4,5,1];try{let t=Hi();t&&(t.stderr||t).level>=2&&(se.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}se.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function Uy(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:By.isatty(process.stderr.fd)}function Xy(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
16
+ `)}function Pl(t){let e={interpolation:"rgb",hsvSpin:"short",...t};if(t!==void 0&&typeof t!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof t}\``);if(typeof e.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof e.interpolation}\``);if(e.interpolation.toLowerCase()==="hsv"&&typeof e.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof e.hsvSpin}\``);return e}var wr={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};_n.exports=no;for(let t in wr)_n.exports[t]=e=>new no(wr[t].colors)(e,wr[t].options),_n.exports[t].multiline=e=>new no(wr[t].colors).multiline(e,wr[t].options)});var Il=y((z2,Ol)=>{var io=class{constructor(e){this.value=e,this.next=void 0}},oo=class{constructor(){this.clear()}enqueue(e){let r=new io(e);this._head?(this._tail.next=r,this._tail=r):(this._head=r,this._tail=r),this._size++}dequeue(){let e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}};Ol.exports=oo});var so=y((W2,Al)=>{"use strict";var Og=Il(),Ig=t=>{if(!((Number.isInteger(t)||t===1/0)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new Og,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...d)=>{r++;let u=(async()=>a(...d))();c(u);try{await u}catch{}n()},o=(a,c,...d)=>{e.enqueue(i.bind(null,a,c,...d)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...c)=>new Promise(d=>{o(a,d,...c)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Al.exports=Ig});var Tl=y((J2,Rl)=>{"use strict";var Fl=so(),wn=class extends Error{constructor(e){super(),this.value=e}},Ag=async(t,e)=>e(await t),Fg=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new wn(e[0]);return!1},Rg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Fl(r.concurrency),i=[...t].map(s=>[s,n(Ag,s,e)]),o=Fl(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(Fg,s)))}catch(s){if(s instanceof wn)return s.value;throw s}};Rl.exports=Rg});var Ll=y((V2,ao)=>{"use strict";var kl=require("path"),Sn=require("fs"),{promisify:Ml}=require("util"),Tg=Tl(),kg=Ml(Sn.stat),Mg=Ml(Sn.lstat),ql={directory:"isDirectory",file:"isFile"};function jl({type:t}){if(!(t in ql))throw new Error(`Invalid type specified: ${t}`)}var Nl=(t,e)=>t===void 0||e[ql[t]]();ao.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},jl(e);let r=e.allowSymlinks?kg:Mg;return Tg(t,async n=>{try{let i=await r(kl.resolve(e.cwd,n));return Nl(e.type,i)}catch{return!1}},e)};ao.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},jl(e);let r=e.allowSymlinks?Sn.statSync:Sn.lstatSync;for(let n of t)try{let i=r(kl.resolve(e.cwd,n));if(Nl(e.type,i))return n}catch{}}});var Bl=y((Y2,co)=>{"use strict";var $l=require("fs"),{promisify:qg}=require("util"),jg=qg($l.access);co.exports=async t=>{try{return await jg(t),!0}catch{return!1}};co.exports.sync=t=>{try{return $l.accessSync(t),!0}catch{return!1}}});var lo=y((K2,Wt)=>{"use strict";var ft=require("path"),xn=Ll(),Ul=Bl(),uo=Symbol("findUp.stop");Wt.exports=async(t,e={})=>{let r=ft.resolve(e.cwd||""),{root:n}=ft.parse(r),i=[].concat(t),o=async s=>{if(typeof t!="function")return xn(i,s);let a=await t(s.cwd);return typeof a=="string"?xn([a],s):a};for(;;){let s=await o({...e,cwd:r});if(s===uo)return;if(s)return ft.resolve(r,s);if(r===n)return;r=ft.dirname(r)}};Wt.exports.sync=(t,e={})=>{let r=ft.resolve(e.cwd||""),{root:n}=ft.parse(r),i=[].concat(t),o=s=>{if(typeof t!="function")return xn.sync(i,s);let a=t(s.cwd);return typeof a=="string"?xn.sync([a],s):a};for(;;){let s=o({...e,cwd:r});if(s===uo)return;if(s)return ft.resolve(r,s);if(r===n)return;r=ft.dirname(r)}};Wt.exports.exists=Ul;Wt.exports.sync.exists=Ul.sync;Wt.exports.stop=uo});var En=y((Q2,fo)=>{"use strict";var Xl=require("path"),Gl=lo(),Ng=async t=>{let e=await Gl("package.json",{cwd:t});return e&&Xl.dirname(e)};fo.exports=Ng;fo.exports.sync=t=>{let e=Gl.sync("package.json",{cwd:t});return e&&Xl.dirname(e)}});function dt(t=""){return _o?yo.default.resolve(bo.default.sync(__dirname),"../../../",t):yo.default.resolve(bo.default.sync(__dirname),"../griddo-components",t)}function Ug(){let t=vo.default.sync("jsconfig.json",{cwd:dt()});return vo.default.sync("tsconfig.json",{cwd:dt()})||t}function Xg(){let t=require(Ug());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[o]=i.split("/*"),s=dt(o);return{...e,[n]:s}},{"@griddo-instance":`${dt()}/src/index.js`})}var yo,vo,bo,_o,tf,wo=Ks(()=>{"use strict";yo=F(require("node:path")),vo=F(lo()),bo=F(En()),_o=__dirname.includes("node_modules"),tf=Xg()});var sf={};Qs(sf,{CXDir:()=>Vg,default:()=>Jg});var We,Fn,nf,An,Gg,Hg,zg,rf,Wg,of,Jg,Vg,af=Ks(()=>{"use strict";We=F(require("node:path")),Fn=F(En());wo();nf=Fn.default.sync(We.default.resolve(__dirname,"../..")),An=Fn.default.sync(__dirname),Gg=We.default.resolve(Fn.default.sync(__dirname)),Hg=We.default.resolve(An,"caches"),zg=dt(),rf=We.default.join(nf,"exports/sites"),{version:Wg}=require(We.default.join(An,"package.json")),of={proDomain:"pro-",griddoVersion:Wg,CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root",EXPORTS_DIST:"__exports_dist",CX_DIST:"__cx_dist"},paths:t=>({__caches:We.default.join(Hg,t||""),__components:zg,__cx:An,__exports:We.default.join(rf,t||""),__root:nf,__ssg:Gg,__exports_dist:t?We.default.join(rf,t,"dist"):"",__cx_dist:We.default.join(An,"dist")})},Jg=of,Vg=of.CXDir});var Io=y((m_,Pf)=>{"use strict";Pf.exports=function(e,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(r,i)}}});var Se=y((g_,If)=>{"use strict";var ey=Io(),xt=Object.prototype.toString;function Ro(t){return xt.call(t)==="[object Array]"}function Ao(t){return typeof t>"u"}function ty(t){return t!==null&&!Ao(t)&&t.constructor!==null&&!Ao(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function ry(t){return xt.call(t)==="[object ArrayBuffer]"}function ny(t){return typeof FormData<"u"&&t instanceof FormData}function iy(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function oy(t){return typeof t=="string"}function sy(t){return typeof t=="number"}function Df(t){return t!==null&&typeof t=="object"}function Tn(t){if(xt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function ay(t){return xt.call(t)==="[object Date]"}function cy(t){return xt.call(t)==="[object File]"}function uy(t){return xt.call(t)==="[object Blob]"}function Of(t){return xt.call(t)==="[object Function]"}function ly(t){return Df(t)&&Of(t.pipe)}function fy(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function dy(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function hy(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function To(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Ro(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function Fo(){var t={};function e(i,o){Tn(t[o])&&Tn(i)?t[o]=Fo(t[o],i):Tn(i)?t[o]=Fo({},i):Ro(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)To(arguments[r],e);return t}function py(t,e,r){return To(e,function(i,o){r&&typeof i=="function"?t[o]=ey(i,r):t[o]=i}),t}function my(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}If.exports={isArray:Ro,isArrayBuffer:ry,isBuffer:ty,isFormData:ny,isArrayBufferView:iy,isString:oy,isNumber:sy,isObject:Df,isPlainObject:Tn,isUndefined:Ao,isDate:ay,isFile:cy,isBlob:uy,isFunction:Of,isStream:ly,isURLSearchParams:fy,isStandardBrowserEnv:hy,forEach:To,merge:Fo,extend:py,trim:dy,stripBOM:my}});var kn=y((y_,Ff)=>{"use strict";var Yt=Se();function Af(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Ff.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(Yt.isURLSearchParams(r))i=r.toString();else{var o=[];Yt.forEach(r,function(c,d){c===null||typeof c>"u"||(Yt.isArray(c)?d=d+"[]":c=[c],Yt.forEach(c,function(p){Yt.isDate(p)?p=p.toISOString():Yt.isObject(p)&&(p=JSON.stringify(p)),o.push(Af(d)+"="+Af(p))}))}),i=o.join("&")}if(i){var s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var Tf=y((v_,Rf)=>{"use strict";var gy=Se();function Mn(){this.handlers=[]}Mn.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Mn.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Mn.prototype.forEach=function(e){gy.forEach(this.handlers,function(n){n!==null&&e(n)})};Rf.exports=Mn});var Mf=y((b_,kf)=>{"use strict";var yy=Se();kf.exports=function(e,r){yy.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var qn=y((__,qf)=>{"use strict";qf.exports=function(e,r,n,i,o){return e.config=r,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}});var jn=y((w_,jf)=>{"use strict";var vy=qn();jf.exports=function(e,r,n,i,o){var s=new Error(e);return vy(s,r,n,i,o)}});var ko=y((S_,Nf)=>{"use strict";var by=jn();Nf.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(by("Request failed with status code "+n.status,n.config,null,n.request,n))}});var $f=y((x_,Lf)=>{"use strict";var Nn=Se();Lf.exports=Nn.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var c=[];c.push(r+"="+encodeURIComponent(n)),Nn.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),Nn.isString(o)&&c.push("path="+o),Nn.isString(s)&&c.push("domain="+s),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()});var Uf=y((E_,Bf)=>{"use strict";Bf.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Gf=y((C_,Xf)=>{"use strict";Xf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var Mo=y((P_,Hf)=>{"use strict";var _y=Uf(),wy=Gf();Hf.exports=function(e,r){return e&&!_y(r)?wy(e,r):r}});var Wf=y((D_,zf)=>{"use strict";var qo=Se(),Sy=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];zf.exports=function(e){var r={},n,i,o;return e&&qo.forEach(e.split(`
17
+ `),function(a){if(o=a.indexOf(":"),n=qo.trim(a.substr(0,o)).toLowerCase(),i=qo.trim(a.substr(o+1)),n){if(r[n]&&Sy.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([i]):r[n]=r[n]?r[n]+", "+i:i}}),r}});var Yf=y((O_,Vf)=>{"use strict";var Jf=Se();Vf.exports=Jf.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){var a=Jf.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Qf=y((I_,Kf)=>{"use strict";var Ln=Se(),xy=ko(),Ey=$f(),Cy=kn(),Py=Mo(),Dy=Wf(),Oy=Yf(),jo=jn();Kf.exports=function(e){return new Promise(function(n,i){var o=e.data,s=e.headers,a=e.responseType;Ln.isFormData(o)&&delete s["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(d+":"+u)}var p=Py(e.baseURL,e.url);c.open(e.method.toUpperCase(),Cy(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?Dy(c.getAllResponseHeaders()):null,w=!a||a==="text"||a==="json"?c.responseText:c.response,x={data:w,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};xy(n,i,x),c=null}}if("onloadend"in c?c.onloadend=g:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(g)},c.onabort=function(){c&&(i(jo("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(jo("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),i(jo(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Ln.isStandardBrowserEnv()){var m=(e.withCredentials||Oy(p))&&e.xsrfCookieName?Ey.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&Ln.forEach(s,function(w,x){typeof o>"u"&&x.toLowerCase()==="content-type"?delete s[x]:c.setRequestHeader(x,w)}),Ln.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&a!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(w){c&&(c.abort(),i(w),c=null)}),o||(o=null),c.send(o)})}});var ed=y((A_,Zf)=>{var Kt=1e3,Qt=Kt*60,Zt=Qt*60,Et=Zt*24,Iy=Et*7,Ay=Et*365.25;Zf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Fy(t);if(r==="number"&&isFinite(t))return e.long?Ty(t):Ry(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Fy(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ay;case"weeks":case"week":case"w":return r*Iy;case"days":case"day":case"d":return r*Et;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Zt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Qt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Kt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ry(t){var e=Math.abs(t);return e>=Et?Math.round(t/Et)+"d":e>=Zt?Math.round(t/Zt)+"h":e>=Qt?Math.round(t/Qt)+"m":e>=Kt?Math.round(t/Kt)+"s":t+"ms"}function Ty(t){var e=Math.abs(t);return e>=Et?$n(t,e,Et,"day"):e>=Zt?$n(t,e,Zt,"hour"):e>=Qt?$n(t,e,Qt,"minute"):e>=Kt?$n(t,e,Kt,"second"):t+" ms"}function $n(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var No=y((F_,td)=>{function ky(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=ed(),r.destroy=d,Object.keys(t).forEach(u=>{r[u]=t[u]}),r.names=[],r.skips=[],r.formatters={};function e(u){let p=0;for(let g=0;g<u.length;g++)p=(p<<5)-p+u.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(u){let p,g=null,m,b;function w(...x){if(!w.enabled)return;let A=w,j=Number(new Date),B=j-(p||j);A.diff=B,A.prev=p,A.curr=j,p=j,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let $=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(ue,Te)=>{if(ue==="%%")return"%";$++;let ee=r.formatters[Te];if(typeof ee=="function"){let D=x[$];ue=ee.call(A,D),x.splice($,1),$--}return ue}),r.formatArgs.call(A,x),(A.log||r.log).apply(A,x)}return w.namespace=u,w.useColors=r.useColors(),w.color=r.selectColor(u),w.extend=n,w.destroy=r.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(u)),b),set:x=>{g=x}}),typeof r.init=="function"&&r.init(w),w}function n(u,p){let g=r(this.namespace+(typeof p>"u"?":":p)+u);return g.log=this.log,g}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p,g=(typeof u=="string"?u:"").split(/[\s,]+/),m=g.length;for(p=0;p<m;p++)g[p]&&(u=g[p].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function o(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(u))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}td.exports=ky});var rd=y((Fe,Bn)=>{Fe.formatArgs=qy;Fe.save=jy;Fe.load=Ny;Fe.useColors=My;Fe.storage=Ly();Fe.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Fe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function My(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function qy(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Bn.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Fe.log=console.debug||console.log||(()=>{});function jy(t){try{t?Fe.storage.setItem("debug",t):Fe.storage.removeItem("debug")}catch{}}function Ny(){let t;try{t=Fe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Ly(){try{return localStorage}catch{}}Bn.exports=No()(Fe);var{formatters:$y}=Bn.exports;$y.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var id=y((se,Xn)=>{var By=require("tty"),Un=require("util");se.init=Jy;se.log=Hy;se.formatArgs=Xy;se.save=zy;se.load=Wy;se.useColors=Uy;se.destroy=Un.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");se.colors=[6,2,3,4,5,1];try{let t=zi();t&&(t.stderr||t).level>=2&&(se.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}se.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function Uy(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:By.isatty(process.stderr.fd)}function Xy(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
18
18
  `).join(`
19
- `+o),t.push(i+"m+"+Un.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Gy()+e+" "+t[0]}function Gy(){return se.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Hy(...t){return process.stderr.write(Bn.format(...t)+`
20
- `)}function zy(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Wy(){return process.env.DEBUG}function Jy(t){t.inspectOpts={};let e=Object.keys(se.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=se.inspectOpts[e[r]]}Un.exports=No()(se);var{formatters:rd}=Un.exports;rd.o=function(t){return this.inspectOpts.colors=this.useColors,Bn.inspect(t,this.inspectOpts).split(`
21
- `).map(e=>e.trim()).join(" ")};rd.O=function(t){return this.inspectOpts.colors=this.useColors,Bn.inspect(t,this.inspectOpts)}});var id=y((R_,Lo)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Lo.exports=td():Lo.exports=nd()});var sd=y((T_,od)=>{var Er;od.exports=function(){if(!Er){try{Er=id()("follow-redirects")}catch{}typeof Er!="function"&&(Er=function(){})}Er.apply(null,arguments)}});var Ho=y((k_,Go)=>{var Ct=require("url"),$o=Ct.URL,Vy=require("http"),Yy=require("https"),ud=require("stream").Writable,ld=require("assert"),fd=sd(),Uo=["abort","aborted","connect","error","socket","timeout"],Xo=Object.create(null);Uo.forEach(function(t){Xo[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Ky=Pr("ERR_INVALID_URL","Invalid URL",TypeError),ad=Pr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Qy=Pr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Zy=Pr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ev=Pr("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){ud.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){r._processResponse(n)},this._performRequest()}Re.prototype=Object.create(ud.prototype);Re.prototype.abort=function(){hd(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new ev;if(!Pt(t)&&!nv(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Cr(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Zy),this.abort())};Re.prototype.end=function(t,e,r){if(Cr(t)?(r=t,t=e=null):Cr(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Re.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Re.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Re.prototype.setTimeout=function(t,e){var r=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(s)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Re.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Re.prototype,t,{get:function(){return this._currentRequest[t]}})});Re.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};Re.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Uo)n.on(i,Xo[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ct.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(d){if(n===s._currentRequest)if(d)s.emit("error",d);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};Re.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(hd(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Qy);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Bo(/^content-/i,this._options.headers));var s=Bo(/^host$/i,this._options.headers),a=Ct.parse(this._currentUrl),c=s||a.host,d=/^\w+:/.test(r)?this._currentUrl:Ct.format(Object.assign(a,{host:c})),u;try{u=Ct.resolve(d,r)}catch(b){this.emit("error",new ad({cause:b}));return}fd("redirecting to",u),this._isRedirect=!0;var p=Ct.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!rv(p.host,c))&&Bo(/^(?:authorization|cookie)$/i,this._options.headers),Cr(i)){var g={headers:t.headers,statusCode:e},m={url:d,method:o,headers:n};try{i(this._options,g,m)}catch(b){this.emit("error",b);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(b){this.emit("error",new ad({cause:b}))}};function dd(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],s=e[n]=Object.create(o);function a(d,u,p){if(Pt(d)){var g;try{g=cd(new $o(d))}catch{g=Ct.parse(d)}if(!Pt(g.protocol))throw new Ky({input:d});d=g}else $o&&d instanceof $o?d=cd(d):(p=u,u=d,d={protocol:i});return Cr(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},d,u),u.nativeProtocols=r,!Pt(u.host)&&!Pt(u.hostname)&&(u.hostname="::1"),ld.equal(u.protocol,i,"protocol mismatch"),fd("options",u),new Re(u,p)}function c(d,u,p){var g=s.request(d,u,p);return g.end(),g}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function tv(){}function cd(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return t.port!==""&&(e.port=Number(t.port)),e}function Bo(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Pr(t,e,r){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+t+"]",n}function hd(t){for(var e of Uo)t.removeListener(e,Xo[e]);t.on("error",tv),t.abort()}function rv(t,e){ld(Pt(t)&&Pt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Pt(t){return typeof t=="string"||t instanceof String}function Cr(t){return typeof t=="function"}function nv(t){return typeof t=="object"&&"length"in t}Go.exports=dd({http:Vy,https:Yy});Go.exports.wrap=dd});var zo=y((M_,iv)=>{iv.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}});var bd=y((q_,vd)=>{"use strict";var Dr=Se(),pd=ko(),ov=Mo(),sv=Tn(),av=require("http"),cv=require("https"),uv=Ho().http,lv=Ho().https,md=require("url"),fv=require("zlib"),dv=zo(),Xn=qn(),Wo=Mn(),gd=/https:?/;function yd(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(o){o.headers.host=o.host,yd(o,e,o.href)}}vd.exports=function(e){return new Promise(function(n,i){var o=function(P){n(P)},s=function(P){i(P)},a=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+dv.version,a&&!Dr.isStream(a)){if(!Buffer.isBuffer(a))if(Dr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(Dr.isString(a))a=Buffer.from(a,"utf-8");else return s(Xn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var d=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";d=u+":"+p}var g=ov(e.baseURL,e.url),m=md.parse(g),b=m.protocol||"http:";if(!d&&m.auth){var w=m.auth.split(":"),x=w[0]||"",A=w[1]||"";d=x+":"+A}d&&delete c.Authorization;var j=gd.test(b),B=j?e.httpsAgent:e.httpAgent,$={path:sv(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:B,agents:{http:e.httpAgent,https:e.httpsAgent},auth:d};e.socketPath?$.socketPath=e.socketPath:($.hostname=m.hostname,$.port=m.port);var V=e.proxy;if(!V&&V!==!1){var ue=b.slice(0,-1)+"_proxy",Te=process.env[ue]||process.env[ue.toUpperCase()];if(Te){var ee=md.parse(Te),D=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(D){var k=D.split(",").map(function(P){return P.trim()});q=!k.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(q&&(V={host:ee.hostname,port:ee.port,protocol:ee.protocol},ee.auth)){var z=ee.auth.split(":");V.auth={username:z[0],password:z[1]}}}}V&&($.headers.host=m.hostname+(m.port?":"+m.port:""),yd($,V,b+"//"+m.hostname+(m.port?":"+m.port:"")+$.path));var I,G=j&&(V?gd.test(V.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=G?cv:av:(e.maxRedirects&&($.maxRedirects=e.maxRedirects),I=G?lv:uv),e.maxBodyLength>-1&&($.maxBodyLength=e.maxBodyLength);var O=I.request($,function(P){if(!O.aborted){var R=P,He=P.req||O;if(P.statusCode!==204&&He.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(fv.createUnzip()),delete P.headers["content-encoding"];break}var Ye={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:He};if(e.responseType==="stream")Ye.data=R,pd(o,s,Ye);else{var le=[],ye=0;R.on("data",function(xe){le.push(xe),ye+=xe.length,e.maxContentLength>-1&&ye>e.maxContentLength&&(R.destroy(),s(Xn("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,He)))}),R.on("error",function(xe){O.aborted||s(Wo(xe,e,null,He))}),R.on("end",function(){var xe=Buffer.concat(le);e.responseType!=="arraybuffer"&&(xe=xe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(xe=Dr.stripBOM(xe))),Ye.data=xe,pd(o,s,Ye)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(Wo(P,e,null,O))}),e.timeout){var U=parseInt(e.timeout,10);if(isNaN(U)){s(Xn("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(U,function(){O.abort(),s(Xn("timeout of "+U+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",O))})}e.cancelToken&&e.cancelToken.promise.then(function(P){O.aborted||(O.abort(),s(P))}),Dr.isStream(a)?a.on("error",function(P){s(Wo(P,e,null,O))}).pipe(O):O.end(a)})}});var Hn=y((j_,Sd)=>{"use strict";var ae=Se(),_d=kf(),hv=Mn(),pv={"Content-Type":"application/x-www-form-urlencoded"};function wd(t,e){!ae.isUndefined(t)&&ae.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function mv(){var t;return typeof XMLHttpRequest<"u"?t=Kf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=bd()),t}function gv(t,e,r){if(ae.isString(t))try{return(e||JSON.parse)(t),ae.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Gn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:mv(),transformRequest:[function(e,r){return _d(r,"Accept"),_d(r,"Content-Type"),ae.isFormData(e)||ae.isArrayBuffer(e)||ae.isBuffer(e)||ae.isStream(e)||ae.isFile(e)||ae.isBlob(e)?e:ae.isArrayBufferView(e)?e.buffer:ae.isURLSearchParams(e)?(wd(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ae.isObject(e)||r&&r["Content-Type"]==="application/json"?(wd(r,"application/json"),gv(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?hv(s,this,"E_JSON_PARSE"):s}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Gn.headers={common:{Accept:"application/json, text/plain, */*"}};ae.forEach(["delete","get","head"],function(e){Gn.headers[e]={}});ae.forEach(["post","put","patch"],function(e){Gn.headers[e]=ae.merge(pv)});Sd.exports=Gn});var Ed=y((N_,xd)=>{"use strict";var yv=Se(),vv=Hn();xd.exports=function(e,r,n){var i=this||vv;return yv.forEach(n,function(s){e=s.call(i,e,r)}),e}});var Jo=y((L_,Cd)=>{"use strict";Cd.exports=function(e){return!!(e&&e.__CANCEL__)}});var Od=y(($_,Dd)=>{"use strict";var Pd=Se(),Vo=Ed(),bv=Jo(),_v=Hn();function Yo(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Dd.exports=function(e){Yo(e),e.headers=e.headers||{},e.data=Vo.call(e,e.data,e.headers,e.transformRequest),e.headers=Pd.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Pd.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||_v.adapter;return r(e).then(function(i){return Yo(e),i.data=Vo.call(e,i.data,i.headers,e.transformResponse),i},function(i){return bv(i)||(Yo(e),i&&i.response&&(i.response.data=Vo.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Ko=y((B_,Id)=>{"use strict";var me=Se();Id.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(g,m){return me.isPlainObject(g)&&me.isPlainObject(m)?me.merge(g,m):me.isPlainObject(m)?me.merge({},m):me.isArray(m)?m.slice():m}function d(g){me.isUndefined(r[g])?me.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}me.forEach(i,function(m){me.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),me.forEach(o,d),me.forEach(s,function(m){me.isUndefined(r[m])?me.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),me.forEach(a,function(m){m in r?n[m]=c(e[m],r[m]):m in e&&(n[m]=c(void 0,e[m]))});var u=i.concat(o).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return me.forEach(p,d),n}});var kd=y((U_,Td)=>{"use strict";var Fd=zo(),Qo={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Qo[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Ad={},wv=Fd.version.split(".");function Rd(t,e){for(var r=e?e.split("."):wv,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Qo.transitional=function(e,r,n){var i=r&&Rd(r);function o(s,a){return"[Axios v"+Fd.version+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return function(s,a,c){if(e===!1)throw new Error(o(a," has been removed in "+r));return i&&!Ad[a]&&(Ad[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,c):!0}};function Sv(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new TypeError("option "+o+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+o)}}Td.exports={isOlderVersion:Rd,assertOptions:Sv,validators:Qo}});var $d=y((X_,Ld)=>{"use strict";var jd=Se(),xv=Tn(),Md=Rf(),qd=Od(),zn=Ko(),Nd=kd(),er=Nd.validators;function Or(t){this.defaults=t,this.interceptors={request:new Md,response:new Md}}Or.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=zn(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&Nd.assertOptions(r,{silentJSONParsing:er.transitional(er.boolean,"1.0.0"),forcedJSONParsing:er.transitional(er.boolean,"1.0.0"),clarifyTimeoutError:er.transitional(er.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(i=i&&g.synchronous,n.unshift(g.fulfilled,g.rejected))});var o=[];this.interceptors.response.forEach(function(g){o.push(g.fulfilled,g.rejected)});var s;if(!i){var a=[qd,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),s=Promise.resolve(e);a.length;)s=s.then(a.shift(),a.shift());return s}for(var c=e;n.length;){var d=n.shift(),u=n.shift();try{c=d(c)}catch(p){u(p);break}}try{s=qd(c)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};Or.prototype.getUri=function(e){return e=zn(this.defaults,e),xv(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};jd.forEach(["delete","get","head","options"],function(e){Or.prototype[e]=function(r,n){return this.request(zn(n||{},{method:e,url:r,data:(n||{}).data}))}});jd.forEach(["post","put","patch"],function(e){Or.prototype[e]=function(r,n,i){return this.request(zn(i||{},{method:e,url:r,data:n}))}});Ld.exports=Or});var es=y((G_,Bd)=>{"use strict";function Zo(t){this.message=t}Zo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Zo.prototype.__CANCEL__=!0;Bd.exports=Zo});var Xd=y((H_,Ud)=>{"use strict";var Ev=es();function Wn(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var r=this;t(function(i){r.reason||(r.reason=new Ev(i),e(r.reason))})}Wn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Wn.source=function(){var e,r=new Wn(function(i){e=i});return{token:r,cancel:e}};Ud.exports=Wn});var Hd=y((z_,Gd)=>{"use strict";Gd.exports=function(e){return function(n){return e.apply(null,n)}}});var Wd=y((W_,zd)=>{"use strict";zd.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Yd=y((J_,ts)=>{"use strict";var Jd=Se(),Cv=Io(),Jn=$d(),Pv=Ko(),Dv=Hn();function Vd(t){var e=new Jn(t),r=Cv(Jn.prototype.request,e);return Jd.extend(r,Jn.prototype,e),Jd.extend(r,e),r}var Xe=Vd(Dv);Xe.Axios=Jn;Xe.create=function(e){return Vd(Pv(Xe.defaults,e))};Xe.Cancel=es();Xe.CancelToken=Xd();Xe.isCancel=Jo();Xe.all=function(e){return Promise.all(e)};Xe.spread=Hd();Xe.isAxiosError=Wd();ts.exports=Xe;ts.exports.default=Xe});var rs=y((V_,Kd)=>{Kd.exports=Yd()});var Z=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.isUndefined=Ie.fixName=Ie.validateName=Ie.validateSingleChar=Ie.fixChar=Ie.validateChar=void 0;function jv(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===9||r===10||r===13||r>=32&&r<=55295||r>=57344&&r<=65533)){if(e+1===t.length)return!1;var n=t.charCodeAt(e+1);if(r>=55296&&r<=56319&&n>=56320&&n<=57343){e++;continue}return!1}}return!0}Ie.validateChar=jv;function Nv(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533){e+=t[r];continue}if(r+1===t.length)return e+="\uFFFD",e;var i=t.charCodeAt(r+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){e+=t[r]+t[r+1],r++;continue}e+="\uFFFD"}return e}Ie.fixChar=Nv;function Lv(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(t.length===1)return e===9||e===10||e===13||e>=32&&e<=55295||e>=57344&&e<=65533;if(t.length!==2)return!1;var r=t.charCodeAt(1);return e>=55296&&e<=56319&&r>=56320&&r<=57343}Ie.validateSingleChar=Lv;function $v(t){if(t.length===0)return!1;var e=t.charCodeAt(0),r=e===58||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533;if(t.length===1)return r;var n=t.charCodeAt(1),i=e>=55296&&e<=56191&&n>=56320&&n<=57343;if(!r&&!i)return!1;for(var o=i?2:1,s=o;s<t.length;s++){var a=t.charCodeAt(s);if(!(a===58||a===95||a===45||a===46||a===183||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=768&&a<=879||a>=880&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533)){if(s+1===t.length)return!1;var c=t.charCodeAt(s+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){s++;continue}return!1}}return!0}Ie.validateName=$v;function Bv(t){var e="";if(t.length===0)return e;var r=t.charCodeAt(0),n=r===58||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533;if(t.length===1)return n?e=t[0]:e="\uFFFD",e;var i=t.charCodeAt(1),o=r>=55296&&r<=56191&&i>=56320&&i<=57343;o?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var s=o?2:1,a=s;a<t.length;a++){var c=t.charCodeAt(a);if(c===58||c===95||c===45||c===46||c===183||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||c>=192&&c<=214||c>=216&&c<=246||c>=248&&c<=767||c>=768&&c<=879||c>=880&&c<=893||c>=895&&c<=8191||c>=8204&&c<=8205||c>=8255&&c<=8256||c>=8304&&c<=8591||c>=11264&&c<=12271||c>=12289&&c<=55295||c>=63744&&c<=64975||c>=65008&&c<=65533){e+=t[a];continue}if(a+1===t.length)return e+="\uFFFD",e;var d=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&d>=56320&&d<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Ie.fixName=Bv;function Uv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ie.isUndefined=Uv});var rr=y(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.StringOptions=void 0;var Qn=Z(),Xv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
22
- `,this.pretty=!0,(0,Qn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Qn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Qn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Qn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Zn.StringOptions=Xv});var ei=y(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.escapeDoubleQuotes=Me.escapeSingleQuotes=Me.escapeRightAngleBracketsInCdataTerminator=Me.escapeLeftAngleBrackets=Me.escapeAmpersands=void 0;function Gv(t){return t.replace(/&/g,"&amp;")}Me.escapeAmpersands=Gv;function Hv(t){return t.replace(/</g,"&lt;")}Me.escapeLeftAngleBrackets=Hv;function zv(t){return t.replace(/]]>/g,"]]&gt;")}Me.escapeRightAngleBracketsInCdataTerminator=zv;function Wv(t){return t.replace(/'/g,"&apos;")}Me.escapeSingleQuotes=Wv;function Jv(t){return t.replace(/"/g,"&quot;")}Me.escapeDoubleQuotes=Jv});var gs=y(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var Vv=ce(),wh=ei(),ps=Z(),Yv=function(){function t(e,r,n){this._validation=r,(0,ps.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,ps.fixChar)(e);else if(this._validation&&!(0,ps.validateChar)(e))throw new Error((0,Vv.getContext)(this.up())+": attribute text"+(' "'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,wh.escapeAmpersands)(e),e=(0,wh.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();ms.default=Yv});var ti=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var Sh=ce(),xh=Z(),Kv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,xh.isUndefined)(n.hex)||(this.hex=n.hex)}return Object.defineProperty(t.prototype,"char",{get:function(){return this._char},set:function(e){if(this._validation&&!(0,xh.validateSingleChar)(e))throw new Error((0,Sh.getContext)(this.up())+": character reference"+(' "'+e+'" should reference a single character,')+" and this character should be allowed in XML");this._char=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){return this._hex},set:function(e){this._hex=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e;if(this._char.length===1)e=this._char.charCodeAt(0);else{var r=this._char.charCodeAt(0);if(r>=55296&&r<=56319&&this._char.length>1){var n=this._char.charCodeAt(1);if(n>=56320&&n<=57343)e=(r-55296)*1024+n-56320+65536;else throw new Error((0,Sh.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else e=r}return this._hex?"&#x"+e.toString(16)+";":"&#"+e+";"},t.prototype.up=function(){return this._parent},t}();ys.default=Kv});var ri=y(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Qv=ce(),Zv=Z(),e1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Zv.validateName)(e))throw new Error((0,Qv.getContext)(this.up())+": entity reference name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"&"+this._name+";"},t.prototype.up=function(){return this._parent},t}();vs.default=e1});var ni=y(Ar=>{"use strict";var ws=Ar&&Ar.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ar,"__esModule",{value:!0});var bs=ce(),Eh=ei(),t1=rr(),_s=Z(),r1=ws(gs()),n1=ws(ti()),i1=ws(ri()),o1=function(){function t(e,r,n){this._validation=r,(0,_s.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,this._children=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,_s.fixName)(e),e.length===0)throw new Error((0,bs.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,_s.validateName)(e))throw e.length===0?new Error((0,bs.getContext)(this.up())+": attribute name should not be empty"):new Error((0,bs.getContext)(this.up())+": attribute name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.charRef=function(e){var r=new n1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new i1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new r1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new t1.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,o=0,s=this._children;o<s.length;o++){var a=s[o];r.doubleQuotes?i+=(0,Eh.escapeDoubleQuotes)(a.toString()):i+=(0,Eh.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Ar.default=o1});var xs=y(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var s1=ce(),a1=Z(),c1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,a1.validateChar)(e))throw new Error((0,s1.getContext)(this.up())+": attribute-list"+(' declaration "'+e+'" should not contain')+" characters not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ATTLIST "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Ss.default=c1});var Cs=y(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var u1=ce(),l1=Z(),f1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,l1.validateChar)(e))throw new Error((0,u1.getContext)(this.up())+": element declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ELEMENT "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Es.default=f1});var Ds=y(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var d1=ce(),h1=Z(),p1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,h1.validateChar)(e))throw new Error((0,d1.getContext)(this.up())+": entity declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ENTITY "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Ps.default=p1});var Is=y(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var m1=ce(),g1=Z(),y1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,g1.validateChar)(e))throw new Error((0,m1.getContext)(this.up())+": notation declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!NOTATION "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Os.default=y1});var Fs=y(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var v1=ce(),b1=Z(),_1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,b1.validateName)(e))throw new Error((0,v1.getContext)(this.up())+": parameter entity"+(' reference name "'+e+'" should not contain')+" characters not allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"%"+this._name+";"},t.prototype.up=function(){return this._parent},t}();As.default=_1});var Fr=y(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var ii=ce(),oi=Z(),w1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.content=n.content,this.target=n.target}return Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){if(!(0,oi.isUndefined)(e)){if(this._validation&&!(0,oi.validateChar)(e))throw new Error((0,ii.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain characters not allowed in XML");if(this._validation&&e.indexOf("?>")!==-1)throw new Error((0,ii.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain the string '?>'")}this._content=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){if(this._validation&&!(0,oi.validateName)(e))throw new Error((0,ii.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not contain characters not allowed in XML names");if(this._validation&&e==="xml")throw new Error((0,ii.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not be the string 'xml'");this._target=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return(0,oi.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();Rs.default=w1});var si=y(Ot=>{"use strict";var It=Ot&&Ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validatePubId=void 0;var mt=ce(),S1=rr(),Ve=Z(),x1=It(Rr()),E1=It(xs()),C1=It(Cs()),P1=It(Ds()),D1=It(Is()),O1=It(Fs()),I1=It(Fr()),A1=function(){function t(e,r,n){this._pubId=void 0,this._sysId=void 0,this._validation=r,this._children=[],this._parent=e,this.name=n.name,(0,Ve.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Ve.isUndefined)(n.pubId)||(this.pubId=n.pubId)}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Ve.validateName)(e))throw new Error((0,mt.getContext)(this.up())+': DTD name "'+e+'" should not contain characters not allowed in XML names');this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pubId",{get:function(){return this._pubId},set:function(e){if(!(0,Ve.isUndefined)(e)){if(this._validation&&!Ch(e))throw new Error((0,mt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Ve.isUndefined)(this._sysId))throw new Error((0,mt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not be defined')+" if system identifier is undefined")}this._pubId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sysId",{get:function(){return this._sysId},set:function(e){if(!(0,Ve.isUndefined)(e)){if(this._validation&&!(0,Ve.validateChar)(e))throw new Error((0,mt.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" characters not allowed in XML");if(this._validation&&e.indexOf("'")!==-1&&e.indexOf('"')!==-1)throw new Error((0,mt.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" both single quotes and double quotes")}this._sysId=e},enumerable:!1,configurable:!0}),t.prototype.attlist=function(e){var r=new E1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new x1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new C1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new P1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new D1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new O1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new I1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new S1.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Ve.isUndefined)(this._pubId))(0,Ve.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Ve.isUndefined)(this._sysId))throw new Error((0,mt.getContext)(this.up())+": DTD system identifier is not undefined");n+=" ",n=this.appendId("PUBLIC",this._pubId,n,r),n=this.appendId("",this._sysId,n,r)}if(this._children.length!==0){n+=" [";for(var i=0,o=this._children;i<o.length;i++){var s=o[i];r.pretty&&(n+=r.newline+r.indent),n+=s.toString()}r.pretty&&(n+=r.newline),n+="]>"}else n+=">";return n},t.prototype.up=function(){return this._parent},t.prototype.appendId=function(e,r,n,i){if(n+=e+" ",i.doubleQuotes){if(this._validation&&r.indexOf('"')!==-1)throw new Error((0,mt.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+='"'+r+'"'}else{if(this._validation&&r.indexOf("'")!==-1)throw new Error((0,mt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();Ot.default=A1;function Ch(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===10||r===13||r===32||r===33||r>=35&&r<=37||r>=39&&r<=47||r>=48&&r<=57||r===58||r===59||r===61||r===63||r>=64&&r<=90||r===95||r>=97&&r<=122))return e+1===t.length,!1}return!0}Ot.validatePubId=Ch});var Ms=y(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var Ph=ce(),Ts=Z(),F1=function(){function t(e,r,n){this._validation=r,(0,Ts.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Ts.fixChar)(e);else if(this._validation&&!(0,Ts.validateChar)(e))throw new Error((0,Ph.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("]]>","\uFFFD\uFFFD\uFFFD");else if(this._validation&&e.indexOf("]]>")!==-1)throw new Error((0,Ph.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain the string')+" ']]>'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<![CDATA["+this._charData+"]]>"},t.prototype.up=function(){return this._parent},t}();ks.default=F1});var Ls=y(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var R1=ce(),qs=ei(),js=Z(),T1=function(){function t(e,r,n){this._validation=r,(0,js.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,js.fixChar)(e);else if(this._validation&&!(0,js.validateChar)(e))throw new Error((0,R1.getContext)(this.up())+": character data"+('"'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,qs.escapeAmpersands)(e),e=(0,qs.escapeLeftAngleBrackets)(e),e=(0,qs.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();Ns.default=T1});var li=y(Mr=>{"use strict";var At=Mr&&Mr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mr,"__esModule",{value:!0});var ai=ce(),k1=rr(),Tr=Z(),Dh=At(ni()),M1=At(Ms()),kr=At(Ls()),ci=At(ti()),q1=At(Rr()),ui=At(ri()),j1=At(Fr()),N1=function(){function t(e,r,n){this._validation=r,(0,Tr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Tr.isUndefined)(n.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=n.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,Tr.fixName)(e),e.length===0)throw new Error((0,ai.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Tr.validateName)(e))throw e.length===0?new Error((0,ai.getContext)(this.up())+": element name should not be empty"):new Error((0,ai.getContext)(this.up())+": element name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.attribute=function(e){if(this._validation&&this._attributeNames.indexOf(e.name)!==-1)throw new Error((0,ai.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Dh.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new M1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new kr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new ci.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new q1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new t(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new ui.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new j1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){return e===void 0&&(e={}),this.toStringWithIndent(e,"")},t.prototype.up=function(){return this._parent},t.prototype.toStringWithIndent=function(e,r){for(var n=new k1.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,c=this._children;a<c.length;a++){var d=c[a];d instanceof Dh.default?o+=" "+d.toString(e):s.push(d)}if(s.length>0){for(var u="",p=0;p<s.length;p++){var g=s[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?s[p-1]:void 0;g instanceof kr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(s)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(s)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof ci.default||i instanceof ui.default||i instanceof kr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof ci.default||e instanceof ui.default||e instanceof kr.default)&&!(0,Tr.isUndefined)(r)&&(r instanceof ci.default||r instanceof ui.default||r instanceof kr.default)},t}();Mr.default=N1});var ce=y(nr=>{"use strict";var di=nr&&nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nr,"__esModule",{value:!0});nr.getContext=void 0;var L1=di(ni()),$1=di(hi()),B1=di(si()),U1=di(li());function fi(t){if(t instanceof L1.default)return fi(t.up())+(' > attribute "'+t.name+'"');if(t instanceof $1.default)return"in XML document";if(t instanceof B1.default)return fi(t.up())+" > DTD";if(t instanceof U1.default)return fi(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}nr.getContext=fi});var Rr=y(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var $s=ce(),Bs=Z(),X1=function(){function t(e,r,n){this._validation=r,(0,Bs.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Bs.fixChar)(e);else if(this._validation&&!(0,Bs.validateChar)(e))throw new Error((0,$s.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("--","\uFFFD\uFFFD");else if(this._validation&&e.indexOf("--")!==-1)throw new Error((0,$s.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain the string')+" '--'");if(this._replaceInvalidCharsInCharData)e.lastIndexOf("-")===e.length-1&&(e=e.substr(0,e.length-1)+"\uFFFD");else if(this._validation&&e.lastIndexOf("-")===e.length-1)throw new Error((0,$s.getContext)(this.up())+": comment content"+(' "'+e+'" should not end with the string')+" '-'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!--"+this._charData+"-->"},t.prototype.up=function(){return this._parent},t}();Us.default=X1});var Hs=y(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var Xs=ce(),G1=rr(),qr=Z(),H1=function(){function t(e,r,n){this._version="1.0",this._validation=r,this._parent=e,this.encoding=n.encoding,this.standalone=n.standalone,(0,qr.isUndefined)(n.version)||(this.version=n.version)}return Object.defineProperty(t.prototype,"encoding",{get:function(){return this._encoding},set:function(e){if(this._validation&&!(0,qr.isUndefined)(e)&&!z1(e))throw new Error((0,Xs.getContext)(this.up())+": declaration"+(" encoding attribute "+e+" should be a")+" valid encoding");this._encoding=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"standalone",{get:function(){return this._standalone},set:function(e){if(this._validation&&!(0,qr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Xs.getContext)(this.up())+": declaration"+(" standalone attribute "+e+" should")+" be the string 'yes' or the string 'no'");this._standalone=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},set:function(e){if(this._validation&&!W1(e))throw new Error((0,Xs.getContext)(this.up())+": declaration version"+(" attribute "+e+" should be a valid XML")+" version");this._version=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e={});var r=new G1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,qr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,qr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();Gs.default=H1;function z1(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(!(e>=65&&e<=90||e>=97&&e<=122))return!1;for(var r=1;r<t.length;r++){var n=t.charCodeAt(r);if(!(n===95||n===45||n===46||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122))return r+1===t.length,!1}return!0}function W1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var hi=y(Nr=>{"use strict";var Lr=Nr&&Nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nr,"__esModule",{value:!0});var J1=rr(),V1=Z(),Y1=Lr(Rr()),Oh=Lr(Hs()),Ih=Lr(si()),jr=Lr(li()),K1=Lr(Fr()),Q1=function(){function t(e){this._children=[],this._validation=(0,V1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new Y1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.decl=function(e){if(e===void 0&&(e={}),this._validation&&this._children.length!==0)throw new Error("in XML document: declaration must be the first child");var r=new Oh.default(this,this._validation,e);return this._children.push(r),r},t.prototype.dtd=function(e){var r=this._children.filter(function(i){return i instanceof jr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Ih.default(this,this._validation,e);return this._children.push(n),n},t.prototype.element=function(e){var r=this._children.filter(function(i){return i instanceof jr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new jr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new K1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=this._children.filter(function(d){return d instanceof jr.default});if(this._validation&&r.length!==1)throw new Error("in XML document: no more than one root element is permitted");for(var n=new J1.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof Oh.default||a instanceof Ih.default||a instanceof jr.default?i+=a.toString(e):i+=a.toString(),n.pretty&&(i+=n.newline)}var c=i.length-n.newline.length;return i.substr(c)===n.newline&&(i=i.substr(0,c)),i},t}();Nr.default=Q1});var Ah=y(T=>{"use strict";var re=T&&T.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(T,"__esModule",{value:!0});T.document=T.XmlProcInst=T.XmlEntityRef=T.XmlElement=T.XmlDtdParamEntityRef=T.XmlDtdNotation=T.XmlDtdEntity=T.XmlDtdElement=T.XmlDtdAttlist=T.XmlDtd=T.XmlDocument=T.XmlDecl=T.XmlComment=T.XmlCharRef=T.XmlCharData=T.XmlCdata=T.XmlAttributeText=T.XmlAttribute=void 0;var Z1=re(hi()),eb=ni();Object.defineProperty(T,"XmlAttribute",{enumerable:!0,get:function(){return re(eb).default}});var tb=gs();Object.defineProperty(T,"XmlAttributeText",{enumerable:!0,get:function(){return re(tb).default}});var rb=Ms();Object.defineProperty(T,"XmlCdata",{enumerable:!0,get:function(){return re(rb).default}});var nb=Ls();Object.defineProperty(T,"XmlCharData",{enumerable:!0,get:function(){return re(nb).default}});var ib=ti();Object.defineProperty(T,"XmlCharRef",{enumerable:!0,get:function(){return re(ib).default}});var ob=Rr();Object.defineProperty(T,"XmlComment",{enumerable:!0,get:function(){return re(ob).default}});var sb=Hs();Object.defineProperty(T,"XmlDecl",{enumerable:!0,get:function(){return re(sb).default}});var ab=hi();Object.defineProperty(T,"XmlDocument",{enumerable:!0,get:function(){return re(ab).default}});var cb=si();Object.defineProperty(T,"XmlDtd",{enumerable:!0,get:function(){return re(cb).default}});var ub=xs();Object.defineProperty(T,"XmlDtdAttlist",{enumerable:!0,get:function(){return re(ub).default}});var lb=Cs();Object.defineProperty(T,"XmlDtdElement",{enumerable:!0,get:function(){return re(lb).default}});var fb=Ds();Object.defineProperty(T,"XmlDtdEntity",{enumerable:!0,get:function(){return re(fb).default}});var db=Is();Object.defineProperty(T,"XmlDtdNotation",{enumerable:!0,get:function(){return re(db).default}});var hb=Fs();Object.defineProperty(T,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return re(hb).default}});var pb=li();Object.defineProperty(T,"XmlElement",{enumerable:!0,get:function(){return re(pb).default}});var mb=ri();Object.defineProperty(T,"XmlEntityRef",{enumerable:!0,get:function(){return re(mb).default}});var gb=Fr();Object.defineProperty(T,"XmlProcInst",{enumerable:!0,get:function(){return re(gb).default}});function yb(t){return t===void 0&&(t={}),new Z1.default(t)}T.document=yb});var zs=y(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.stringify=ne.isMap=ne.isSet=ne.isFunction=ne.isArray=ne.isObject=ne.isNull=ne.isUndefined=void 0;function Fh(t){return Object.prototype.toString.call(t)==="[object Undefined]"}ne.isUndefined=Fh;function Rh(t){return Object.prototype.toString.call(t)==="[object Null]"}ne.isNull=Rh;function vb(t){return Object.prototype.toString.call(t)==="[object Object]"}ne.isObject=vb;function bb(t){return Object.prototype.toString.call(t)==="[object Array]"}ne.isArray=bb;function Th(t){return Object.prototype.toString.call(t)==="[object Function]"}ne.isFunction=Th;function _b(t){return Object.prototype.toString.call(t)==="[object Set]"}ne.isSet=_b;function wb(t){return Object.prototype.toString.call(t)==="[object Map]"}ne.isMap=wb;function Sb(t){return!Fh(t)&&!Rh(t)&&Th(t?.toString)&&(t=t.toString()),String(t)}ne.stringify=Sb});var Lh=y(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.WrapHandlers=Ae.TypeHandlers=Ae.FormatOptions=Ae.DtdOptions=Ae.DeclarationOptions=Ae.Options=void 0;var Ge=zs(),xb=function(){function t(e){e===void 0&&(e={}),this.aliasString="=",this.attributeString="@",this.cdataInvalidChars=!1,this.cdataKeys=[],this.replaceInvalidChars=!1,this.useSelfClosingTagIfEmpty=!0,this.validation=!0,this.valueString="#",(0,Ge.isUndefined)(e.validation)||(this.validation=e.validation),(0,Ge.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Ge.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Ge.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Ge.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new kh(e.declaration),this.dtd=new Mh(this.validation,e.dtd),this.format=new qh(e.format),(0,Ge.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new jh(e.typeHandlers),(0,Ge.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Ge.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Nh(e.wrapHandlers)}return t}();Ae.Options=xb;var kh=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Ge.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ae.DeclarationOptions=kh;var Mh=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Ge.isUndefined)(r.include)||(this.include=r.include),e&&(0,Ge.isUndefined)(r.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=r.name,this.sysId=r.sysId,this.pubId=r.pubId}return t}();Ae.DtdOptions=Mh;var qh=function(){function t(e){e===void 0&&(e={}),this.doubleQuotes=e.doubleQuotes,this.indent=e.indent,this.newline=e.newline,this.pretty=e.pretty}return t}();Ae.FormatOptions=qh;var jh=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ae.TypeHandlers=jh;var Nh=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ae.WrapHandlers=Nh});var Hh=y(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.parse=gt.parseToExistingElement=gt.Absent=void 0;var Bh=Ah(),Uh=Lh(),K=zs(),Ws=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();gt.Absent=Ws;function Js(t,e){var r=Object.prototype.toString.call(t),n;return Object.prototype.hasOwnProperty.call(e.typeHandlers,"*")&&(n=e.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(e.typeHandlers,r)&&(n=e.typeHandlers[r]),n}function Xh(t,e,r){var n=function(s){return r.cdataInvalidChars&&(s.indexOf("<")!==-1||s.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof Bh.XmlElement)if(n(t))for(var i=t.split("]]>"),o=0;o<i.length;o++)n(i[o])?e.cdata({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}),o<i.length-1&&e.charData({charData:"]]>",replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.charData({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.text({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars})}function Eb(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Xh((0,K.stringify)(e),i,n)}function $h(t,e,r,n){if(t===n.aliasString){r.name=(0,K.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,K.isObject)(e)){for(var i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];Eb(s,(0,K.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){pi(t,(0,K.stringify)(e),r,n);return}var a=r;if(!(0,K.isArray)(e)&&!(0,K.isSet)(e)){var c=Js(e,n);if(!(0,K.isUndefined)(c)&&c(e)===Ws.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}pi(t,e,a,n)}function Cb(t,e,r){if((0,K.isMap)(t))t.forEach(function(s,a){$h((0,K.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];$h(o,t[o],e,r)}}function Pb(t,e,r,n){var i;Object.prototype.hasOwnProperty.call(n.wrapHandlers,"*")&&(i=n.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(n.wrapHandlers,t)&&(i=n.wrapHandlers[t]);var o=t,s=r;if(!(0,K.isUndefined)(i)){var a=i(o,e);(0,K.isNull)(a)||(o=a,s=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var d=s;if(!(0,K.isArray)(c)&&!(0,K.isSet)(c)){var u=Js(c,n);if(!(0,K.isUndefined)(u)&&u(c)===Ws.instance)return;d=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}pi(o,c,d,n)})}function pi(t,e,r,n){var i=Js(e,n);if((0,K.isUndefined)(i)||(e=i(e)),(0,K.isObject)(e)||(0,K.isMap)(e)){Cb(e,r,n);return}if((0,K.isArray)(e)||(0,K.isSet)(e)){Pb(t,e,r,n);return}Xh((0,K.stringify)(e),r,n)}function Gh(t,e,r){var n=new Uh.Options(r);pi(t.name,e,t,n)}gt.parseToExistingElement=Gh;function Db(t,e,r){var n=new Uh.Options(r),i=new Bh.XmlDocument({validation:n.validation});n.declaration.include&&i.decl(n.declaration),n.dtd.include&&i.dtd({name:n.dtd.name,pubId:n.dtd.pubId,sysId:n.dtd.sysId});var o=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return Gh(o,e,r),i.toString(n.format)}gt.parse=Db});var Nb={};Qs(Nb,{IS_COMPONENT_LIBRARY:()=>bo,PROJECT_ALIASES:()=>tf,getBuildPagesFromCachedStore:()=>Hl,getBuildPagesFromStore:()=>Pn,getBuildPagesPath:()=>zl,getConfig:()=>Y,logInfo:()=>Ze,logPageSize:()=>pf,resolveComponentsPath:()=>ft,startRender:()=>lp,verbose:()=>L,walk:()=>Sr});module.exports=ea(Nb);var Br=F(require("node:fs")),or=F(require("node:path"));var yf=require("node:child_process"),et=F(require("node:path")),vf=F(nt()),Ue=F(_t());var Vt=F(require("node:fs")),af=F(require("node:path")),ht=F(hn()),cf=F(nt()),Fn=F(_t()),uf=F(Dl()),lf=F(En());var Le=F(require("node:fs")),ze=F(require("node:path")),we=F(_t());var Qe=F(require("node:fs")),oe=F(require("node:path")),Cn=F(_t());var St=Y();function Hl(t){let{__caches:e}=St.paths(t);return Pn({basePath:oe.default.join(e,"store"),withSizeProp:!1})}function*Pn(t){let{basePath:e,withSizeProp:r}=t||{},{__cx:n}=St.paths(),i=e||oe.default.join(n,"store"),o=Sr(i).filter(s=>oe.default.extname(s)===".json");for(let s of o)try{let a=Cn.default.readJsonSync(s,{encoding:"utf-8"});if(r){let c=Qe.default.statSync(s);a.size=c.size/1024}a.path&&(yield a)}catch(a){console.error(`Error: The file ${s} doesn't exist`,a)}}function zl(){let t=Y(),{__cx:e}=t.paths(),r=oe.default.join(e,"store");return Sr(r).filter(i=>oe.default.extname(i)===".json")}async function fo(){let{__cx:t}=St.paths(),{sitesToPublish:e,createdPages:r,buildProcessData:n}=Cn.default.readJSONSync(oe.default.join(t,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:e}}function Wl(){let{__cx:t}=St.paths(),e=oe.default.join(t,"store");Qe.default.existsSync(e)||(Qe.default.mkdirSync(e),Qe.default.mkdirSync(oe.default.join(e,"metadata"))),console.info("Store initialized")}function Jl(t,e){let{__cx:r}=St.paths();Qe.default.writeFileSync(oe.default.join(r,"store","metadata","render-info.json"),JSON.stringify(e))}function Ng(t,e){return ho(t).filter(i=>e.includes(i))}function ho(t){return Qe.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=Qe.default.statSync(n);if(i&&i.isDirectory()||oe.default.extname(r)!==".json")return!1;let o=oe.default.basename(r,oe.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=oe.default.basename(r,oe.default.extname(r));return parseInt(n)})}function Vl(t){let{__cx:e}=St.paths();t.forEach(r=>{po(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=oe.default.join(e,"store",n);Cn.default.writeJSONSync(i,r)})}function Dn(t){let{__cx:e}=St.paths();t.length!==0&&t.forEach(r=>{let n=oe.default.join(e,"store",`${r}.json`);try{Qe.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Yl(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=e,s=Ng(t,n),a=i.filter(m=>!s.includes(m)),c=a.concat(r),d=s.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!d.includes(m)),p=Pn(),g=[];for await(let m of p){let b=m.context.page.site,w=m.context.page.id;o.map(x=>x.id).includes(b)||g.push(w)}return{pagesInStore:s,pagesMissingInStore:a,pagesToDeleteFromStore:[...d,...g],pagesToWriteToStore:u}}var Lg=Y(),mo=t=>{if(!we.default.statSync(t).isDirectory())return;let r=we.default.readdirSync(t);if(r.length>0){let i=r.length,o=r.filter(s=>ze.default.extname(s).toLowerCase()===".xml").length;i===o&&(r.forEach(function(s){let a=ze.default.join(t,s);we.default.rmSync(a)}),r=we.default.readdirSync(t)),r.forEach(function(s){let a=ze.default.join(t,s);mo(a)}),r=we.default.readdirSync(t)}if(r.length===0){we.default.rmdirSync(t);return}};function On(t,e){for(let r of t)Le.default.existsSync(r)||Le.default.mkdirSync(r,{recursive:!0,...e})}function In(t,e,r,n={withBackup:!1}){let{withBackup:i}=n;for(let o of r){let s=ze.default.join(t,o),a=ze.default.join(e,o);if(!we.default.existsSync(s)){console.log(`Source directory does not exist: ${s}`);continue}i&&Zl(a);try{we.default.existsSync(a)&&Le.default.rmSync(a,{recursive:!0,force:!0}),Le.default.cpSync(s,a,{recursive:!0,preserveTimestamps:!0}),i&&Ql(a)}catch{console.log("Copy failed!"),i&&(Kl(a),console.log("Backup has been restored."))}}}function Jt(t,e,r,n){let{override:i,withBackup:o}=n||{};for(let s of r){let a=ze.default.join(t,s),c=ze.default.join(e,s);if(we.default.existsSync(a)){o&&Zl(c);try{i&&we.default.existsSync(c)&&Le.default.rmSync(c,{recursive:!0,force:!0}),Le.default.renameSync(a,c),o&&Ql(c)}catch{console.log("Move failed!"),o&&(Kl(c),console.log("Backup has been restored."))}}}}function xr(t,e){for(let r of e){if(!r)continue;let n=ze.default.join(t,r);we.default.existsSync(n)&&Le.default.rmSync(n,{recursive:!0,force:!0})}}function Kl(t,e="-BACKUP"){let r=t+e;try{Le.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function Ql(t,e="-BACKUP"){let r=t+e;if(we.default.existsSync(r))try{Le.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function Zl(t,e="-BACKUP"){let r=t+e;if(we.default.existsSync(t)){if(we.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{Le.default.renameSync(t,r),console.log(`Backup of ${t} has been created in ${r}`)}catch{console.log(`Error while coping ${t} to ${r} backup`)}}}function $g(t){return Number.isInteger(t)&&t<0}async function ef(){let{__cx:t}=Lg.paths(),e=ze.default.join(t,"store");try{let r=ho(e).filter($g);Dn(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}cf.default.config();var ff=Y(),Yg=df(process.env.GRIDDO_DEBUG_LOGS),Kg=df(process.env.GRIDDO_BUILD_LOGS),c_=lf.default.sync(),We={clean:JSON.parse(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),prepare:JSON.parse(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),restore:JSON.parse(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),data:JSON.parse(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),ssg:JSON.parse(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),relocation:JSON.parse(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),meta:JSON.parse(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),archive:JSON.parse(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1")};function Y(){try{return(sf(),ea(of)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}function L(t){Yg&&console.log(ht.default.hex("#ffff33")("verbose"),ht.default.gray(t.replace(/(\s)\s+/g,"$1").trim()))}function df(t){if(typeof t=="boolean")return t;if(t==null)return!1;if(t.toLowerCase()==="true")return!0;if(t.toLowerCase()==="false")return!1;let e=parseInt(t,10);return isNaN(e)?!1:e>0}function Sr(t){let e=[];return Vt.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function $e(t,e="",r=1,n=1){let i=t.split(`
19
+ `+o),t.push(i+"m+"+Xn.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Gy()+e+" "+t[0]}function Gy(){return se.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Hy(...t){return process.stderr.write(Un.format(...t)+`
20
+ `)}function zy(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Wy(){return process.env.DEBUG}function Jy(t){t.inspectOpts={};let e=Object.keys(se.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=se.inspectOpts[e[r]]}Xn.exports=No()(se);var{formatters:nd}=Xn.exports;nd.o=function(t){return this.inspectOpts.colors=this.useColors,Un.inspect(t,this.inspectOpts).split(`
21
+ `).map(e=>e.trim()).join(" ")};nd.O=function(t){return this.inspectOpts.colors=this.useColors,Un.inspect(t,this.inspectOpts)}});var od=y((R_,Lo)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Lo.exports=rd():Lo.exports=id()});var ad=y((T_,sd)=>{var Er;sd.exports=function(){if(!Er){try{Er=od()("follow-redirects")}catch{}typeof Er!="function"&&(Er=function(){})}Er.apply(null,arguments)}});var Ho=y((k_,Go)=>{var Ct=require("url"),$o=Ct.URL,Vy=require("http"),Yy=require("https"),ld=require("stream").Writable,fd=require("assert"),dd=ad(),Uo=["abort","aborted","connect","error","socket","timeout"],Xo=Object.create(null);Uo.forEach(function(t){Xo[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Ky=Pr("ERR_INVALID_URL","Invalid URL",TypeError),cd=Pr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Qy=Pr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Zy=Pr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ev=Pr("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){ld.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){r._processResponse(n)},this._performRequest()}Re.prototype=Object.create(ld.prototype);Re.prototype.abort=function(){pd(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new ev;if(!Pt(t)&&!nv(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Cr(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Zy),this.abort())};Re.prototype.end=function(t,e,r){if(Cr(t)?(r=t,t=e=null):Cr(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Re.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Re.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Re.prototype.setTimeout=function(t,e){var r=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(s)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Re.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Re.prototype,t,{get:function(){return this._currentRequest[t]}})});Re.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};Re.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e){this.emit("error",new TypeError("Unsupported protocol "+t));return}if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Uo)n.on(i,Xo[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ct.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function c(d){if(n===s._currentRequest)if(d)s.emit("error",d);else if(o<a.length){var u=a[o++];n.finished||n.write(u.data,u.encoding,c)}else s._ended&&n.end()})()}};Re.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(pd(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Qy);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Bo(/^content-/i,this._options.headers));var s=Bo(/^host$/i,this._options.headers),a=Ct.parse(this._currentUrl),c=s||a.host,d=/^\w+:/.test(r)?this._currentUrl:Ct.format(Object.assign(a,{host:c})),u;try{u=Ct.resolve(d,r)}catch(b){this.emit("error",new cd({cause:b}));return}dd("redirecting to",u),this._isRedirect=!0;var p=Ct.parse(u);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!rv(p.host,c))&&Bo(/^(?:authorization|cookie)$/i,this._options.headers),Cr(i)){var g={headers:t.headers,statusCode:e},m={url:d,method:o,headers:n};try{i(this._options,g,m)}catch(b){this.emit("error",b);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(b){this.emit("error",new cd({cause:b}))}};function hd(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],s=e[n]=Object.create(o);function a(d,u,p){if(Pt(d)){var g;try{g=ud(new $o(d))}catch{g=Ct.parse(d)}if(!Pt(g.protocol))throw new Ky({input:d});d=g}else $o&&d instanceof $o?d=ud(d):(p=u,u=d,d={protocol:i});return Cr(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},d,u),u.nativeProtocols=r,!Pt(u.host)&&!Pt(u.hostname)&&(u.hostname="::1"),fd.equal(u.protocol,i,"protocol mismatch"),dd("options",u),new Re(u,p)}function c(d,u,p){var g=s.request(d,u,p);return g.end(),g}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function tv(){}function ud(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return t.port!==""&&(e.port=Number(t.port)),e}function Bo(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Pr(t,e,r){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+t+"]",n}function pd(t){for(var e of Uo)t.removeListener(e,Xo[e]);t.on("error",tv),t.abort()}function rv(t,e){fd(Pt(t)&&Pt(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function Pt(t){return typeof t=="string"||t instanceof String}function Cr(t){return typeof t=="function"}function nv(t){return typeof t=="object"&&"length"in t}Go.exports=hd({http:Vy,https:Yy});Go.exports.wrap=hd});var zo=y((M_,iv)=>{iv.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}});var _d=y((q_,bd)=>{"use strict";var Dr=Se(),md=ko(),ov=Mo(),sv=kn(),av=require("http"),cv=require("https"),uv=Ho().http,lv=Ho().https,gd=require("url"),fv=require("zlib"),dv=zo(),Gn=jn(),Wo=qn(),yd=/https:?/;function vd(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(o){o.headers.host=o.host,vd(o,e,o.href)}}bd.exports=function(e){return new Promise(function(n,i){var o=function(P){n(P)},s=function(P){i(P)},a=e.data,c=e.headers;if("User-Agent"in c||"user-agent"in c?!c["User-Agent"]&&!c["user-agent"]&&(delete c["User-Agent"],delete c["user-agent"]):c["User-Agent"]="axios/"+dv.version,a&&!Dr.isStream(a)){if(!Buffer.isBuffer(a))if(Dr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(Dr.isString(a))a=Buffer.from(a,"utf-8");else return s(Gn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var d=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";d=u+":"+p}var g=ov(e.baseURL,e.url),m=gd.parse(g),b=m.protocol||"http:";if(!d&&m.auth){var w=m.auth.split(":"),x=w[0]||"",A=w[1]||"";d=x+":"+A}d&&delete c.Authorization;var j=yd.test(b),B=j?e.httpsAgent:e.httpAgent,$={path:sv(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:B,agents:{http:e.httpAgent,https:e.httpsAgent},auth:d};e.socketPath?$.socketPath=e.socketPath:($.hostname=m.hostname,$.port=m.port);var V=e.proxy;if(!V&&V!==!1){var ue=b.slice(0,-1)+"_proxy",Te=process.env[ue]||process.env[ue.toUpperCase()];if(Te){var ee=gd.parse(Te),D=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(D){var k=D.split(",").map(function(P){return P.trim()});q=!k.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(q&&(V={host:ee.hostname,port:ee.port,protocol:ee.protocol},ee.auth)){var z=ee.auth.split(":");V.auth={username:z[0],password:z[1]}}}}V&&($.headers.host=m.hostname+(m.port?":"+m.port:""),vd($,V,b+"//"+m.hostname+(m.port?":"+m.port:"")+$.path));var I,G=j&&(V?yd.test(V.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=G?cv:av:(e.maxRedirects&&($.maxRedirects=e.maxRedirects),I=G?lv:uv),e.maxBodyLength>-1&&($.maxBodyLength=e.maxBodyLength);var O=I.request($,function(P){if(!O.aborted){var R=P,He=P.req||O;if(P.statusCode!==204&&He.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(fv.createUnzip()),delete P.headers["content-encoding"];break}var Ke={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:He};if(e.responseType==="stream")Ke.data=R,md(o,s,Ke);else{var le=[],ye=0;R.on("data",function(xe){le.push(xe),ye+=xe.length,e.maxContentLength>-1&&ye>e.maxContentLength&&(R.destroy(),s(Gn("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,He)))}),R.on("error",function(xe){O.aborted||s(Wo(xe,e,null,He))}),R.on("end",function(){var xe=Buffer.concat(le);e.responseType!=="arraybuffer"&&(xe=xe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(xe=Dr.stripBOM(xe))),Ke.data=xe,md(o,s,Ke)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(Wo(P,e,null,O))}),e.timeout){var U=parseInt(e.timeout,10);if(isNaN(U)){s(Gn("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(U,function(){O.abort(),s(Gn("timeout of "+U+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",O))})}e.cancelToken&&e.cancelToken.promise.then(function(P){O.aborted||(O.abort(),s(P))}),Dr.isStream(a)?a.on("error",function(P){s(Wo(P,e,null,O))}).pipe(O):O.end(a)})}});var zn=y((j_,xd)=>{"use strict";var ae=Se(),wd=Mf(),hv=qn(),pv={"Content-Type":"application/x-www-form-urlencoded"};function Sd(t,e){!ae.isUndefined(t)&&ae.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function mv(){var t;return typeof XMLHttpRequest<"u"?t=Qf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=_d()),t}function gv(t,e,r){if(ae.isString(t))try{return(e||JSON.parse)(t),ae.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Hn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:mv(),transformRequest:[function(e,r){return wd(r,"Accept"),wd(r,"Content-Type"),ae.isFormData(e)||ae.isArrayBuffer(e)||ae.isBuffer(e)||ae.isStream(e)||ae.isFile(e)||ae.isBlob(e)?e:ae.isArrayBufferView(e)?e.buffer:ae.isURLSearchParams(e)?(Sd(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ae.isObject(e)||r&&r["Content-Type"]==="application/json"?(Sd(r,"application/json"),gv(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?hv(s,this,"E_JSON_PARSE"):s}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Hn.headers={common:{Accept:"application/json, text/plain, */*"}};ae.forEach(["delete","get","head"],function(e){Hn.headers[e]={}});ae.forEach(["post","put","patch"],function(e){Hn.headers[e]=ae.merge(pv)});xd.exports=Hn});var Cd=y((N_,Ed)=>{"use strict";var yv=Se(),vv=zn();Ed.exports=function(e,r,n){var i=this||vv;return yv.forEach(n,function(s){e=s.call(i,e,r)}),e}});var Jo=y((L_,Pd)=>{"use strict";Pd.exports=function(e){return!!(e&&e.__CANCEL__)}});var Id=y(($_,Od)=>{"use strict";var Dd=Se(),Vo=Cd(),bv=Jo(),_v=zn();function Yo(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Od.exports=function(e){Yo(e),e.headers=e.headers||{},e.data=Vo.call(e,e.data,e.headers,e.transformRequest),e.headers=Dd.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Dd.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||_v.adapter;return r(e).then(function(i){return Yo(e),i.data=Vo.call(e,i.data,i.headers,e.transformResponse),i},function(i){return bv(i)||(Yo(e),i&&i.response&&(i.response.data=Vo.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Ko=y((B_,Ad)=>{"use strict";var me=Se();Ad.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(g,m){return me.isPlainObject(g)&&me.isPlainObject(m)?me.merge(g,m):me.isPlainObject(m)?me.merge({},m):me.isArray(m)?m.slice():m}function d(g){me.isUndefined(r[g])?me.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}me.forEach(i,function(m){me.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),me.forEach(o,d),me.forEach(s,function(m){me.isUndefined(r[m])?me.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),me.forEach(a,function(m){m in r?n[m]=c(e[m],r[m]):m in e&&(n[m]=c(void 0,e[m]))});var u=i.concat(o).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return me.forEach(p,d),n}});var Md=y((U_,kd)=>{"use strict";var Rd=zo(),Qo={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Qo[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Fd={},wv=Rd.version.split(".");function Td(t,e){for(var r=e?e.split("."):wv,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Qo.transitional=function(e,r,n){var i=r&&Td(r);function o(s,a){return"[Axios v"+Rd.version+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return function(s,a,c){if(e===!1)throw new Error(o(a," has been removed in "+r));return i&&!Fd[a]&&(Fd[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,c):!0}};function Sv(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new TypeError("option "+o+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+o)}}kd.exports={isOlderVersion:Td,assertOptions:Sv,validators:Qo}});var Bd=y((X_,$d)=>{"use strict";var Nd=Se(),xv=kn(),qd=Tf(),jd=Id(),Wn=Ko(),Ld=Md(),er=Ld.validators;function Or(t){this.defaults=t,this.interceptors={request:new qd,response:new qd}}Or.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Wn(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&Ld.assertOptions(r,{silentJSONParsing:er.transitional(er.boolean,"1.0.0"),forcedJSONParsing:er.transitional(er.boolean,"1.0.0"),clarifyTimeoutError:er.transitional(er.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(i=i&&g.synchronous,n.unshift(g.fulfilled,g.rejected))});var o=[];this.interceptors.response.forEach(function(g){o.push(g.fulfilled,g.rejected)});var s;if(!i){var a=[jd,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),s=Promise.resolve(e);a.length;)s=s.then(a.shift(),a.shift());return s}for(var c=e;n.length;){var d=n.shift(),u=n.shift();try{c=d(c)}catch(p){u(p);break}}try{s=jd(c)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};Or.prototype.getUri=function(e){return e=Wn(this.defaults,e),xv(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Nd.forEach(["delete","get","head","options"],function(e){Or.prototype[e]=function(r,n){return this.request(Wn(n||{},{method:e,url:r,data:(n||{}).data}))}});Nd.forEach(["post","put","patch"],function(e){Or.prototype[e]=function(r,n,i){return this.request(Wn(i||{},{method:e,url:r,data:n}))}});$d.exports=Or});var es=y((G_,Ud)=>{"use strict";function Zo(t){this.message=t}Zo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Zo.prototype.__CANCEL__=!0;Ud.exports=Zo});var Gd=y((H_,Xd)=>{"use strict";var Ev=es();function Jn(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var r=this;t(function(i){r.reason||(r.reason=new Ev(i),e(r.reason))})}Jn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Jn.source=function(){var e,r=new Jn(function(i){e=i});return{token:r,cancel:e}};Xd.exports=Jn});var zd=y((z_,Hd)=>{"use strict";Hd.exports=function(e){return function(n){return e.apply(null,n)}}});var Jd=y((W_,Wd)=>{"use strict";Wd.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Kd=y((J_,ts)=>{"use strict";var Vd=Se(),Cv=Io(),Vn=Bd(),Pv=Ko(),Dv=zn();function Yd(t){var e=new Vn(t),r=Cv(Vn.prototype.request,e);return Vd.extend(r,Vn.prototype,e),Vd.extend(r,e),r}var Xe=Yd(Dv);Xe.Axios=Vn;Xe.create=function(e){return Yd(Pv(Xe.defaults,e))};Xe.Cancel=es();Xe.CancelToken=Gd();Xe.isCancel=Jo();Xe.all=function(e){return Promise.all(e)};Xe.spread=zd();Xe.isAxiosError=Jd();ts.exports=Xe;ts.exports.default=Xe});var rs=y((V_,Qd)=>{Qd.exports=Kd()});var Z=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.isUndefined=Ie.fixName=Ie.validateName=Ie.validateSingleChar=Ie.fixChar=Ie.validateChar=void 0;function jv(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===9||r===10||r===13||r>=32&&r<=55295||r>=57344&&r<=65533)){if(e+1===t.length)return!1;var n=t.charCodeAt(e+1);if(r>=55296&&r<=56319&&n>=56320&&n<=57343){e++;continue}return!1}}return!0}Ie.validateChar=jv;function Nv(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n===9||n===10||n===13||n>=32&&n<=55295||n>=57344&&n<=65533){e+=t[r];continue}if(r+1===t.length)return e+="\uFFFD",e;var i=t.charCodeAt(r+1);if(n>=55296&&n<=56319&&i>=56320&&i<=57343){e+=t[r]+t[r+1],r++;continue}e+="\uFFFD"}return e}Ie.fixChar=Nv;function Lv(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(t.length===1)return e===9||e===10||e===13||e>=32&&e<=55295||e>=57344&&e<=65533;if(t.length!==2)return!1;var r=t.charCodeAt(1);return e>=55296&&e<=56319&&r>=56320&&r<=57343}Ie.validateSingleChar=Lv;function $v(t){if(t.length===0)return!1;var e=t.charCodeAt(0),r=e===58||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533;if(t.length===1)return r;var n=t.charCodeAt(1),i=e>=55296&&e<=56191&&n>=56320&&n<=57343;if(!r&&!i)return!1;for(var o=i?2:1,s=o;s<t.length;s++){var a=t.charCodeAt(s);if(!(a===58||a===95||a===45||a===46||a===183||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=768&&a<=879||a>=880&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533)){if(s+1===t.length)return!1;var c=t.charCodeAt(s+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){s++;continue}return!1}}return!0}Ie.validateName=$v;function Bv(t){var e="";if(t.length===0)return e;var r=t.charCodeAt(0),n=r===58||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533;if(t.length===1)return n?e=t[0]:e="\uFFFD",e;var i=t.charCodeAt(1),o=r>=55296&&r<=56191&&i>=56320&&i<=57343;o?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var s=o?2:1,a=s;a<t.length;a++){var c=t.charCodeAt(a);if(c===58||c===95||c===45||c===46||c===183||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||c>=192&&c<=214||c>=216&&c<=246||c>=248&&c<=767||c>=768&&c<=879||c>=880&&c<=893||c>=895&&c<=8191||c>=8204&&c<=8205||c>=8255&&c<=8256||c>=8304&&c<=8591||c>=11264&&c<=12271||c>=12289&&c<=55295||c>=63744&&c<=64975||c>=65008&&c<=65533){e+=t[a];continue}if(a+1===t.length)return e+="\uFFFD",e;var d=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&d>=56320&&d<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Ie.fixName=Bv;function Uv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ie.isUndefined=Uv});var rr=y(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.StringOptions=void 0;var Zn=Z(),Xv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
22
+ `,this.pretty=!0,(0,Zn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Zn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Zn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Zn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();ei.StringOptions=Xv});var ti=y(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.escapeDoubleQuotes=Me.escapeSingleQuotes=Me.escapeRightAngleBracketsInCdataTerminator=Me.escapeLeftAngleBrackets=Me.escapeAmpersands=void 0;function Gv(t){return t.replace(/&/g,"&amp;")}Me.escapeAmpersands=Gv;function Hv(t){return t.replace(/</g,"&lt;")}Me.escapeLeftAngleBrackets=Hv;function zv(t){return t.replace(/]]>/g,"]]&gt;")}Me.escapeRightAngleBracketsInCdataTerminator=zv;function Wv(t){return t.replace(/'/g,"&apos;")}Me.escapeSingleQuotes=Wv;function Jv(t){return t.replace(/"/g,"&quot;")}Me.escapeDoubleQuotes=Jv});var gs=y(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var Vv=ce(),Sh=ti(),ps=Z(),Yv=function(){function t(e,r,n){this._validation=r,(0,ps.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,ps.fixChar)(e);else if(this._validation&&!(0,ps.validateChar)(e))throw new Error((0,Vv.getContext)(this.up())+": attribute text"+(' "'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,Sh.escapeAmpersands)(e),e=(0,Sh.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();ms.default=Yv});var ri=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var xh=ce(),Eh=Z(),Kv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,Eh.isUndefined)(n.hex)||(this.hex=n.hex)}return Object.defineProperty(t.prototype,"char",{get:function(){return this._char},set:function(e){if(this._validation&&!(0,Eh.validateSingleChar)(e))throw new Error((0,xh.getContext)(this.up())+": character reference"+(' "'+e+'" should reference a single character,')+" and this character should be allowed in XML");this._char=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){return this._hex},set:function(e){this._hex=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e;if(this._char.length===1)e=this._char.charCodeAt(0);else{var r=this._char.charCodeAt(0);if(r>=55296&&r<=56319&&this._char.length>1){var n=this._char.charCodeAt(1);if(n>=56320&&n<=57343)e=(r-55296)*1024+n-56320+65536;else throw new Error((0,xh.getContext)(this.up())+": character"+(' reference "'+this.char+'" should')+" reference a valid Unicode character")}else e=r}return this._hex?"&#x"+e.toString(16)+";":"&#"+e+";"},t.prototype.up=function(){return this._parent},t}();ys.default=Kv});var ni=y(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Qv=ce(),Zv=Z(),e1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Zv.validateName)(e))throw new Error((0,Qv.getContext)(this.up())+": entity reference name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"&"+this._name+";"},t.prototype.up=function(){return this._parent},t}();vs.default=e1});var ii=y(Ar=>{"use strict";var ws=Ar&&Ar.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ar,"__esModule",{value:!0});var bs=ce(),Ch=ti(),t1=rr(),_s=Z(),r1=ws(gs()),n1=ws(ri()),i1=ws(ni()),o1=function(){function t(e,r,n){this._validation=r,(0,_s.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,this._children=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,_s.fixName)(e),e.length===0)throw new Error((0,bs.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,_s.validateName)(e))throw e.length===0?new Error((0,bs.getContext)(this.up())+": attribute name should not be empty"):new Error((0,bs.getContext)(this.up())+": attribute name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.charRef=function(e){var r=new n1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new i1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new r1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new t1.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,o=0,s=this._children;o<s.length;o++){var a=s[o];r.doubleQuotes?i+=(0,Ch.escapeDoubleQuotes)(a.toString()):i+=(0,Ch.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Ar.default=o1});var xs=y(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var s1=ce(),a1=Z(),c1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,a1.validateChar)(e))throw new Error((0,s1.getContext)(this.up())+": attribute-list"+(' declaration "'+e+'" should not contain')+" characters not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ATTLIST "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Ss.default=c1});var Cs=y(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var u1=ce(),l1=Z(),f1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,l1.validateChar)(e))throw new Error((0,u1.getContext)(this.up())+": element declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ELEMENT "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Es.default=f1});var Ds=y(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var d1=ce(),h1=Z(),p1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,h1.validateChar)(e))throw new Error((0,d1.getContext)(this.up())+": entity declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!ENTITY "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Ps.default=p1});var Is=y(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var m1=ce(),g1=Z(),y1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._validation&&!(0,g1.validateChar)(e))throw new Error((0,m1.getContext)(this.up())+": notation declaration"+(' "'+e+'" should not contain characters')+" not allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!NOTATION "+this._charData+">"},t.prototype.up=function(){return this._parent},t}();Os.default=y1});var Fs=y(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var v1=ce(),b1=Z(),_1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,b1.validateName)(e))throw new Error((0,v1.getContext)(this.up())+": parameter entity"+(' reference name "'+e+'" should not contain')+" characters not allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"%"+this._name+";"},t.prototype.up=function(){return this._parent},t}();As.default=_1});var Fr=y(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var oi=ce(),si=Z(),w1=function(){function t(e,r,n){this._validation=r,this._parent=e,this.content=n.content,this.target=n.target}return Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){if(!(0,si.isUndefined)(e)){if(this._validation&&!(0,si.validateChar)(e))throw new Error((0,oi.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain characters not allowed in XML");if(this._validation&&e.indexOf("?>")!==-1)throw new Error((0,oi.getContext)(this.up())+": processing"+(' instruction content "'+e+'" should')+" not contain the string '?>'")}this._content=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){if(this._validation&&!(0,si.validateName)(e))throw new Error((0,oi.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not contain characters not allowed in XML names");if(this._validation&&e==="xml")throw new Error((0,oi.getContext)(this.up())+": processing"+(' instruction target "'+e+'" should')+" not be the string 'xml'");this._target=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return(0,si.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();Rs.default=w1});var ai=y(Ot=>{"use strict";var It=Ot&&Ot.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.validatePubId=void 0;var mt=ce(),S1=rr(),Ye=Z(),x1=It(Rr()),E1=It(xs()),C1=It(Cs()),P1=It(Ds()),D1=It(Is()),O1=It(Fs()),I1=It(Fr()),A1=function(){function t(e,r,n){this._pubId=void 0,this._sysId=void 0,this._validation=r,this._children=[],this._parent=e,this.name=n.name,(0,Ye.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Ye.isUndefined)(n.pubId)||(this.pubId=n.pubId)}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._validation&&!(0,Ye.validateName)(e))throw new Error((0,mt.getContext)(this.up())+': DTD name "'+e+'" should not contain characters not allowed in XML names');this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pubId",{get:function(){return this._pubId},set:function(e){if(!(0,Ye.isUndefined)(e)){if(this._validation&&!Ph(e))throw new Error((0,mt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Ye.isUndefined)(this._sysId))throw new Error((0,mt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not be defined')+" if system identifier is undefined")}this._pubId=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sysId",{get:function(){return this._sysId},set:function(e){if(!(0,Ye.isUndefined)(e)){if(this._validation&&!(0,Ye.validateChar)(e))throw new Error((0,mt.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" characters not allowed in XML");if(this._validation&&e.indexOf("'")!==-1&&e.indexOf('"')!==-1)throw new Error((0,mt.getContext)(this.up())+": DTD system"+(' identifier "'+e+'" should not contain')+" both single quotes and double quotes")}this._sysId=e},enumerable:!1,configurable:!0}),t.prototype.attlist=function(e){var r=new E1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new x1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new C1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new P1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new D1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new O1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new I1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new S1.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Ye.isUndefined)(this._pubId))(0,Ye.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Ye.isUndefined)(this._sysId))throw new Error((0,mt.getContext)(this.up())+": DTD system identifier is not undefined");n+=" ",n=this.appendId("PUBLIC",this._pubId,n,r),n=this.appendId("",this._sysId,n,r)}if(this._children.length!==0){n+=" [";for(var i=0,o=this._children;i<o.length;i++){var s=o[i];r.pretty&&(n+=r.newline+r.indent),n+=s.toString()}r.pretty&&(n+=r.newline),n+="]>"}else n+=">";return n},t.prototype.up=function(){return this._parent},t.prototype.appendId=function(e,r,n,i){if(n+=e+" ",i.doubleQuotes){if(this._validation&&r.indexOf('"')!==-1)throw new Error((0,mt.getContext)(this.up())+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+='"'+r+'"'}else{if(this._validation&&r.indexOf("'")!==-1)throw new Error((0,mt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();Ot.default=A1;function Ph(t){for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(!(r===10||r===13||r===32||r===33||r>=35&&r<=37||r>=39&&r<=47||r>=48&&r<=57||r===58||r===59||r===61||r===63||r>=64&&r<=90||r===95||r>=97&&r<=122))return e+1===t.length,!1}return!0}Ot.validatePubId=Ph});var Ms=y(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var Dh=ce(),Ts=Z(),F1=function(){function t(e,r,n){this._validation=r,(0,Ts.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Ts.fixChar)(e);else if(this._validation&&!(0,Ts.validateChar)(e))throw new Error((0,Dh.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("]]>","\uFFFD\uFFFD\uFFFD");else if(this._validation&&e.indexOf("]]>")!==-1)throw new Error((0,Dh.getContext)(this.up())+": CDATA section"+(' "'+e+'" should not contain the string')+" ']]>'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<![CDATA["+this._charData+"]]>"},t.prototype.up=function(){return this._parent},t}();ks.default=F1});var Ls=y(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var R1=ce(),qs=ti(),js=Z(),T1=function(){function t(e,r,n){this._validation=r,(0,js.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,js.fixChar)(e);else if(this._validation&&!(0,js.validateChar)(e))throw new Error((0,R1.getContext)(this.up())+": character data"+('"'+e+'" should not contain characters not')+" allowed in XML");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this._charData;return e=(0,qs.escapeAmpersands)(e),e=(0,qs.escapeLeftAngleBrackets)(e),e=(0,qs.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();Ns.default=T1});var fi=y(Mr=>{"use strict";var At=Mr&&Mr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Mr,"__esModule",{value:!0});var ci=ce(),k1=rr(),Tr=Z(),Oh=At(ii()),M1=At(Ms()),kr=At(Ls()),ui=At(ri()),q1=At(Rr()),li=At(ni()),j1=At(Fr()),N1=function(){function t(e,r,n){this._validation=r,(0,Tr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Tr.isUndefined)(n.useSelfClosingTagIfEmpty)?this._useSelfClosingTagIfEmpty=!0:this._useSelfClosingTagIfEmpty=n.useSelfClosingTagIfEmpty,this._children=[],this._attributeNames=[],this._parent=e,this.name=n.name}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(e){if(this._replaceInvalidCharsInName){if(e=(0,Tr.fixName)(e),e.length===0)throw new Error((0,ci.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Tr.validateName)(e))throw e.length===0?new Error((0,ci.getContext)(this.up())+": element name should not be empty"):new Error((0,ci.getContext)(this.up())+": element name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.attribute=function(e){if(this._validation&&this._attributeNames.indexOf(e.name)!==-1)throw new Error((0,ci.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Oh.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new M1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new kr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new ui.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new q1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new t(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new li.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new j1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){return e===void 0&&(e={}),this.toStringWithIndent(e,"")},t.prototype.up=function(){return this._parent},t.prototype.toStringWithIndent=function(e,r){for(var n=new k1.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,c=this._children;a<c.length;a++){var d=c[a];d instanceof Oh.default?o+=" "+d.toString(e):s.push(d)}if(s.length>0){for(var u="",p=0;p<s.length;p++){var g=s[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?s[p-1]:void 0;g instanceof kr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(s)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(s)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof ui.default||i instanceof li.default||i instanceof kr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof ui.default||e instanceof li.default||e instanceof kr.default)&&!(0,Tr.isUndefined)(r)&&(r instanceof ui.default||r instanceof li.default||r instanceof kr.default)},t}();Mr.default=N1});var ce=y(nr=>{"use strict";var hi=nr&&nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nr,"__esModule",{value:!0});nr.getContext=void 0;var L1=hi(ii()),$1=hi(pi()),B1=hi(ai()),U1=hi(fi());function di(t){if(t instanceof L1.default)return di(t.up())+(' > attribute "'+t.name+'"');if(t instanceof $1.default)return"in XML document";if(t instanceof B1.default)return di(t.up())+" > DTD";if(t instanceof U1.default)return di(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}nr.getContext=di});var Rr=y(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var $s=ce(),Bs=Z(),X1=function(){function t(e,r,n){this._validation=r,(0,Bs.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Bs.fixChar)(e);else if(this._validation&&!(0,Bs.validateChar)(e))throw new Error((0,$s.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain characters')+" not allowed in XML");if(this._replaceInvalidCharsInCharData)e=e.replace("--","\uFFFD\uFFFD");else if(this._validation&&e.indexOf("--")!==-1)throw new Error((0,$s.getContext)(this.up())+": comment content"+(' "'+e+'" should not contain the string')+" '--'");if(this._replaceInvalidCharsInCharData)e.lastIndexOf("-")===e.length-1&&(e=e.substr(0,e.length-1)+"\uFFFD");else if(this._validation&&e.lastIndexOf("-")===e.length-1)throw new Error((0,$s.getContext)(this.up())+": comment content"+(' "'+e+'" should not end with the string')+" '-'");this._charData=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"<!--"+this._charData+"-->"},t.prototype.up=function(){return this._parent},t}();Us.default=X1});var Hs=y(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var Xs=ce(),G1=rr(),qr=Z(),H1=function(){function t(e,r,n){this._version="1.0",this._validation=r,this._parent=e,this.encoding=n.encoding,this.standalone=n.standalone,(0,qr.isUndefined)(n.version)||(this.version=n.version)}return Object.defineProperty(t.prototype,"encoding",{get:function(){return this._encoding},set:function(e){if(this._validation&&!(0,qr.isUndefined)(e)&&!z1(e))throw new Error((0,Xs.getContext)(this.up())+": declaration"+(" encoding attribute "+e+" should be a")+" valid encoding");this._encoding=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"standalone",{get:function(){return this._standalone},set:function(e){if(this._validation&&!(0,qr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Xs.getContext)(this.up())+": declaration"+(" standalone attribute "+e+" should")+" be the string 'yes' or the string 'no'");this._standalone=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},set:function(e){if(this._validation&&!W1(e))throw new Error((0,Xs.getContext)(this.up())+": declaration version"+(" attribute "+e+" should be a valid XML")+" version");this._version=e},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e={});var r=new G1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,qr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,qr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();Gs.default=H1;function z1(t){if(t.length===0)return!1;var e=t.charCodeAt(0);if(!(e>=65&&e<=90||e>=97&&e<=122))return!1;for(var r=1;r<t.length;r++){var n=t.charCodeAt(r);if(!(n===95||n===45||n===46||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122))return r+1===t.length,!1}return!0}function W1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var pi=y(Nr=>{"use strict";var Lr=Nr&&Nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nr,"__esModule",{value:!0});var J1=rr(),V1=Z(),Y1=Lr(Rr()),Ih=Lr(Hs()),Ah=Lr(ai()),jr=Lr(fi()),K1=Lr(Fr()),Q1=function(){function t(e){this._children=[],this._validation=(0,V1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new Y1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.decl=function(e){if(e===void 0&&(e={}),this._validation&&this._children.length!==0)throw new Error("in XML document: declaration must be the first child");var r=new Ih.default(this,this._validation,e);return this._children.push(r),r},t.prototype.dtd=function(e){var r=this._children.filter(function(i){return i instanceof jr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Ah.default(this,this._validation,e);return this._children.push(n),n},t.prototype.element=function(e){var r=this._children.filter(function(i){return i instanceof jr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new jr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new K1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=this._children.filter(function(d){return d instanceof jr.default});if(this._validation&&r.length!==1)throw new Error("in XML document: no more than one root element is permitted");for(var n=new J1.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof Ih.default||a instanceof Ah.default||a instanceof jr.default?i+=a.toString(e):i+=a.toString(),n.pretty&&(i+=n.newline)}var c=i.length-n.newline.length;return i.substr(c)===n.newline&&(i=i.substr(0,c)),i},t}();Nr.default=Q1});var Fh=y(T=>{"use strict";var re=T&&T.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(T,"__esModule",{value:!0});T.document=T.XmlProcInst=T.XmlEntityRef=T.XmlElement=T.XmlDtdParamEntityRef=T.XmlDtdNotation=T.XmlDtdEntity=T.XmlDtdElement=T.XmlDtdAttlist=T.XmlDtd=T.XmlDocument=T.XmlDecl=T.XmlComment=T.XmlCharRef=T.XmlCharData=T.XmlCdata=T.XmlAttributeText=T.XmlAttribute=void 0;var Z1=re(pi()),eb=ii();Object.defineProperty(T,"XmlAttribute",{enumerable:!0,get:function(){return re(eb).default}});var tb=gs();Object.defineProperty(T,"XmlAttributeText",{enumerable:!0,get:function(){return re(tb).default}});var rb=Ms();Object.defineProperty(T,"XmlCdata",{enumerable:!0,get:function(){return re(rb).default}});var nb=Ls();Object.defineProperty(T,"XmlCharData",{enumerable:!0,get:function(){return re(nb).default}});var ib=ri();Object.defineProperty(T,"XmlCharRef",{enumerable:!0,get:function(){return re(ib).default}});var ob=Rr();Object.defineProperty(T,"XmlComment",{enumerable:!0,get:function(){return re(ob).default}});var sb=Hs();Object.defineProperty(T,"XmlDecl",{enumerable:!0,get:function(){return re(sb).default}});var ab=pi();Object.defineProperty(T,"XmlDocument",{enumerable:!0,get:function(){return re(ab).default}});var cb=ai();Object.defineProperty(T,"XmlDtd",{enumerable:!0,get:function(){return re(cb).default}});var ub=xs();Object.defineProperty(T,"XmlDtdAttlist",{enumerable:!0,get:function(){return re(ub).default}});var lb=Cs();Object.defineProperty(T,"XmlDtdElement",{enumerable:!0,get:function(){return re(lb).default}});var fb=Ds();Object.defineProperty(T,"XmlDtdEntity",{enumerable:!0,get:function(){return re(fb).default}});var db=Is();Object.defineProperty(T,"XmlDtdNotation",{enumerable:!0,get:function(){return re(db).default}});var hb=Fs();Object.defineProperty(T,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return re(hb).default}});var pb=fi();Object.defineProperty(T,"XmlElement",{enumerable:!0,get:function(){return re(pb).default}});var mb=ni();Object.defineProperty(T,"XmlEntityRef",{enumerable:!0,get:function(){return re(mb).default}});var gb=Fr();Object.defineProperty(T,"XmlProcInst",{enumerable:!0,get:function(){return re(gb).default}});function yb(t){return t===void 0&&(t={}),new Z1.default(t)}T.document=yb});var zs=y(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.stringify=ne.isMap=ne.isSet=ne.isFunction=ne.isArray=ne.isObject=ne.isNull=ne.isUndefined=void 0;function Rh(t){return Object.prototype.toString.call(t)==="[object Undefined]"}ne.isUndefined=Rh;function Th(t){return Object.prototype.toString.call(t)==="[object Null]"}ne.isNull=Th;function vb(t){return Object.prototype.toString.call(t)==="[object Object]"}ne.isObject=vb;function bb(t){return Object.prototype.toString.call(t)==="[object Array]"}ne.isArray=bb;function kh(t){return Object.prototype.toString.call(t)==="[object Function]"}ne.isFunction=kh;function _b(t){return Object.prototype.toString.call(t)==="[object Set]"}ne.isSet=_b;function wb(t){return Object.prototype.toString.call(t)==="[object Map]"}ne.isMap=wb;function Sb(t){return!Rh(t)&&!Th(t)&&kh(t?.toString)&&(t=t.toString()),String(t)}ne.stringify=Sb});var $h=y(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.WrapHandlers=Ae.TypeHandlers=Ae.FormatOptions=Ae.DtdOptions=Ae.DeclarationOptions=Ae.Options=void 0;var Ge=zs(),xb=function(){function t(e){e===void 0&&(e={}),this.aliasString="=",this.attributeString="@",this.cdataInvalidChars=!1,this.cdataKeys=[],this.replaceInvalidChars=!1,this.useSelfClosingTagIfEmpty=!0,this.validation=!0,this.valueString="#",(0,Ge.isUndefined)(e.validation)||(this.validation=e.validation),(0,Ge.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Ge.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Ge.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Ge.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Mh(e.declaration),this.dtd=new qh(this.validation,e.dtd),this.format=new jh(e.format),(0,Ge.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new Nh(e.typeHandlers),(0,Ge.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Ge.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Lh(e.wrapHandlers)}return t}();Ae.Options=xb;var Mh=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Ge.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ae.DeclarationOptions=Mh;var qh=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Ge.isUndefined)(r.include)||(this.include=r.include),e&&(0,Ge.isUndefined)(r.name)&&this.include)throw new Error("options.dtd.name should be defined if options.dtd.include is true");this.name=r.name,this.sysId=r.sysId,this.pubId=r.pubId}return t}();Ae.DtdOptions=qh;var jh=function(){function t(e){e===void 0&&(e={}),this.doubleQuotes=e.doubleQuotes,this.indent=e.indent,this.newline=e.newline,this.pretty=e.pretty}return t}();Ae.FormatOptions=jh;var Nh=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ae.TypeHandlers=Nh;var Lh=function(){function t(e){e===void 0&&(e={});for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this[r]=e[r])}return t}();Ae.WrapHandlers=Lh});var zh=y(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.parse=gt.parseToExistingElement=gt.Absent=void 0;var Uh=Fh(),Xh=$h(),K=zs(),Ws=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();gt.Absent=Ws;function Js(t,e){var r=Object.prototype.toString.call(t),n;return Object.prototype.hasOwnProperty.call(e.typeHandlers,"*")&&(n=e.typeHandlers["*"]),Object.prototype.hasOwnProperty.call(e.typeHandlers,r)&&(n=e.typeHandlers[r]),n}function Gh(t,e,r){var n=function(s){return r.cdataInvalidChars&&(s.indexOf("<")!==-1||s.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof Uh.XmlElement)if(n(t))for(var i=t.split("]]>"),o=0;o<i.length;o++)n(i[o])?e.cdata({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}),o<i.length-1&&e.charData({charData:"]]>",replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.charData({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.text({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars})}function Eb(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Gh((0,K.stringify)(e),i,n)}function Bh(t,e,r,n){if(t===n.aliasString){r.name=(0,K.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,K.isObject)(e)){for(var i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];Eb(s,(0,K.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){mi(t,(0,K.stringify)(e),r,n);return}var a=r;if(!(0,K.isArray)(e)&&!(0,K.isSet)(e)){var c=Js(e,n);if(!(0,K.isUndefined)(c)&&c(e)===Ws.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}mi(t,e,a,n)}function Cb(t,e,r){if((0,K.isMap)(t))t.forEach(function(s,a){Bh((0,K.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];Bh(o,t[o],e,r)}}function Pb(t,e,r,n){var i;Object.prototype.hasOwnProperty.call(n.wrapHandlers,"*")&&(i=n.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(n.wrapHandlers,t)&&(i=n.wrapHandlers[t]);var o=t,s=r;if(!(0,K.isUndefined)(i)){var a=i(o,e);(0,K.isNull)(a)||(o=a,s=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var d=s;if(!(0,K.isArray)(c)&&!(0,K.isSet)(c)){var u=Js(c,n);if(!(0,K.isUndefined)(u)&&u(c)===Ws.instance)return;d=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}mi(o,c,d,n)})}function mi(t,e,r,n){var i=Js(e,n);if((0,K.isUndefined)(i)||(e=i(e)),(0,K.isObject)(e)||(0,K.isMap)(e)){Cb(e,r,n);return}if((0,K.isArray)(e)||(0,K.isSet)(e)){Pb(t,e,r,n);return}Gh((0,K.stringify)(e),r,n)}function Hh(t,e,r){var n=new Xh.Options(r);mi(t.name,e,t,n)}gt.parseToExistingElement=Hh;function Db(t,e,r){var n=new Xh.Options(r),i=new Uh.XmlDocument({validation:n.validation});n.declaration.include&&i.decl(n.declaration),n.dtd.include&&i.dtd({name:n.dtd.name,pubId:n.dtd.pubId,sysId:n.dtd.sysId});var o=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return Hh(o,e,r),i.toString(n.format)}gt.parse=Db});var Nb={};Qs(Nb,{IS_COMPONENT_LIBRARY:()=>_o,PROJECT_ALIASES:()=>tf,getBuildPagesFromCachedStore:()=>Hl,getBuildPagesFromStore:()=>Pn,getBuildPagesPath:()=>zl,getConfig:()=>Y,logInfo:()=>et,logPageSize:()=>mf,resolveComponentsPath:()=>dt,startRender:()=>fp,verbose:()=>L,walk:()=>Sr});module.exports=ea(Nb);var Br=F(require("node:fs")),or=F(require("node:path"));var vf=require("node:child_process"),tt=F(require("node:path")),bf=F(it()),Ue=F(_t());var Vt=F(require("node:fs")),cf=F(require("node:path")),ht=F(hn()),uf=F(it()),Rn=F(_t()),lf=F(Dl()),ff=F(En());var Le=F(require("node:fs")),ze=F(require("node:path")),we=F(_t());var Ze=F(require("node:fs")),oe=F(require("node:path")),Cn=F(_t());var St=Y();function Hl(t){let{__caches:e}=St.paths(t);return Pn({basePath:oe.default.join(e,"store"),withSizeProp:!1})}function*Pn(t){let{basePath:e,withSizeProp:r}=t||{},{__cx:n}=St.paths(),i=e||oe.default.join(n,"store"),o=Sr(i).filter(s=>oe.default.extname(s)===".json");for(let s of o)try{let a=Cn.default.readJsonSync(s,{encoding:"utf-8"});if(r){let c=Ze.default.statSync(s);a.size=c.size/1024}a.path&&(yield a)}catch(a){console.error(`Error: The file ${s} doesn't exist`,a)}}function zl(){let t=Y(),{__cx:e}=t.paths(),r=oe.default.join(e,"store");return Sr(r).filter(i=>oe.default.extname(i)===".json")}async function ho(){let{__cx:t}=St.paths(),{sitesToPublish:e,createdPages:r,buildProcessData:n}=Cn.default.readJSONSync(oe.default.join(t,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:e}}function Wl(){let{__cx:t}=St.paths(),e=oe.default.join(t,"store");Ze.default.existsSync(e)||(Ze.default.mkdirSync(e),Ze.default.mkdirSync(oe.default.join(e,"metadata"))),console.info("Store initialized")}function Jl(t,e){let{__cx:r}=St.paths();Ze.default.writeFileSync(oe.default.join(r,"store","metadata","render-info.json"),JSON.stringify(e))}function Lg(t,e){return po(t).filter(i=>e.includes(i))}function po(t){return Ze.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=Ze.default.statSync(n);if(i&&i.isDirectory()||oe.default.extname(r)!==".json")return!1;let o=oe.default.basename(r,oe.default.extname(r));return!isNaN(parseInt(o))}).map(r=>{let n=oe.default.basename(r,oe.default.extname(r));return parseInt(n)})}function Vl(t){let{__cx:e}=St.paths();t.forEach(r=>{mo(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=oe.default.join(e,"store",n);Cn.default.writeJSONSync(i,r)})}function Dn(t){let{__cx:e}=St.paths();t.length!==0&&t.forEach(r=>{let n=oe.default.join(e,"store",`${r}.json`);try{Ze.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Yl(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:o}=e,s=Lg(t,n),a=i.filter(m=>!s.includes(m)),c=a.concat(r),d=s.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!d.includes(m)),p=Pn(),g=[];for await(let m of p){let b=m.context.page.site,w=m.context.page.id;o.map(x=>x.id).includes(b)||g.push(w)}return{pagesInStore:s,pagesMissingInStore:a,pagesToDeleteFromStore:[...d,...g],pagesToWriteToStore:u}}var $g=Y(),go=t=>{if(!we.default.statSync(t).isDirectory())return;let r=we.default.readdirSync(t);if(r.length>0){let i=r.length,o=r.filter(s=>ze.default.extname(s).toLowerCase()===".xml").length;i===o&&(r.forEach(function(s){let a=ze.default.join(t,s);we.default.rmSync(a)}),r=we.default.readdirSync(t)),r.forEach(function(s){let a=ze.default.join(t,s);go(a)}),r=we.default.readdirSync(t)}if(r.length===0){we.default.rmdirSync(t);return}};function On(t,e){for(let r of t)Le.default.existsSync(r)||Le.default.mkdirSync(r,{recursive:!0,...e})}function In(t,e,r,n={withBackup:!1}){let{withBackup:i}=n;for(let o of r){let s=ze.default.join(t,o),a=ze.default.join(e,o);if(!we.default.existsSync(s)){console.log(`Source directory does not exist: ${s}`);continue}i&&Zl(a);try{we.default.existsSync(a)&&Le.default.rmSync(a,{recursive:!0,force:!0}),Le.default.cpSync(s,a,{recursive:!0,preserveTimestamps:!0}),i&&Ql(a)}catch{console.log("Copy failed!"),i&&(Kl(a),console.log("Backup has been restored."))}}}function Jt(t,e,r,n){let{override:i,withBackup:o}=n||{};for(let s of r){let a=ze.default.join(t,s),c=ze.default.join(e,s);if(we.default.existsSync(a)){o&&Zl(c);try{i&&we.default.existsSync(c)&&Le.default.rmSync(c,{recursive:!0,force:!0}),Le.default.renameSync(a,c),o&&Ql(c)}catch{console.log("Move failed!"),o&&(Kl(c),console.log("Backup has been restored."))}}}}function xr(t,e){for(let r of e){if(!r)continue;let n=ze.default.join(t,r);we.default.existsSync(n)&&Le.default.rmSync(n,{recursive:!0,force:!0})}}function Kl(t,e="-BACKUP"){let r=t+e;try{Le.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function Ql(t,e="-BACKUP"){let r=t+e;if(we.default.existsSync(r))try{Le.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function Zl(t,e="-BACKUP"){let r=t+e;if(we.default.existsSync(t)){if(we.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{Le.default.renameSync(t,r),console.log(`Backup of ${t} has been created in ${r}`)}catch{console.log(`Error while coping ${t} to ${r} backup`)}}}function Bg(t){return Number.isInteger(t)&&t<0}async function ef(){let{__cx:t}=$g.paths(),e=ze.default.join(t,"store");try{let r=po(e).filter(Bg);Dn(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}uf.default.config();var df=Y(),Yg=hf(process.env.GRIDDO_DEBUG_LOGS),Kg=hf(process.env.GRIDDO_BUILD_LOGS),c_=ff.default.sync(),Je={clean:JSON.parse(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1"),prepare:JSON.parse(process.env.GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS||"1"),restore:JSON.parse(process.env.GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS||"1"),data:JSON.parse(process.env.GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS||"1"),ssg:JSON.parse(process.env.GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS||"2"),relocation:JSON.parse(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),meta:JSON.parse(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"4"),archive:JSON.parse(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1")};function Y(){try{return(af(),ea(sf)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}function L(t){Yg&&console.log(ht.default.hex("#ffff33")("verbose"),ht.default.gray(t.replace(/(\s)\s+/g,"$1").trim()))}function hf(t){if(typeof t=="boolean")return t;if(t==null)return!1;if(t.toLowerCase()==="true")return!0;if(t.toLowerCase()==="false")return!1;if(t.toLowerCase()==="on")return!0;if(t.toLowerCase()==="off")return!1;let e=parseInt(t,10);return isNaN(e)?!1:e>0}function Sr(t){let e=[];return Vt.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function $e(t,e="",r=1,n=1){let i=t.split(`
23
23
  `).map(b=>b.trim()),o=e?` ${e} `:"",s=e?o.length:0,a=Math.max(...i.map(b=>b.length))+r*2,c=Math.max(a,s),d=`\u2502${" ".repeat(c)}\u2502
24
24
  `.repeat(n),u=c,p=`\u256D${o}${"\u2500".repeat(u-s)}\u256E
25
25
  `,g=`\u2570${"\u2500".repeat(u)}\u256F`,m=i.map(b=>{let w=" ".repeat(c-b.length-r);return`\u2502${" ".repeat(r)}${b}${w}\u2502
26
- `}).join("");console.log(`${p}${d}${m}${d}${g}`)}function Ze(t){Kg&&console.info(t.replace(/(\s)\s+/g,"$1").trim())}function hf(t){return new Promise(e=>setTimeout(e,t))}function pf(t,e="KB"){let r={low:50,mid:80,large:130,extraLarge:210},n=t>r.large?"red":t>r.mid?"magenta":t>r.low?"blue":"green";return ht.default[n].bold(`${t}${e}`)}function So(t,e=3){return(t/1e3).toFixed(e)}function xo(t){return"site"in t&&t.site?t?.site:void 0}function po(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&po(t[r],e)}function Eo(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function mf(t){let e=process.version,{griddoVersion:r}=ff,n=`
26
+ `}).join("");console.log(`${p}${d}${m}${d}${g}`)}function et(t){Kg&&console.info(t.replace(/(\s)\s+/g,"$1").trim())}function pf(t){return new Promise(e=>setTimeout(e,t))}function mf(t,e="KB"){let r={low:50,mid:80,large:130,extraLarge:210},n=t>r.large?"red":t>r.mid?"magenta":t>r.low?"blue":"green";return ht.default[n].bold(`${t}${e}`)}function So(t,e=3){return(t/1e3).toFixed(e)}function xo(t){return"site"in t&&t.site?t?.site:void 0}function mo(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&mo(t[r],e)}function Eo(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function gf(t){let e=process.version,{griddoVersion:r}=df,n=`
27
27
  \xB7\xB7
28
28
  \xB7\xB7 Griddo Exporter ${r}
29
29
  \xB7\xB7 Adapter: ${t}
30
30
  \xB7\xB7 Node: ${e}
31
31
  \xB7\xB7
32
- `;console.log(uf.default.cristal(n))}function gf(){let{__cx:t}=ff.paths(),e=af.default.join(t,"apiCache"),r=Vt.default.readdirSync(e),n={},i=r.filter(s=>{let a=`${e}/${s}`,c=Fn.default.readJSONSync(a,"utf-8"),{id:d,entity:u,fullUrl:p}=c;return!!(d&&u&&p)});for(let s of i){let a=`${e}/${s}`,c=Fn.default.readJSONSync(a,"utf-8"),d=Vt.default.statSync(a).mtimeMs,{id:u}=c;(!n[u]||d>Vt.default.statSync(`${e}/${n[u]}`).mtimeMs)&&(n[u]=s)}let o=0;for(let s of i){let a=`${e}/${s}`,c=Fn.default.readJSONSync(a,"utf-8"),{id:d}=c;s!==n[d]&&(Vt.default.unlinkSync(a),o++)}console.log(`Sanitize apiCache dir for ${o} files`)}async function Co(...t){let e=process.hrtime();for(let o of t)await o();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function Je(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
32
+ `;console.log(lf.default.cristal(n))}function yf(){let{__cx:t}=df.paths(),e=cf.default.join(t,"apiCache"),r=Vt.default.readdirSync(e),n={},i=r.filter(s=>{let a=`${e}/${s}`,c=Rn.default.readJSONSync(a,"utf-8"),{id:d,entity:u,fullUrl:p}=c;return!!(d&&u&&p)});for(let s of i){let a=`${e}/${s}`,c=Rn.default.readJSONSync(a,"utf-8"),d=Vt.default.statSync(a).mtimeMs,{id:u}=c;(!n[u]||d>Vt.default.statSync(`${e}/${n[u]}`).mtimeMs)&&(n[u]=s)}let o=0;for(let s of i){let a=`${e}/${s}`,c=Rn.default.readJSONSync(a,"utf-8"),{id:d}=c;s!==n[d]&&(Vt.default.unlinkSync(a),o++)}console.log(`Sanitize apiCache dir for ${o} files`)}async function Co(...t){let e=process.hrtime();for(let o of t)await o();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function Ve(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
33
33
  `),$e(`\u231B\uFE0F ${t}`,"",1,0),process.stdin.once("data",()=>{r()})})}async function Be(t){let{steps:e,name:r,attempts:n}=t,i=0,o=n||1;for(;i<o;)try{console.info(`
34
34
  ${ht.default.blue("info")} start ${r} life-cycle`);let s=await Co(...e);console.info(`${ht.default.green("success")} ${r} - ${s}s`);break}catch(s){let a=ht.default.bgRed.black(` Error in ${r} LifeCycle `),c=ht.default.yellow(`Attempt (${i+1})`);console.log(`
35
35
  ${a} ${c}
36
- `),console.log(s),console.log(),i++}if(i===o)throw new Error(`Exceeded maximum retry attempts (${o}) for ${r} LifeCycle`)}vf.default.config();var bf=Y();function _f(t){let{proDomain:e}=Y(),r=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;if(!r||!t||!t.startsWith(e))return"";let n=`${r}/${t}`;return L(`Reading env.GRIDDO_ASSET_PREFIX, ${process.env.GRIDDO_ASSET_PREFIX}`),L(`Setting the asset prefix with the domain concatenated, ${n}`),n}function Po(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Zg(i,`c_fill,w_${e},h_${r}`):Qg(i,`f/${n}/w/${e}/h/${r}`):null}function Qg(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Zg(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}function wf(t){L(`read assetPrefixWithDomain, ${t}`);let{__ssg:e}=bf.paths(),r=(0,yf.spawnSync)("yarn",["gatsby-build",process.env.GRIDDO_SSG_VERBOSE?"--verbose":""],{cwd:e,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign(process.env,{GRIDDO_EXPORTER:"true",SPAWN_ASSET_PREFIX_WITH_DOMAIN:t})});if(r.status!==0)throw new Error(`Error in gatsby build ${JSON.stringify(r)}`)}async function Sf(t,e){let{__cx:r,__ssg:n}=bf.paths(t),i=et.default.join(r,"dist"),o=et.default.join(r,"assets"),s=et.default.join(r,"dist",t),a=et.default.join(n,"public"),c=Ue.default.readdirSync(a).filter(w=>et.default.extname(w)===".js"||et.default.extname(w)===".json"||et.default.extname(w)===".css"),d=`${a}/page-data`,u=`${o}/page-data`,p=et.default.join(n,"static"),g=o,m=`${i}/static`,b=`${o}/static`;try{Ue.default.mkdirSync(o,{recursive:!0}),Ue.default.copySync(a,i,{preserveTimestamps:!0}),e&&(Ue.default.copySync(d,u,{preserveTimestamps:!0}),Ue.default.existsSync(p)&&Ue.default.copySync(p,g,{overwrite:!1,preserveTimestamps:!0}),Ue.default.copySync(m,b,{overwrite:!1,preserveTimestamps:!0}),Ue.default.existsSync(p)&&Ue.default.copySync(p,s,{overwrite:!1,preserveTimestamps:!0}),c.map(async w=>{let x=`${a}/${w}`,A=`${o}/${w}`;Ue.default.copySync(x,A,{preserveTimestamps:!0})}))}catch(w){console.error(w)}}var Do=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}};function Oo({error:t,message:e,expected:r="",hint:n=""}){let i=[e,r,n].filter(Boolean).join(`
37
- `);throw $e(i,t,1,0),new Do}var xf={id:100,error:"NoDomainsFoundError",message:"No domains found in this instance. The process cannot continue.",expected:"This can happen if the API is not functioning or the site is not properly configured, or the domains are not registered.",hint:"You can contact the instance administrator."},Ef={id:101,error:"RenderUUIDError",message:`Render sentinel file does not exist.
36
+ `),console.log(s),console.log(),i++}if(i===o)throw new Error(`Exceeded maximum retry attempts (${o}) for ${r} LifeCycle`)}bf.default.config();var _f=Y();function wf(t){let{proDomain:e}=Y(),r=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;if(!r||!t||!t.startsWith(e))return"";let n=`${r}/${t}`;return L(`Reading env.GRIDDO_ASSET_PREFIX, ${process.env.GRIDDO_ASSET_PREFIX}`),L(`Setting the asset prefix with the domain concatenated, ${n}`),n}function Po(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Zg(i,`c_fill,w_${e},h_${r}`):Qg(i,`f/${n}/w/${e}/h/${r}`):null}function Qg(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Zg(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}function Sf(t){L(`read assetPrefixWithDomain, ${t}`);let{__ssg:e}=_f.paths(),r=(0,vf.spawnSync)("yarn",["gatsby-build",process.env.GRIDDO_SSG_VERBOSE?"--verbose":""],{cwd:e,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign(process.env,{GRIDDO_EXPORTER:"true",SPAWN_ASSET_PREFIX_WITH_DOMAIN:t})});if(r.status!==0)throw new Error(`Error in gatsby build ${JSON.stringify(r)}`)}async function xf(t,e){let{__cx:r,__ssg:n}=_f.paths(t),i=tt.default.join(r,"dist"),o=tt.default.join(r,"assets"),s=tt.default.join(r,"dist",t),a=tt.default.join(n,"public"),c=Ue.default.readdirSync(a).filter(w=>tt.default.extname(w)===".js"||tt.default.extname(w)===".json"||tt.default.extname(w)===".css"),d=`${a}/page-data`,u=`${o}/page-data`,p=tt.default.join(n,"static"),g=o,m=`${i}/static`,b=`${o}/static`;try{Ue.default.mkdirSync(o,{recursive:!0}),Ue.default.copySync(a,i,{preserveTimestamps:!0}),e&&(Ue.default.copySync(d,u,{preserveTimestamps:!0}),Ue.default.existsSync(p)&&Ue.default.copySync(p,g,{overwrite:!1,preserveTimestamps:!0}),Ue.default.copySync(m,b,{overwrite:!1,preserveTimestamps:!0}),Ue.default.existsSync(p)&&Ue.default.copySync(p,s,{overwrite:!1,preserveTimestamps:!0}),c.map(async w=>{let x=`${a}/${w}`,A=`${o}/${w}`;Ue.default.copySync(x,A,{preserveTimestamps:!0})}))}catch(w){console.error(w)}}var Do=class extends Error{constructor(){super(),this.name="InternalCXError",this.stack=""}};function Oo({error:t,message:e,expected:r="",hint:n=""}){let i=[e,r,n].filter(Boolean).join(`
37
+ `);throw $e(i,t,1,0),new Do}var Ef={id:100,error:"NoDomainsFoundError",message:"No domains found in this instance. The process cannot continue.",expected:"This can happen if the API is not functioning or the site is not properly configured, or the domains are not registered.",hint:"You can contact the instance administrator."},Cf={id:101,error:"RenderUUIDError",message:`Render sentinel file does not exist.
38
38
  The rendering uuid cannot be read safely.
39
39
  There was probably a instance deployment during the render and files were deleted.
40
40
 
41
- The files generated in this render will not be published.`};var ss=F(require("node:fs")),as=F(require("node:path")),lh=F(nt());var ah=F(rs()),ch=F(hn()),uh=F(nt());var Qd=F(require("node:crypto")),Dt=F(require("node:fs")),tr=F(require("node:path")),ns=F(_t());var Vn=Y();function Zd(){let{__cx:t}=Vn.paths(),e=tr.default.join(t,"apiCache");Dt.default.existsSync(e)||Dt.default.mkdirSync(e),console.info("Cache initialized")}function eh(t){let{__cx:e}=Vn.paths(),r=tr.default.join(e,"apiCache"),n=Qd.default.createHash("sha256");return n.update(JSON.stringify(t)),`${r}/${n.digest("hex")}`}function th(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=eh(t),i=tr.default.dirname(n);Dt.default.existsSync(i)||Dt.default.mkdirSync(i,{recursive:!0}),Dt.default.writeFileSync(n,r,"utf8")}function rh(t){try{let e=eh(t);return ns.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function Ov(){let{__cx:t}=Vn.paths(),r=`${tr.default.join(t,"apiCache")}/siteHash.json`;try{return ns.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function nh(t,e){let r=Ov(),n=r[t],i=e||n||new Date().valueOf(),{__cx:o}=Vn.paths(),a=`${tr.default.join(o,"apiCache")}/siteHash.json`;return i!==n&&(r[t]=i,Dt.default.writeFileSync(a,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var ih=F(rs()),oh=F(hn()),is=class{user;password;baseUrl;headers;constructor(){this.user=process.env.botEmail,this.password=process.env.botPassword,this.baseUrl=process.env.API_URL}async login(){try{let e=await(0,ih.default)({url:`${this.baseUrl}/login_check`,method:"POST",headers:{"Content-Type":"application/json"},data:{username:this.user,password:this.password}});if(e.status===200){let{data:{token:r}}=e;this.headers={Authorization:"bearer "+r,"Cache-Control":"no-store"}}return this.headers}catch{console.error(oh.default.red(`
41
+ The files generated in this render will not be published.`};var ss=F(require("node:fs")),as=F(require("node:path")),fh=F(it());var ch=F(rs()),uh=F(hn()),lh=F(it());var Zd=F(require("node:crypto")),Dt=F(require("node:fs")),tr=F(require("node:path")),ns=F(_t());var Yn=Y();function eh(){let{__cx:t}=Yn.paths(),e=tr.default.join(t,"apiCache");Dt.default.existsSync(e)||Dt.default.mkdirSync(e),console.info("Cache initialized")}function th(t){let{__cx:e}=Yn.paths(),r=tr.default.join(e,"apiCache"),n=Zd.default.createHash("sha256");return n.update(JSON.stringify(t)),`${r}/${n.digest("hex")}`}function rh(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=th(t),i=tr.default.dirname(n);Dt.default.existsSync(i)||Dt.default.mkdirSync(i,{recursive:!0}),Dt.default.writeFileSync(n,r,"utf8")}function nh(t){try{let e=th(t);return ns.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function Ov(){let{__cx:t}=Yn.paths(),r=`${tr.default.join(t,"apiCache")}/siteHash.json`;try{return ns.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function ih(t,e){let r=Ov(),n=r[t],i=e||n||new Date().valueOf(),{__cx:o}=Yn.paths(),a=`${tr.default.join(o,"apiCache")}/siteHash.json`;return i!==n&&(r[t]=i,Dt.default.writeFileSync(a,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var oh=F(rs()),sh=F(hn()),is=class{user;password;baseUrl;headers;constructor(){this.user=process.env.botEmail,this.password=process.env.botPassword,this.baseUrl=process.env.API_URL}async login(){try{let e=await(0,oh.default)({url:`${this.baseUrl}/login_check`,method:"POST",headers:{"Content-Type":"application/json"},data:{username:this.user,password:this.password}});if(e.status===200){let{data:{token:r}}=e;this.headers={Authorization:"bearer "+r,"Cache-Control":"no-store"}}return this.headers}catch{console.error(sh.default.red(`
42
42
  \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
43
43
  \u2502 Access credentials failure \u2502
44
44
  \u2502 Check that the login details are correct in your .env file \u2502
45
45
  \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F
46
- `)),process.exit(1)}}},tt=new is;uh.default.config();var{env:{RETRY_WAIT_SECONDS:Iv="4",RETRY_ATTEMPTS:sh="4"}}=process;async function os(t,e,r=""){let{endpoint:n,body:i,cacheKey:o="",attempt:s=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:o};if(o){let d=new Date,u=rh(c);if(u){let p=xo(u),g=p?`site: ${p}`:"",m=So(new Date().getTime()-d.getTime());return Ze(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let d=new Date,{data:u}=await(0,ah.default)({url:n,method:e,headers:Object.assign({},a,tt.headers),data:i}),p=xo(u),g=p?`site: ${p}`:"",m=So(new Date().getTime()-d.getTime());return Ze(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),th(c,u),u}catch(d){let u=d;return u.response?.status===404?null:(s>parseInt(sh)&&(console.log(`
47
- Max attempts ${sh} reached
46
+ `)),process.exit(1)}}},rt=new is;lh.default.config();var{env:{RETRY_WAIT_SECONDS:Iv="4",RETRY_ATTEMPTS:ah="4"}}=process;async function os(t,e,r=""){let{endpoint:n,body:i,cacheKey:o="",attempt:s=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:o};if(o){let d=new Date,u=nh(c);if(u){let p=xo(u),g=p?`site: ${p}`:"",m=So(new Date().getTime()-d.getTime());return et(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let d=new Date,{data:u}=await(0,ch.default)({url:n,method:e,headers:Object.assign({},a,rt.headers),data:i}),p=xo(u),g=p?`site: ${p}`:"",m=So(new Date().getTime()-d.getTime());return et(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),rh(c,u),u}catch(d){let u=d;return u.response?.status===404?null:(s>parseInt(ah)&&(console.log(`
47
+ Max attempts ${ah} reached
48
48
  --------------------------------------
49
49
  - ${e.toUpperCase()} ${n}
50
50
  - BODY: ${JSON.stringify(i)}
51
51
  - HEADERS: ${JSON.stringify(a)}
52
52
  - RESPONSE: ${u.response?.status,JSON.stringify(u.response?.data)}
53
53
  --------------------------------------
54
- `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),Av(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await hf(parseInt(Iv)*1e3),os({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Oe(t){return await os(t,"get")}async function Ir(t){let{endpoint:e,body:r,headers:n}=t,i=e.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await os(t,"post",i||"")}function Av(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(o))d.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let u=d.join(`
54
+ `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),Av(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await pf(parseInt(Iv)*1e3),os({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Oe(t){return await os(t,"get")}async function Ir(t){let{endpoint:e,body:r,headers:n}=t,i=e.endsWith("/distributor")&&`# Distributor body: ${JSON.stringify(r)} lang: ${JSON.stringify(n?.lang)}`;return await os(t,"post",i||"")}function Av(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:c}=r||{},d=[];for(let m of Object.keys(o))d.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let u=d.join(`
55
55
  `),p=r?`Code: ${s} - ${a}
56
56
  Response: ${JSON.stringify(c)}`:"",g=`${n}
57
- ${i}`;console.warn(ch.default.bold.red(`
57
+ ${i}`;console.warn(uh.default.bold.red(`
58
58
  =============
59
59
 
60
60
  { Call info }
@@ -67,6 +67,6 @@ ${p}
67
67
  ${g}
68
68
 
69
69
  =============
70
- `))}lh.default.config();var Fv=Y(),cs=class{robots;baseURL;settings;endpoint;constructor(){this.robots=[],this.baseURL=process.env.API_URL,this.settings={},this.endpoint=`${this.baseURL}/domains/robots`}async getRobots(){try{let e=await Oe({endpoint:this.endpoint});this.robots=e?.filter(r=>!!r.path).map(({path:r,content:n})=>({path:r,content:n||`User-agent: *
70
+ `))}fh.default.config();var Fv=Y(),cs=class{robots;baseURL;settings;endpoint;constructor(){this.robots=[],this.baseURL=process.env.API_URL,this.settings={},this.endpoint=`${this.baseURL}/domains/robots`}async getRobots(){try{let e=await Oe({endpoint:this.endpoint});this.robots=e?.filter(r=>!!r.path).map(({path:r,content:n})=>({path:r,content:n||`User-agent: *
71
71
  \r
72
- \rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let{__cx:r}=Fv.paths(e),n=as.default.join(r,"dist");await this.getRobots();let i=this.robots.find(({path:o})=>o===`/${e}`);if(!i){console.log(`Robots not found for ${e}`);return}if(ss.default.existsSync(n)){let o=as.default.join(n,"robots.txt");ss.default.writeFileSync(o,i?.content)}else console.log(`${n} not found`)}},fh=new cs;var rp=F(require("node:path")),np=F(nt()),ip=F(oo());var dh=F(nt());dh.default.config();var us=process.env.API_URL,pt=`${us}/site/`,rt={GET_ALL:`${us}/sites/all`,GET_PAGE:[`${us}/page/`,""],INFO:[`${pt}`,"/all"],LANGUAGES:[`${pt}`,"/languages"],BUILD_START:[`${pt}`,"/build/start"],BUILD_END:[`${pt}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${pt}`,"/distributor"],GET_SITEMAP:[`${pt}`,"/sitemap"],SOCIALS:[`${pt}`,"/socials"],GET_PAGES:[`${pt}`,"/pages?pagination=false"]},ge=class{static async getAll(){let{GET_ALL:e}=rt;return await Oe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=rt;return await Oe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=rt;return await Ir({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,o){let{GET_DISTRIBUTOR_DATA:[s,a]}=rt,c=i||e.site,d=o||e.language;return await Ir({endpoint:`${s}${c}${a}`,body:r,headers:{lang:d},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=rt;return await Oe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=rt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Yn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:c=!1,allLanguages:d=!1,preferenceLanguage:u=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:d,preferenceLanguage:u}:s==="manual"?{mode:s,fixed:a,fullRelations:c}:s==="navigation"?{mode:s,order:n,quantity:o,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${s} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return $e(`Error: Page ${r.id} has \`hasDistributorData: true\` but it doesn't have a \`data\` prop`,"No data in ReferenceField"),[];if(Array.isArray(n.sources)&&n.sources.length<1)return $e(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:o,lang:s}=n;n.sources||$e(`Warning: Page with id: ${r.id} in the site ${o} has a ReferenceField with \`undefined\` \`data.sources\``,"Undefined data.sources in ReferenceField");let a=this.getBody(n,r);return await ge.getDistributorData(r,a,i,o,s)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,c=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let d in a){if(d==="queriedItems")continue;let p=a[d];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,c+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Kn=class{_defaultHeaders;_defaultFooters;_navigations;constructor(){this._navigations={footers:[],headers:[]},this._defaultHeaders={},this._defaultFooters={}}set navigations(e){this._navigations=e,this._defaultFooters=this.getDefaultFooters(),this._defaultHeaders=this.getDefaultHeaders()}get navigations(){return this._navigations}getDefaultFooters(){return[...this.navigations.footers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let o=e.find(s=>s.language===n&&s.navigationLanguages?.find(a=>a.navigationId===r))||e.find(s=>s.id===r);return o?{...o}:null}getPageHeader(e,r){return this.getRightLanguage(this.navigations.headers,e,r)}getPageFooter(e,r){return this.getRightLanguage(this.navigations.footers,e,r)}getPageNavigations(e){let{header:r,footer:n,language:i,template:{templateType:o},templateConfig:{defaultHeader:s,defaultFooter:a,templates:c}}=e,d=b=>{let w=b.find(x=>typeof x=="number");return typeof w=="number"?w:null},u=d([r,c?.[o]?.defaultHeader,s]),p=d([n,c?.[o]?.defaultFooter,a]),g=u?this.getPageHeader(u,i):u===0?null:this._defaultHeaders[i],m=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:g,footer:m}}};var ls=class{baseURL;settings;ENDPOINTS;constructor(){this.baseURL=process.env.API_URL,this.settings={cloudinaryName:"",useMetaTitle:!1,useMetaKeywords:!1,showBasicMetaRobots:!1,avoidHrefLangsOnCanonicals:!1,avoidSelfReferenceCanonicals:!1,avoidHrefLangXDefault:!1,avoidDebugMetas:!1},this.ENDPOINTS={settings:`${this.baseURL}/settings`,resetRender:`${this.baseURL}/debug/reset-render`}}async getAll(){let{settings:e}=this.ENDPOINTS,r=await Oe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await Ir({endpoint:e})}},fs=new ls;var mh=F(nt());mh.default.config();var Rv=25;function Tv({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Po(r,1280,768):"",twitterImage:r?Po(r,1280,768):""}}function kv(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:c,metasAdvanced:d,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=d?.split(",").filter(Boolean).map(b=>b.trim().toLowerCase())||[];return{title:(r||e||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():a?p:void 0,locale:o,url:s,index:a?"index":"noindex",follow:c?"follow":"nofollow",translate:m.includes("notranslate")?"notranslate":"",metasAdvanced:m.filter(b=>b!=="notranslate").join(),pageLanguages:u,metaKeywords:g?.filter(Boolean).map(b=>b.replace(/"/g,"'")).join(", ")}}async function hs(t,e){let{id:r,title:n,fullPath:i,language:o,breadcrumb:s,socialDescription:a,socialImage:c,socialTitle:d}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:w,siteScript:x,siteSlug:A,socials:j,theme:B,navigations:{header:$,footer:V}}=e;t.breadcrumb=s,t.siteSlug=A,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let Te=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),ee=kv(t),D=Tv({socialDescription:a,socialImage:c,socialTitle:d}),q=i.compose,k=new Date().toString();return{path:q,size:void 0,context:{id:r,title:n,fullPath:i,locale:Te,languageId:o,theme:B,siteMetadata:b,pageMetadata:ee,openGraph:D,socials:j,siteLangs:m,cloudinaryName:p,siteOptions:w,griddoVersion:g,renderDate:k,siteScript:x,header:$,footer:V,page:t}}}async function gh(t,e){return await hs(t,e)}async function yh({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(c,d)=>{let u=d===0,p=d+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,id:parseInt("-"+t.id+d),fullPath:{...t.fullPath,compose:ds(m,p,{addEndingSlash:!0})},fullUrl:ds(t.fullUrl,p,{addEndingSlash:!0}),slug:ds(t.slug,p),title:ph(t.title,p),metaTitle:ph(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:o?.length},isRoot:r,defaultLang:n};return await hs(b,s)});return Promise.all(a)}function vh(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:s})=>s==="/")||i.push({});let o=i.map(async(s,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:d="/",title:u="",metaTitle:p="",metaDescription:g=""}=s,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",w=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=d?.replace(/\//g,""),j=d==="/"?x:x+"/",B=b.endsWith("/")?"":"/",$=`${b}${B}${j}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${w}/${j}`,c.fullPath.compose=$,c.slug=$,c.template.activeSectionSlug=d,c.template.activeSectionBase=w,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await hs(c,e)});return Promise.all(o)}function bh(t){return new Promise(r=>{let n=(i,o=0)=>{if(!(!i||typeof i!="object")){for(let s in i){let a=i[s],c=a||typeof a=="object",d=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!d)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Mv(t,e,r){return e?.slice(t*(r-1),t*r)}function qv(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Mv(t,e,i))}function _h(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Rv;return qv(r,e)}function hh(t){return t.replace(/\/+$/,"/")}function ds(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?hh(`${t}${i}`):hh(`${t}${n}${e}${i}`)}function ph(t,e){return!t||e<=1?t:`${t} - ${e}`}var Ft=F(require("node:path")),$r=F(_t()),Vs=F(Hh());var Ob=process.env.API_URL,Ib=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,ir=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),zh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),Jh=Y();async function Vh(t){console.info(`API URL ${Ob}`),await tt.login();let e=await ge.getAll(),r=Ib?e.filter(o=>!ir||o.id===ir):e.filter(o=>ir?o.id===ir:!!o.shouldBeUpdated);if(r.length)for(let o of r){let{items:s}=await ge.getLanguages(o.id);o.domains=s.filter(a=>a.domain&&(a.domain.slug===t||a.domain.slug===`/${t}`)).map(a=>({[a.id]:`${a.domain.slug}${a.path}`}))}let n=r.filter(o=>ir?o.id===ir:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Yh(t){for(let e of t){let r=await ge.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await ge.endSiteRender(e.id,i)}}async function Kh(t){let e=await ge.startSiteRender(t),r=await ge.getInfo(t),n=await ge.getLanguages(t),i=await ge.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:d}=e,{headers:u,footers:p}=r,g=zh.length?zh.filter(b=>d.includes(b)):d;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:o,defaultLang:s,headers:u,footers:p,socials:i}}async function Qh(){let{__cx:t}=Jh.paths(),{buildProcessData:e}=await fo(),r=await tt.login(),n=Object.keys(e).map(o=>({...e[o],siteId:parseInt(o)})),i={authControl:r,sites:n};$r.default.writeFileSync(Ft.default.join(t,"dist","__build-report__.json"),JSON.stringify(i)),Ze(`Build report saved for ${n.length} site(s)`)}async function Zh(){let{sitesToPublish:t}=await fo(),{__cx:e}=Jh.paths(),r=Ft.default.join(e,"dist");for(let n of t){let{id:i,languages:o}=n;for(let s of o){tt.headers&&(tt.headers.lang=s.id.toString());let a=await ge.getSitemap(i);if(!a)continue;let{items:c,url:{home:d,domain:u}}=a;if(!d)continue;let p=n.domains.find(j=>Object.keys(j)[0]==s.id.toString());if(!p)continue;let g=Object.values(p)[0],m=[],b=Object.keys(c),w=Ft.default.join(r,g.replace(u,""));for(let j of b){let B=c[j];if(!B.length)continue;let $=(0,Vs.parse)("urlset",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation":"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"},url:B}),V=`/sitemap-${j.toLowerCase()}.xml`,ue=Ft.default.join(w,V);Wh(ue,$),m.push(`${d.endsWith("/")?d.slice(0,-1):d}${V}`)}if(!m.length)continue;let x=(0,Vs.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:m.map(j=>({loc:j}))}),A=Ft.default.join(w,"sitemap.xml");Wh(A,x)}}}function Wh(t,e){try{let r=Ft.default.dirname(t);$r.default.existsSync(r)||$r.default.mkdirSync(r,{recursive:!0}),$r.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}var ep=Y();np.default.config();var Ab=process.env.API_URL,Fb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,tp=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Rb=process.env.PUBLIC_API_URL,Tb=new Date().valueOf().toString();async function op(t){Wl(),console.info(`API calls with ${tp} threads`);let{__cx:e}=ep.paths(),{griddoVersion:r}=ep,n=rp.default.join(e,"store");try{let i=[],o={},{sitesToPublish:s,sitesToUnpublish:a}=await Vh(t);await fs.getAll(),s.length||a.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Eo(s)}`),console.info(`Sites to unpublish: ${Eo(a)}`),await Yh(a);for(let c of s){let{id:d,slug:u,theme:p,favicon:g,changedPages:m=[],pages:b=[]}=c,{siteInfo:w,validPagesIds:x,siteHash:A,unpublishHashes:j,siteLangs:B,defaultLang:$,headers:V,footers:ue,socials:Te}=await Kh(d),{cloudinaryName:ee,useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:k,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O}=fs.settings;o[d]={siteHash:A,unpublishHashes:j,publishHashes:[]};let U=new Kn;U.navigations={headers:V,footers:ue},c.languages=B;let M=nh(d,A),P=w.siteScript,R={siteUrl:w.slug,title:w.name,favicon:g},He={baseUrl:Ab,publicBaseUrl:Rb,instance:Fb,siteSlug:u,theme:p,siteMetadata:R,socials:Te,siteLangs:B,cloudinaryName:ee,griddoVersion:r,siteOptions:{useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:k,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O},siteScript:P};Ze(`${c.name} site`);let Ye=async h=>{let f=[],v=await ge.getPage(h,M);if(!v)return;i.push(h);let S=JSON.parse(JSON.stringify(He));S.navigations=U.getPageNavigations(v);let _=await Yn.getDistributorData({page:v,cacheKey:Tb}),N=await bh(_),X=v?.mode==="list",W=!X&&N,Ee=!W&&!X;if(X){let fe={page:v,pages:_h(_),isRoot:!1,defaultLang:$,template:_,totalQueriedItems:_.queriedItems};f=await yh(fe,S)}if(W){let fe=v;fe.template=_,fe.multiPageElements=N,fe.defaultLang=$,f=await vh(fe,S)}if(Ee){let fe=v;fe.template=_,fe.defaultLang=$,f=[await gh(fe,S)]}v.hash!==null&&o[d].publishHashes.push(v.hash),Vl(f)},{pagesMissingInStore:le,pagesToDeleteFromStore:ye,pagesToWriteToStore:yt}=await Yl(n,{sitesToPublish:s,pages:b,validPagesIds:x,changedPages:m});Dn(ye),L(`Store site: ${c.name}`),L(`${x.length} valid pages from API`),L(`changed ${m.length} pages from API`),L(`deleted ${ye.length} pages from store`),L(`missing ${le.length} pages in store`),L(`write ${yt.length} pages to store`);let xe=(0,ip.default)(tp),l=yt.map(h=>xe(()=>Ye(h)));await Promise.all(l)}Jl(n,{buildProcessData:o,createdPages:i,sitesToPublish:s})}catch(i){console.error(i.message),process.exit(1)}}async function sp(t){Zd(),await op(t),gf()}var kb=process.env.API_URL,Mb={GET_ALL:`${kb}/domains`},mi=class{static async getAll(){let{GET_ALL:e}=Mb;return await Oe({endpoint:e})}};async function ap(){await tt.login();let t=await mi.getAll();return L(`Getting domains slugs (${t.length})`),qb(t)}function qb(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var up=Y(),{__cx:jb}=up.paths(),cp=or.default.join(jb,".render-sentinel");async function Ys(){mf("gatsby"),Br.default.writeFileSync(cp,new Date().toISOString());let t=await ap();t.length||Oo(xf);for(let e of t){let{__ssg:r,__exports:n,__caches:i,__cx:o,__components:s}=up.paths(e);$e(`Initializing render for the domain ${e}`,"",1,0);let a=_f(e),c=!!a&&a!=="";await Be({name:"Clean",attempts:We.clean,steps:[()=>xr(o,["store","apiCache","dist"]),()=>L("clean `store`, `apiCache` and `dist` directories from `__cx`"),()=>xr(r,["dist","public","static",".cache"]),()=>L("clean `dist`, `public`, `static` and `.cache` directories from `__ssg`"),()=>Je("Clean LifeCycle")]}),await Be({name:"Prepare",attempts:We.prepare,steps:[()=>On([n]),()=>L("create `exports/sites/<domain>` directory"),()=>On([i]),()=>L("create `caches/<domain>` directory"),()=>Je("prepare LifeCycle")]}),await Be({name:"Restore",attempts:We.restore,steps:[()=>In(s,r,["static"]),()=>L("copy `static` directory from `__components` to `__ssg`"),()=>In(n,o,["assets"]),()=>L("copy `assets` directory from `__exports` to `__cx`"),()=>In(n,r,["dist"]),()=>{Br.default.existsSync(or.default.join(r,"dist"))&&Br.default.renameSync(or.default.join(r,"dist"),or.default.join(r,"public"))},()=>L("rename `__ssg/dist` to `__ssg/public` directory."),()=>Jt(i,o,["apiCache","store"]),()=>L("move `apiCache` and `store` directories from `__caches` to `__cx`"),()=>Jt(i,r,[".cache"]),()=>L("move `.cache` directory from `__caches` to `__ssg`"),()=>Je("Restore LifeCycle")]}),await Be({name:"Data",attempts:We.data,steps:[()=>sp(e),()=>Je("Data LifeCycle")]}),await Be({name:"SSG",attempts:We.ssg,steps:[()=>wf(a),()=>Je("SSG LifeCycle")]}),await Be({name:"Relocation",attempts:We.relocation,steps:[()=>Sf(e,c),()=>L("create an `assets` directory from `public`"),()=>Je("Relocation LifeCycle")]}),await Be({name:"Meta",attempts:We.meta,steps:[()=>Qh(),()=>L("create build report from `store/metadata/render-info.json`"),()=>fh.writeFiles(e),()=>L("create Robots.txt"),()=>Zh(),()=>L("generate sitemaps"),()=>Je("Meta LifeCycle")]}),await Be({name:"Archive",attempts:We.archive,steps:[()=>ef(),()=>L("remove virtual pages from store (multipage and static list)"),()=>mo(or.default.join(o,"dist")),()=>L("remove empty site directories from `__cx/dist`"),()=>Jt(o,n,["dist","assets"],{withBackup:!0}),()=>L("move `dist` and `assets` directories from `__cx` to `__exports`"),()=>Jt(o,i,["apiCache","store"]),()=>L("move `apiCache` and `store` directories from `__cx` to `__caches`"),()=>Jt(r,i,[".cache"]),()=>L("move `.cache` directory from `__ssg` to `__caches`"),()=>Je("Archive LifeCycle")]}),await Be({name:"Clean",attempts:We.clean,steps:[()=>xr(r,["static","public","dist"]),()=>Je("Clean LifeCycle")]}),await Be({name:"HealthCheck",attempts:1,steps:[()=>{Br.default.existsSync(cp)||Oo(Ef)}]})}}async function lp(){try{let t=await Co(Ys);$e(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}catch(t){console.log(t),process.exit(1)}}_o();0&&(module.exports={IS_COMPONENT_LIBRARY,PROJECT_ALIASES,getBuildPagesFromCachedStore,getBuildPagesFromStore,getBuildPagesPath,getConfig,logInfo,logPageSize,resolveComponentsPath,startRender,verbose,walk});
72
+ \rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let{__cx:r}=Fv.paths(e),n=as.default.join(r,"dist");await this.getRobots();let i=this.robots.find(({path:o})=>o===`/${e}`);if(!i){console.log(`Robots not found for ${e}`);return}if(ss.default.existsSync(n)){let o=as.default.join(n,"robots.txt");ss.default.writeFileSync(o,i?.content)}else console.log(`${n} not found`)}},dh=new cs;var np=F(require("node:path")),ip=F(it()),op=F(so());var hh=F(it());hh.default.config();var us=process.env.API_URL,pt=`${us}/site/`,nt={GET_ALL:`${us}/sites/all`,GET_PAGE:[`${us}/page/`,""],INFO:[`${pt}`,"/all"],LANGUAGES:[`${pt}`,"/languages"],BUILD_START:[`${pt}`,"/build/start"],BUILD_END:[`${pt}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${pt}`,"/distributor"],GET_SITEMAP:[`${pt}`,"/sitemap"],SOCIALS:[`${pt}`,"/socials"],GET_PAGES:[`${pt}`,"/pages?pagination=false"]},ge=class{static async getAll(){let{GET_ALL:e}=nt;return await Oe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=nt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=nt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=nt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=nt;return await Oe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=nt;return await Ir({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,o){let{GET_DISTRIBUTOR_DATA:[s,a]}=nt,c=i||e.site,d=o||e.language;return await Ir({endpoint:`${s}${c}${a}`,body:r,headers:{lang:d},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=nt;return await Oe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=nt;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Kn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:c=!1,allLanguages:d=!1,preferenceLanguage:u=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:c,allLanguages:d,preferenceLanguage:u}:s==="manual"?{mode:s,fixed:a,fullRelations:c}:s==="navigation"?{mode:s,order:n,quantity:o,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${s} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return $e(`Error: Page ${r.id} has \`hasDistributorData: true\` but it doesn't have a \`data\` prop`,"No data in ReferenceField"),[];if(Array.isArray(n.sources)&&n.sources.length<1)return $e(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:o,lang:s}=n;n.sources||$e(`Warning: Page with id: ${r.id} in the site ${o} has a ReferenceField with \`undefined\` \`data.sources\``,"Undefined data.sources in ReferenceField");let a=this.getBody(n,r);return await ge.getDistributorData(r,a,i,o,s)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,c=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let d in a){if(d==="queriedItems")continue;let p=a[d];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,c+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Qn=class{_defaultHeaders;_defaultFooters;_navigations;constructor(){this._navigations={footers:[],headers:[]},this._defaultHeaders={},this._defaultFooters={}}set navigations(e){this._navigations=e,this._defaultFooters=this.getDefaultFooters(),this._defaultHeaders=this.getDefaultHeaders()}get navigations(){return this._navigations}getDefaultFooters(){return[...this.navigations.footers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let o=e.find(s=>s.language===n&&s.navigationLanguages?.find(a=>a.navigationId===r))||e.find(s=>s.id===r);return o?{...o}:null}getPageHeader(e,r){return this.getRightLanguage(this.navigations.headers,e,r)}getPageFooter(e,r){return this.getRightLanguage(this.navigations.footers,e,r)}getPageNavigations(e){let{header:r,footer:n,language:i,template:{templateType:o},templateConfig:{defaultHeader:s,defaultFooter:a,templates:c}}=e,d=b=>{let w=b.find(x=>typeof x=="number");return typeof w=="number"?w:null},u=d([r,c?.[o]?.defaultHeader,s]),p=d([n,c?.[o]?.defaultFooter,a]),g=u?this.getPageHeader(u,i):u===0?null:this._defaultHeaders[i],m=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:g,footer:m}}};var ls=class{baseURL;settings;ENDPOINTS;constructor(){this.baseURL=process.env.API_URL,this.settings={cloudinaryName:"",useMetaTitle:!1,useMetaKeywords:!1,showBasicMetaRobots:!1,avoidHrefLangsOnCanonicals:!1,avoidSelfReferenceCanonicals:!1,avoidHrefLangXDefault:!1,avoidDebugMetas:!1},this.ENDPOINTS={settings:`${this.baseURL}/settings`,resetRender:`${this.baseURL}/debug/reset-render`}}async getAll(){let{settings:e}=this.ENDPOINTS,r=await Oe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await Ir({endpoint:e})}},fs=new ls;var gh=F(it());gh.default.config();var Rv=25;function Tv({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Po(r,1280,768):"",twitterImage:r?Po(r,1280,768):""}}function kv(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:c,metasAdvanced:d,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=d?.split(",").filter(Boolean).map(b=>b.trim().toLowerCase())||[];return{title:(r||e||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():a?p:void 0,locale:o,url:s,index:a?"index":"noindex",follow:c?"follow":"nofollow",translate:m.includes("notranslate")?"notranslate":"",metasAdvanced:m.filter(b=>b!=="notranslate").join(),pageLanguages:u,metaKeywords:g?.filter(Boolean).map(b=>b.replace(/"/g,"'")).join(", ")}}async function hs(t,e){let{id:r,title:n,fullPath:i,language:o,breadcrumb:s,socialDescription:a,socialImage:c,socialTitle:d}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:w,siteScript:x,siteSlug:A,socials:j,theme:B,navigations:{header:$,footer:V}}=e;t.breadcrumb=s,t.siteSlug=A,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let Te=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),ee=kv(t),D=Tv({socialDescription:a,socialImage:c,socialTitle:d}),q=i.compose,k=new Date().toString();return{path:q,size:void 0,context:{id:r,title:n,fullPath:i,locale:Te,languageId:o,theme:B,siteMetadata:b,pageMetadata:ee,openGraph:D,socials:j,siteLangs:m,cloudinaryName:p,siteOptions:w,griddoVersion:g,renderDate:k,siteScript:x,header:$,footer:V,page:t}}}async function yh(t,e){return await hs(t,e)}async function vh({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(c,d)=>{let u=d===0,p=d+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,id:parseInt("-"+t.id+d),fullPath:{...t.fullPath,compose:ds(m,p,{addEndingSlash:!0})},fullUrl:ds(t.fullUrl,p,{addEndingSlash:!0}),slug:ds(t.slug,p),title:mh(t.title,p),metaTitle:mh(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:o?.length},isRoot:r,defaultLang:n};return await hs(b,s)});return Promise.all(a)}function bh(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:s})=>s==="/")||i.push({});let o=i.map(async(s,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:d="/",title:u="",metaTitle:p="",metaDescription:g=""}=s,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",w=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=d?.replace(/\//g,""),j=d==="/"?x:x+"/",B=b.endsWith("/")?"":"/",$=`${b}${B}${j}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${w}/${j}`,c.fullPath.compose=$,c.slug=$,c.template.activeSectionSlug=d,c.template.activeSectionBase=w,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await hs(c,e)});return Promise.all(o)}function _h(t){return new Promise(r=>{let n=(i,o=0)=>{if(!(!i||typeof i!="object")){for(let s in i){let a=i[s],c=a||typeof a=="object",d=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!d)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Mv(t,e,r){return e?.slice(t*(r-1),t*r)}function qv(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Mv(t,e,i))}function wh(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Rv;return qv(r,e)}function ph(t){return t.replace(/\/+$/,"/")}function ds(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?ph(`${t}${i}`):ph(`${t}${n}${e}${i}`)}function mh(t,e){return!t||e<=1?t:`${t} - ${e}`}var Ft=F(require("node:path")),$r=F(_t()),Vs=F(zh());var Ob=process.env.API_URL,Ib=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,ir=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),Wh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),Vh=Y();async function Yh(t){console.info(`API URL ${Ob}`),await rt.login();let e=await ge.getAll(),r=Ib?e.filter(o=>!ir||o.id===ir):e.filter(o=>ir?o.id===ir:!!o.shouldBeUpdated);if(r.length)for(let o of r){let{items:s}=await ge.getLanguages(o.id);o.domains=s.filter(a=>a.domain&&(a.domain.slug===t||a.domain.slug===`/${t}`)).map(a=>({[a.id]:`${a.domain.slug}${a.path}`}))}let n=r.filter(o=>ir?o.id===ir:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Kh(t){for(let e of t){let r=await ge.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await ge.endSiteRender(e.id,i)}}async function Qh(t){let e=await ge.startSiteRender(t),r=await ge.getInfo(t),n=await ge.getLanguages(t),i=await ge.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:d}=e,{headers:u,footers:p}=r,g=Wh.length?Wh.filter(b=>d.includes(b)):d;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:o,defaultLang:s,headers:u,footers:p,socials:i}}async function Zh(){let{__cx:t}=Vh.paths(),{buildProcessData:e}=await ho(),r=await rt.login(),n=Object.keys(e).map(o=>({...e[o],siteId:parseInt(o)})),i={authControl:r,sites:n};$r.default.writeFileSync(Ft.default.join(t,"dist","__build-report__.json"),JSON.stringify(i)),et(`Build report saved for ${n.length} site(s)`)}async function ep(){let{sitesToPublish:t}=await ho(),{__cx:e}=Vh.paths(),r=Ft.default.join(e,"dist");for(let n of t){let{id:i,languages:o}=n;for(let s of o){rt.headers&&(rt.headers.lang=s.id.toString());let a=await ge.getSitemap(i);if(!a)continue;let{items:c,url:{home:d,domain:u}}=a;if(!d)continue;let p=n.domains.find(j=>Object.keys(j)[0]==s.id.toString());if(!p)continue;let g=Object.values(p)[0],m=[],b=Object.keys(c),w=Ft.default.join(r,g.replace(u,""));for(let j of b){let B=c[j];if(!B.length)continue;let $=(0,Vs.parse)("urlset",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation":"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"},url:B}),V=`/sitemap-${j.toLowerCase()}.xml`,ue=Ft.default.join(w,V);Jh(ue,$),m.push(`${d.endsWith("/")?d.slice(0,-1):d}${V}`)}if(!m.length)continue;let x=(0,Vs.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:m.map(j=>({loc:j}))}),A=Ft.default.join(w,"sitemap.xml");Jh(A,x)}}}function Jh(t,e){try{let r=Ft.default.dirname(t);$r.default.existsSync(r)||$r.default.mkdirSync(r,{recursive:!0}),$r.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}var tp=Y();ip.default.config();var Ab=process.env.API_URL,Fb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,rp=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Rb=process.env.PUBLIC_API_URL,Tb=new Date().valueOf().toString();async function sp(t){Wl(),console.info(`API calls with ${rp} threads`);let{__cx:e}=tp.paths(),{griddoVersion:r}=tp,n=np.default.join(e,"store");try{let i=[],o={},{sitesToPublish:s,sitesToUnpublish:a}=await Yh(t);await fs.getAll(),s.length||a.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Eo(s)}`),console.info(`Sites to unpublish: ${Eo(a)}`),await Kh(a);for(let c of s){let{id:d,slug:u,theme:p,favicon:g,changedPages:m=[],pages:b=[]}=c,{siteInfo:w,validPagesIds:x,siteHash:A,unpublishHashes:j,siteLangs:B,defaultLang:$,headers:V,footers:ue,socials:Te}=await Qh(d),{cloudinaryName:ee,useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:k,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O}=fs.settings;o[d]={siteHash:A,unpublishHashes:j,publishHashes:[]};let U=new Qn;U.navigations={headers:V,footers:ue},c.languages=B;let M=ih(d,A),P=w.siteScript,R={siteUrl:w.slug,title:w.name,favicon:g},He={baseUrl:Ab,publicBaseUrl:Rb,instance:Fb,siteSlug:u,theme:p,siteMetadata:R,socials:Te,siteLangs:B,cloudinaryName:ee,griddoVersion:r,siteOptions:{useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:k,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O},siteScript:P};et(`${c.name} site`);let Ke=async h=>{let f=[],v=await ge.getPage(h,M);if(!v)return;i.push(h);let S=JSON.parse(JSON.stringify(He));S.navigations=U.getPageNavigations(v);let _=await Kn.getDistributorData({page:v,cacheKey:Tb}),N=await _h(_),X=v?.mode==="list",W=!X&&N,Ee=!W&&!X;if(X){let fe={page:v,pages:wh(_),isRoot:!1,defaultLang:$,template:_,totalQueriedItems:_.queriedItems};f=await vh(fe,S)}if(W){let fe=v;fe.template=_,fe.multiPageElements=N,fe.defaultLang=$,f=await bh(fe,S)}if(Ee){let fe=v;fe.template=_,fe.defaultLang=$,f=[await yh(fe,S)]}v.hash!==null&&o[d].publishHashes.push(v.hash),Vl(f)},{pagesMissingInStore:le,pagesToDeleteFromStore:ye,pagesToWriteToStore:yt}=await Yl(n,{sitesToPublish:s,pages:b,validPagesIds:x,changedPages:m});Dn(ye),L(`Store site: ${c.name}`),L(`${x.length} valid pages from API`),L(`changed ${m.length} pages from API`),L(`deleted ${ye.length} pages from store`),L(`missing ${le.length} pages in store`),L(`write ${yt.length} pages to store`);let xe=(0,op.default)(rp),l=yt.map(h=>xe(()=>Ke(h)));await Promise.all(l)}Jl(n,{buildProcessData:o,createdPages:i,sitesToPublish:s})}catch(i){console.error(i.message),process.exit(1)}}async function ap(t){eh(),await sp(t),yf()}var kb=process.env.API_URL,Mb={GET_ALL:`${kb}/domains`},gi=class{static async getAll(){let{GET_ALL:e}=Mb;return await Oe({endpoint:e})}};async function cp(){await rt.login();let t=await gi.getAll();return L(`Getting domains slugs (${t.length})`),qb(t)}function qb(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var lp=Y(),{__cx:jb}=lp.paths(),up=or.default.join(jb,".render-sentinel");async function Ys(){gf("gatsby"),Br.default.writeFileSync(up,new Date().toISOString());let t=await cp();t.length||Oo(Ef);for(let e of t){let{__ssg:r,__exports:n,__caches:i,__cx:o,__components:s}=lp.paths(e);$e(`Initializing render for the domain ${e}`,"",1,0);let a=wf(e),c=!!a&&a!=="";await Be({name:"Clean",attempts:Je.clean,steps:[()=>xr(o,["store","apiCache","dist"]),()=>L("clean `store`, `apiCache` and `dist` directories from `__cx`"),()=>xr(r,["dist","public","static",".cache"]),()=>L("clean `dist`, `public`, `static` and `.cache` directories from `__ssg`"),()=>Ve("Clean LifeCycle")]}),await Be({name:"Prepare",attempts:Je.prepare,steps:[()=>On([n]),()=>L("create `exports/sites/<domain>` directory"),()=>On([i]),()=>L("create `caches/<domain>` directory"),()=>Ve("prepare LifeCycle")]}),await Be({name:"Restore",attempts:Je.restore,steps:[()=>In(s,r,["static"]),()=>L("copy `static` directory from `__components` to `__ssg`"),()=>In(n,o,["assets"]),()=>L("copy `assets` directory from `__exports` to `__cx`"),()=>In(n,r,["dist"]),()=>{Br.default.existsSync(or.default.join(r,"dist"))&&Br.default.renameSync(or.default.join(r,"dist"),or.default.join(r,"public"))},()=>L("rename `__ssg/dist` to `__ssg/public` directory."),()=>Jt(i,o,["apiCache","store"]),()=>L("move `apiCache` and `store` directories from `__caches` to `__cx`"),()=>Jt(i,r,[".cache"]),()=>L("move `.cache` directory from `__caches` to `__ssg`"),()=>Ve("Restore LifeCycle")]}),await Be({name:"Data",attempts:Je.data,steps:[()=>ap(e),()=>Ve("Data LifeCycle")]}),await Be({name:"SSG",attempts:Je.ssg,steps:[()=>Sf(a),()=>Ve("SSG LifeCycle")]}),await Be({name:"Relocation",attempts:Je.relocation,steps:[()=>xf(e,c),()=>L("create an `assets` directory from `public`"),()=>Ve("Relocation LifeCycle")]}),await Be({name:"Meta",attempts:Je.meta,steps:[()=>Zh(),()=>L("create build report from `store/metadata/render-info.json`"),()=>dh.writeFiles(e),()=>L("create Robots.txt"),()=>ep(),()=>L("generate sitemaps"),()=>Ve("Meta LifeCycle")]}),await Be({name:"Archive",attempts:Je.archive,steps:[()=>ef(),()=>L("remove virtual pages from store (multipage and static list)"),()=>go(or.default.join(o,"dist")),()=>L("remove empty site directories from `__cx/dist`"),()=>Jt(o,n,["dist","assets"],{withBackup:!0}),()=>L("move `dist` and `assets` directories from `__cx` to `__exports`"),()=>Jt(o,i,["apiCache","store"]),()=>L("move `apiCache` and `store` directories from `__cx` to `__caches`"),()=>Jt(r,i,[".cache"]),()=>L("move `.cache` directory from `__ssg` to `__caches`"),()=>Ve("Archive LifeCycle")]}),await Be({name:"Clean",attempts:Je.clean,steps:[()=>xr(r,["static","public","dist"]),()=>Ve("Clean LifeCycle")]}),await Be({name:"HealthCheck",attempts:1,steps:[()=>{Br.default.existsSync(up)||Oo(Cf)}]})}}async function fp(){try{let t=await Co(Ys);$e(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}catch(t){console.log(t),process.exit(1)}}wo();0&&(module.exports={IS_COMPONENT_LIBRARY,PROJECT_ALIASES,getBuildPagesFromCachedStore,getBuildPagesFromStore,getBuildPagesPath,getConfig,logInfo,logPageSize,resolveComponentsPath,startRender,verbose,walk});