@griddo/cx 10.4.22 → 10.4.23

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.
Files changed (42) hide show
  1. package/build/adapters/gatsby/utils.d.ts +2 -2
  2. package/build/build-complete.js +19 -19
  3. package/build/index.d.ts +2 -3
  4. package/build/index.js +29 -33
  5. package/build/react/Foo/index.d.ts +3 -0
  6. package/build/react/index.d.ts +1 -1
  7. package/build/react/index.js +1 -0
  8. package/build/reset-render.js +19 -19
  9. package/build/run-start-render.js +28 -32
  10. package/build/start-render.js +27 -31
  11. package/build/types/global.d.ts +1 -0
  12. package/build/upload-search-content.js +24 -24
  13. package/build/utils/{shared.d.ts → core-utils.d.ts} +44 -2
  14. package/build/utils/folders.d.ts +6 -1
  15. package/build/utils/store.d.ts +1 -1
  16. package/cx.config.js +7 -0
  17. package/exporter/adapters/gatsby/index.ts +60 -10
  18. package/exporter/adapters/gatsby/utils.ts +33 -32
  19. package/exporter/index.ts +6 -5
  20. package/exporter/react/Foo/index.tsx +7 -0
  21. package/exporter/react/index.tsx +3 -0
  22. package/exporter/services/distributors.ts +1 -1
  23. package/exporter/services/robots.ts +1 -1
  24. package/exporter/services/store.ts +9 -16
  25. package/exporter/start-render.ts +1 -1
  26. package/exporter/types/global.ts +1 -0
  27. package/exporter/utils/api.ts +1 -1
  28. package/exporter/utils/cache.ts +1 -1
  29. package/exporter/utils/{shared.ts → core-utils.ts} +120 -20
  30. package/exporter/utils/create-build-data.ts +1 -1
  31. package/exporter/utils/domains.ts +3 -0
  32. package/exporter/utils/folders.ts +38 -2
  33. package/exporter/utils/health-checks.ts +1 -1
  34. package/exporter/utils/searches.ts +1 -1
  35. package/exporter/utils/sites.ts +12 -18
  36. package/exporter/utils/store.ts +2 -3
  37. package/gatsby-config.ts +2 -11
  38. package/gatsby-node.ts +13 -19
  39. package/package.json +8 -5
  40. package/build/utils/temp-utils.d.ts +0 -15
  41. package/exporter/react/index.ts +0 -5
  42. package/exporter/utils/temp-utils.ts +0 -52
package/build/index.js CHANGED
@@ -1,54 +1,55 @@
1
- "use strict";var ip=Object.create;var Br=Object.defineProperty;var sp=Object.getOwnPropertyDescriptor;var op=Object.getOwnPropertyNames;var ap=Object.getPrototypeOf,cp=Object.prototype.hasOwnProperty;var Yo=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vo=(t,e)=>{for(var r in e)Br(t,r,{get:e[r],enumerable:!0})},Ko=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of op(e))!cp.call(t,i)&&i!==r&&Br(t,i,{get:()=>e[i],enumerable:!(n=sp(e,i))||n.enumerable});return t};var F=(t,e,r)=>(r=t!=null?ip(ap(t)):{},Ko(e||!t||!t.__esModule?Br(r,"default",{value:t,enumerable:!0}):r,t)),Qo=t=>Ko(Br({},"__esModule",{value:!0}),t);var Ke=y((Fb,pi)=>{var up=require("fs"),lp=require("path");function Zo(t){console.log(`[dotenv][DEBUG] ${t}`)}var fp=`
2
- `,hp=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,dp=/\\n/g,pp=/\n|\r|\r\n/;function ea(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(pp).forEach(function(i,s){let o=i.match(hp);if(o!=null){let a=o[1],c=o[2]||"",f=c.length-1,u=c[0]==='"'&&c[f]==='"';c[0]==="'"&&c[f]==="'"||u?(c=c.substring(1,f),u&&(c=c.replace(dp,fp))):c=c.trim(),n[a]=c}else r&&Zo(`did not match key and value when parsing line ${s+1}: ${i}`)}),n}function mp(t){let e=lp.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=ea(up.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?n&&Zo(`"${s}" is already defined in \`process.env\` and will not be overwritten`):process.env[s]=i[s]}),{parsed:i}}catch(i){return{error:i}}}pi.exports.config=mp;pi.exports.parse=ea});var Ee=y(mi=>{"use strict";mi.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,s)=>i!=null?n(i):r(s))})},"name",{value:t.name})};mi.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 ra=y((kb,ta)=>{var ot=require("constants"),gp=process.cwd,Ur=null,yp=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ur||(Ur=gp.call(process)),Ur};try{process.cwd()}catch{}typeof process.chdir=="function"&&(gi=process.chdir,process.chdir=function(t){Ur=null,gi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,gi));var gi;ta.exports=vp;function vp(t){ot.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(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(){}),yp==="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($){if($&&($.code==="EACCES"||$.code==="EPERM")&&Date.now()-w<6e4){setTimeout(function(){t.stat(m,function(U,q){U&&U.code==="ENOENT"?u(g,m,A):b($)})},x),x<100&&(x+=10);return}b&&b($)})}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 $;if(A&&typeof A=="function"){var U=0;$=function(q,Y,ue){if(q&&q.code==="EAGAIN"&&U<10)return U++,u.call(t,g,m,b,w,x,$);A.apply(this,arguments)}}return u.call(t,g,m,b,w,x,$)}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($){b&&b(A||$)})})})},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){f(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(!f(m))throw m}}}function s(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(w){f(w)&&(w=null),b&&b.apply(this,arguments)})}}function o(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!f(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 f(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var sa=y((Tb,ia)=>{var na=require("stream").Stream;ia.exports=bp;function bp(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);na.call(this);var s=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 o=Object.keys(i),a=0,c=o.length;a<c;a++){var f=o[a];this[f]=i[f]}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(){s._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){s.emit("error",u),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);na.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 s=Object.keys(i),o=0,a=s.length;o<a;o++){var c=s[o];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 aa=y((Mb,oa)=>{"use strict";oa.exports=wp;var _p=Object.getPrototypeOf||function(t){return t.__proto__};function wp(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:_p(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var he=y((qb,bi)=>{var z=require("fs"),Sp=ra(),xp=sa(),Ep=aa(),Xr=require("util"),ie,Hr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ie=Symbol.for("graceful-fs.queue"),Hr=Symbol.for("graceful-fs.previous")):(ie="___graceful-fs.queue",Hr="___graceful-fs.previous");function Cp(){}function la(t,e){Object.defineProperty(t,ie,{get:function(){return e}})}var yt=Cp;Xr.debuglog?yt=Xr.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(yt=function(){var t=Xr.format.apply(Xr,arguments);t="GFS4: "+t.split(/\n/).join(`
3
- GFS4: `),console.error(t)});z[ie]||(ca=global[ie]||[],la(z,ca),z.close=function(t){function e(r,n){return t.call(z,r,function(i){i||ua(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Hr,{value:t}),e}(z.close),z.closeSync=function(t){function e(r){t.apply(z,arguments),ua()}return Object.defineProperty(e,Hr,{value:t}),e}(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){yt(z[ie]),require("assert").equal(z[ie].length,0)}));var ca;global[ie]||la(global,z[ie]);bi.exports=yi(Ep(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(bi.exports=yi(z),z.__patched=!0);function yi(t){Sp(t),t.gracefulify=yi,t.createReadStream=Y,t.createWriteStream=ue;var e=t.readFile;t.readFile=r;function r(D,j,T){return typeof j=="function"&&(T=j,j=null),H(D,j,T);function H(I,X,O,B){return e(I,X,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Ft([H,[I,X,O],M,B||Date.now(),Date.now()]):typeof O=="function"&&O.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(D,j,T,H){return typeof T=="function"&&(H=T,T=null),I(D,j,T,H);function I(X,O,B,M,P){return n(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(D,j,T,H){return typeof T=="function"&&(H=T,T=null),I(D,j,T,H);function I(X,O,B,M,P){return s(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[X,O,B,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,j,T,H){return typeof T=="function"&&(H=T,T=0),I(D,j,T,H);function I(X,O,B,M,P){return a(X,O,B,function(R){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var f=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(D,j,T){typeof j=="function"&&(T=j,j=null);var H=u.test(process.version)?function(O,B,M,P){return f(O,I(O,B,M,P))}:function(O,B,M,P){return f(O,B,I(O,B,M,P))};return H(D,j,T);function I(X,O,B,M){return function(P,R){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Ft([H,[X,O,B],P,M||Date.now(),Date.now()]):(R&&R.sort&&R.sort(),typeof B=="function"&&B.call(this,P,R))}}}if(process.version.substr(0,4)==="v0.8"){var g=xp(t);A=g.ReadStream,U=g.WriteStream}var m=t.ReadStream;m&&(A.prototype=Object.create(m.prototype),A.prototype.open=$);var b=t.WriteStream;b&&(U.prototype=Object.create(b.prototype),U.prototype.open=q),Object.defineProperty(t,"ReadStream",{get:function(){return A},set:function(D){A=D},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return U},set:function(D){U=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=U;Object.defineProperty(t,"FileWriteStream",{get:function(){return x},set:function(D){x=D},enumerable:!0,configurable:!0});function A(D,j){return this instanceof A?(m.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function $(){var D=this;K(D.path,D.flags,D.mode,function(j,T){j?(D.autoClose&&D.destroy(),D.emit("error",j)):(D.fd=T,D.emit("open",T),D.read())})}function U(D,j){return this instanceof U?(b.apply(this,arguments),this):U.apply(Object.create(U.prototype),arguments)}function q(){var D=this;K(D.path,D.flags,D.mode,function(j,T){j?(D.destroy(),D.emit("error",j)):(D.fd=T,D.emit("open",T))})}function Y(D,j){return new t.ReadStream(D,j)}function ue(D,j){return new t.WriteStream(D,j)}var ye=t.open;t.open=K;function K(D,j,T,H){return typeof T=="function"&&(H=T,T=null),I(D,j,T,H);function I(X,O,B,M,P){return ye(X,O,B,function(R,Be){R&&(R.code==="EMFILE"||R.code==="ENFILE")?Ft([I,[X,O,B,M],R,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Ft(t){yt("ENQUEUE",t[0].name,t[1]),z[ie].push(t),vi()}var Gr;function ua(){for(var t=Date.now(),e=0;e<z[ie].length;++e)z[ie][e].length>2&&(z[ie][e][3]=t,z[ie][e][4]=t);vi()}function vi(){if(clearTimeout(Gr),Gr=void 0,z[ie].length!==0){var t=z[ie].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)yt("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){yt("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,c=Math.max(s-i,1),f=Math.min(c*1.2,100);a>=f?(yt("RETRY",e.name,r),e.apply(null,r.concat([i]))):z[ie].push(t)}Gr===void 0&&(Gr=setTimeout(vi,0))}}});var ir=y(at=>{"use strict";var fa=Ee().fromCallback,be=he(),Pp=["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 be[t]=="function");Object.keys(be).forEach(t=>{t!=="promises"&&(at[t]=be[t])});Pp.forEach(t=>{at[t]=fa(be[t])});at.exists=function(t,e){return typeof e=="function"?be.exists(t,e):new Promise(r=>be.exists(t,r))};at.read=function(t,e,r,n,i,s){return typeof s=="function"?be.read(t,e,r,n,i,s):new Promise((o,a)=>{be.read(t,e,r,n,i,(c,f,u)=>{if(c)return a(c);o({bytesRead:f,buffer:u})})})};at.write=function(t,e,...r){return typeof r[r.length-1]=="function"?be.write(t,e,...r):new Promise((n,i)=>{be.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof be.writev=="function"&&(at.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?be.writev(t,e,...r):new Promise((n,i)=>{be.writev(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})});typeof be.realpath.native=="function"&&(at.realpath.native=fa(be.realpath.native))});var _i=y((Nb,ha)=>{ha.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 ya=y((Lb,wi)=>{"use strict";var Rt=ir(),Qe=require("path"),Dp=_i(),da=Dp("10.12.0"),pa=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}},ma=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},ga=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};wi.exports.makeDir=async(t,e)=>{if(pa(t),e=ma(e),da){let n=Qe.resolve(t);return Rt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Rt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Qe.dirname(n)===n)throw ga(n);if(i.message.includes("null bytes"))throw i;return await r(Qe.dirname(n)),r(n)}try{if(!(await Rt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Qe.resolve(t))};wi.exports.makeDirSync=(t,e)=>{if(pa(t),e=ma(e),da){let n=Qe.resolve(t);return Rt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Rt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Qe.dirname(n)===n)throw ga(n);if(i.message.includes("null bytes"))throw i;return r(Qe.dirname(n)),r(n)}try{if(!Rt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Qe.resolve(t))}});var Me=y(($b,va)=>{"use strict";var Op=Ee().fromPromise,{makeDir:Ip,makeDirSync:Si}=ya(),xi=Op(Ip);va.exports={mkdirs:xi,mkdirsSync:Si,mkdirp:xi,mkdirpSync:Si,ensureDir:xi,ensureDirSync:Si}});var Ei=y((Bb,ba)=>{"use strict";var kt=he();function Ap(t,e,r,n){kt.open(t,"r+",(i,s)=>{if(i)return n(i);kt.futimes(s,e,r,o=>{kt.close(s,a=>{n&&n(o||a)})})})}function Fp(t,e,r){let n=kt.openSync(t,"r+");return kt.futimesSync(n,e,r),kt.closeSync(n)}ba.exports={utimesMillis:Ap,utimesMillisSync:Fp}});var sr=y((Ub,xa)=>{"use strict";var Tt=ir(),Ce=require("path"),Rp=require("util"),kp=_i(),Jr=kp("10.5.0"),_a=t=>Jr?Tt.stat(t,{bigint:!0}):Tt.stat(t),Ci=t=>Jr?Tt.statSync(t,{bigint:!0}):Tt.statSync(t);function Tp(t,e){return Promise.all([_a(t),_a(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function Mp(t,e){let r,n=Ci(t);try{r=Ci(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function qp(t,e,r,n){Rp.callbackify(Tp)(t,e,(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;return a&&zr(o,a)?n(new Error("Source and destination must not be the same.")):o.isDirectory()&&Pi(t,e)?n(new Error(Wr(t,e,r))):n(null,{srcStat:o,destStat:a})})}function jp(t,e,r){let{srcStat:n,destStat:i}=Mp(t,e);if(i&&zr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Pi(t,e))throw new Error(Wr(t,e,r));return{srcStat:n,destStat:i}}function wa(t,e,r,n,i){let s=Ce.resolve(Ce.dirname(t)),o=Ce.resolve(Ce.dirname(r));if(o===s||o===Ce.parse(o).root)return i();let a=(c,f)=>c?c.code==="ENOENT"?i():i(c):zr(e,f)?i(new Error(Wr(t,r,n))):wa(t,e,o,n,i);Jr?Tt.stat(o,{bigint:!0},a):Tt.stat(o,a)}function Sa(t,e,r,n){let i=Ce.resolve(Ce.dirname(t)),s=Ce.resolve(Ce.dirname(r));if(s===i||s===Ce.parse(s).root)return;let o;try{o=Ci(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(zr(e,o))throw new Error(Wr(t,r,n));return Sa(t,e,s,n)}function zr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(Jr||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 Pi(t,e){let r=Ce.resolve(t).split(Ce.sep).filter(i=>i),n=Ce.resolve(e).split(Ce.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function Wr(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}xa.exports={checkPaths:qp,checkPathsSync:jp,checkParentPaths:wa,checkParentPathsSync:Sa,isSrcSubdir:Pi}});var Oa=y((Xb,Da)=>{"use strict";var de=he(),or=require("path"),Np=Me().mkdirsSync,Lp=Ei().utimesMillisSync,ar=sr();function $p(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 sp=Object.create;var Br=Object.defineProperty;var op=Object.getOwnPropertyDescriptor;var ap=Object.getOwnPropertyNames;var cp=Object.getPrototypeOf,up=Object.prototype.hasOwnProperty;var Vo=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yo=(t,e)=>{for(var r in e)Br(t,r,{get:e[r],enumerable:!0})},Ko=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ap(e))!up.call(t,i)&&i!==r&&Br(t,i,{get:()=>e[i],enumerable:!(n=op(e,i))||n.enumerable});return t};var F=(t,e,r)=>(r=t!=null?sp(cp(t)):{},Ko(e||!t||!t.__esModule?Br(r,"default",{value:t,enumerable:!0}):r,t)),Qo=t=>Ko(Br({},"__esModule",{value:!0}),t);var tt=y((kb,mi)=>{var lp=require("fs"),fp=require("path");function Zo(t){console.log(`[dotenv][DEBUG] ${t}`)}var dp=`
2
+ `,hp=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,pp=/\\n/g,mp=/\n|\r|\r\n/;function ea(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(mp).forEach(function(i,s){let o=i.match(hp);if(o!=null){let a=o[1],c=o[2]||"",f=c.length-1,u=c[0]==='"'&&c[f]==='"';c[0]==="'"&&c[f]==="'"||u?(c=c.substring(1,f),u&&(c=c.replace(pp,dp))):c=c.trim(),n[a]=c}else r&&Zo(`did not match key and value when parsing line ${s+1}: ${i}`)}),n}function gp(t){let e=fp.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=ea(lp.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?n&&Zo(`"${s}" is already defined in \`process.env\` and will not be overwritten`):process.env[s]=i[s]}),{parsed:i}}catch(i){return{error:i}}}mi.exports.config=gp;mi.exports.parse=ea});var Ce=y(gi=>{"use strict";gi.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,s)=>i!=null?n(i):r(s))})},"name",{value:t.name})};gi.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 ra=y((Mb,ta)=>{var rt=require("constants"),yp=process.cwd,Ur=null,vp=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ur||(Ur=yp.call(process)),Ur};try{process.cwd()}catch{}typeof process.chdir=="function"&&(yi=process.chdir,process.chdir=function(t){Ur=null,yi.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,yi));var yi;ta.exports=bp;function bp(t){rt.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(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(){}),vp==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function p(g,m,b){var S=Date.now(),x=0;u(g,m,function A(N){if(N&&(N.code==="EACCES"||N.code==="EPERM")&&Date.now()-S<6e4){setTimeout(function(){t.stat(m,function(B,$){B&&B.code==="ENOENT"?u(g,m,A):b(N)})},x),x<100&&(x+=10);return}b&&b(N)})}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,S,x,A){var N;if(A&&typeof A=="function"){var B=0;N=function($,V,le){if($&&$.code==="EAGAIN"&&B<10)return B++,u.call(t,g,m,b,S,x,N);A.apply(this,arguments)}}return u.call(t,g,m,b,S,x,N)}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,S){for(var x=0;;)try{return u.call(t,p,g,m,b,S)}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,rt.O_WRONLY|rt.O_SYMLINK,g,function(b,S){if(b){m&&m(b);return}u.fchmod(S,g,function(x){u.close(S,function(A){m&&m(x||A)})})})},u.lchmodSync=function(p,g){var m=u.openSync(p,rt.O_WRONLY|rt.O_SYMLINK,g),b=!0,S;try{S=u.fchmodSync(m,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return S}}function r(u){rt.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(p,g,m,b){u.open(p,rt.O_SYMLINK,function(S,x){if(S){b&&b(S);return}u.futimes(x,g,m,function(A){u.close(x,function(N){b&&b(A||N)})})})},u.lutimesSync=function(p,g,m){var b=u.openSync(p,rt.O_SYMLINK),S,x=!0;try{S=u.futimesSync(b,g,m),x=!1}finally{if(x)try{u.closeSync(b)}catch{}else u.closeSync(b)}return S}):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){f(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(!f(m))throw m}}}function s(u){return u&&function(p,g,m,b){return u.call(t,p,g,m,function(S){f(S)&&(S=null),b&&b.apply(this,arguments)})}}function o(u){return u&&function(p,g,m){try{return u.call(t,p,g,m)}catch(b){if(!f(b))throw b}}}function a(u){return u&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(S,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 f(u){if(!u||u.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var sa=y((qb,ia)=>{var na=require("stream").Stream;ia.exports=_p;function _p(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);na.call(this);var s=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 o=Object.keys(i),a=0,c=o.length;a<c;a++){var f=o[a];this[f]=i[f]}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(){s._read()});return}t.open(this.path,this.flags,this.mode,function(u,p){if(u){s.emit("error",u),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);na.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 s=Object.keys(i),o=0,a=s.length;o<a;o++){var c=s[o];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 aa=y((jb,oa)=>{"use strict";oa.exports=Sp;var wp=Object.getPrototypeOf||function(t){return t.__proto__};function Sp(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:wp(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var fe=y((Nb,_i)=>{var J=require("fs"),xp=ra(),Ep=sa(),Cp=aa(),Xr=require("util"),se,Hr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(se=Symbol.for("graceful-fs.queue"),Hr=Symbol.for("graceful-fs.previous")):(se="___graceful-fs.queue",Hr="___graceful-fs.previous");function Pp(){}function la(t,e){Object.defineProperty(t,se,{get:function(){return e}})}var vt=Pp;Xr.debuglog?vt=Xr.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vt=function(){var t=Xr.format.apply(Xr,arguments);t="GFS4: "+t.split(/\n/).join(`
3
+ GFS4: `),console.error(t)});J[se]||(ca=global[se]||[],la(J,ca),J.close=function(t){function e(r,n){return t.call(J,r,function(i){i||ua(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Hr,{value:t}),e}(J.close),J.closeSync=function(t){function e(r){t.apply(J,arguments),ua()}return Object.defineProperty(e,Hr,{value:t}),e}(J.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vt(J[se]),require("assert").equal(J[se].length,0)}));var ca;global[se]||la(global,J[se]);_i.exports=vi(Cp(J));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!J.__patched&&(_i.exports=vi(J),J.__patched=!0);function vi(t){xp(t),t.gracefulify=vi,t.createReadStream=V,t.createWriteStream=le;var e=t.readFile;t.readFile=r;function r(D,q,T){return typeof q=="function"&&(T=q,q=null),z(D,q,T);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,T,z){return typeof T=="function"&&(z=T,T=null),I(D,q,T,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 s=t.appendFile;s&&(t.appendFile=o);function o(D,q,T,z){return typeof T=="function"&&(z=T,T=null),I(D,q,T,z);function I(G,O,U,M,P){return s(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,T,z){return typeof T=="function"&&(z=T,T=0),I(D,q,T,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 f=t.readdir;t.readdir=p;var u=/^v[0-5]\./;function p(D,q,T){typeof q=="function"&&(T=q,q=null);var z=u.test(process.version)?function(O,U,M,P){return f(O,I(O,U,M,P))}:function(O,U,M,P){return f(O,U,I(O,U,M,P))};return z(D,q,T);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=Ep(t);A=g.ReadStream,B=g.WriteStream}var m=t.ReadStream;m&&(A.prototype=Object.create(m.prototype),A.prototype.open=N);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 S=A;Object.defineProperty(t,"FileReadStream",{get:function(){return S},set:function(D){S=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 N(){var D=this;te(D.path,D.flags,D.mode,function(q,T){q?(D.autoClose&&D.destroy(),D.emit("error",q)):(D.fd=T,D.emit("open",T),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;te(D.path,D.flags,D.mode,function(q,T){q?(D.destroy(),D.emit("error",q)):(D.fd=T,D.emit("open",T))})}function V(D,q){return new t.ReadStream(D,q)}function le(D,q){return new t.WriteStream(D,q)}var ke=t.open;t.open=te;function te(D,q,T,z){return typeof T=="function"&&(z=T,T=null),I(D,q,T,z);function I(G,O,U,M,P){return ke(G,O,U,function(R,Ue){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[se].push(t),bi()}var Gr;function ua(){for(var t=Date.now(),e=0;e<J[se].length;++e)J[se][e].length>2&&(J[se][e][3]=t,J[se][e][4]=t);bi()}function bi(){if(clearTimeout(Gr),Gr=void 0,J[se].length!==0){var t=J[se].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=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 o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,c=Math.max(s-i,1),f=Math.min(c*1.2,100);a>=f?(vt("RETRY",e.name,r),e.apply(null,r.concat([i]))):J[se].push(t)}Gr===void 0&&(Gr=setTimeout(bi,0))}}});var sr=y(nt=>{"use strict";var fa=Ce().fromCallback,be=fe(),Dp=["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 be[t]=="function");Object.keys(be).forEach(t=>{t!=="promises"&&(nt[t]=be[t])});Dp.forEach(t=>{nt[t]=fa(be[t])});nt.exists=function(t,e){return typeof e=="function"?be.exists(t,e):new Promise(r=>be.exists(t,r))};nt.read=function(t,e,r,n,i,s){return typeof s=="function"?be.read(t,e,r,n,i,s):new Promise((o,a)=>{be.read(t,e,r,n,i,(c,f,u)=>{if(c)return a(c);o({bytesRead:f,buffer:u})})})};nt.write=function(t,e,...r){return typeof r[r.length-1]=="function"?be.write(t,e,...r):new Promise((n,i)=>{be.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof be.writev=="function"&&(nt.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?be.writev(t,e,...r):new Promise((n,i)=>{be.writev(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})});typeof be.realpath.native=="function"&&(nt.realpath.native=fa(be.realpath.native))});var wi=y(($b,da)=>{da.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 ya=y((Bb,Si)=>{"use strict";var kt=sr(),Ve=require("path"),Op=wi(),ha=Op("10.12.0"),pa=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Ve.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},ma=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},ga=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};Si.exports.makeDir=async(t,e)=>{if(pa(t),e=ma(e),ha){let n=Ve.resolve(t);return kt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await kt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw ga(n);if(i.message.includes("null bytes"))throw i;return await r(Ve.dirname(n)),r(n)}try{if(!(await kt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))};Si.exports.makeDirSync=(t,e)=>{if(pa(t),e=ma(e),ha){let n=Ve.resolve(t);return kt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{kt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Ve.dirname(n)===n)throw ga(n);if(i.message.includes("null bytes"))throw i;return r(Ve.dirname(n)),r(n)}try{if(!kt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Ve.resolve(t))}});var qe=y((Ub,va)=>{"use strict";var Ip=Ce().fromPromise,{makeDir:Ap,makeDirSync:xi}=ya(),Ei=Ip(Ap);va.exports={mkdirs:Ei,mkdirsSync:xi,mkdirp:Ei,mkdirpSync:xi,ensureDir:Ei,ensureDirSync:xi}});var Ci=y((Xb,ba)=>{"use strict";var Tt=fe();function Fp(t,e,r,n){Tt.open(t,"r+",(i,s)=>{if(i)return n(i);Tt.futimes(s,e,r,o=>{Tt.close(s,a=>{n&&n(o||a)})})})}function Rp(t,e,r){let n=Tt.openSync(t,"r+");return Tt.futimesSync(n,e,r),Tt.closeSync(n)}ba.exports={utimesMillis:Fp,utimesMillisSync:Rp}});var or=y((Gb,xa)=>{"use strict";var Mt=sr(),Pe=require("path"),kp=require("util"),Tp=wi(),zr=Tp("10.5.0"),_a=t=>zr?Mt.stat(t,{bigint:!0}):Mt.stat(t),Pi=t=>zr?Mt.statSync(t,{bigint:!0}):Mt.statSync(t);function Mp(t,e){return Promise.all([_a(t),_a(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function qp(t,e){let r,n=Pi(t);try{r=Pi(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function jp(t,e,r,n){kp.callbackify(Mp)(t,e,(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;return a&&Wr(o,a)?n(new Error("Source and destination must not be the same.")):o.isDirectory()&&Di(t,e)?n(new Error(Jr(t,e,r))):n(null,{srcStat:o,destStat:a})})}function Np(t,e,r){let{srcStat:n,destStat:i}=qp(t,e);if(i&&Wr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Di(t,e))throw new Error(Jr(t,e,r));return{srcStat:n,destStat:i}}function wa(t,e,r,n,i){let s=Pe.resolve(Pe.dirname(t)),o=Pe.resolve(Pe.dirname(r));if(o===s||o===Pe.parse(o).root)return i();let a=(c,f)=>c?c.code==="ENOENT"?i():i(c):Wr(e,f)?i(new Error(Jr(t,r,n))):wa(t,e,o,n,i);zr?Mt.stat(o,{bigint:!0},a):Mt.stat(o,a)}function Sa(t,e,r,n){let i=Pe.resolve(Pe.dirname(t)),s=Pe.resolve(Pe.dirname(r));if(s===i||s===Pe.parse(s).root)return;let o;try{o=Pi(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(Wr(e,o))throw new Error(Jr(t,r,n));return Sa(t,e,s,n)}function Wr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(zr||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 Di(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,s,o)=>i&&n[o]===s,!0)}function Jr(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}xa.exports={checkPaths:jp,checkPathsSync:Np,checkParentPaths:wa,checkParentPathsSync:Sa,isSrcSubdir:Di}});var Oa=y((Hb,Da)=>{"use strict";var de=fe(),ar=require("path"),Lp=qe().mkdirsSync,$p=Ci().utimesMillisSync,cr=or();function Bp(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}=ar.checkPathsSync(t,e,"copy");return ar.checkParentPathsSync(t,n,e,"copy"),Bp(i,t,e,r)}function Bp(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=or.dirname(r);return de.existsSync(i)||Np(i),Ea(t,e,r,n)}function Ea(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return Up(t,e,r,n)}function Up(t,e,r,n){let s=(n.dereference?de.statSync:de.lstatSync)(e);if(s.isDirectory())return Yp(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Xp(s,t,e,r,n);if(s.isSymbolicLink())return Qp(t,e,r,n)}function Xp(t,e,r,n,i){return e?Gp(t,r,n,i):Ca(t,r,n,i)}function Gp(t,e,r,n){if(n.overwrite)return de.unlinkSync(r),Ca(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Ca(t,e,r,n){return de.copyFileSync(e,r),n.preserveTimestamps&&Hp(t.mode,e,r),Di(r,t.mode)}function Hp(t,e,r){return Jp(t)&&zp(r,t),Wp(e,r)}function Jp(t){return(t&128)===0}function zp(t,e){return Di(t,e|128)}function Di(t,e){return de.chmodSync(t,e)}function Wp(t,e){let r=de.statSync(t);return Lp(e,r.atime,r.mtime)}function Yp(t,e,r,n,i){if(!e)return Vp(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Pa(r,n,i)}function Vp(t,e,r,n){return de.mkdirSync(r),Pa(e,r,n),Di(r,t)}function Pa(t,e,r){de.readdirSync(t).forEach(n=>Kp(n,t,e,r))}function Kp(t,e,r,n){let i=or.join(e,t),s=or.join(r,t),{destStat:o}=ar.checkPathsSync(i,s,"copy");return Ea(o,i,s,n)}function Qp(t,e,r,n){let i=de.readlinkSync(e);if(n.dereference&&(i=or.resolve(process.cwd(),i)),t){let s;try{s=de.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return de.symlinkSync(i,r);throw o}if(n.dereference&&(s=or.resolve(process.cwd(),s)),ar.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(de.statSync(r).isDirectory()&&ar.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return Zp(i,r)}else return de.symlinkSync(i,r)}function Zp(t,e){return de.unlinkSync(e),de.symlinkSync(t,e)}Da.exports=$p});var Oi=y((Gb,Ia)=>{"use strict";Ia.exports={copySync:Oa()}});var ct=y((Hb,Fa)=>{"use strict";var e0=Ee().fromPromise,Aa=ir();function t0(t){return Aa.access(t).then(()=>!0).catch(()=>!1)}Fa.exports={pathExists:e0(t0),pathExistsSync:Aa.existsSync}});var $a=y((Jb,La)=>{"use strict";var Pe=he(),cr=require("path"),r0=Me().mkdirs,n0=ct().pathExists,i0=Ei().utimesMillis,ur=sr();function s0(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}=cr.checkPathsSync(t,e,"copy");return cr.checkParentPathsSync(t,n,e,"copy"),Up(i,t,e,r)}function Up(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=ar.dirname(r);return de.existsSync(i)||Lp(i),Ea(t,e,r,n)}function Ea(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return Xp(t,e,r,n)}function Xp(t,e,r,n){let s=(n.dereference?de.statSync:de.lstatSync)(e);if(s.isDirectory())return Yp(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Gp(s,t,e,r,n);if(s.isSymbolicLink())return Zp(t,e,r,n)}function Gp(t,e,r,n,i){return e?Hp(t,r,n,i):Ca(t,r,n,i)}function Hp(t,e,r,n){if(n.overwrite)return de.unlinkSync(r),Ca(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Ca(t,e,r,n){return de.copyFileSync(e,r),n.preserveTimestamps&&zp(t.mode,e,r),Oi(r,t.mode)}function zp(t,e,r){return Wp(t)&&Jp(r,t),Vp(e,r)}function Wp(t){return(t&128)===0}function Jp(t,e){return Oi(t,e|128)}function Oi(t,e){return de.chmodSync(t,e)}function Vp(t,e){let r=de.statSync(t);return $p(e,r.atime,r.mtime)}function Yp(t,e,r,n,i){if(!e)return Kp(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return Pa(r,n,i)}function Kp(t,e,r,n){return de.mkdirSync(r),Pa(e,r,n),Oi(r,t)}function Pa(t,e,r){de.readdirSync(t).forEach(n=>Qp(n,t,e,r))}function Qp(t,e,r,n){let i=ar.join(e,t),s=ar.join(r,t),{destStat:o}=cr.checkPathsSync(i,s,"copy");return Ea(o,i,s,n)}function Zp(t,e,r,n){let i=de.readlinkSync(e);if(n.dereference&&(i=ar.resolve(process.cwd(),i)),t){let s;try{s=de.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return de.symlinkSync(i,r);throw o}if(n.dereference&&(s=ar.resolve(process.cwd(),s)),cr.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(de.statSync(r).isDirectory()&&cr.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return e0(i,r)}else return de.symlinkSync(i,r)}function e0(t,e){return de.unlinkSync(e),de.symlinkSync(t,e)}Da.exports=Bp});var Ii=y((zb,Ia)=>{"use strict";Ia.exports={copySync:Oa()}});var it=y((Wb,Fa)=>{"use strict";var t0=Ce().fromPromise,Aa=sr();function r0(t){return Aa.access(t).then(()=>!0).catch(()=>!1)}Fa.exports={pathExists:t0(r0),pathExistsSync:Aa.existsSync}});var $a=y((Jb,La)=>{"use strict";var De=fe(),ur=require("path"),n0=qe().mkdirs,i0=it().pathExists,s0=Ci().utimesMillis,lr=or();function o0(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`),ur.checkPaths(t,e,"copy",(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;ur.checkParentPaths(t,o,e,"copy",c=>c?n(c):r.filter?Ma(Ra,a,t,e,r,n):Ra(a,t,e,r,n))})}function Ra(t,e,r,n,i){let s=cr.dirname(r);n0(s,(o,a)=>{if(o)return i(o);if(a)return Ii(t,e,r,n,i);r0(s,c=>c?i(c):Ii(t,e,r,n,i))})}function Ma(t,e,r,n,i,s){Promise.resolve(i.filter(r,n)).then(o=>o?t(e,r,n,i,s):s(),o=>s(o))}function Ii(t,e,r,n,i){return n.filter?Ma(ka,t,e,r,n,i):ka(t,e,r,n,i)}function ka(t,e,r,n,i){(n.dereference?Pe.stat:Pe.lstat)(e,(o,a)=>{if(o)return i(o);if(a.isDirectory())return h0(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return o0(a,t,e,r,n,i);if(a.isSymbolicLink())return m0(t,e,r,n,i)})}function o0(t,e,r,n,i,s){return e?a0(t,r,n,i,s):qa(t,r,n,i,s)}function a0(t,e,r,n,i){if(n.overwrite)Pe.unlink(r,s=>s?i(s):qa(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function qa(t,e,r,n,i){Pe.copyFile(e,r,s=>s?i(s):n.preserveTimestamps?c0(t.mode,e,r,i):Yr(r,t.mode,i))}function c0(t,e,r,n){return u0(t)?l0(r,t,i=>i?n(i):Ta(t,e,r,n)):Ta(t,e,r,n)}function u0(t){return(t&128)===0}function l0(t,e,r){return Yr(t,e|128,r)}function Ta(t,e,r,n){f0(e,r,i=>i?n(i):Yr(r,t,n))}function Yr(t,e,r){return Pe.chmod(t,e,r)}function f0(t,e,r){Pe.stat(t,(n,i)=>n?r(n):i0(e,i.atime,i.mtime,r))}function h0(t,e,r,n,i,s){return e?e&&!e.isDirectory()?s(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):ja(r,n,i,s):d0(t.mode,r,n,i,s)}function d0(t,e,r,n,i){Pe.mkdir(r,s=>{if(s)return i(s);ja(e,r,n,o=>o?i(o):Yr(r,t,i))})}function ja(t,e,r,n){Pe.readdir(t,(i,s)=>i?n(i):Na(s,t,e,r,n))}function Na(t,e,r,n,i){let s=t.pop();return s?p0(t,s,e,r,n,i):i()}function p0(t,e,r,n,i,s){let o=cr.join(r,e),a=cr.join(n,e);ur.checkPaths(o,a,"copy",(c,f)=>{if(c)return s(c);let{destStat:u}=f;Ii(u,o,a,i,p=>p?s(p):Na(t,r,n,i,s))})}function m0(t,e,r,n,i){Pe.readlink(e,(s,o)=>{if(s)return i(s);if(n.dereference&&(o=cr.resolve(process.cwd(),o)),t)Pe.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Pe.symlink(o,r,i):i(a):(n.dereference&&(c=cr.resolve(process.cwd(),c)),ur.isSrcSubdir(o,c)?i(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&ur.isSrcSubdir(c,o)?i(new Error(`Cannot overwrite '${c}' with '${o}'.`)):g0(o,r,i)));else return Pe.symlink(o,r,i)})}function g0(t,e,r){Pe.unlink(e,n=>n?r(n):Pe.symlink(t,e,r))}La.exports=s0});var Ai=y((zb,Ba)=>{"use strict";var y0=Ee().fromCallback;Ba.exports={copy:y0($a())}});var Va=y((Wb,Ya)=>{"use strict";var Ua=he(),Ja=require("path"),G=require("assert"),lr=process.platform==="win32";function za(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ua[r],r=r+"Sync",t[r]=t[r]||Ua[r]}),t.maxBusyTries=t.maxBusyTries||3}function Fi(t,e,r){let n=0;typeof e=="function"&&(r=e,e={}),G(t,"rimraf: missing path"),G.strictEqual(typeof t,"string","rimraf: path should be a string"),G.strictEqual(typeof r,"function","rimraf: callback function required"),G(e,"rimraf: invalid options argument provided"),G.strictEqual(typeof e,"object","rimraf: options should be object"),za(e),Xa(t,e,function i(s){if(s){if((s.code==="EBUSY"||s.code==="ENOTEMPTY"||s.code==="EPERM")&&n<e.maxBusyTries){n++;let o=n*100;return setTimeout(()=>Xa(t,e,i),o)}s.code==="ENOENT"&&(s=null)}r(s)})}function Xa(t,e,r){G(t),G(e),G(typeof r=="function"),e.lstat(t,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&lr)return Ga(t,e,n,r);if(i&&i.isDirectory())return Vr(t,e,n,r);e.unlink(t,s=>{if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return lr?Ga(t,e,s,r):Vr(t,e,s,r);if(s.code==="EISDIR")return Vr(t,e,s,r)}return r(s)})})}function Ga(t,e,r,n){G(t),G(e),G(typeof n=="function"),e.chmod(t,438,i=>{i?n(i.code==="ENOENT"?null:r):e.stat(t,(s,o)=>{s?n(s.code==="ENOENT"?null:r):o.isDirectory()?Vr(t,e,r,n):e.unlink(t,n)})})}function Ha(t,e,r){let n;G(t),G(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()?Kr(t,e,r):e.unlinkSync(t)}function Vr(t,e,r,n){G(t),G(e),G(typeof n=="function"),e.rmdir(t,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?v0(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function v0(t,e,r){G(t),G(e),G(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let s=i.length,o;if(s===0)return e.rmdir(t,r);i.forEach(a=>{Fi(Ja.join(t,a),e,c=>{if(!o){if(c)return r(o=c);--s===0&&e.rmdir(t,r)}})})})}function Wa(t,e){let r;e=e||{},za(e),G(t,"rimraf: missing path"),G.strictEqual(typeof t,"string","rimraf: path should be a string"),G(e,"rimraf: missing options"),G.strictEqual(typeof e,"object","rimraf: options should be object");try{r=e.lstatSync(t)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&lr&&Ha(t,e,n)}try{r&&r.isDirectory()?Kr(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return lr?Ha(t,e,n):Kr(t,e,n);if(n.code!=="EISDIR")throw n;Kr(t,e,n)}}function Kr(t,e,r){G(t),G(e);try{e.rmdirSync(t)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")b0(t,e);else if(n.code!=="ENOENT")throw n}}function b0(t,e){if(G(t),G(e),e.readdirSync(t).forEach(r=>Wa(Ja.join(t,r),e)),lr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Ya.exports=Fi;Fi.sync=Wa});var fr=y((Yb,Qa)=>{"use strict";var _0=Ee().fromCallback,Ka=Va();Qa.exports={remove:_0(Ka),removeSync:Ka.sync}});var oc=y((Vb,sc)=>{"use strict";var w0=Ee().fromCallback,tc=he(),rc=require("path"),nc=Me(),ic=fr(),Za=w0(function(e,r){r=r||function(){},tc.readdir(e,(n,i)=>{if(n)return nc.mkdirs(e,r);i=i.map(o=>rc.join(e,o)),s();function s(){let o=i.pop();if(!o)return r();ic.remove(o,a=>{if(a)return r(a);s()})}})});function ec(t){let e;try{e=tc.readdirSync(t)}catch{return nc.mkdirsSync(t)}e.forEach(r=>{r=rc.join(t,r),ic.removeSync(r)})}sc.exports={emptyDirSync:ec,emptydirSync:ec,emptyDir:Za,emptydir:Za}});var lc=y((Kb,uc)=>{"use strict";var S0=Ee().fromCallback,ac=require("path"),ut=he(),cc=Me();function x0(t,e){function r(){ut.writeFile(t,"",n=>{if(n)return e(n);e()})}ut.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let s=ac.dirname(t);ut.stat(s,(o,a)=>{if(o)return o.code==="ENOENT"?cc.mkdirs(s,c=>{if(c)return e(c);r()}):e(o);a.isDirectory()?r():ut.readdir(s,c=>{if(c)return e(c)})})})}function E0(t){let e;try{e=ut.statSync(t)}catch{}if(e&&e.isFile())return;let r=ac.dirname(t);try{ut.statSync(r).isDirectory()||ut.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")cc.mkdirsSync(r);else throw n}ut.writeFileSync(t,"")}uc.exports={createFile:S0(x0),createFileSync:E0}});var mc=y((Qb,pc)=>{"use strict";var C0=Ee().fromCallback,hc=require("path"),vt=he(),dc=Me(),fc=ct().pathExists;function P0(t,e,r){function n(i,s){vt.link(i,s,o=>{if(o)return r(o);r(null)})}fc(e,(i,s)=>{if(i)return r(i);if(s)return r(null);vt.lstat(t,o=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),r(o);let a=hc.dirname(e);fc(a,(c,f)=>{if(c)return r(c);if(f)return n(t,e);dc.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function D0(t,e){if(vt.existsSync(e))return;try{vt.lstatSync(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=hc.dirname(e);return vt.existsSync(n)||dc.mkdirsSync(n),vt.linkSync(t,e)}pc.exports={createLink:C0(P0),createLinkSync:D0}});var yc=y((Zb,gc)=>{"use strict";var lt=require("path"),hr=he(),O0=ct().pathExists;function I0(t,e,r){if(lt.isAbsolute(t))return hr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=lt.dirname(e),i=lt.join(n,t);return O0(i,(s,o)=>s?r(s):o?r(null,{toCwd:i,toDst:t}):hr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:lt.relative(n,t)})))}}function A0(t,e){let r;if(lt.isAbsolute(t)){if(r=hr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=lt.dirname(e),i=lt.join(n,t);if(r=hr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=hr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:lt.relative(n,t)}}}gc.exports={symlinkPaths:I0,symlinkPathsSync:A0}});var _c=y((e2,bc)=>{"use strict";var vc=he();function F0(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);vc.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function R0(t,e){let r;if(e)return e;try{r=vc.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}bc.exports={symlinkType:F0,symlinkTypeSync:R0}});var Dc=y((t2,Pc)=>{"use strict";var k0=Ee().fromCallback,Sc=require("path"),Mt=he(),xc=Me(),T0=xc.mkdirs,M0=xc.mkdirsSync,Ec=yc(),q0=Ec.symlinkPaths,j0=Ec.symlinkPathsSync,Cc=_c(),N0=Cc.symlinkType,L0=Cc.symlinkTypeSync,wc=ct().pathExists;function $0(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,wc(e,(i,s)=>{if(i)return n(i);if(s)return n(null);q0(t,e,(o,a)=>{if(o)return n(o);t=a.toDst,N0(a.toCwd,r,(c,f)=>{if(c)return n(c);let u=Sc.dirname(e);wc(u,(p,g)=>{if(p)return n(p);if(g)return Mt.symlink(t,e,f,n);T0(u,m=>{if(m)return n(m);Mt.symlink(t,e,f,n)})})})})})}function B0(t,e,r){if(Mt.existsSync(e))return;let i=j0(t,e);t=i.toDst,r=L0(i.toCwd,r);let s=Sc.dirname(e);return Mt.existsSync(s)||M0(s),Mt.symlinkSync(t,e,r)}Pc.exports={createSymlink:k0($0),createSymlinkSync:B0}});var Ic=y((r2,Oc)=>{"use strict";var Qr=lc(),Zr=mc(),en=Dc();Oc.exports={createFile:Qr.createFile,createFileSync:Qr.createFileSync,ensureFile:Qr.createFile,ensureFileSync:Qr.createFileSync,createLink:Zr.createLink,createLinkSync:Zr.createLinkSync,ensureLink:Zr.createLink,ensureLinkSync:Zr.createLinkSync,createSymlink:en.createSymlink,createSymlinkSync:en.createSymlinkSync,ensureSymlink:en.createSymlink,ensureSymlinkSync:en.createSymlinkSync}});var tn=y((n2,Ac)=>{function U0(t,{EOL:e=`
8
- `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function X0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Ac.exports={stringify:U0,stripBom:X0}});var Tc=y((i2,kc)=>{var qt;try{qt=he()}catch{qt=require("fs")}var rn=Ee(),{stringify:Fc,stripBom:Rc}=tn();async function G0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||qt,n="throws"in e?e.throws:!0,i=await rn.fromCallback(r.readFile)(t,e);i=Rc(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${t}: ${o.message}`,o;return null}return s}var H0=rn.fromPromise(G0);function J0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||qt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=Rc(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function z0(t,e,r={}){let n=r.fs||qt,i=Fc(e,r);await rn.fromCallback(n.writeFile)(t,i,r)}var W0=rn.fromPromise(z0);function Y0(t,e,r={}){let n=r.fs||qt,i=Fc(e,r);return n.writeFileSync(t,i,r)}var V0={readFile:H0,readFileSync:J0,writeFile:W0,writeFileSync:Y0};kc.exports=V0});var qc=y((s2,Mc)=>{"use strict";var nn=Tc();Mc.exports={readJson:nn.readFile,readJsonSync:nn.readFileSync,writeJson:nn.writeFile,writeJsonSync:nn.writeFileSync}});var sn=y((o2,Lc)=>{"use strict";var K0=Ee().fromCallback,dr=he(),jc=require("path"),Nc=Me(),Q0=ct().pathExists;function Z0(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=jc.dirname(t);Q0(i,(s,o)=>{if(s)return n(s);if(o)return dr.writeFile(t,e,r,n);Nc.mkdirs(i,a=>{if(a)return n(a);dr.writeFile(t,e,r,n)})})}function em(t,...e){let r=jc.dirname(t);if(dr.existsSync(r))return dr.writeFileSync(t,...e);Nc.mkdirsSync(r),dr.writeFileSync(t,...e)}Lc.exports={outputFile:K0(Z0),outputFileSync:em}});var Bc=y((a2,$c)=>{"use strict";var{stringify:tm}=tn(),{outputFile:rm}=sn();async function nm(t,e,r={}){let n=tm(e,r);await rm(t,n,r)}$c.exports=nm});var Xc=y((c2,Uc)=>{"use strict";var{stringify:im}=tn(),{outputFileSync:sm}=sn();function om(t,e,r){let n=im(e,r);sm(t,n,r)}Uc.exports=om});var Hc=y((u2,Gc)=>{"use strict";var am=Ee().fromPromise,_e=qc();_e.outputJson=am(Bc());_e.outputJsonSync=Xc();_e.outputJSON=_e.outputJson;_e.outputJSONSync=_e.outputJsonSync;_e.writeJSON=_e.writeJson;_e.writeJSONSync=_e.writeJsonSync;_e.readJSON=_e.readJson;_e.readJSONSync=_e.readJsonSync;Gc.exports=_e});var Kc=y((l2,Vc)=>{"use strict";var Wc=he(),cm=require("path"),um=Oi().copySync,Yc=fr().removeSync,lm=Me().mkdirpSync,Jc=sr();function fm(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"),lm(cm.dirname(e)),hm(t,e,n)}function hm(t,e,r){if(r)return Yc(e),zc(t,e,r);if(Wc.existsSync(e))throw new Error("dest already exists.");return zc(t,e,r)}function zc(t,e,r){try{Wc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return dm(t,e,r)}}function dm(t,e,r){return um(t,e,{overwrite:r,errorOnExist:!0}),Yc(t)}Vc.exports=fm});var Zc=y((f2,Qc)=>{"use strict";Qc.exports={moveSync:Kc()}});var iu=y((h2,nu)=>{"use strict";var pm=he(),mm=require("path"),gm=Ai().copy,ru=fr().remove,ym=Me().mkdirp,vm=ct().pathExists,eu=sr();function bm(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;eu.checkPaths(t,e,"move",(s,o)=>{if(s)return n(s);let{srcStat:a}=o;eu.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);ym(mm.dirname(e),f=>f?n(f):_m(t,e,i,n))})})}function _m(t,e,r,n){if(r)return ru(e,i=>i?n(i):tu(t,e,r,n));vm(e,(i,s)=>i?n(i):s?n(new Error("dest already exists.")):tu(t,e,r,n))}function tu(t,e,r,n){pm.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):wm(t,e,r,n):n())}function wm(t,e,r,n){gm(t,e,{overwrite:r,errorOnExist:!0},s=>s?n(s):ru(t,n))}nu.exports=bm});var ou=y((d2,su)=>{"use strict";var Sm=Ee().fromCallback;su.exports={move:Sm(iu())}});var bt=y((p2,Ri)=>{"use strict";Ri.exports={...ir(),...Oi(),...Ai(),...oc(),...Ic(),...Hc(),...Me(),...Zc(),...ou(),...sn(),...ct(),...fr()};var au=require("fs");Object.getOwnPropertyDescriptor(au,"promises")&&Object.defineProperty(Ri.exports,"promises",{get(){return au.promises}})});var uu=y((m2,cu)=>{"use strict";var xm=/[|\\{}()[\]^$+*?.]/g;cu.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(xm,"\\$&")}});var fu=y((g2,lu)=>{"use strict";lu.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 ki=y((y2,mu)=>{var _t=fu(),pu={};for(on in _t)_t.hasOwnProperty(on)&&(pu[_t[on]]=on);var on,E=mu.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(we in E)if(E.hasOwnProperty(we)){if(!("channels"in E[we]))throw new Error("missing channels property: "+we);if(!("labels"in E[we]))throw new Error("missing channel labels property: "+we);if(E[we].labels.length!==E[we].channels)throw new Error("channel and label counts mismatch: "+we);hu=E[we].channels,du=E[we].labels,delete E[we].channels,delete E[we].labels,Object.defineProperty(E[we],"channels",{value:hu}),Object.defineProperty(E[we],"labels",{value:du})}var hu,du,we;E.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,c,f;return s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360),f=(i+s)/2,s===i?c=0:f<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,f*100]};E.rgb.hsv=function(t){var e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(o,a,c),u=f-Math.min(o,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?i=s=0:(s=u/f,e=p(o),r=p(a),n=p(c),o===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};E.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};E.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,s,o,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,s=(1-r-a)/(1-a)||0,o=(1-n-a)/(1-a)||0,[i*100,s*100,o*100,a*100]};function Em(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=pu[t];if(e)return e;var r=1/0,n;for(var i in _t)if(_t.hasOwnProperty(i)){var s=_t[i],o=Em(t,s);o<r&&(r=o,n=i)}return n};E.keyword.rgb=function(t){return _t[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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*100]};E.rgb.lab=function(t){var e=E.rgb.xyz(t),r=e[0],n=e[1],i=e[2],s,o,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,s=116*n-16,o=500*(r-n),a=200*(n-i),[s,o,a]};E.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?s=n*(1+r):s=n+r-n*r,i=2*n-s,a=[0,0,0];for(var f=0;f<3;f++)o=e+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?c=i+(s-i)*6*o:2*o<1?c=s:3*o<2?c=i+(s-i)*(2/3-o)*6:c=i,a[f]=c*255;return a};E.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01),o,a;return n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s,a=(n+r)/2,o=n===0?2*i/(s+i):2*r/(n+r),[e,o*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,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};E.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o,a;return a=(2-r)*n,s=(2-r)*i,o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,o*100,a*100]};E.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s,o,a,c;i>1&&(r/=i,n/=i),s=Math.floor(6*e),o=1-n,a=6*e-s,s&1&&(a=1-a),c=r+a*(o-r);var f,u,p;switch(s){default:case 6:case 0:f=o,u=c,p=r;break;case 1:f=c,u=o,p=r;break;case 2:f=r,u=o,p=c;break;case 3:f=r,u=c,p=o;break;case 4:f=c,u=r,p=o;break;case 5:f=o,u=r,p=c;break}return[f*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,s,o,a;return s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[s*255,o*255,a*255]};E.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};E.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;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,s=500*(e-r),o=200*(r-n),[i,s,o]};E.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;var a=Math.pow(s,3),c=Math.pow(i,3),f=Math.pow(o,3);return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};E.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return i=Math.atan2(n,r),s=i*360/2/Math.PI,s<0&&(s+=360),o=Math.sqrt(r*r+n*n),[e,o,s]};E.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return o=n/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o),[e,i,s]};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 s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};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,s=(e>>2&1)*r*255;return[n,i,s]};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,s=r%6/5*255;return[n,i,s]};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,s=n>>8&255,o=n&255;return[i,s,o]};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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o+4,c/=6,c%=1,[c*360,o*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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*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 yu=y((v2,gu)=>{var an=ki();function Cm(){for(var t={},e=Object.keys(an),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Pm(t){var e=Cm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(an[n]),s=i.length,o=0;o<s;o++){var a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function Dm(t,e){return function(r){return e(t(r))}}function Om(t,e){for(var r=[e[t].parent,t],n=an[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=Dm(an[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}gu.exports=function(t){for(var e=Pm(t),r={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var o=n[s],a=e[o];a.parent!==null&&(r[o]=Om(o,e))}return r}});var bu=y((b2,vu)=>{var Ti=ki(),Im=yu(),jt={},Am=Object.keys(Ti);function Fm(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 Rm(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,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}Am.forEach(function(t){jt[t]={},Object.defineProperty(jt[t],"channels",{value:Ti[t].channels}),Object.defineProperty(jt[t],"labels",{value:Ti[t].labels});var e=Im(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];jt[t][n]=Rm(i),jt[t][n].raw=Fm(i)})});vu.exports=jt});var wu=y((_2,_u)=>{"use strict";var Nt=bu(),cn=(t,e)=>function(){return`\x1B[${t.apply(Nt,arguments)+e}m`},un=(t,e)=>function(){let r=t.apply(Nt,arguments);return`\x1B[${38+e};5;${r}m`},ln=(t,e)=>function(){let r=t.apply(Nt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function km(){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 s=e[i];for(let o of Object.keys(s)){let a=s[o];e[o]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},s[o]=e[o],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,s,o)=>[i,s,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:cn(r,0)},e.color.ansi256={ansi256:un(r,0)},e.color.ansi16m={rgb:ln(n,0)},e.bgColor.ansi={ansi:cn(r,10)},e.bgColor.ansi256={ansi256:un(r,10)},e.bgColor.ansi16m={rgb:ln(n,10)};for(let i of Object.keys(Nt)){if(typeof Nt[i]!="object")continue;let s=Nt[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=cn(s.ansi16,0),e.bgColor.ansi[i]=cn(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=un(s.ansi256,0),e.bgColor.ansi256[i]=un(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=ln(s.rgb,0),e.bgColor.ansi16m[i]=ln(s.rgb,10))}return e}Object.defineProperty(_u,"exports",{enumerable:!0,get:km})});var xu=y((w2,Su)=>{"use strict";Su.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 Cu=y((S2,Eu)=>{"use strict";var Tm=require("os"),qe=xu(),pe=process.env,Lt;qe("no-color")||qe("no-colors")||qe("color=false")?Lt=!1:(qe("color")||qe("colors")||qe("color=true")||qe("color=always"))&&(Lt=!0);"FORCE_COLOR"in pe&&(Lt=pe.FORCE_COLOR.length===0||parseInt(pe.FORCE_COLOR,10)!==0);function Mm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function qm(t){if(Lt===!1)return 0;if(qe("color=16m")||qe("color=full")||qe("color=truecolor"))return 3;if(qe("color=256"))return 2;if(t&&!t.isTTY&&Lt!==!0)return 0;let e=Lt?1:0;if(process.platform==="win32"){let r=Tm.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 Mi(t){let e=qm(t);return Mm(e)}Eu.exports={supportsColor:Mi,stdout:Mi(process.stdout),stderr:Mi(process.stderr)}});var Au=y((x2,Iu)=>{"use strict";var jm=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Pu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Nm=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Lm=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,$m=new Map([["n",`
9
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ou(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):$m.get(t)||t}function Bm(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))r.push(Number(s));else if(i=s.match(Nm))r.push(i[2].replace(Lm,(o,a,c)=>a?Ou(a):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`);return r}function Um(t){Pu.lastIndex=0;let e=[],r;for(;(r=Pu.exec(t))!==null;){let n=r[1];if(r[2]){let i=Bm(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Du(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.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}Iu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(jm,(s,o,a,c,f,u)=>{if(o)i.push(Ou(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Du(t,r)(p)),r.push({inverse:a,styles:Um(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Du(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var hn=y((E2,mr)=>{"use strict";var ji=uu(),Q=wu(),qi=Cu().stdout,Xm=Au(),Ru=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),ku=["ansi","ansi","ansi256","ansi16m"],Tu=new Set(["gray"]),$t=Object.create(null);function Fu(t,e){e=e||{};let r=qi?qi.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function pr(t){if(!this||!(this instanceof pr)||this.template){let e={};return Fu(e,t),e.template=function(){let r=[].slice.call(arguments);return Jm.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,pr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=pr,e.template}Fu(this,t)}Ru&&(Q.blue.open="\x1B[94m");for(let t of Object.keys(Q))Q[t].closeRe=new RegExp(ji(Q[t].close),"g"),$t[t]={get(){let e=Q[t];return fn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};$t.visible={get(){return fn.call(this,this._styles||[],!0,"visible")}};Q.color.closeRe=new RegExp(ji(Q.color.close),"g");for(let t of Object.keys(Q.color.ansi))Tu.has(t)||($t[t]={get(){let e=this.level;return function(){let n={open:Q.color[ku[e]][t].apply(null,arguments),close:Q.color.close,closeRe:Q.color.closeRe};return fn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Q.bgColor.closeRe=new RegExp(ji(Q.bgColor.close),"g");for(let t of Object.keys(Q.bgColor.ansi)){if(Tu.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);$t[e]={get(){let r=this.level;return function(){let i={open:Q.bgColor[ku[r]][t].apply(null,arguments),close:Q.bgColor.close,closeRe:Q.bgColor.closeRe};return fn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var Gm=Object.defineProperties(()=>{},$t);function fn(t,e,r){let n=function(){return Hm.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=Gm,n}function Hm(){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;Ru&&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 Jm(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 Xm(t,n.join(""))}Object.defineProperties(pr.prototype,$t);mr.exports=pr();mr.exports.supportsColor=qi;mr.exports.default=mr.exports});var qu=y((C2,Mu)=>{"use strict";Mu.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 Ni=y((P2,Nu)=>{var gr=qu(),ju={};for(let t of Object.keys(gr))ju[gr[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"]}};Nu.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),s=Math.max(e,r,n),o=s-i,a,c;s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+s)/2;return s===i?c=0:f<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,f*100]};C.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(o,a,c),u=f-Math.min(o,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?(i=0,s=0):(s=u/f,e=p(o),r=p(a),n=p(c),o===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};C.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=C.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*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),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function zm(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=ju[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(gr)){let s=gr[i],o=zm(t,s);o<r&&(r=o,n=i)}return n};C.keyword.rgb=function(t){return gr[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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*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 s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};C.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o;if(r===0)return o=n*255,[o,o,o];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let f=0;f<3;f++)s=e+1/3*-(f-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,c[f]=o*255;return c};C.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[e,a*100,o*100]};C.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};C.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};C.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,o&1&&(s=1-s);let c=r+s*(a-r),f,u,p;switch(o){default:case 6:case 0:f=a,u=c,p=r;break;case 1:f=c,u=a,p=r;break;case 2:f=r,u=a,p=c;break;case 3:f=r,u=c,p=a;break;case 4:f=c,u=r,p=a;break;case 5:f=a,u=r,p=c;break}return[f*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,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};C.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*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,s=500*(e-r),o=200*(r-n);return[i,s,o]};C.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,c=i**3,f=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};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 o=Math.sqrt(r*r+n*n);return[e,o,i]};C.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};C.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?C.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};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,s=(e>>2&1)*r*255;return[n,i,s]};C.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}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,s=n>>8&255,o=n&255;return[i,s,o]};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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o,c/=6,c%=1,[c*360,o*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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*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 $u=y((D2,Lu)=>{var dn=Ni();function Wm(){let t={},e=Object.keys(dn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Ym(t){let e=Wm(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(dn[n]);for(let s=i.length,o=0;o<s;o++){let a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}}return e}function Vm(t,e){return function(r){return e(t(r))}}function Km(t,e){let r=[e[t].parent,t],n=dn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Vm(dn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Lu.exports=function(t){let e=Ym(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=Km(o,e))}return r}});var Uu=y((O2,Bu)=>{var Li=Ni(),Qm=$u(),Bt={},Zm=Object.keys(Li);function eg(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 tg(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 s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Zm.forEach(t=>{Bt[t]={},Object.defineProperty(Bt[t],"channels",{value:Li[t].channels}),Object.defineProperty(Bt[t],"labels",{value:Li[t].labels});let e=Qm(t);Object.keys(e).forEach(n=>{let i=e[n];Bt[t][n]=tg(i),Bt[t][n].raw=eg(i)})});Bu.exports=Bt});var Wu=y((I2,zu)=>{"use strict";var Xu=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Gu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Hu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},pn=t=>t,Ju=(t,e,r)=>[t,e,r],Ut=(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})},$i,Xt=(t,e,r,n)=>{$i===void 0&&($i=Uu());let i=n?10:0,s={};for(let[o,a]of Object.entries($i)){let c=o==="ansi16"?"ansi":o;o===e?s[c]=t(r,i):typeof a=="object"&&(s[c]=t(a[e],i))}return s};function rg(){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,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[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",Ut(e.color,"ansi",()=>Xt(Xu,"ansi16",pn,!1)),Ut(e.color,"ansi256",()=>Xt(Gu,"ansi256",pn,!1)),Ut(e.color,"ansi16m",()=>Xt(Hu,"rgb",Ju,!1)),Ut(e.bgColor,"ansi",()=>Xt(Xu,"ansi16",pn,!0)),Ut(e.bgColor,"ansi256",()=>Xt(Gu,"ansi256",pn,!0)),Ut(e.bgColor,"ansi16m",()=>Xt(Hu,"rgb",Ju,!0)),e}Object.defineProperty(zu,"exports",{enumerable:!0,get:rg})});var Vu=y((A2,Yu)=>{"use strict";Yu.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 Xi=y((F2,Qu)=>{"use strict";var ng=require("os"),Ku=require("tty"),ke=Vu(),{env:ee}=process,ft;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?ft=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(ft=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?ft=1:ee.FORCE_COLOR==="false"?ft=0:ft=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function Bi(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ui(t,e){if(ft===0)return 0;if(ke("color=16m")||ke("color=full")||ke("color=truecolor"))return 3;if(ke("color=256"))return 2;if(t&&!e&&ft===void 0)return 0;let r=ft||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=ng.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in ee)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in ee)||ee.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in ee)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ee.TEAMCITY_VERSION)?1:0;if(ee.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ee){let n=parseInt((ee.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ee.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ee.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ee.TERM)||"COLORTERM"in ee?1:r}function ig(t){let e=Ui(t,t&&t.isTTY);return Bi(e)}Qu.exports={supportsColor:ig,stdout:Bi(Ui(!0,Ku.isatty(1))),stderr:Bi(Ui(!0,Ku.isatty(2)))}});var el=y((R2,Zu)=>{"use strict";var sg=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},og=(t,e,r,n)=>{let i=0,s="";do{let o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r
7
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),lr.checkPaths(t,e,"copy",(i,s)=>{if(i)return n(i);let{srcStat:o,destStat:a}=s;lr.checkParentPaths(t,o,e,"copy",c=>c?n(c):r.filter?Ma(Ra,a,t,e,r,n):Ra(a,t,e,r,n))})}function Ra(t,e,r,n,i){let s=ur.dirname(r);i0(s,(o,a)=>{if(o)return i(o);if(a)return Ai(t,e,r,n,i);n0(s,c=>c?i(c):Ai(t,e,r,n,i))})}function Ma(t,e,r,n,i,s){Promise.resolve(i.filter(r,n)).then(o=>o?t(e,r,n,i,s):s(),o=>s(o))}function Ai(t,e,r,n,i){return n.filter?Ma(ka,t,e,r,n,i):ka(t,e,r,n,i)}function ka(t,e,r,n,i){(n.dereference?De.stat:De.lstat)(e,(o,a)=>{if(o)return i(o);if(a.isDirectory())return h0(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return a0(a,t,e,r,n,i);if(a.isSymbolicLink())return g0(t,e,r,n,i)})}function a0(t,e,r,n,i,s){return e?c0(t,r,n,i,s):qa(t,r,n,i,s)}function c0(t,e,r,n,i){if(n.overwrite)De.unlink(r,s=>s?i(s):qa(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function qa(t,e,r,n,i){De.copyFile(e,r,s=>s?i(s):n.preserveTimestamps?u0(t.mode,e,r,i):Vr(r,t.mode,i))}function u0(t,e,r,n){return l0(t)?f0(r,t,i=>i?n(i):Ta(t,e,r,n)):Ta(t,e,r,n)}function l0(t){return(t&128)===0}function f0(t,e,r){return Vr(t,e|128,r)}function Ta(t,e,r,n){d0(e,r,i=>i?n(i):Vr(r,t,n))}function Vr(t,e,r){return De.chmod(t,e,r)}function d0(t,e,r){De.stat(t,(n,i)=>n?r(n):s0(e,i.atime,i.mtime,r))}function h0(t,e,r,n,i,s){return e?e&&!e.isDirectory()?s(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):ja(r,n,i,s):p0(t.mode,r,n,i,s)}function p0(t,e,r,n,i){De.mkdir(r,s=>{if(s)return i(s);ja(e,r,n,o=>o?i(o):Vr(r,t,i))})}function ja(t,e,r,n){De.readdir(t,(i,s)=>i?n(i):Na(s,t,e,r,n))}function Na(t,e,r,n,i){let s=t.pop();return s?m0(t,s,e,r,n,i):i()}function m0(t,e,r,n,i,s){let o=ur.join(r,e),a=ur.join(n,e);lr.checkPaths(o,a,"copy",(c,f)=>{if(c)return s(c);let{destStat:u}=f;Ai(u,o,a,i,p=>p?s(p):Na(t,r,n,i,s))})}function g0(t,e,r,n,i){De.readlink(e,(s,o)=>{if(s)return i(s);if(n.dereference&&(o=ur.resolve(process.cwd(),o)),t)De.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?De.symlink(o,r,i):i(a):(n.dereference&&(c=ur.resolve(process.cwd(),c)),lr.isSrcSubdir(o,c)?i(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${c}'.`)):t.isDirectory()&&lr.isSrcSubdir(c,o)?i(new Error(`Cannot overwrite '${c}' with '${o}'.`)):y0(o,r,i)));else return De.symlink(o,r,i)})}function y0(t,e,r){De.unlink(e,n=>n?r(n):De.symlink(t,e,r))}La.exports=o0});var Fi=y((Vb,Ba)=>{"use strict";var v0=Ce().fromCallback;Ba.exports={copy:v0($a())}});var Ya=y((Yb,Va)=>{"use strict";var Ua=fe(),za=require("path"),H=require("assert"),fr=process.platform==="win32";function Wa(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||Ua[r],r=r+"Sync",t[r]=t[r]||Ua[r]}),t.maxBusyTries=t.maxBusyTries||3}function Ri(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"),Wa(e),Xa(t,e,function i(s){if(s){if((s.code==="EBUSY"||s.code==="ENOTEMPTY"||s.code==="EPERM")&&n<e.maxBusyTries){n++;let o=n*100;return setTimeout(()=>Xa(t,e,i),o)}s.code==="ENOENT"&&(s=null)}r(s)})}function Xa(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"&&fr)return Ga(t,e,n,r);if(i&&i.isDirectory())return Yr(t,e,n,r);e.unlink(t,s=>{if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return fr?Ga(t,e,s,r):Yr(t,e,s,r);if(s.code==="EISDIR")return Yr(t,e,s,r)}return r(s)})})}function Ga(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,(s,o)=>{s?n(s.code==="ENOENT"?null:r):o.isDirectory()?Yr(t,e,r,n):e.unlink(t,n)})})}function Ha(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()?Kr(t,e,r):e.unlinkSync(t)}function Yr(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")?b0(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function b0(t,e,r){H(t),H(e),H(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let s=i.length,o;if(s===0)return e.rmdir(t,r);i.forEach(a=>{Ri(za.join(t,a),e,c=>{if(!o){if(c)return r(o=c);--s===0&&e.rmdir(t,r)}})})})}function Ja(t,e){let r;e=e||{},Wa(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"&&fr&&Ha(t,e,n)}try{r&&r.isDirectory()?Kr(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return fr?Ha(t,e,n):Kr(t,e,n);if(n.code!=="EISDIR")throw n;Kr(t,e,n)}}function Kr(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")_0(t,e);else if(n.code!=="ENOENT")throw n}}function _0(t,e){if(H(t),H(e),e.readdirSync(t).forEach(r=>Ja(za.join(t,r),e)),fr){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Va.exports=Ri;Ri.sync=Ja});var dr=y((Kb,Qa)=>{"use strict";var w0=Ce().fromCallback,Ka=Ya();Qa.exports={remove:w0(Ka),removeSync:Ka.sync}});var oc=y((Qb,sc)=>{"use strict";var S0=Ce().fromCallback,tc=fe(),rc=require("path"),nc=qe(),ic=dr(),Za=S0(function(e,r){r=r||function(){},tc.readdir(e,(n,i)=>{if(n)return nc.mkdirs(e,r);i=i.map(o=>rc.join(e,o)),s();function s(){let o=i.pop();if(!o)return r();ic.remove(o,a=>{if(a)return r(a);s()})}})});function ec(t){let e;try{e=tc.readdirSync(t)}catch{return nc.mkdirsSync(t)}e.forEach(r=>{r=rc.join(t,r),ic.removeSync(r)})}sc.exports={emptyDirSync:ec,emptydirSync:ec,emptyDir:Za,emptydir:Za}});var lc=y((Zb,uc)=>{"use strict";var x0=Ce().fromCallback,ac=require("path"),st=fe(),cc=qe();function E0(t,e){function r(){st.writeFile(t,"",n=>{if(n)return e(n);e()})}st.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let s=ac.dirname(t);st.stat(s,(o,a)=>{if(o)return o.code==="ENOENT"?cc.mkdirs(s,c=>{if(c)return e(c);r()}):e(o);a.isDirectory()?r():st.readdir(s,c=>{if(c)return e(c)})})})}function C0(t){let e;try{e=st.statSync(t)}catch{}if(e&&e.isFile())return;let r=ac.dirname(t);try{st.statSync(r).isDirectory()||st.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")cc.mkdirsSync(r);else throw n}st.writeFileSync(t,"")}uc.exports={createFile:x0(E0),createFileSync:C0}});var mc=y((e2,pc)=>{"use strict";var P0=Ce().fromCallback,dc=require("path"),bt=fe(),hc=qe(),fc=it().pathExists;function D0(t,e,r){function n(i,s){bt.link(i,s,o=>{if(o)return r(o);r(null)})}fc(e,(i,s)=>{if(i)return r(i);if(s)return r(null);bt.lstat(t,o=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),r(o);let a=dc.dirname(e);fc(a,(c,f)=>{if(c)return r(c);if(f)return n(t,e);hc.mkdirs(a,u=>{if(u)return r(u);n(t,e)})})})})}function O0(t,e){if(bt.existsSync(e))return;try{bt.lstatSync(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=dc.dirname(e);return bt.existsSync(n)||hc.mkdirsSync(n),bt.linkSync(t,e)}pc.exports={createLink:P0(D0),createLinkSync:O0}});var yc=y((t2,gc)=>{"use strict";var ot=require("path"),hr=fe(),I0=it().pathExists;function A0(t,e,r){if(ot.isAbsolute(t))return hr.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=ot.dirname(e),i=ot.join(n,t);return I0(i,(s,o)=>s?r(s):o?r(null,{toCwd:i,toDst:t}):hr.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:ot.relative(n,t)})))}}function F0(t,e){let r;if(ot.isAbsolute(t)){if(r=hr.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=ot.dirname(e),i=ot.join(n,t);if(r=hr.existsSync(i),r)return{toCwd:i,toDst:t};if(r=hr.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:ot.relative(n,t)}}}gc.exports={symlinkPaths:A0,symlinkPathsSync:F0}});var _c=y((r2,bc)=>{"use strict";var vc=fe();function R0(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);vc.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function k0(t,e){let r;if(e)return e;try{r=vc.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}bc.exports={symlinkType:R0,symlinkTypeSync:k0}});var Dc=y((n2,Pc)=>{"use strict";var T0=Ce().fromCallback,Sc=require("path"),qt=fe(),xc=qe(),M0=xc.mkdirs,q0=xc.mkdirsSync,Ec=yc(),j0=Ec.symlinkPaths,N0=Ec.symlinkPathsSync,Cc=_c(),L0=Cc.symlinkType,$0=Cc.symlinkTypeSync,wc=it().pathExists;function B0(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,wc(e,(i,s)=>{if(i)return n(i);if(s)return n(null);j0(t,e,(o,a)=>{if(o)return n(o);t=a.toDst,L0(a.toCwd,r,(c,f)=>{if(c)return n(c);let u=Sc.dirname(e);wc(u,(p,g)=>{if(p)return n(p);if(g)return qt.symlink(t,e,f,n);M0(u,m=>{if(m)return n(m);qt.symlink(t,e,f,n)})})})})})}function U0(t,e,r){if(qt.existsSync(e))return;let i=N0(t,e);t=i.toDst,r=$0(i.toCwd,r);let s=Sc.dirname(e);return qt.existsSync(s)||q0(s),qt.symlinkSync(t,e,r)}Pc.exports={createSymlink:T0(B0),createSymlinkSync:U0}});var Ic=y((i2,Oc)=>{"use strict";var Qr=lc(),Zr=mc(),en=Dc();Oc.exports={createFile:Qr.createFile,createFileSync:Qr.createFileSync,ensureFile:Qr.createFile,ensureFileSync:Qr.createFileSync,createLink:Zr.createLink,createLinkSync:Zr.createLinkSync,ensureLink:Zr.createLink,ensureLinkSync:Zr.createLinkSync,createSymlink:en.createSymlink,createSymlinkSync:en.createSymlinkSync,ensureSymlink:en.createSymlink,ensureSymlinkSync:en.createSymlinkSync}});var tn=y((s2,Ac)=>{function X0(t,{EOL:e=`
8
+ `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function G0(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}Ac.exports={stringify:X0,stripBom:G0}});var Tc=y((o2,kc)=>{var jt;try{jt=fe()}catch{jt=require("fs")}var rn=Ce(),{stringify:Fc,stripBom:Rc}=tn();async function H0(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||jt,n="throws"in e?e.throws:!0,i=await rn.fromCallback(r.readFile)(t,e);i=Rc(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${t}: ${o.message}`,o;return null}return s}var z0=rn.fromPromise(H0);function W0(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=Rc(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function J0(t,e,r={}){let n=r.fs||jt,i=Fc(e,r);await rn.fromCallback(n.writeFile)(t,i,r)}var V0=rn.fromPromise(J0);function Y0(t,e,r={}){let n=r.fs||jt,i=Fc(e,r);return n.writeFileSync(t,i,r)}var K0={readFile:z0,readFileSync:W0,writeFile:V0,writeFileSync:Y0};kc.exports=K0});var qc=y((a2,Mc)=>{"use strict";var nn=Tc();Mc.exports={readJson:nn.readFile,readJsonSync:nn.readFileSync,writeJson:nn.writeFile,writeJsonSync:nn.writeFileSync}});var sn=y((c2,Lc)=>{"use strict";var Q0=Ce().fromCallback,pr=fe(),jc=require("path"),Nc=qe(),Z0=it().pathExists;function em(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=jc.dirname(t);Z0(i,(s,o)=>{if(s)return n(s);if(o)return pr.writeFile(t,e,r,n);Nc.mkdirs(i,a=>{if(a)return n(a);pr.writeFile(t,e,r,n)})})}function tm(t,...e){let r=jc.dirname(t);if(pr.existsSync(r))return pr.writeFileSync(t,...e);Nc.mkdirsSync(r),pr.writeFileSync(t,...e)}Lc.exports={outputFile:Q0(em),outputFileSync:tm}});var Bc=y((u2,$c)=>{"use strict";var{stringify:rm}=tn(),{outputFile:nm}=sn();async function im(t,e,r={}){let n=rm(e,r);await nm(t,n,r)}$c.exports=im});var Xc=y((l2,Uc)=>{"use strict";var{stringify:sm}=tn(),{outputFileSync:om}=sn();function am(t,e,r){let n=sm(e,r);om(t,n,r)}Uc.exports=am});var Hc=y((f2,Gc)=>{"use strict";var cm=Ce().fromPromise,_e=qc();_e.outputJson=cm(Bc());_e.outputJsonSync=Xc();_e.outputJSON=_e.outputJson;_e.outputJSONSync=_e.outputJsonSync;_e.writeJSON=_e.writeJson;_e.writeJSONSync=_e.writeJsonSync;_e.readJSON=_e.readJson;_e.readJSONSync=_e.readJsonSync;Gc.exports=_e});var Kc=y((d2,Yc)=>{"use strict";var Jc=fe(),um=require("path"),lm=Ii().copySync,Vc=dr().removeSync,fm=qe().mkdirpSync,zc=or();function dm(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=zc.checkPathsSync(t,e,"move");return zc.checkParentPathsSync(t,i,e,"move"),fm(um.dirname(e)),hm(t,e,n)}function hm(t,e,r){if(r)return Vc(e),Wc(t,e,r);if(Jc.existsSync(e))throw new Error("dest already exists.");return Wc(t,e,r)}function Wc(t,e,r){try{Jc.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return pm(t,e,r)}}function pm(t,e,r){return lm(t,e,{overwrite:r,errorOnExist:!0}),Vc(t)}Yc.exports=dm});var Zc=y((h2,Qc)=>{"use strict";Qc.exports={moveSync:Kc()}});var iu=y((p2,nu)=>{"use strict";var mm=fe(),gm=require("path"),ym=Fi().copy,ru=dr().remove,vm=qe().mkdirp,bm=it().pathExists,eu=or();function _m(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;eu.checkPaths(t,e,"move",(s,o)=>{if(s)return n(s);let{srcStat:a}=o;eu.checkParentPaths(t,a,e,"move",c=>{if(c)return n(c);vm(gm.dirname(e),f=>f?n(f):wm(t,e,i,n))})})}function wm(t,e,r,n){if(r)return ru(e,i=>i?n(i):tu(t,e,r,n));bm(e,(i,s)=>i?n(i):s?n(new Error("dest already exists.")):tu(t,e,r,n))}function tu(t,e,r,n){mm.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Sm(t,e,r,n):n())}function Sm(t,e,r,n){ym(t,e,{overwrite:r,errorOnExist:!0},s=>s?n(s):ru(t,n))}nu.exports=_m});var ou=y((m2,su)=>{"use strict";var xm=Ce().fromCallback;su.exports={move:xm(iu())}});var _t=y((g2,ki)=>{"use strict";ki.exports={...sr(),...Ii(),...Fi(),...oc(),...Ic(),...Hc(),...qe(),...Zc(),...ou(),...sn(),...it(),...dr()};var au=require("fs");Object.getOwnPropertyDescriptor(au,"promises")&&Object.defineProperty(ki.exports,"promises",{get(){return au.promises}})});var uu=y((y2,cu)=>{"use strict";var Em=/[|\\{}()[\]^$+*?.]/g;cu.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Em,"\\$&")}});var fu=y((v2,lu)=>{"use strict";lu.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 Ti=y((b2,mu)=>{var wt=fu(),pu={};for(on in wt)wt.hasOwnProperty(on)&&(pu[wt[on]]=on);var on,E=mu.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(we in E)if(E.hasOwnProperty(we)){if(!("channels"in E[we]))throw new Error("missing channels property: "+we);if(!("labels"in E[we]))throw new Error("missing channel labels property: "+we);if(E[we].labels.length!==E[we].channels)throw new Error("channel and label counts mismatch: "+we);du=E[we].channels,hu=E[we].labels,delete E[we].channels,delete E[we].labels,Object.defineProperty(E[we],"channels",{value:du}),Object.defineProperty(E[we],"labels",{value:hu})}var du,hu,we;E.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),s=Math.max(e,r,n),o=s-i,a,c,f;return s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360),f=(i+s)/2,s===i?c=0:f<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,f*100]};E.rgb.hsv=function(t){var e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(o,a,c),u=f-Math.min(o,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?i=s=0:(s=u/f,e=p(o),r=p(a),n=p(c),o===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};E.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*100,n*100]};E.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,s,o,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,s=(1-r-a)/(1-a)||0,o=(1-n-a)/(1-a)||0,[i*100,s*100,o*100,a*100]};function Cm(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=pu[t];if(e)return e;var r=1/0,n;for(var i in wt)if(wt.hasOwnProperty(i)){var s=wt[i],o=Cm(t,s);o<r&&(r=o,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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*100]};E.rgb.lab=function(t){var e=E.rgb.xyz(t),r=e[0],n=e[1],i=e[2],s,o,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,s=116*n-16,o=500*(r-n),a=200*(n-i),[s,o,a]};E.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o,a,c;if(r===0)return c=n*255,[c,c,c];n<.5?s=n*(1+r):s=n+r-n*r,i=2*n-s,a=[0,0,0];for(var f=0;f<3;f++)o=e+1/3*-(f-1),o<0&&o++,o>1&&o--,6*o<1?c=i+(s-i)*6*o:2*o<1?c=s:3*o<2?c=i+(s-i)*(2/3-o)*6:c=i,a[f]=c*255;return a};E.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01),o,a;return n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s,a=(n+r)/2,o=n===0?2*i/(s+i):2*r/(n+r),[e,o*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,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};E.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o,a;return a=(2-r)*n,s=(2-r)*i,o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,o*100,a*100]};E.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s,o,a,c;i>1&&(r/=i,n/=i),s=Math.floor(6*e),o=1-n,a=6*e-s,s&1&&(a=1-a),c=r+a*(o-r);var f,u,p;switch(s){default:case 6:case 0:f=o,u=c,p=r;break;case 1:f=c,u=o,p=r;break;case 2:f=r,u=o,p=c;break;case 3:f=r,u=c,p=o;break;case 4:f=c,u=r,p=o;break;case 5:f=o,u=r,p=c;break}return[f*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,s,o,a;return s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[s*255,o*255,a*255]};E.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};E.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;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,s=500*(e-r),o=200*(r-n),[i,s,o]};E.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;var a=Math.pow(s,3),c=Math.pow(i,3),f=Math.pow(o,3);return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};E.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return i=Math.atan2(n,r),s=i*360/2/Math.PI,s<0&&(s+=360),o=Math.sqrt(r*r+n*n),[e,o,s]};E.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,s,o;return o=n/360*2*Math.PI,i=r*Math.cos(o),s=r*Math.sin(o),[e,i,s]};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 s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};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,s=(e>>2&1)*r*255;return[n,i,s]};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,s=r%6/5*255;return[n,i,s]};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,s=n>>8&255,o=n&255;return[i,s,o]};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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o+4,c/=6,c%=1,[c*360,o*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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*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 yu=y((_2,gu)=>{var an=Ti();function Pm(){for(var t={},e=Object.keys(an),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Dm(t){var e=Pm(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(an[n]),s=i.length,o=0;o<s;o++){var a=i[o],c=e[a];c.distance===-1&&(c.distance=e[n].distance+1,c.parent=n,r.unshift(a))}return e}function Om(t,e){return function(r){return e(t(r))}}function Im(t,e){for(var r=[e[t].parent,t],n=an[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=Om(an[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}gu.exports=function(t){for(var e=Dm(t),r={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var o=n[s],a=e[o];a.parent!==null&&(r[o]=Im(o,e))}return r}});var bu=y((w2,vu)=>{var Mi=Ti(),Am=yu(),Nt={},Fm=Object.keys(Mi);function Rm(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 km(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,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}Fm.forEach(function(t){Nt[t]={},Object.defineProperty(Nt[t],"channels",{value:Mi[t].channels}),Object.defineProperty(Nt[t],"labels",{value:Mi[t].labels});var e=Am(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];Nt[t][n]=km(i),Nt[t][n].raw=Rm(i)})});vu.exports=Nt});var wu=y((S2,_u)=>{"use strict";var Lt=bu(),cn=(t,e)=>function(){return`\x1B[${t.apply(Lt,arguments)+e}m`},un=(t,e)=>function(){let r=t.apply(Lt,arguments);return`\x1B[${38+e};5;${r}m`},ln=(t,e)=>function(){let r=t.apply(Lt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function Tm(){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 s=e[i];for(let o of Object.keys(s)){let a=s[o];e[o]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},s[o]=e[o],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,s,o)=>[i,s,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:cn(r,0)},e.color.ansi256={ansi256:un(r,0)},e.color.ansi16m={rgb:ln(n,0)},e.bgColor.ansi={ansi:cn(r,10)},e.bgColor.ansi256={ansi256:un(r,10)},e.bgColor.ansi16m={rgb:ln(n,10)};for(let i of Object.keys(Lt)){if(typeof Lt[i]!="object")continue;let s=Lt[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=cn(s.ansi16,0),e.bgColor.ansi[i]=cn(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=un(s.ansi256,0),e.bgColor.ansi256[i]=un(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=ln(s.rgb,0),e.bgColor.ansi16m[i]=ln(s.rgb,10))}return e}Object.defineProperty(_u,"exports",{enumerable:!0,get:Tm})});var xu=y((x2,Su)=>{"use strict";Su.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 Cu=y((E2,Eu)=>{"use strict";var Mm=require("os"),je=xu(),he=process.env,$t;je("no-color")||je("no-colors")||je("color=false")?$t=!1:(je("color")||je("colors")||je("color=true")||je("color=always"))&&($t=!0);"FORCE_COLOR"in he&&($t=he.FORCE_COLOR.length===0||parseInt(he.FORCE_COLOR,10)!==0);function qm(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function jm(t){if($t===!1)return 0;if(je("color=16m")||je("color=full")||je("color=truecolor"))return 3;if(je("color=256"))return 2;if(t&&!t.isTTY&&$t!==!0)return 0;let e=$t?1:0;if(process.platform==="win32"){let r=Mm.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 he)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in he)||he.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in he)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(he.TEAMCITY_VERSION)?1:0;if(he.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in he){let r=parseInt((he.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(he.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(he.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(he.TERM)||"COLORTERM"in he?1:(he.TERM==="dumb",e)}function qi(t){let e=jm(t);return qm(e)}Eu.exports={supportsColor:qi,stdout:qi(process.stdout),stderr:qi(process.stderr)}});var Au=y((C2,Iu)=>{"use strict";var Nm=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Pu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Lm=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,$m=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Bm=new Map([["n",`
9
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ou(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):Bm.get(t)||t}function Um(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))r.push(Number(s));else if(i=s.match(Lm))r.push(i[2].replace($m,(o,a,c)=>a?Ou(a):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`);return r}function Xm(t){Pu.lastIndex=0;let e=[],r;for(;(r=Pu.exec(t))!==null;){let n=r[1];if(r[2]){let i=Um(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function Du(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.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}Iu.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Nm,(s,o,a,c,f,u)=>{if(o)i.push(Ou(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:Du(t,r)(p)),r.push({inverse:a,styles:Xm(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Du(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var dn=y((P2,gr)=>{"use strict";var Ni=uu(),Z=wu(),ji=Cu().stdout,Gm=Au(),Ru=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),ku=["ansi","ansi","ansi256","ansi16m"],Tu=new Set(["gray"]),Bt=Object.create(null);function Fu(t,e){e=e||{};let r=ji?ji.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function mr(t){if(!this||!(this instanceof mr)||this.template){let e={};return Fu(e,t),e.template=function(){let r=[].slice.call(arguments);return Wm.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,mr.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=mr,e.template}Fu(this,t)}Ru&&(Z.blue.open="\x1B[94m");for(let t of Object.keys(Z))Z[t].closeRe=new RegExp(Ni(Z[t].close),"g"),Bt[t]={get(){let e=Z[t];return fn.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Bt.visible={get(){return fn.call(this,this._styles||[],!0,"visible")}};Z.color.closeRe=new RegExp(Ni(Z.color.close),"g");for(let t of Object.keys(Z.color.ansi))Tu.has(t)||(Bt[t]={get(){let e=this.level;return function(){let n={open:Z.color[ku[e]][t].apply(null,arguments),close:Z.color.close,closeRe:Z.color.closeRe};return fn.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Z.bgColor.closeRe=new RegExp(Ni(Z.bgColor.close),"g");for(let t of Object.keys(Z.bgColor.ansi)){if(Tu.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Bt[e]={get(){let r=this.level;return function(){let i={open:Z.bgColor[ku[r]][t].apply(null,arguments),close:Z.bgColor.close,closeRe:Z.bgColor.closeRe};return fn.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var Hm=Object.defineProperties(()=>{},Bt);function fn(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(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=Hm,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=Z.dim.open;Ru&&this.hasGrey&&(Z.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 Z.dim.open=n,r}function Wm(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 Gm(t,n.join(""))}Object.defineProperties(mr.prototype,Bt);gr.exports=mr();gr.exports.supportsColor=ji;gr.exports.default=gr.exports});var qu=y((D2,Mu)=>{"use strict";Mu.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 Li=y((O2,Nu)=>{var yr=qu(),ju={};for(let t of Object.keys(yr))ju[yr[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"]}};Nu.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),s=Math.max(e,r,n),o=s-i,a,c;s===i?a=0:e===s?a=(r-n)/o:r===s?a=2+(n-e)/o:n===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let f=(i+s)/2;return s===i?c=0:f<=.5?c=o/(s+i):c=o/(2-s-i),[a,c*100,f*100]};C.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,c=t[2]/255,f=Math.max(o,a,c),u=f-Math.min(o,a,c),p=function(g){return(f-g)/6/u+1/2};return u===0?(i=0,s=0):(s=u/f,e=p(o),r=p(a),n=p(c),o===f?i=n-r:a===f?i=1/3+e-n:c===f&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,f*100]};C.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=C.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,s*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),s=(1-e-i)/(1-i)||0,o=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function Jm(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=ju[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(yr)){let s=yr[i],o=Jm(t,s);o<r&&(r=o,n=i)}return n};C.keyword.rgb=function(t){return yr[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,s=e*.2126+r*.7152+n*.0722,o=e*.0193+r*.1192+n*.9505;return[i*100,s*100,o*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 s=116*n-16,o=500*(r-n),a=200*(n-i);return[s,o,a]};C.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o;if(r===0)return o=n*255,[o,o,o];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,c=[0,0,0];for(let f=0;f<3;f++)s=e+1/3*-(f-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,c[f]=o*255;return c};C.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=s<=1?s:2-s;let o=(n+r)/2,a=n===0?2*i/(s+i):2*r/(n+r);return[e,a*100,o*100]};C.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-r),a=255*n*(1-r*s),c=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};C.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),s,o;o=(2-r)*n;let a=(2-r)*i;return s=r*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};C.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s;i>1&&(r/=i,n/=i);let o=Math.floor(6*e),a=1-n;s=6*e-o,o&1&&(s=1-s);let c=r+s*(a-r),f,u,p;switch(o){default:case 6:case 0:f=a,u=c,p=r;break;case 1:f=c,u=a,p=r;break;case 2:f=r,u=a,p=c;break;case 3:f=r,u=c,p=a;break;case 4:f=c,u=r,p=a;break;case 5:f=a,u=r,p=c;break}return[f*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,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[s*255,o*255,a*255]};C.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,s,o;return i=e*3.2406+r*-1.5372+n*-.4986,s=e*-.9689+r*1.8758+n*.0415,o=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*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,s=500*(e-r),o=200*(r-n);return[i,s,o]};C.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,s,o;s=(e+16)/116,i=r/500+s,o=s-n/200;let a=s**3,c=i**3,f=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,o=f>.008856?f:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};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 o=Math.sqrt(r*r+n*n);return[e,o,i]};C.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,s=r*Math.cos(i),o=r*Math.sin(i);return[e,s,o]};C.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?C.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};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,s=(e>>2&1)*r*255;return[n,i,s]};C.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}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,s=n>>8&255,o=n&255;return[i,s,o]};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),s=Math.min(Math.min(e,r),n),o=i-s,a,c;return o<1?a=s/(1-o):a=0,o<=0?c=0:i===e?c=(r-n)/o%6:i===r?c=2+(n-e)/o:c=4+(e-r)/o,c/=6,c%=1,[c*360,o*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],s=e%1*6,o=s%1,a=1-o,c=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,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]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,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,s=0;return i<1&&(s=(n-i)/(1-i)),[t[0],i*100,s*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 $u=y((I2,Lu)=>{var hn=Li();function Vm(){let t={},e=Object.keys(hn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Ym(t){let e=Vm(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(hn[n]);for(let s=i.length,o=0;o<s;o++){let a=i[o],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 Qm(t,e){let r=[e[t].parent,t],n=hn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Km(hn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Lu.exports=function(t){let e=Ym(t),r={},n=Object.keys(e);for(let i=n.length,s=0;s<i;s++){let o=n[s];e[o].parent!==null&&(r[o]=Qm(o,e))}return r}});var Uu=y((A2,Bu)=>{var $i=Li(),Zm=$u(),Ut={},eg=Object.keys($i);function tg(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 rg(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 s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}eg.forEach(t=>{Ut[t]={},Object.defineProperty(Ut[t],"channels",{value:$i[t].channels}),Object.defineProperty(Ut[t],"labels",{value:$i[t].labels});let e=Zm(t);Object.keys(e).forEach(n=>{let i=e[n];Ut[t][n]=rg(i),Ut[t][n].raw=tg(i)})});Bu.exports=Ut});var Ju=y((F2,Wu)=>{"use strict";var Xu=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,Gu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},Hu=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},pn=t=>t,zu=(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})},Bi,Gt=(t,e,r,n)=>{Bi===void 0&&(Bi=Uu());let i=n?10:0,s={};for(let[o,a]of Object.entries(Bi)){let c=o==="ansi16"?"ansi":o;o===e?s[c]=t(r,i):typeof a=="object"&&(s[c]=t(a[e],i))}return s};function ng(){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,s]of Object.entries(n))e[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[i]=e[i],t.set(s[0],s[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(Xu,"ansi16",pn,!1)),Xt(e.color,"ansi256",()=>Gt(Gu,"ansi256",pn,!1)),Xt(e.color,"ansi16m",()=>Gt(Hu,"rgb",zu,!1)),Xt(e.bgColor,"ansi",()=>Gt(Xu,"ansi16",pn,!0)),Xt(e.bgColor,"ansi256",()=>Gt(Gu,"ansi256",pn,!0)),Xt(e.bgColor,"ansi16m",()=>Gt(Hu,"rgb",zu,!0)),e}Object.defineProperty(Wu,"exports",{enumerable:!0,get:ng})});var Yu=y((R2,Vu)=>{"use strict";Vu.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 Gi=y((k2,Qu)=>{"use strict";var ig=require("os"),Ku=require("tty"),Te=Yu(),{env:re}=process,at;Te("no-color")||Te("no-colors")||Te("color=false")||Te("color=never")?at=0:(Te("color")||Te("colors")||Te("color=true")||Te("color=always"))&&(at=1);"FORCE_COLOR"in re&&(re.FORCE_COLOR==="true"?at=1:re.FORCE_COLOR==="false"?at=0:at=re.FORCE_COLOR.length===0?1:Math.min(parseInt(re.FORCE_COLOR,10),3));function Ui(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Xi(t,e){if(at===0)return 0;if(Te("color=16m")||Te("color=full")||Te("color=truecolor"))return 3;if(Te("color=256"))return 2;if(t&&!e&&at===void 0)return 0;let r=at||0;if(re.TERM==="dumb")return r;if(process.platform==="win32"){let n=ig.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in re)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in re)||re.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in re)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(re.TEAMCITY_VERSION)?1:0;if(re.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in re){let n=parseInt((re.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(re.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(re.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(re.TERM)||"COLORTERM"in re?1:r}function sg(t){let e=Xi(t,t&&t.isTTY);return Ui(e)}Qu.exports={supportsColor:sg,stdout:Ui(Xi(!0,Ku.isatty(1))),stderr:Ui(Xi(!0,Ku.isatty(2)))}});var el=y((T2,Zu)=>{"use strict";var og=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},ag=(t,e,r,n)=>{let i=0,s="";do{let o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r
10
10
  `:`
11
11
  `)+r,i=n+1,n=t.indexOf(`
12
- `,i)}while(n!==-1);return s+=t.substr(i),s};Zu.exports={stringReplaceAll:sg,stringEncaseCRLFWithFirstIndex:og}});var sl=y((k2,il)=>{"use strict";var ag=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,tl=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,cg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ug=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,lg=new Map([["n",`
13
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function nl(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)):lg.get(t)||t}function fg(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(i=s.match(cg))r.push(i[2].replace(ug,(a,c,f)=>c?nl(c):f));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function hg(t){tl.lastIndex=0;let e=[],r;for(;(r=tl.exec(t))!==null;){let n=r[1];if(r[2]){let i=fg(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function rl(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.slice(1);let n=t;for(let[i,s]of Object.entries(r))if(Array.isArray(s)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=s.length>0?n[i](...s):n[i]}return n}il.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(ag,(s,o,a,c,f,u)=>{if(o)i.push(nl(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:rl(t,r)(p)),r.push({inverse:a,styles:hg(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(rl(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var hl=y((T2,fl)=>{"use strict";var yr=Wu(),{stdout:Hi,stderr:Ji}=Xi(),{stringReplaceAll:dg,stringEncaseCRLFWithFirstIndex:pg}=el(),{isArray:mn}=Array,al=["ansi","ansi","ansi256","ansi16m"],Gt=Object.create(null),mg=(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=Hi?Hi.level:0;t.level=e.level===void 0?r:e.level},zi=class{constructor(e){return cl(e)}},cl=t=>{let e={};return mg(e,t),e.template=(...r)=>ll(e.template,...r),Object.setPrototypeOf(e,gn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=zi,e.template};function gn(t){return cl(t)}for(let[t,e]of Object.entries(yr))Gt[t]={get(){let r=yn(this,Wi(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Gt.visible={get(){let t=yn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var ul=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of ul)Gt[t]={get(){let{level:e}=this;return function(...r){let n=Wi(yr.color[al[e]][t](...r),yr.color.close,this._styler);return yn(this,n,this._isEmpty)}}};for(let t of ul){let e="bg"+t[0].toUpperCase()+t.slice(1);Gt[e]={get(){let{level:r}=this;return function(...n){let i=Wi(yr.bgColor[al[r]][t](...n),yr.bgColor.close,this._styler);return yn(this,i,this._isEmpty)}}}}var gg=Object.defineProperties(()=>{},{...Gt,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Wi=(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}},yn=(t,e,r)=>{let n=(...i)=>mn(i[0])&&mn(i[0].raw)?ol(n,ll(n,...i)):ol(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,gg),n._generator=t,n._styler=e,n._isEmpty=r,n},ol=(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=dg(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
14
- `);return s!==-1&&(e=pg(e,i,n,s)),n+e+i},Gi,ll=(t,...e)=>{let[r]=e;if(!mn(r)||!mn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return Gi===void 0&&(Gi=sl()),Gi(t,i.join(""))};Object.defineProperties(gn.prototype,Gt);var vn=gn();vn.supportsColor=Hi;vn.stderr=gn({level:Ji?Ji.level:0});vn.stderr.supportsColor=Ji;fl.exports=vn});var dl=y((Yi,Vi)=>{(function(t,e){typeof Yi=="object"&&typeof Vi<"u"?Vi.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Yi,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,d){if(l=l||"",d=d||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,d);var h=i(l);this._originalInput=l,this._r=h.r,this._g=h.g,this._b=h.b,this._a=h.a,this._roundA=Math.round(100*this._a)/100,this._format=d.format||h.format,this._gradientType=d.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=h.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 d=this.toRgb();return(d.r*299+d.g*587+d.b*114)/1e3},getLuminance:function(){var d=this.toRgb(),h,v,S,_,N,L;return h=d.r/255,v=d.g/255,S=d.b/255,h<=.03928?_=h/12.92:_=Math.pow((h+.055)/1.055,2.4),v<=.03928?N=v/12.92:N=Math.pow((v+.055)/1.055,2.4),S<=.03928?L=S/12.92:L=Math.pow((S+.055)/1.055,2.4),.2126*_+.7152*N+.0722*L},setAlpha:function(d){return this._a=H(d),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var d=c(this._r,this._g,this._b);return{h:d.h*360,s:d.s,v:d.v,a:this._a}},toHsvString:function(){var d=c(this._r,this._g,this._b),h=Math.round(d.h*360),v=Math.round(d.s*100),S=Math.round(d.v*100);return this._a==1?"hsv("+h+", "+v+"%, "+S+"%)":"hsva("+h+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var d=o(this._r,this._g,this._b);return{h:d.h*360,s:d.s,l:d.l,a:this._a}},toHslString:function(){var d=o(this._r,this._g,this._b),h=Math.round(d.h*360),v=Math.round(d.s*100),S=Math.round(d.l*100);return this._a==1?"hsl("+h+", "+v+"%, "+S+"%)":"hsla("+h+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(d){return u(this._r,this._g,this._b,d)},toHexString:function(d){return"#"+this.toHex(d)},toHex8:function(d){return p(this._r,this._g,this._b,this._a,d)},toHex8String:function(d){return"#"+this.toHex8(d)},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:j[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(d){var h="#"+g(this._r,this._g,this._b,this._a),v=h,S=this._gradientType?"GradientType = 1, ":"";if(d){var _=n(d);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+h+",endColorstr="+v+")"},toString:function(d){var h=!!d;d=d||this._format;var v=!1,S=this._a<1&&this._a>=0,_=!h&&S&&(d==="hex"||d==="hex6"||d==="hex3"||d==="hex4"||d==="hex8"||d==="name");return _?d==="name"&&this._a===0?this.toName():this.toRgbString():(d==="rgb"&&(v=this.toRgbString()),d==="prgb"&&(v=this.toPercentageRgbString()),(d==="hex"||d==="hex6")&&(v=this.toHexString()),d==="hex3"&&(v=this.toHexString(!0)),d==="hex4"&&(v=this.toHex8String(!0)),d==="hex8"&&(v=this.toHex8String()),d==="name"&&(v=this.toName()),d==="hsl"&&(v=this.toHslString()),d==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(d,h){var v=d.apply(null,[this].concat([].slice.call(h)));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($,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(U,arguments)},_applyCombination:function(d,h){return d.apply(null,[this].concat([].slice.call(h)))},analogous:function(){return this._applyCombination(ye,arguments)},complement:function(){return this._applyCombination(q,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(ue,arguments)},triad:function(){return this._applyCombination(Y,[3])},tetrad:function(){return this._applyCombination(Y,[4])}},n.fromRatio=function(l,d){if(t(l)=="object"){var h={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?h[v]=l[v]:h[v]=R(l[v]));l=h}return n(l,d)};function i(l){var d={r:0,g:0,b:0},h=1,v=null,S=null,_=null,N=!1,L=!1;return typeof l=="string"&&(l=it(l)),t(l)=="object"&&(ve(l.r)&&ve(l.g)&&ve(l.b)?(d=s(l.r,l.g,l.b),N=!0,L=String(l.r).substr(-1)==="%"?"prgb":"rgb"):ve(l.h)&&ve(l.s)&&ve(l.v)?(v=R(l.s),S=R(l.v),d=f(l.h,v,S),N=!0,L="hsv"):ve(l.h)&&ve(l.s)&&ve(l.l)&&(v=R(l.s),_=R(l.l),d=a(l.h,v,_),N=!0,L="hsl"),l.hasOwnProperty("a")&&(h=l.a)),h=H(h),{ok:N,format:l.format||L,r:Math.min(255,Math.max(d.r,0)),g:Math.min(255,Math.max(d.g,0)),b:Math.min(255,Math.max(d.b,0)),a:h}}function s(l,d,h){return{r:I(l,255)*255,g:I(d,255)*255,b:I(h,255)*255}}function o(l,d,h){l=I(l,255),d=I(d,255),h=I(h,255);var v=Math.max(l,d,h),S=Math.min(l,d,h),_,N,L=(v+S)/2;if(v==S)_=N=0;else{var J=v-S;switch(N=L>.5?J/(2-v-S):J/(v+S),v){case l:_=(d-h)/J+(d<h?6:0);break;case d:_=(h-l)/J+2;break;case h:_=(l-d)/J+4;break}_/=6}return{h:_,s:N,l:L}}function a(l,d,h){var v,S,_;l=I(l,360),d=I(d,100),h=I(h,100);function N(fe,st,Ae){return Ae<0&&(Ae+=1),Ae>1&&(Ae-=1),Ae<1/6?fe+(st-fe)*6*Ae:Ae<1/2?st:Ae<2/3?fe+(st-fe)*(2/3-Ae)*6:fe}if(d===0)v=S=_=h;else{var L=h<.5?h*(1+d):h+d-h*d,J=2*h-L;v=N(J,L,l+1/3),S=N(J,L,l),_=N(J,L,l-1/3)}return{r:v*255,g:S*255,b:_*255}}function c(l,d,h){l=I(l,255),d=I(d,255),h=I(h,255);var v=Math.max(l,d,h),S=Math.min(l,d,h),_,N,L=v,J=v-S;if(N=v===0?0:J/v,v==S)_=0;else{switch(v){case l:_=(d-h)/J+(d<h?6:0);break;case d:_=(h-l)/J+2;break;case h:_=(l-d)/J+4;break}_/=6}return{h:_,s:N,v:L}}function f(l,d,h){l=I(l,360)*6,d=I(d,100),h=I(h,100);var v=Math.floor(l),S=l-v,_=h*(1-d),N=h*(1-S*d),L=h*(1-(1-S)*d),J=v%6,fe=[h,N,_,_,L,h][J],st=[L,h,h,N,_,_][J],Ae=[_,_,L,h,h,N][J];return{r:fe*255,g:st*255,b:Ae*255}}function u(l,d,h,v){var S=[P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(h).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,d,h,v,S){var _=[P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(h).toString(16)),P(Be(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,d,h,v){var S=[P(Be(v)),P(Math.round(l).toString(16)),P(Math.round(d).toString(16)),P(Math.round(h).toString(16))];return S.join("")}n.equals=function(l,d){return!l||!d?!1:n(l).toRgbString()==n(d).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.s-=d/100,h.s=X(h.s),n(h)}function b(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.s+=d/100,h.s=X(h.s),n(h)}function w(l){return n(l).desaturate(100)}function x(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.l+=d/100,h.l=X(h.l),n(h)}function A(l,d){d=d===0?0:d||10;var h=n(l).toRgb();return h.r=Math.max(0,Math.min(255,h.r-Math.round(255*-(d/100)))),h.g=Math.max(0,Math.min(255,h.g-Math.round(255*-(d/100)))),h.b=Math.max(0,Math.min(255,h.b-Math.round(255*-(d/100)))),n(h)}function $(l,d){d=d===0?0:d||10;var h=n(l).toHsl();return h.l-=d/100,h.l=X(h.l),n(h)}function U(l,d){var h=n(l).toHsl(),v=(h.h+d)%360;return h.h=v<0?360+v:v,n(h)}function q(l){var d=n(l).toHsl();return d.h=(d.h+180)%360,n(d)}function Y(l,d){if(isNaN(d)||d<=0)throw new Error("Argument to polyad must be a positive number");for(var h=n(l).toHsl(),v=[n(l)],S=360/d,_=1;_<d;_++)v.push(n({h:(h.h+_*S)%360,s:h.s,l:h.l}));return v}function ue(l){var d=n(l).toHsl(),h=d.h;return[n(l),n({h:(h+72)%360,s:d.s,l:d.l}),n({h:(h+216)%360,s:d.s,l:d.l})]}function ye(l,d,h){d=d||6,h=h||30;var v=n(l).toHsl(),S=360/h,_=[n(l)];for(v.h=(v.h-(S*d>>1)+720)%360;--d;)v.h=(v.h+S)%360,_.push(n(v));return _}function K(l,d){d=d||6;for(var h=n(l).toHsv(),v=h.h,S=h.s,_=h.v,N=[],L=1/d;d--;)N.push(n({h:v,s:S,v:_})),_=(_+L)%1;return N}n.mix=function(l,d,h){h=h===0?0:h||50;var v=n(l).toRgb(),S=n(d).toRgb(),_=h/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,d){var h=n(l),v=n(d);return(Math.max(h.getLuminance(),v.getLuminance())+.05)/(Math.min(h.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,d,h){var v=n.readability(l,d),S,_;switch(_=!1,S=le(h),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,d,h){var v=null,S=0,_,N,L,J;h=h||{},N=h.includeFallbackColors,L=h.level,J=h.size;for(var fe=0;fe<d.length;fe++)_=n.readability(l,d[fe]),_>S&&(S=_,v=n(d[fe]));return n.isReadable(l,v,{level:L,size:J})||!N?v:(h.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],h))};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"},j=n.hexNames=T(D);function T(l){var d={};for(var h in l)l.hasOwnProperty(h)&&(d[l[h]]=h);return d}function H(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function I(l,d){B(l)&&(l="100%");var h=M(l);return l=Math.min(d,Math.max(0,parseFloat(l))),h&&(l=parseInt(l*d,10)/100),Math.abs(l-d)<1e-6?1:l%d/parseFloat(d)}function X(l){return Math.min(1,Math.max(0,l))}function O(l){return parseInt(l,16)}function B(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 Be(l){return Math.round(parseFloat(l)*255).toString(16)}function Ve(l){return O(l)/255}var ne=function(){var l="[-\\+]?\\d+%?",d="[-\\+]?\\d*\\.\\d+%?",h="(?:"+d+")|(?:"+l+")",v="[\\s|\\(]+("+h+")[,|\\s]+("+h+")[,|\\s]+("+h+")\\s*\\)?",S="[\\s|\\(]+("+h+")[,|\\s]+("+h+")[,|\\s]+("+h+")[,|\\s]+("+h+")\\s*\\)?";return{CSS_UNIT:new RegExp(h),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 ve(l){return!!ne.CSS_UNIT.exec(l)}function it(l){l=l.replace(e,"").replace(r,"").toLowerCase();var d=!1;if(D[l])l=D[l],d=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var h;return(h=ne.rgb.exec(l))?{r:h[1],g:h[2],b:h[3]}:(h=ne.rgba.exec(l))?{r:h[1],g:h[2],b:h[3],a:h[4]}:(h=ne.hsl.exec(l))?{h:h[1],s:h[2],l:h[3]}:(h=ne.hsla.exec(l))?{h:h[1],s:h[2],l:h[3],a:h[4]}:(h=ne.hsv.exec(l))?{h:h[1],s:h[2],v:h[3]}:(h=ne.hsva.exec(l))?{h:h[1],s:h[2],v:h[3],a:h[4]}:(h=ne.hex8.exec(l))?{r:O(h[1]),g:O(h[2]),b:O(h[3]),a:Ve(h[4]),format:d?"name":"hex8"}:(h=ne.hex6.exec(l))?{r:O(h[1]),g:O(h[2]),b:O(h[3]),format:d?"name":"hex"}:(h=ne.hex4.exec(l))?{r:O(h[1]+""+h[1]),g:O(h[2]+""+h[2]),b:O(h[3]+""+h[3]),a:Ve(h[4]+""+h[4]),format:d?"name":"hex8"}:(h=ne.hex3.exec(l))?{r:O(h[1]+""+h[1]),g:O(h[2]+""+h[2]),b:O(h[3]+""+h[3]),format:d?"name":"hex"}:!1}function le(l){var d,h;return l=l||{level:"AA",size:"small"},d=(l.level||"AA").toUpperCase(),h=(l.size||"small").toLowerCase(),d!=="AA"&&d!=="AAA"&&(d="AA"),h!=="small"&&h!=="large"&&(h="small"),{level:d,size:h}}return n})});var _l=y((M2,bl)=>{var vr=dl(),yl={r:256,g:256,b:256,a:1},vl={h:360,s:1,v:1,a:1};function Qi(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 Zi(t,e,r,n){let i={};for(let s in e)e.hasOwnProperty(s)&&(i[s]=t[s]*r+e[s],i[s]=i[s]<0?i[s]+n[s]:n[s]!==1?i[s]%n[s]:i[s]);return i}function Ki(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=Qi(n,i,r),o=[t.color];for(let a=1;a<r;a++){let c=Zi(s,n,a,yl);o.push(vr(c))}return o}function pl(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return Ki(t,e,r);let o;if(typeof n=="boolean")o=n;else{let u=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;o=n==="long"&&u||n==="short"&&!u}let a=Qi(i,s,r),c=[t.color],f;i.h<=s.h&&!o||i.h>=s.h&&o?f=s.h-i.h:o?f=360-s.h+i.h:f=360-i.h+s.h,a.h=Math.pow(-1,o?1:0)*Math.abs(f)/r;for(let u=1;u<r;u++){let p=Zi(a,i,u,vl);c.push(vr(p))}return c}function ml(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 s=1;s<r;s++){let o=(e-1)*(t[s].pos-t[s-1].pos);n.push(Math.max(1,Math.round(o)))}let i=1;for(let s=r-1;s--;)i+=n[s];for(;i!==e;)if(i<e){let s=Math.min.apply(null,n);n[n.indexOf(s)]++,i++}else{let s=Math.max.apply(null,n);n[n.indexOf(s)]--,i--}return n}function gl(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,s;for(let c=0,f=t.length;c<f-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],s=t[c+1];break}i||(i=s=t[t.length-1]);let o=Qi(i.color[r](),s.color[r](),(s.pos-i.pos)*100),a=Zi(o,i.color[r](),(e-i.pos)*100,n);return vr(a)}var Ht=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,s=!1;this.stops=e.map((o,a)=>{let c=o.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let f=o.color!==void 0;if(!f&&(s||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!f,o={color:f?vr(o.color):null,colorLess:!f,pos:o.pos},o.pos<0||o.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(o.pos<i)throw new Error("Color stops positions are not ordered");i=o.pos}else o={color:vr(o.color!==void 0?o.color:o),pos:a/(n-1)};return o}),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 Ht(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 Ht(e.concat(r.reverse()))}rgb(e){let r=ml(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=Ki(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=Ki(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...o)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=ml(this.stops,e),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=pl(this.stops[o-1],this.stops[o+1],2,r)[1])});for(let s=0,o=this.stops.length;s<o-1;s++){let a=pl(this.stops[s],this.stops[s+1],n[s],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 gl(this.stops,e,"toRgb",yl)}hsvAt(e){return gl(this.stops,e,"toHsv",vl)}};bl.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 Ht(t)}});var Cl=y((q2,bn)=>{"use strict";var Sl=hl(),yg=_l(),wl=/\s/g;function es(...t){let e=yg.apply(this,t),r=(n,i)=>vg(n?n.toString():"",e,i);return r.multiline=(n,i)=>bg(n?n.toString():"",e,i),r}var xl=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function vg(t,e,r){let n=El(r),i=Math.max(t.replace(wl,"").length,e.stops.length),s=xl(e,n,i),o="";for(let a of t)o+=a.match(wl)?a:Sl.hex(s.shift().toHex())(a);return o}function bg(t,e,r){let n=El(r),i=t.split(`
12
+ `,i)}while(n!==-1);return s+=t.substr(i),s};Zu.exports={stringReplaceAll:og,stringEncaseCRLFWithFirstIndex:ag}});var sl=y((M2,il)=>{"use strict";var cg=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,tl=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,ug=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,lg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,fg=new Map([["n",`
13
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function nl(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)):fg.get(t)||t}function dg(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(i=s.match(ug))r.push(i[2].replace(lg,(a,c,f)=>c?nl(c):f));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function hg(t){tl.lastIndex=0;let e=[],r;for(;(r=tl.exec(t))!==null;){let n=r[1];if(r[2]){let i=dg(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function rl(t,e){let r={};for(let i of e)for(let s of i.styles)r[s[0]]=i.inverse?null:s.slice(1);let n=t;for(let[i,s]of Object.entries(r))if(Array.isArray(s)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=s.length>0?n[i](...s):n[i]}return n}il.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(cg,(s,o,a,c,f,u)=>{if(o)i.push(nl(o));else if(c){let p=i.join("");i=[],n.push(r.length===0?p:rl(t,r)(p)),r.push({inverse:a,styles:hg(c)})}else if(f){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(rl(t,r)(i.join(""))),i=[],r.pop()}else i.push(u)}),n.push(i.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var dl=y((q2,fl)=>{"use strict";var vr=Ju(),{stdout:zi,stderr:Wi}=Gi(),{stringReplaceAll:pg,stringEncaseCRLFWithFirstIndex:mg}=el(),{isArray:mn}=Array,al=["ansi","ansi","ansi256","ansi16m"],Ht=Object.create(null),gg=(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=zi?zi.level:0;t.level=e.level===void 0?r:e.level},Ji=class{constructor(e){return cl(e)}},cl=t=>{let e={};return gg(e,t),e.template=(...r)=>ll(e.template,...r),Object.setPrototypeOf(e,gn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Ji,e.template};function gn(t){return cl(t)}for(let[t,e]of Object.entries(vr))Ht[t]={get(){let r=yn(this,Vi(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Ht.visible={get(){let t=yn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var ul=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of ul)Ht[t]={get(){let{level:e}=this;return function(...r){let n=Vi(vr.color[al[e]][t](...r),vr.color.close,this._styler);return yn(this,n,this._isEmpty)}}};for(let t of ul){let e="bg"+t[0].toUpperCase()+t.slice(1);Ht[e]={get(){let{level:r}=this;return function(...n){let i=Vi(vr.bgColor[al[r]][t](...n),vr.bgColor.close,this._styler);return yn(this,i,this._isEmpty)}}}}var yg=Object.defineProperties(()=>{},{...Ht,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),Vi=(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}},yn=(t,e,r)=>{let n=(...i)=>mn(i[0])&&mn(i[0].raw)?ol(n,ll(n,...i)):ol(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,yg),n._generator=t,n._styler=e,n._isEmpty=r,n},ol=(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=pg(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
14
+ `);return s!==-1&&(e=mg(e,i,n,s)),n+e+i},Hi,ll=(t,...e)=>{let[r]=e;if(!mn(r)||!mn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return Hi===void 0&&(Hi=sl()),Hi(t,i.join(""))};Object.defineProperties(gn.prototype,Ht);var vn=gn();vn.supportsColor=zi;vn.stderr=gn({level:Wi?Wi.level:0});vn.stderr.supportsColor=Wi;fl.exports=vn});var hl=y((Yi,Ki)=>{(function(t,e){typeof Yi=="object"&&typeof Ki<"u"?Ki.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(Yi,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 d=i(l);this._originalInput=l,this._r=d.r,this._g=d.g,this._b=d.b,this._a=d.a,this._roundA=Math.round(100*this._a)/100,this._format=h.format||d.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=d.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(),d,v,w,_,j,X;return d=h.r/255,v=h.g/255,w=h.b/255,d<=.03928?_=d/12.92:_=Math.pow((d+.055)/1.055,2.4),v<=.03928?j=v/12.92:j=Math.pow((v+.055)/1.055,2.4),w<=.03928?X=w/12.92:X=Math.pow((w+.055)/1.055,2.4),.2126*_+.7152*j+.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),d=Math.round(h.h*360),v=Math.round(h.s*100),w=Math.round(h.v*100);return this._a==1?"hsv("+d+", "+v+"%, "+w+"%)":"hsva("+d+", "+v+"%, "+w+"%, "+this._roundA+")"},toHsl:function(){var h=o(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=o(this._r,this._g,this._b),d=Math.round(h.h*360),v=Math.round(h.s*100),w=Math.round(h.l*100);return this._a==1?"hsl("+d+", "+v+"%, "+w+"%)":"hsla("+d+", "+v+"%, "+w+"%, "+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 d="#"+g(this._r,this._g,this._b,this._a),v=d,w=this._gradientType?"GradientType = 1, ":"";if(h){var _=n(h);v="#"+g(_._r,_._g,_._b,_._a)}return"progid:DXImageTransform.Microsoft.gradient("+w+"startColorstr="+d+",endColorstr="+v+")"},toString:function(h){var d=!!h;h=h||this._format;var v=!1,w=this._a<1&&this._a>=0,_=!d&&w&&(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,d){var v=h.apply(null,[this].concat([].slice.call(d)));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(N,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(h,d){return h.apply(null,[this].concat([].slice.call(d)))},analogous:function(){return this._applyCombination(ke,arguments)},complement:function(){return this._applyCombination($,arguments)},monochromatic:function(){return this._applyCombination(te,arguments)},splitcomplement:function(){return this._applyCombination(le,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 d={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?d[v]=l[v]:d[v]=R(l[v]));l=d}return n(l,h)};function i(l){var h={r:0,g:0,b:0},d=1,v=null,w=null,_=null,j=!1,X=!1;return typeof l=="string"&&(l=gt(l)),t(l)=="object"&&(Ee(l.r)&&Ee(l.g)&&Ee(l.b)?(h=s(l.r,l.g,l.b),j=!0,X=String(l.r).substr(-1)==="%"?"prgb":"rgb"):Ee(l.h)&&Ee(l.s)&&Ee(l.v)?(v=R(l.s),w=R(l.v),h=f(l.h,v,w),j=!0,X="hsv"):Ee(l.h)&&Ee(l.s)&&Ee(l.l)&&(v=R(l.s),_=R(l.l),h=a(l.h,v,_),j=!0,X="hsl"),l.hasOwnProperty("a")&&(d=l.a)),d=z(d),{ok:j,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:d}}function s(l,h,d){return{r:I(l,255)*255,g:I(h,255)*255,b:I(d,255)*255}}function o(l,h,d){l=I(l,255),h=I(h,255),d=I(d,255);var v=Math.max(l,h,d),w=Math.min(l,h,d),_,j,X=(v+w)/2;if(v==w)_=j=0;else{var W=v-w;switch(j=X>.5?W/(2-v-w):W/(v+w),v){case l:_=(h-d)/W+(h<d?6:0);break;case h:_=(d-l)/W+2;break;case d:_=(l-h)/W+4;break}_/=6}return{h:_,s:j,l:X}}function a(l,h,d){var v,w,_;l=I(l,360),h=I(h,100),d=I(d,100);function j(ve,yt,Y){return Y<0&&(Y+=1),Y>1&&(Y-=1),Y<1/6?ve+(yt-ve)*6*Y:Y<1/2?yt:Y<2/3?ve+(yt-ve)*(2/3-Y)*6:ve}if(h===0)v=w=_=d;else{var X=d<.5?d*(1+h):d+h-d*h,W=2*d-X;v=j(W,X,l+1/3),w=j(W,X,l),_=j(W,X,l-1/3)}return{r:v*255,g:w*255,b:_*255}}function c(l,h,d){l=I(l,255),h=I(h,255),d=I(d,255);var v=Math.max(l,h,d),w=Math.min(l,h,d),_,j,X=v,W=v-w;if(j=v===0?0:W/v,v==w)_=0;else{switch(v){case l:_=(h-d)/W+(h<d?6:0);break;case h:_=(d-l)/W+2;break;case d:_=(l-h)/W+4;break}_/=6}return{h:_,s:j,v:X}}function f(l,h,d){l=I(l,360)*6,h=I(h,100),d=I(d,100);var v=Math.floor(l),w=l-v,_=d*(1-h),j=d*(1-w*h),X=d*(1-(1-w)*h),W=v%6,ve=[d,j,_,_,X,d][W],yt=[X,d,d,j,_,_][W],Y=[_,_,X,d,d,j][W];return{r:ve*255,g:yt*255,b:Y*255}}function u(l,h,d,v){var w=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(d).toString(16))];return v&&w[0].charAt(0)==w[0].charAt(1)&&w[1].charAt(0)==w[1].charAt(1)&&w[2].charAt(0)==w[2].charAt(1)?w[0].charAt(0)+w[1].charAt(0)+w[2].charAt(0):w.join("")}function p(l,h,d,v,w){var _=[P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(d).toString(16)),P(Ue(v))];return w&&_[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,d,v){var w=[P(Ue(v)),P(Math.round(l).toString(16)),P(Math.round(h).toString(16)),P(Math.round(d).toString(16))];return w.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 d=n(l).toHsl();return d.s-=h/100,d.s=G(d.s),n(d)}function b(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.s+=h/100,d.s=G(d.s),n(d)}function S(l){return n(l).desaturate(100)}function x(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.l+=h/100,d.l=G(d.l),n(d)}function A(l,h){h=h===0?0:h||10;var d=n(l).toRgb();return d.r=Math.max(0,Math.min(255,d.r-Math.round(255*-(h/100)))),d.g=Math.max(0,Math.min(255,d.g-Math.round(255*-(h/100)))),d.b=Math.max(0,Math.min(255,d.b-Math.round(255*-(h/100)))),n(d)}function N(l,h){h=h===0?0:h||10;var d=n(l).toHsl();return d.l-=h/100,d.l=G(d.l),n(d)}function B(l,h){var d=n(l).toHsl(),v=(d.h+h)%360;return d.h=v<0?360+v:v,n(d)}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 d=n(l).toHsl(),v=[n(l)],w=360/h,_=1;_<h;_++)v.push(n({h:(d.h+_*w)%360,s:d.s,l:d.l}));return v}function le(l){var h=n(l).toHsl(),d=h.h;return[n(l),n({h:(d+72)%360,s:h.s,l:h.l}),n({h:(d+216)%360,s:h.s,l:h.l})]}function ke(l,h,d){h=h||6,d=d||30;var v=n(l).toHsl(),w=360/d,_=[n(l)];for(v.h=(v.h-(w*h>>1)+720)%360;--h;)v.h=(v.h+w)%360,_.push(n(v));return _}function te(l,h){h=h||6;for(var d=n(l).toHsv(),v=d.h,w=d.s,_=d.v,j=[],X=1/h;h--;)j.push(n({h:v,s:w,v:_})),_=(_+X)%1;return j}n.mix=function(l,h,d){d=d===0?0:d||50;var v=n(l).toRgb(),w=n(h).toRgb(),_=d/100,j={r:(w.r-v.r)*_+v.r,g:(w.g-v.g)*_+v.g,b:(w.b-v.b)*_+v.b,a:(w.a-v.a)*_+v.a};return n(j)},n.readability=function(l,h){var d=n(l),v=n(h);return(Math.max(d.getLuminance(),v.getLuminance())+.05)/(Math.min(d.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,h,d){var v=n.readability(l,h),w,_;switch(_=!1,w=ye(d),w.level+w.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,d){var v=null,w=0,_,j,X,W;d=d||{},j=d.includeFallbackColors,X=d.level,W=d.size;for(var ve=0;ve<h.length;ve++)_=n.readability(l,h[ve]),_>w&&(w=_,v=n(h[ve]));return n.isReadable(l,v,{level:X,size:W})||!j?v:(d.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],d))};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=T(D);function T(l){var h={};for(var d in l)l.hasOwnProperty(d)&&(h[l[d]]=d);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 d=M(l);return l=Math.min(h,Math.max(0,parseFloat(l))),d&&(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 Ue(l){return Math.round(parseFloat(l)*255).toString(16)}function Je(l){return O(l)/255}var ge=function(){var l="[-\\+]?\\d+%?",h="[-\\+]?\\d*\\.\\d+%?",d="(?:"+h+")|(?:"+l+")",v="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?",w="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?";return{CSS_UNIT:new RegExp(d),rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+w),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+w),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"+w),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 Ee(l){return!!ge.CSS_UNIT.exec(l)}function gt(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 d;return(d=ge.rgb.exec(l))?{r:d[1],g:d[2],b:d[3]}:(d=ge.rgba.exec(l))?{r:d[1],g:d[2],b:d[3],a:d[4]}:(d=ge.hsl.exec(l))?{h:d[1],s:d[2],l:d[3]}:(d=ge.hsla.exec(l))?{h:d[1],s:d[2],l:d[3],a:d[4]}:(d=ge.hsv.exec(l))?{h:d[1],s:d[2],v:d[3]}:(d=ge.hsva.exec(l))?{h:d[1],s:d[2],v:d[3],a:d[4]}:(d=ge.hex8.exec(l))?{r:O(d[1]),g:O(d[2]),b:O(d[3]),a:Je(d[4]),format:h?"name":"hex8"}:(d=ge.hex6.exec(l))?{r:O(d[1]),g:O(d[2]),b:O(d[3]),format:h?"name":"hex"}:(d=ge.hex4.exec(l))?{r:O(d[1]+""+d[1]),g:O(d[2]+""+d[2]),b:O(d[3]+""+d[3]),a:Je(d[4]+""+d[4]),format:h?"name":"hex8"}:(d=ge.hex3.exec(l))?{r:O(d[1]+""+d[1]),g:O(d[2]+""+d[2]),b:O(d[3]+""+d[3]),format:h?"name":"hex"}:!1}function ye(l){var h,d;return l=l||{level:"AA",size:"small"},h=(l.level||"AA").toUpperCase(),d=(l.size||"small").toLowerCase(),h!=="AA"&&h!=="AAA"&&(h="AA"),d!=="small"&&d!=="large"&&(d="small"),{level:h,size:d}}return n})});var _l=y((j2,bl)=>{var br=hl(),yl={r:256,g:256,b:256,a:1},vl={h:360,s:1,v:1,a:1};function Zi(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 es(t,e,r,n){let i={};for(let s in e)e.hasOwnProperty(s)&&(i[s]=t[s]*r+e[s],i[s]=i[s]<0?i[s]+n[s]:n[s]!==1?i[s]%n[s]:i[s]);return i}function Qi(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=Zi(n,i,r),o=[t.color];for(let a=1;a<r;a++){let c=es(s,n,a,yl);o.push(br(c))}return o}function pl(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return Qi(t,e,r);let o;if(typeof n=="boolean")o=n;else{let u=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;o=n==="long"&&u||n==="short"&&!u}let a=Zi(i,s,r),c=[t.color],f;i.h<=s.h&&!o||i.h>=s.h&&o?f=s.h-i.h:o?f=360-s.h+i.h:f=360-i.h+s.h,a.h=Math.pow(-1,o?1:0)*Math.abs(f)/r;for(let u=1;u<r;u++){let p=es(a,i,u,vl);c.push(br(p))}return c}function ml(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 s=1;s<r;s++){let o=(e-1)*(t[s].pos-t[s-1].pos);n.push(Math.max(1,Math.round(o)))}let i=1;for(let s=r-1;s--;)i+=n[s];for(;i!==e;)if(i<e){let s=Math.min.apply(null,n);n[n.indexOf(s)]++,i++}else{let s=Math.max.apply(null,n);n[n.indexOf(s)]--,i--}return n}function gl(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,s;for(let c=0,f=t.length;c<f-1;c++)if(e>=t[c].pos&&e<t[c+1].pos){i=t[c],s=t[c+1];break}i||(i=s=t[t.length-1]);let o=Zi(i.color[r](),s.color[r](),(s.pos-i.pos)*100),a=es(o,i.color[r](),(e-i.pos)*100,n);return br(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,s=!1;this.stops=e.map((o,a)=>{let c=o.pos!==void 0;if(r^c)throw new Error("Cannot mix positionned and not posionned color stops");if(c){let f=o.color!==void 0;if(!f&&(s||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!f,o={color:f?br(o.color):null,colorLess:!f,pos:o.pos},o.pos<0||o.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(o.pos<i)throw new Error("Color stops positions are not ordered");i=o.pos}else o={color:br(o.color!==void 0?o.color:o),pos:a/(n-1)};return o}),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=ml(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=Qi(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=Qi(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...o)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=ml(this.stops,e),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=pl(this.stops[o-1],this.stops[o+1],2,r)[1])});for(let s=0,o=this.stops.length;s<o-1;s++){let a=pl(this.stops[s],this.stops[s+1],n[s],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 gl(this.stops,e,"toRgb",yl)}hsvAt(e){return gl(this.stops,e,"toHsv",vl)}};bl.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 Cl=y((N2,bn)=>{"use strict";var Sl=dl(),vg=_l(),wl=/\s/g;function ts(...t){let e=vg.apply(this,t),r=(n,i)=>bg(n?n.toString():"",e,i);return r.multiline=(n,i)=>_g(n?n.toString():"",e,i),r}var xl=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function bg(t,e,r){let n=El(r),i=Math.max(t.replace(wl,"").length,e.stops.length),s=xl(e,n,i),o="";for(let a of t)o+=a.match(wl)?a:Sl.hex(s.shift().toHex())(a);return o}function _g(t,e,r){let n=El(r),i=t.split(`
15
15
  `),s=Math.max.apply(null,i.map(c=>c.length).concat([e.stops.length])),o=xl(e,n,s),a=[];for(let c of i){let f=o.slice(0),u="";for(let p of c)u+=Sl.hex(f.shift().toHex())(p);a.push(u)}return a.join(`
16
- `)}function El(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 br={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"}}};bn.exports=es;for(let t in br)bn.exports[t]=e=>new es(br[t].colors)(e,br[t].options),bn.exports[t].multiline=e=>new es(br[t].colors).multiline(e,br[t].options)});var Dl=y((j2,Pl)=>{var ts=class{constructor(e){this.value=e,this.next=void 0}},rs=class{constructor(){this.clear()}enqueue(e){let r=new ts(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}};Pl.exports=rs});var ns=y((N2,Ol)=>{"use strict";var _g=Dl(),wg=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 _g,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...f)=>{r++;let u=(async()=>a(...f))();c(u);try{await u}catch{}n()},s=(a,c,...f)=>{e.enqueue(i.bind(null,a,c,...f)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},o=(a,...c)=>new Promise(f=>{s(a,f,...c)});return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),o};Ol.exports=wg});var Fl=y((L2,Al)=>{"use strict";var Il=ns(),_n=class extends Error{constructor(e){super(),this.value=e}},Sg=async(t,e)=>e(await t),xg=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new _n(e[0]);return!1},Eg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Il(r.concurrency),i=[...t].map(o=>[o,n(Sg,o,e)]),s=Il(r.preserveOrder?1:1/0);try{await Promise.all(i.map(o=>s(xg,o)))}catch(o){if(o instanceof _n)return o.value;throw o}};Al.exports=Eg});var jl=y(($2,is)=>{"use strict";var Rl=require("path"),wn=require("fs"),{promisify:kl}=require("util"),Cg=Fl(),Pg=kl(wn.stat),Dg=kl(wn.lstat),Tl={directory:"isDirectory",file:"isFile"};function Ml({type:t}){if(!(t in Tl))throw new Error(`Invalid type specified: ${t}`)}var ql=(t,e)=>t===void 0||e[Tl[t]]();is.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Ml(e);let r=e.allowSymlinks?Pg:Dg;return Cg(t,async n=>{try{let i=await r(Rl.resolve(e.cwd,n));return ql(e.type,i)}catch{return!1}},e)};is.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Ml(e);let r=e.allowSymlinks?wn.statSync:wn.lstatSync;for(let n of t)try{let i=r(Rl.resolve(e.cwd,n));if(ql(e.type,i))return n}catch{}}});var Ll=y((B2,ss)=>{"use strict";var Nl=require("fs"),{promisify:Og}=require("util"),Ig=Og(Nl.access);ss.exports=async t=>{try{return await Ig(t),!0}catch{return!1}};ss.exports.sync=t=>{try{return Nl.accessSync(t),!0}catch{return!1}}});var as=y((U2,Jt)=>{"use strict";var ht=require("path"),Sn=jl(),$l=Ll(),os=Symbol("findUp.stop");Jt.exports=async(t,e={})=>{let r=ht.resolve(e.cwd||""),{root:n}=ht.parse(r),i=[].concat(t),s=async o=>{if(typeof t!="function")return Sn(i,o);let a=await t(o.cwd);return typeof a=="string"?Sn([a],o):a};for(;;){let o=await s({...e,cwd:r});if(o===os)return;if(o)return ht.resolve(r,o);if(r===n)return;r=ht.dirname(r)}};Jt.exports.sync=(t,e={})=>{let r=ht.resolve(e.cwd||""),{root:n}=ht.parse(r),i=[].concat(t),s=o=>{if(typeof t!="function")return Sn.sync(i,o);let a=t(o.cwd);return typeof a=="string"?Sn.sync([a],o):a};for(;;){let o=s({...e,cwd:r});if(o===os)return;if(o)return ht.resolve(r,o);if(r===n)return;r=ht.dirname(r)}};Jt.exports.exists=$l;Jt.exports.sync.exists=$l.sync;Jt.exports.stop=os});var xn=y((X2,cs)=>{"use strict";var Bl=require("path"),Ul=as(),Ag=async t=>{let e=await Ul("package.json",{cwd:t});return e&&Bl.dirname(e)};cs.exports=Ag;cs.exports.sync=t=>{let e=Ul.sync("package.json",{cwd:t});return e&&Bl.dirname(e)}});function dt(t=""){return ws?vs.default.resolve(_s.default.sync(__dirname),"../../../",t):vs.default.resolve(_s.default.sync(__dirname),"../griddo-components",t)}function Mg(){let t=bs.default.sync("jsconfig.json",{cwd:dt()});return bs.default.sync("tsconfig.json",{cwd:dt()})||t}function qg(){let t=require(Mg());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[s]=i.split("/*"),o=dt(s);return{...e,[n]:o}},{"@griddo-instance":`${dt()}/src/index.js`})}var vs,bs,_s,ws,cf,Ss=Yo(()=>{"use strict";vs=F(require("node:path")),bs=F(as()),_s=F(xn()),ws=__dirname.includes("node_modules"),cf=qg()});var hf={};Vo(hf,{CXDir:()=>Ug,default:()=>Bg});var St,In,uf,lf,jg,Ng,Lg,$g,ff,Bg,Ug,df=Yo(()=>{"use strict";St=F(require("node:path")),In=F(xn());Ss();uf=In.default.sync(St.default.resolve(__dirname,"../..")),lf=In.default.sync(__dirname),jg=St.default.resolve(In.default.sync(__dirname)),Ng=St.default.resolve(lf,"caches"),Lg=dt(),$g=St.default.join(uf,"exports/sites"),ff={proDomain:"pro-",CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root"},paths:t=>({__caches:St.default.join(Ng,t||""),__components:Lg,__cx:lf,__exports:St.default.join($g,t||""),__root:uf,__ssg:jg})},Bg=ff,Ug=ff.CXDir});var Es=y((c_,wf)=>{"use strict";wf.exports=function(e,r){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(r,i)}}});var xe=y((u_,Ef)=>{"use strict";var Hg=Es(),xt=Object.prototype.toString;function Ds(t){return xt.call(t)==="[object Array]"}function Cs(t){return typeof t>"u"}function Jg(t){return t!==null&&!Cs(t)&&t.constructor!==null&&!Cs(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function zg(t){return xt.call(t)==="[object ArrayBuffer]"}function Wg(t){return typeof FormData<"u"&&t instanceof FormData}function Yg(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Vg(t){return typeof t=="string"}function Kg(t){return typeof t=="number"}function Sf(t){return t!==null&&typeof t=="object"}function An(t){if(xt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Qg(t){return xt.call(t)==="[object Date]"}function Zg(t){return xt.call(t)==="[object File]"}function ey(t){return xt.call(t)==="[object Blob]"}function xf(t){return xt.call(t)==="[object Function]"}function ty(t){return Sf(t)&&xf(t.pipe)}function ry(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function ny(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function iy(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Os(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Ds(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 Ps(){var t={};function e(i,s){An(t[s])&&An(i)?t[s]=Ps(t[s],i):An(i)?t[s]=Ps({},i):Ds(i)?t[s]=i.slice():t[s]=i}for(var r=0,n=arguments.length;r<n;r++)Os(arguments[r],e);return t}function sy(t,e,r){return Os(e,function(i,s){r&&typeof i=="function"?t[s]=Hg(i,r):t[s]=i}),t}function oy(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Ef.exports={isArray:Ds,isArrayBuffer:zg,isBuffer:Jg,isFormData:Wg,isArrayBufferView:Yg,isString:Vg,isNumber:Kg,isObject:Sf,isPlainObject:An,isUndefined:Cs,isDate:Qg,isFile:Zg,isBlob:ey,isFunction:xf,isStream:ty,isURLSearchParams:ry,isStandardBrowserEnv:iy,forEach:Os,merge:Ps,extend:sy,trim:ny,stripBOM:oy}});var Fn=y((l_,Pf)=>{"use strict";var Yt=xe();function Cf(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Pf.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 s=[];Yt.forEach(r,function(c,f){c===null||typeof c>"u"||(Yt.isArray(c)?f=f+"[]":c=[c],Yt.forEach(c,function(p){Yt.isDate(p)?p=p.toISOString():Yt.isObject(p)&&(p=JSON.stringify(p)),s.push(Cf(f)+"="+Cf(p))}))}),i=s.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var Of=y((f_,Df)=>{"use strict";var ay=xe();function Rn(){this.handlers=[]}Rn.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};Rn.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Rn.prototype.forEach=function(e){ay.forEach(this.handlers,function(n){n!==null&&e(n)})};Df.exports=Rn});var Af=y((h_,If)=>{"use strict";var cy=xe();If.exports=function(e,r){cy.forEach(e,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[s])})}});var kn=y((d_,Ff)=>{"use strict";Ff.exports=function(e,r,n,i,s){return e.config=r,n&&(e.code=n),e.request=i,e.response=s,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 Tn=y((p_,Rf)=>{"use strict";var uy=kn();Rf.exports=function(e,r,n,i,s){var o=new Error(e);return uy(o,r,n,i,s)}});var Is=y((m_,kf)=>{"use strict";var ly=Tn();kf.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(ly("Request failed with status code "+n.status,n.config,null,n.request,n))}});var Mf=y((g_,Tf)=>{"use strict";var Mn=xe();Tf.exports=Mn.isStandardBrowserEnv()?function(){return{write:function(r,n,i,s,o,a){var c=[];c.push(r+"="+encodeURIComponent(n)),Mn.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),Mn.isString(s)&&c.push("path="+s),Mn.isString(o)&&c.push("domain="+o),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 jf=y((y_,qf)=>{"use strict";qf.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Lf=y((v_,Nf)=>{"use strict";Nf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var As=y((b_,$f)=>{"use strict";var fy=jf(),hy=Lf();$f.exports=function(e,r){return e&&!fy(r)?hy(e,r):r}});var Uf=y((__,Bf)=>{"use strict";var Fs=xe(),dy=["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"];Bf.exports=function(e){var r={},n,i,s;return e&&Fs.forEach(e.split(`
17
- `),function(a){if(s=a.indexOf(":"),n=Fs.trim(a.substr(0,s)).toLowerCase(),i=Fs.trim(a.substr(s+1)),n){if(r[n]&&dy.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 Hf=y((w_,Gf)=>{"use strict";var Xf=xe();Gf.exports=Xf.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){var o=s;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{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(o){var a=Xf.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var zf=y((S_,Jf)=>{"use strict";var qn=xe(),py=Is(),my=Mf(),gy=Fn(),yy=As(),vy=Uf(),by=Hf(),Rs=Tn();Jf.exports=function(e){return new Promise(function(n,i){var s=e.data,o=e.headers,a=e.responseType;qn.isFormData(s)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(f+":"+u)}var p=yy(e.baseURL,e.url);c.open(e.method.toUpperCase(),gy(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?vy(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};py(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(Rs("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(Rs("Network Error",e,null,c)),c=null},c.ontimeout=function(){var w="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),i(Rs(w,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},qn.isStandardBrowserEnv()){var m=(e.withCredentials||by(p))&&e.xsrfCookieName?my.read(e.xsrfCookieName):void 0;m&&(o[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&qn.forEach(o,function(w,x){typeof s>"u"&&x.toLowerCase()==="content-type"?delete o[x]:c.setRequestHeader(x,w)}),qn.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)}),s||(s=null),c.send(s)})}});var Yf=y((x_,Wf)=>{var Vt=1e3,Kt=Vt*60,Qt=Kt*60,Et=Qt*24,_y=Et*7,wy=Et*365.25;Wf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Sy(t);if(r==="number"&&isFinite(t))return e.long?Ey(t):xy(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Sy(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*wy;case"weeks":case"week":case"w":return r*_y;case"days":case"day":case"d":return r*Et;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qt;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Vt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function xy(t){var e=Math.abs(t);return e>=Et?Math.round(t/Et)+"d":e>=Qt?Math.round(t/Qt)+"h":e>=Kt?Math.round(t/Kt)+"m":e>=Vt?Math.round(t/Vt)+"s":t+"ms"}function Ey(t){var e=Math.abs(t);return e>=Et?jn(t,e,Et,"day"):e>=Qt?jn(t,e,Qt,"hour"):e>=Kt?jn(t,e,Kt,"minute"):e>=Vt?jn(t,e,Vt,"second"):t+" ms"}function jn(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var ks=y((E_,Vf)=>{function Cy(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Yf(),r.destroy=f,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,$=Number(new Date),U=$-(p||$);A.diff=U,A.prev=p,A.curr=$,p=$,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let q=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(ue,ye)=>{if(ue==="%%")return"%";q++;let K=r.formatters[ye];if(typeof K=="function"){let D=x[q];ue=K.call(A,D),x.splice(q,1),q--}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 s(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function o(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 f(){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}Vf.exports=Cy});var Kf=y((Fe,Nn)=>{Fe.formatArgs=Dy;Fe.save=Oy;Fe.load=Iy;Fe.useColors=Py;Fe.storage=Ay();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 Py(){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 Dy(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Nn.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 Oy(t){try{t?Fe.storage.setItem("debug",t):Fe.storage.removeItem("debug")}catch{}}function Iy(){let t;try{t=Fe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Ay(){try{return localStorage}catch{}}Nn.exports=ks()(Fe);var{formatters:Fy}=Nn.exports;Fy.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Zf=y((oe,$n)=>{var Ry=require("tty"),Ln=require("util");oe.init=Ly;oe.log=qy;oe.formatArgs=Ty;oe.save=jy;oe.load=Ny;oe.useColors=ky;oe.destroy=Ln.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");oe.colors=[6,2,3,4,5,1];try{let t=Xi();t&&(t.stderr||t).level>=2&&(oe.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{}oe.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,s)=>s.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 ky(){return"colors"in oe.inspectOpts?!!oe.inspectOpts.colors:Ry.isatty(process.stderr.fd)}function Ty(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
16
+ `)}function El(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 _r={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"}}};bn.exports=ts;for(let t in _r)bn.exports[t]=e=>new ts(_r[t].colors)(e,_r[t].options),bn.exports[t].multiline=e=>new ts(_r[t].colors).multiline(e,_r[t].options)});var Dl=y((L2,Pl)=>{var rs=class{constructor(e){this.value=e,this.next=void 0}},ns=class{constructor(){this.clear()}enqueue(e){let r=new rs(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}};Pl.exports=ns});var is=y(($2,Ol)=>{"use strict";var wg=Dl(),Sg=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 wg,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,c,...f)=>{r++;let u=(async()=>a(...f))();c(u);try{await u}catch{}n()},s=(a,c,...f)=>{e.enqueue(i.bind(null,a,c,...f)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},o=(a,...c)=>new Promise(f=>{s(a,f,...c)});return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),o};Ol.exports=Sg});var Fl=y((B2,Al)=>{"use strict";var Il=is(),_n=class extends Error{constructor(e){super(),this.value=e}},xg=async(t,e)=>e(await t),Eg=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new _n(e[0]);return!1},Cg=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=Il(r.concurrency),i=[...t].map(o=>[o,n(xg,o,e)]),s=Il(r.preserveOrder?1:1/0);try{await Promise.all(i.map(o=>s(Eg,o)))}catch(o){if(o instanceof _n)return o.value;throw o}};Al.exports=Cg});var jl=y((U2,ss)=>{"use strict";var Rl=require("path"),wn=require("fs"),{promisify:kl}=require("util"),Pg=Fl(),Dg=kl(wn.stat),Og=kl(wn.lstat),Tl={directory:"isDirectory",file:"isFile"};function Ml({type:t}){if(!(t in Tl))throw new Error(`Invalid type specified: ${t}`)}var ql=(t,e)=>t===void 0||e[Tl[t]]();ss.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Ml(e);let r=e.allowSymlinks?Dg:Og;return Pg(t,async n=>{try{let i=await r(Rl.resolve(e.cwd,n));return ql(e.type,i)}catch{return!1}},e)};ss.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Ml(e);let r=e.allowSymlinks?wn.statSync:wn.lstatSync;for(let n of t)try{let i=r(Rl.resolve(e.cwd,n));if(ql(e.type,i))return n}catch{}}});var Ll=y((X2,os)=>{"use strict";var Nl=require("fs"),{promisify:Ig}=require("util"),Ag=Ig(Nl.access);os.exports=async t=>{try{return await Ag(t),!0}catch{return!1}};os.exports.sync=t=>{try{return Nl.accessSync(t),!0}catch{return!1}}});var cs=y((G2,Wt)=>{"use strict";var ct=require("path"),Sn=jl(),$l=Ll(),as=Symbol("findUp.stop");Wt.exports=async(t,e={})=>{let r=ct.resolve(e.cwd||""),{root:n}=ct.parse(r),i=[].concat(t),s=async o=>{if(typeof t!="function")return Sn(i,o);let a=await t(o.cwd);return typeof a=="string"?Sn([a],o):a};for(;;){let o=await s({...e,cwd:r});if(o===as)return;if(o)return ct.resolve(r,o);if(r===n)return;r=ct.dirname(r)}};Wt.exports.sync=(t,e={})=>{let r=ct.resolve(e.cwd||""),{root:n}=ct.parse(r),i=[].concat(t),s=o=>{if(typeof t!="function")return Sn.sync(i,o);let a=t(o.cwd);return typeof a=="string"?Sn.sync([a],o):a};for(;;){let o=s({...e,cwd:r});if(o===as)return;if(o)return ct.resolve(r,o);if(r===n)return;r=ct.dirname(r)}};Wt.exports.exists=$l;Wt.exports.sync.exists=$l.sync;Wt.exports.stop=as});var xn=y((H2,us)=>{"use strict";var Bl=require("path"),Ul=cs(),Fg=async t=>{let e=await Ul("package.json",{cwd:t});return e&&Bl.dirname(e)};us.exports=Fg;us.exports.sync=t=>{let e=Ul.sync("package.json",{cwd:t});return e&&Bl.dirname(e)}});function ut(t=""){return ys?ps.default.resolve(gs.default.sync(__dirname),"../../../",t):ps.default.resolve(gs.default.sync(__dirname),"../griddo-components",t)}function Mg(){let t=ms.default.sync("jsconfig.json",{cwd:ut()});return ms.default.sync("tsconfig.json",{cwd:ut()})||t}function qg(){let t=require(Mg());return Object.keys(t?.compilerOptions?.paths).reduce((e,r)=>{let[n]=r.split("/"),[i]=t&&t.compilerOptions&&t.compilerOptions.paths&&t.compilerOptions.paths[r],[s]=i.split("/*"),o=ut(s);return{...e,[n]:o}},{"@griddo-instance":`${ut()}/src/index.js`})}var ps,ms,gs,ys,Zl,vs=Vo(()=>{"use strict";ps=F(require("node:path")),ms=F(cs()),gs=F(xn()),ys=__dirname.includes("node_modules"),Zl=qg()});var rf={};Yo(rf,{CXDir:()=>Xg,default:()=>Ug});var lt,In,ef,bs,jg,Ng,Lg,$g,Bg,tf,Ug,Xg,nf=Vo(()=>{"use strict";lt=F(require("node:path")),In=F(xn());vs();ef=In.default.sync(lt.default.resolve(__dirname,"../..")),bs=In.default.sync(__dirname),jg=lt.default.resolve(In.default.sync(__dirname)),Ng=lt.default.resolve(bs,"caches"),Lg=ut(),$g=lt.default.join(ef,"exports/sites"),{version:Bg}=require(lt.default.join(bs,"package.json")),tf={proDomain:"pro-",griddoVersion:Bg,CXDir:{EXPORTS:"__exports",CACHE:"__caches",CX:"__cx",SSG:"__ssg",COMPONENTS:"__components",ROOT:"__root"},paths:t=>({__caches:lt.default.join(Ng,t||""),__components:Lg,__cx:bs,__exports:lt.default.join($g,t||""),__root:ef,__ssg:jg})},Ug=tf,Xg=tf.CXDir});var Cs=y((s_,wf)=>{"use strict";wf.exports=function(e,r){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(r,i)}}});var xe=y((o_,Ef)=>{"use strict";var Jg=Cs(),xt=Object.prototype.toString;function Os(t){return xt.call(t)==="[object Array]"}function Ps(t){return typeof t>"u"}function Vg(t){return t!==null&&!Ps(t)&&t.constructor!==null&&!Ps(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function Yg(t){return xt.call(t)==="[object ArrayBuffer]"}function Kg(t){return typeof FormData<"u"&&t instanceof FormData}function Qg(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function Zg(t){return typeof t=="string"}function ey(t){return typeof t=="number"}function Sf(t){return t!==null&&typeof t=="object"}function Fn(t){if(xt.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function ty(t){return xt.call(t)==="[object Date]"}function ry(t){return xt.call(t)==="[object File]"}function ny(t){return xt.call(t)==="[object Blob]"}function xf(t){return xt.call(t)==="[object Function]"}function iy(t){return Sf(t)&&xf(t.pipe)}function sy(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function oy(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ay(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Is(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Os(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 Ds(){var t={};function e(i,s){Fn(t[s])&&Fn(i)?t[s]=Ds(t[s],i):Fn(i)?t[s]=Ds({},i):Os(i)?t[s]=i.slice():t[s]=i}for(var r=0,n=arguments.length;r<n;r++)Is(arguments[r],e);return t}function cy(t,e,r){return Is(e,function(i,s){r&&typeof i=="function"?t[s]=Jg(i,r):t[s]=i}),t}function uy(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Ef.exports={isArray:Os,isArrayBuffer:Yg,isBuffer:Vg,isFormData:Kg,isArrayBufferView:Qg,isString:Zg,isNumber:ey,isObject:Sf,isPlainObject:Fn,isUndefined:Ps,isDate:ty,isFile:ry,isBlob:ny,isFunction:xf,isStream:iy,isURLSearchParams:sy,isStandardBrowserEnv:ay,forEach:Is,merge:Ds,extend:cy,trim:oy,stripBOM:uy}});var Rn=y((a_,Pf)=>{"use strict";var Yt=xe();function Cf(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Pf.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 s=[];Yt.forEach(r,function(c,f){c===null||typeof c>"u"||(Yt.isArray(c)?f=f+"[]":c=[c],Yt.forEach(c,function(p){Yt.isDate(p)?p=p.toISOString():Yt.isObject(p)&&(p=JSON.stringify(p)),s.push(Cf(f)+"="+Cf(p))}))}),i=s.join("&")}if(i){var o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var Of=y((c_,Df)=>{"use strict";var ly=xe();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){ly.forEach(this.handlers,function(n){n!==null&&e(n)})};Df.exports=kn});var Af=y((u_,If)=>{"use strict";var fy=xe();If.exports=function(e,r){fy.forEach(e,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[s])})}});var Tn=y((l_,Ff)=>{"use strict";Ff.exports=function(e,r,n,i,s){return e.config=r,n&&(e.code=n),e.request=i,e.response=s,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 Mn=y((f_,Rf)=>{"use strict";var dy=Tn();Rf.exports=function(e,r,n,i,s){var o=new Error(e);return dy(o,r,n,i,s)}});var As=y((d_,kf)=>{"use strict";var hy=Mn();kf.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(hy("Request failed with status code "+n.status,n.config,null,n.request,n))}});var Mf=y((h_,Tf)=>{"use strict";var qn=xe();Tf.exports=qn.isStandardBrowserEnv()?function(){return{write:function(r,n,i,s,o,a){var c=[];c.push(r+"="+encodeURIComponent(n)),qn.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),qn.isString(s)&&c.push("path="+s),qn.isString(o)&&c.push("domain="+o),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 jf=y((p_,qf)=>{"use strict";qf.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Lf=y((m_,Nf)=>{"use strict";Nf.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var Fs=y((g_,$f)=>{"use strict";var py=jf(),my=Lf();$f.exports=function(e,r){return e&&!py(r)?my(e,r):r}});var Uf=y((y_,Bf)=>{"use strict";var Rs=xe(),gy=["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"];Bf.exports=function(e){var r={},n,i,s;return e&&Rs.forEach(e.split(`
17
+ `),function(a){if(s=a.indexOf(":"),n=Rs.trim(a.substr(0,s)).toLowerCase(),i=Rs.trim(a.substr(s+1)),n){if(r[n]&&gy.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 Hf=y((v_,Gf)=>{"use strict";var Xf=xe();Gf.exports=Xf.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(s){var o=s;return e&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{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(o){var a=Xf.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Wf=y((b_,zf)=>{"use strict";var jn=xe(),yy=As(),vy=Mf(),by=Rn(),_y=Fs(),wy=Uf(),Sy=Hf(),ks=Mn();zf.exports=function(e){return new Promise(function(n,i){var s=e.data,o=e.headers,a=e.responseType;jn.isFormData(s)&&delete o["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(f+":"+u)}var p=_y(e.baseURL,e.url);c.open(e.method.toUpperCase(),by(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function g(){if(c){var b="getAllResponseHeaders"in c?wy(c.getAllResponseHeaders()):null,S=!a||a==="text"||a==="json"?c.responseText:c.response,x={data:S,status:c.status,statusText:c.statusText,headers:b,config:e,request:c};yy(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(ks("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){i(ks("Network Error",e,null,c)),c=null},c.ontimeout=function(){var S="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(S=e.timeoutErrorMessage),i(ks(S,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},jn.isStandardBrowserEnv()){var m=(e.withCredentials||Sy(p))&&e.xsrfCookieName?vy.read(e.xsrfCookieName):void 0;m&&(o[e.xsrfHeaderName]=m)}"setRequestHeader"in c&&jn.forEach(o,function(S,x){typeof s>"u"&&x.toLowerCase()==="content-type"?delete o[x]:c.setRequestHeader(x,S)}),jn.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(S){c&&(c.abort(),i(S),c=null)}),s||(s=null),c.send(s)})}});var Vf=y((__,Jf)=>{var Kt=1e3,Qt=Kt*60,Zt=Qt*60,Et=Zt*24,xy=Et*7,Ey=Et*365.25;Jf.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Cy(t);if(r==="number"&&isFinite(t))return e.long?Dy(t):Py(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Cy(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*Ey;case"weeks":case"week":case"w":return r*xy;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 Py(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 Dy(t){var e=Math.abs(t);return e>=Et?Nn(t,e,Et,"day"):e>=Zt?Nn(t,e,Zt,"hour"):e>=Qt?Nn(t,e,Qt,"minute"):e>=Kt?Nn(t,e,Kt,"second"):t+" ms"}function Nn(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Ts=y((w_,Yf)=>{function Oy(t){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Vf(),r.destroy=f,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 S(...x){if(!S.enabled)return;let A=S,N=Number(new Date),B=N-(p||N);A.diff=B,A.prev=p,A.curr=N,p=N,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let $=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(le,ke)=>{if(le==="%%")return"%";$++;let te=r.formatters[ke];if(typeof te=="function"){let D=x[$];le=te.call(A,D),x.splice($,1),$--}return le}),r.formatArgs.call(A,x),(A.log||r.log).apply(A,x)}return S.namespace=u,S.useColors=r.useColors(),S.color=r.selectColor(u),S.extend=n,S.destroy=r.destroy,Object.defineProperty(S,"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(S),S}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 s(){let u=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),u}function o(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 f(){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}Yf.exports=Oy});var Kf=y((Fe,Ln)=>{Fe.formatArgs=Ay;Fe.save=Fy;Fe.load=Ry;Fe.useColors=Iy;Fe.storage=ky();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 Iy(){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 Ay(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ln.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 Fy(t){try{t?Fe.storage.setItem("debug",t):Fe.storage.removeItem("debug")}catch{}}function Ry(){let t;try{t=Fe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function ky(){try{return localStorage}catch{}}Ln.exports=Ts()(Fe);var{formatters:Ty}=Ln.exports;Ty.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Zf=y((ae,Bn)=>{var My=require("tty"),$n=require("util");ae.init=Uy;ae.log=Ly;ae.formatArgs=jy;ae.save=$y;ae.load=By;ae.useColors=qy;ae.destroy=$n.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ae.colors=[6,2,3,4,5,1];try{let t=Gi();t&&(t.stderr||t).level>=2&&(ae.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{}ae.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,s)=>s.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 qy(){return"colors"in ae.inspectOpts?!!ae.inspectOpts.colors:My.isatty(process.stderr.fd)}function jy(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
18
18
  `).join(`
19
- `+s),t.push(i+"m+"+$n.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=My()+e+" "+t[0]}function My(){return oe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function qy(...t){return process.stderr.write(Ln.format(...t)+`
20
- `)}function jy(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Ny(){return process.env.DEBUG}function Ly(t){t.inspectOpts={};let e=Object.keys(oe.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=oe.inspectOpts[e[r]]}$n.exports=ks()(oe);var{formatters:Qf}=$n.exports;Qf.o=function(t){return this.inspectOpts.colors=this.useColors,Ln.inspect(t,this.inspectOpts).split(`
21
- `).map(e=>e.trim()).join(" ")};Qf.O=function(t){return this.inspectOpts.colors=this.useColors,Ln.inspect(t,this.inspectOpts)}});var eh=y((C_,Ts)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ts.exports=Kf():Ts.exports=Zf()});var rh=y((P_,th)=>{var Sr;th.exports=function(){if(!Sr){try{Sr=eh()("follow-redirects")}catch{}typeof Sr!="function"&&(Sr=function(){})}Sr.apply(null,arguments)}});var $s=y((D_,Ls)=>{var Ct=require("url"),Ms=Ct.URL,$y=require("http"),By=require("https"),sh=require("stream").Writable,oh=require("assert"),ah=rh(),js=["abort","aborted","connect","error","socket","timeout"],Ns=Object.create(null);js.forEach(function(t){Ns[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Uy=Er("ERR_INVALID_URL","Invalid URL",TypeError),nh=Er("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Xy=Er("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Gy=Er("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Hy=Er("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){sh.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(sh.prototype);Re.prototype.abort=function(){uh(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new Hy;if(!Pt(t)&&!Wy(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(xr(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 Gy),this.abort())};Re.prototype.end=function(t,e,r){if(xr(t)?(r=t,t=e=null):xr(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(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},t),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),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",s),this.on("error",s),this.on("response",s),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 js)n.on(i,Ns[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ct.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function c(f){if(n===o._currentRequest)if(f)o.emit("error",f);else if(s<a.length){var u=a[s++];n.finished||n.write(u.data,u.encoding,c)}else o._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(uh(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Xy);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var s=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=[],qs(/^content-/i,this._options.headers));var o=qs(/^host$/i,this._options.headers),a=Ct.parse(this._currentUrl),c=o||a.host,f=/^\w+:/.test(r)?this._currentUrl:Ct.format(Object.assign(a,{host:c})),u;try{u=Ct.resolve(f,r)}catch(b){this.emit("error",new nh({cause:b}));return}ah("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&&!zy(p.host,c))&&qs(/^(?:authorization|cookie)$/i,this._options.headers),xr(i)){var g={headers:t.headers,statusCode:e},m={url:f,method:s,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 nh({cause:b}))}};function ch(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",s=r[i]=t[n],o=e[n]=Object.create(s);function a(f,u,p){if(Pt(f)){var g;try{g=ih(new Ms(f))}catch{g=Ct.parse(f)}if(!Pt(g.protocol))throw new Uy({input:f});f=g}else Ms&&f instanceof Ms?f=ih(f):(p=u,u=f,f={protocol:i});return xr(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},f,u),u.nativeProtocols=r,!Pt(u.host)&&!Pt(u.hostname)&&(u.hostname="::1"),oh.equal(u.protocol,i,"protocol mismatch"),ah("options",u),new Re(u,p)}function c(f,u,p){var g=o.request(f,u,p);return g.end(),g}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Jy(){}function ih(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 qs(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 Er(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 uh(t){for(var e of js)t.removeListener(e,Ns[e]);t.on("error",Jy),t.abort()}function zy(t,e){oh(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 xr(t){return typeof t=="function"}function Wy(t){return typeof t=="object"&&"length"in t}Ls.exports=ch({http:$y,https:By});Ls.exports.wrap=ch});var Bs=y((O_,Yy)=>{Yy.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 mh=y((I_,ph)=>{"use strict";var Cr=xe(),lh=Is(),Vy=As(),Ky=Fn(),Qy=require("http"),Zy=require("https"),ev=$s().http,tv=$s().https,fh=require("url"),rv=require("zlib"),nv=Bs(),Bn=Tn(),Us=kn(),hh=/https:?/;function dh(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(s){s.headers.host=s.host,dh(s,e,s.href)}}ph.exports=function(e){return new Promise(function(n,i){var s=function(P){n(P)},o=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/"+nv.version,a&&!Cr.isStream(a)){if(!Buffer.isBuffer(a))if(Cr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(Cr.isString(a))a=Buffer.from(a,"utf-8");else return o(Bn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var f=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";f=u+":"+p}var g=Vy(e.baseURL,e.url),m=fh.parse(g),b=m.protocol||"http:";if(!f&&m.auth){var w=m.auth.split(":"),x=w[0]||"",A=w[1]||"";f=x+":"+A}f&&delete c.Authorization;var $=hh.test(b),U=$?e.httpsAgent:e.httpAgent,q={path:Ky(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:U,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?q.socketPath=e.socketPath:(q.hostname=m.hostname,q.port=m.port);var Y=e.proxy;if(!Y&&Y!==!1){var ue=b.slice(0,-1)+"_proxy",ye=process.env[ue]||process.env[ue.toUpperCase()];if(ye){var K=fh.parse(ye),D=process.env.no_proxy||process.env.NO_PROXY,j=!0;if(D){var T=D.split(",").map(function(P){return P.trim()});j=!T.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(j&&(Y={host:K.hostname,port:K.port,protocol:K.protocol},K.auth)){var H=K.auth.split(":");Y.auth={username:H[0],password:H[1]}}}}Y&&(q.headers.host=m.hostname+(m.port?":"+m.port:""),dh(q,Y,b+"//"+m.hostname+(m.port?":"+m.port:"")+q.path));var I,X=$&&(Y?hh.test(Y.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=X?Zy:Qy:(e.maxRedirects&&(q.maxRedirects=e.maxRedirects),I=X?tv:ev),e.maxBodyLength>-1&&(q.maxBodyLength=e.maxBodyLength);var O=I.request(q,function(P){if(!O.aborted){var R=P,Be=P.req||O;if(P.statusCode!==204&&Be.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(rv.createUnzip()),delete P.headers["content-encoding"];break}var Ve={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:Be};if(e.responseType==="stream")Ve.data=R,lh(s,o,Ve);else{var ne=[],ve=0;R.on("data",function(le){ne.push(le),ve+=le.length,e.maxContentLength>-1&&ve>e.maxContentLength&&(R.destroy(),o(Bn("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Be)))}),R.on("error",function(le){O.aborted||o(Us(le,e,null,Be))}),R.on("end",function(){var le=Buffer.concat(ne);e.responseType!=="arraybuffer"&&(le=le.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(le=Cr.stripBOM(le))),Ve.data=le,lh(s,o,Ve)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||o(Us(P,e,null,O))}),e.timeout){var B=parseInt(e.timeout,10);if(isNaN(B)){o(Bn("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(B,function(){O.abort(),o(Bn("timeout of "+B+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",O))})}e.cancelToken&&e.cancelToken.promise.then(function(P){O.aborted||(O.abort(),o(P))}),Cr.isStream(a)?a.on("error",function(P){o(Us(P,e,null,O))}).pipe(O):O.end(a)})}});var Xn=y((A_,vh)=>{"use strict";var ae=xe(),gh=Af(),iv=kn(),sv={"Content-Type":"application/x-www-form-urlencoded"};function yh(t,e){!ae.isUndefined(t)&&ae.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function ov(){var t;return typeof XMLHttpRequest<"u"?t=zf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=mh()),t}function av(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 Un={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ov(),transformRequest:[function(e,r){return gh(r,"Accept"),gh(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)?(yh(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ae.isObject(e)||r&&r["Content-Type"]==="application/json"?(yh(r,"application/json"),av(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||i&&ae.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?iv(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Un.headers={common:{Accept:"application/json, text/plain, */*"}};ae.forEach(["delete","get","head"],function(e){Un.headers[e]={}});ae.forEach(["post","put","patch"],function(e){Un.headers[e]=ae.merge(sv)});vh.exports=Un});var _h=y((F_,bh)=>{"use strict";var cv=xe(),uv=Xn();bh.exports=function(e,r,n){var i=this||uv;return cv.forEach(n,function(o){e=o.call(i,e,r)}),e}});var Xs=y((R_,wh)=>{"use strict";wh.exports=function(e){return!!(e&&e.__CANCEL__)}});var Eh=y((k_,xh)=>{"use strict";var Sh=xe(),Gs=_h(),lv=Xs(),fv=Xn();function Hs(t){t.cancelToken&&t.cancelToken.throwIfRequested()}xh.exports=function(e){Hs(e),e.headers=e.headers||{},e.data=Gs.call(e,e.data,e.headers,e.transformRequest),e.headers=Sh.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Sh.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||fv.adapter;return r(e).then(function(i){return Hs(e),i.data=Gs.call(e,i.data,i.headers,e.transformResponse),i},function(i){return lv(i)||(Hs(e),i&&i.response&&(i.response.data=Gs.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Js=y((T_,Ch)=>{"use strict";var me=xe();Ch.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],o=["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 f(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(s,f),me.forEach(o,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(s).concat(o).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return me.forEach(p,f),n}});var Ah=y((M_,Ih)=>{"use strict";var Dh=Bs(),zs={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){zs[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Ph={},hv=Dh.version.split(".");function Oh(t,e){for(var r=e?e.split("."):hv,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}zs.transitional=function(e,r,n){var i=r&&Oh(r);function s(o,a){return"[Axios v"+Dh.version+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,c){if(e===!1)throw new Error(s(a," has been removed in "+r));return i&&!Ph[a]&&(Ph[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,c):!0}};function dv(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 s=n[i],o=e[s];if(o){var a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new TypeError("option "+s+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+s)}}Ih.exports={isOlderVersion:Oh,assertOptions:dv,validators:zs}});var qh=y((q_,Mh)=>{"use strict";var kh=xe(),pv=Fn(),Fh=Of(),Rh=Eh(),Gn=Js(),Th=Ah(),Zt=Th.validators;function Pr(t){this.defaults=t,this.interceptors={request:new Fh,response:new Fh}}Pr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Gn(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&&Th.assertOptions(r,{silentJSONParsing:Zt.transitional(Zt.boolean,"1.0.0"),forcedJSONParsing:Zt.transitional(Zt.boolean,"1.0.0"),clarifyTimeoutError:Zt.transitional(Zt.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 s=[];this.interceptors.response.forEach(function(g){s.push(g.fulfilled,g.rejected)});var o;if(!i){var a=[Rh,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var c=e;n.length;){var f=n.shift(),u=n.shift();try{c=f(c)}catch(p){u(p);break}}try{o=Rh(c)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Pr.prototype.getUri=function(e){return e=Gn(this.defaults,e),pv(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};kh.forEach(["delete","get","head","options"],function(e){Pr.prototype[e]=function(r,n){return this.request(Gn(n||{},{method:e,url:r,data:(n||{}).data}))}});kh.forEach(["post","put","patch"],function(e){Pr.prototype[e]=function(r,n,i){return this.request(Gn(i||{},{method:e,url:r,data:n}))}});Mh.exports=Pr});var Ys=y((j_,jh)=>{"use strict";function Ws(t){this.message=t}Ws.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Ws.prototype.__CANCEL__=!0;jh.exports=Ws});var Lh=y((N_,Nh)=>{"use strict";var mv=Ys();function Hn(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 mv(i),e(r.reason))})}Hn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Hn.source=function(){var e,r=new Hn(function(i){e=i});return{token:r,cancel:e}};Nh.exports=Hn});var Bh=y((L_,$h)=>{"use strict";$h.exports=function(e){return function(n){return e.apply(null,n)}}});var Xh=y(($_,Uh)=>{"use strict";Uh.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Jh=y((B_,Vs)=>{"use strict";var Gh=xe(),gv=Es(),Jn=qh(),yv=Js(),vv=Xn();function Hh(t){var e=new Jn(t),r=gv(Jn.prototype.request,e);return Gh.extend(r,Jn.prototype,e),Gh.extend(r,e),r}var Le=Hh(vv);Le.Axios=Jn;Le.create=function(e){return Hh(yv(Le.defaults,e))};Le.Cancel=Ys();Le.CancelToken=Lh();Le.isCancel=Xs();Le.all=function(e){return Promise.all(e)};Le.spread=Bh();Le.isAxiosError=Xh();Vs.exports=Le;Vs.exports.default=Le});var Ks=y((U_,zh)=>{zh.exports=Jh()});var Z=y(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.isUndefined=Oe.fixName=Oe.validateName=Oe.validateSingleChar=Oe.fixChar=Oe.validateChar=void 0;function Ov(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}Oe.validateChar=Ov;function Iv(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}Oe.fixChar=Iv;function Av(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}Oe.validateSingleChar=Av;function Fv(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 s=i?2:1,o=s;o<t.length;o++){var a=t.charCodeAt(o);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(o+1===t.length)return!1;var c=t.charCodeAt(o+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){o++;continue}return!1}}return!0}Oe.validateName=Fv;function Rv(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),s=r>=55296&&r<=56191&&i>=56320&&i<=57343;s?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var o=s?2:1,a=o;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 f=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&f>=56320&&f<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Oe.fixName=Rv;function kv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Oe.isUndefined=kv});var tr=y(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.StringOptions=void 0;var Vn=Z(),Tv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
22
- `,this.pretty=!0,(0,Vn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Vn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Vn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Vn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Kn.StringOptions=Tv});var Qn=y(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.escapeDoubleQuotes=Te.escapeSingleQuotes=Te.escapeRightAngleBracketsInCdataTerminator=Te.escapeLeftAngleBrackets=Te.escapeAmpersands=void 0;function Mv(t){return t.replace(/&/g,"&amp;")}Te.escapeAmpersands=Mv;function qv(t){return t.replace(/</g,"&lt;")}Te.escapeLeftAngleBrackets=qv;function jv(t){return t.replace(/]]>/g,"]]&gt;")}Te.escapeRightAngleBracketsInCdataTerminator=jv;function Nv(t){return t.replace(/'/g,"&apos;")}Te.escapeSingleQuotes=Nv;function Lv(t){return t.replace(/"/g,"&quot;")}Te.escapeDoubleQuotes=Lv});var fo=y(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});var $v=ce(),yd=Qn(),uo=Z(),Bv=function(){function t(e,r,n){this._validation=r,(0,uo.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,uo.fixChar)(e);else if(this._validation&&!(0,uo.validateChar)(e))throw new Error((0,$v.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,yd.escapeAmpersands)(e),e=(0,yd.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();lo.default=Bv});var Zn=y(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});var vd=ce(),bd=Z(),Uv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,bd.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,bd.validateSingleChar)(e))throw new Error((0,vd.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,vd.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}();ho.default=Uv});var ei=y(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var Xv=ce(),Gv=Z(),Hv=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,Gv.validateName)(e))throw new Error((0,Xv.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}();po.default=Hv});var ti=y(Or=>{"use strict";var yo=Or&&Or.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Or,"__esModule",{value:!0});var mo=ce(),_d=Qn(),Jv=tr(),go=Z(),zv=yo(fo()),Wv=yo(Zn()),Yv=yo(ei()),Vv=function(){function t(e,r,n){this._validation=r,(0,go.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,go.fixName)(e),e.length===0)throw new Error((0,mo.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,go.validateName)(e))throw e.length===0?new Error((0,mo.getContext)(this.up())+": attribute name should not be empty"):new Error((0,mo.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 Wv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Yv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new zv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new Jv.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,s=0,o=this._children;s<o.length;s++){var a=o[s];r.doubleQuotes?i+=(0,_d.escapeDoubleQuotes)(a.toString()):i+=(0,_d.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Or.default=Vv});var bo=y(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var Kv=ce(),Qv=Z(),Zv=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,Qv.validateChar)(e))throw new Error((0,Kv.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}();vo.default=Zv});var wo=y(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var e1=ce(),t1=Z(),r1=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,t1.validateChar)(e))throw new Error((0,e1.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}();_o.default=r1});var xo=y(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var n1=ce(),i1=Z(),s1=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,i1.validateChar)(e))throw new Error((0,n1.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}();So.default=s1});var Co=y(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var o1=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,o1.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}();Eo.default=c1});var Do=y(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var u1=ce(),l1=Z(),f1=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,l1.validateName)(e))throw new Error((0,u1.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}();Po.default=f1});var Ir=y(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});var ri=ce(),ni=Z(),h1=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,ni.isUndefined)(e)){if(this._validation&&!(0,ni.validateChar)(e))throw new Error((0,ri.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,ri.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,ni.validateName)(e))throw new Error((0,ri.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,ri.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,ni.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();Oo.default=h1});var ii=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(),d1=tr(),Ye=Z(),p1=It(Ar()),m1=It(bo()),g1=It(wo()),y1=It(xo()),v1=It(Co()),b1=It(Do()),_1=It(Ir()),w1=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&&!wd(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 m1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new p1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new g1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new y1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new v1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new b1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new _1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new d1.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,s=this._children;i<s.length;i++){var o=s[i];r.pretty&&(n+=r.newline+r.indent),n+=o.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=w1;function wd(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=wd});var Fo=y(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Sd=ce(),Io=Z(),S1=function(){function t(e,r,n){this._validation=r,(0,Io.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,Io.fixChar)(e);else if(this._validation&&!(0,Io.validateChar)(e))throw new Error((0,Sd.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,Sd.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}();Ao.default=S1});var Mo=y(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var x1=ce(),Ro=Qn(),ko=Z(),E1=function(){function t(e,r,n){this._validation=r,(0,ko.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,ko.fixChar)(e);else if(this._validation&&!(0,ko.validateChar)(e))throw new Error((0,x1.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,Ro.escapeAmpersands)(e),e=(0,Ro.escapeLeftAngleBrackets)(e),e=(0,Ro.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();To.default=E1});var ci=y(kr=>{"use strict";var At=kr&&kr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kr,"__esModule",{value:!0});var si=ce(),C1=tr(),Fr=Z(),xd=At(ti()),P1=At(Fo()),Rr=At(Mo()),oi=At(Zn()),D1=At(Ar()),ai=At(ei()),O1=At(Ir()),I1=function(){function t(e,r,n){this._validation=r,(0,Fr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Fr.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,Fr.fixName)(e),e.length===0)throw new Error((0,si.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Fr.validateName)(e))throw e.length===0?new Error((0,si.getContext)(this.up())+": element name should not be empty"):new Error((0,si.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,si.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new xd.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new P1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new Rr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new oi.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new D1.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 ai.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new O1.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 C1.StringOptions(e),i=r+n.indent,s="<"+this._name,o=[],a=0,c=this._children;a<c.length;a++){var f=c[a];f instanceof xd.default?s+=" "+f.toString(e):o.push(f)}if(o.length>0){for(var u="",p=0;p<o.length;p++){var g=o[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?o[p-1]:void 0;g instanceof Rr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(o)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(o)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?s+="/>":s+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?s+="/>":s+="></"+this._name+">";return s},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof oi.default||i instanceof ai.default||i instanceof Rr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof oi.default||e instanceof ai.default||e instanceof Rr.default)&&!(0,Fr.isUndefined)(r)&&(r instanceof oi.default||r instanceof ai.default||r instanceof Rr.default)},t}();kr.default=I1});var ce=y(rr=>{"use strict";var li=rr&&rr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rr,"__esModule",{value:!0});rr.getContext=void 0;var A1=li(ti()),F1=li(fi()),R1=li(ii()),k1=li(ci());function ui(t){if(t instanceof A1.default)return ui(t.up())+(' > attribute "'+t.name+'"');if(t instanceof F1.default)return"in XML document";if(t instanceof R1.default)return ui(t.up())+" > DTD";if(t instanceof k1.default)return ui(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}rr.getContext=ui});var Ar=y(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var qo=ce(),jo=Z(),T1=function(){function t(e,r,n){this._validation=r,(0,jo.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,jo.fixChar)(e);else if(this._validation&&!(0,jo.validateChar)(e))throw new Error((0,qo.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,qo.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,qo.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}();No.default=T1});var Bo=y($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});var Lo=ce(),M1=tr(),Tr=Z(),q1=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,Tr.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,Tr.isUndefined)(e)&&!j1(e))throw new Error((0,Lo.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,Tr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,Lo.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&&!N1(e))throw new Error((0,Lo.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 M1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Tr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Tr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();$o.default=q1;function j1(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 N1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var fi=y(qr=>{"use strict";var jr=qr&&qr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qr,"__esModule",{value:!0});var L1=tr(),$1=Z(),B1=jr(Ar()),Ed=jr(Bo()),Cd=jr(ii()),Mr=jr(ci()),U1=jr(Ir()),X1=function(){function t(e){this._children=[],this._validation=(0,$1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new B1.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 Ed.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 Mr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Cd.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 Mr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new Mr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new U1.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(f){return f instanceof Mr.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 L1.StringOptions(e),i="",s=0,o=this._children;s<o.length;s++){var a=o[s];a instanceof Ed.default||a instanceof Cd.default||a instanceof Mr.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}();qr.default=X1});var Pd=y(k=>{"use strict";var te=k&&k.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(k,"__esModule",{value:!0});k.document=k.XmlProcInst=k.XmlEntityRef=k.XmlElement=k.XmlDtdParamEntityRef=k.XmlDtdNotation=k.XmlDtdEntity=k.XmlDtdElement=k.XmlDtdAttlist=k.XmlDtd=k.XmlDocument=k.XmlDecl=k.XmlComment=k.XmlCharRef=k.XmlCharData=k.XmlCdata=k.XmlAttributeText=k.XmlAttribute=void 0;var G1=te(fi()),H1=ti();Object.defineProperty(k,"XmlAttribute",{enumerable:!0,get:function(){return te(H1).default}});var J1=fo();Object.defineProperty(k,"XmlAttributeText",{enumerable:!0,get:function(){return te(J1).default}});var z1=Fo();Object.defineProperty(k,"XmlCdata",{enumerable:!0,get:function(){return te(z1).default}});var W1=Mo();Object.defineProperty(k,"XmlCharData",{enumerable:!0,get:function(){return te(W1).default}});var Y1=Zn();Object.defineProperty(k,"XmlCharRef",{enumerable:!0,get:function(){return te(Y1).default}});var V1=Ar();Object.defineProperty(k,"XmlComment",{enumerable:!0,get:function(){return te(V1).default}});var K1=Bo();Object.defineProperty(k,"XmlDecl",{enumerable:!0,get:function(){return te(K1).default}});var Q1=fi();Object.defineProperty(k,"XmlDocument",{enumerable:!0,get:function(){return te(Q1).default}});var Z1=ii();Object.defineProperty(k,"XmlDtd",{enumerable:!0,get:function(){return te(Z1).default}});var eb=bo();Object.defineProperty(k,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(eb).default}});var tb=wo();Object.defineProperty(k,"XmlDtdElement",{enumerable:!0,get:function(){return te(tb).default}});var rb=xo();Object.defineProperty(k,"XmlDtdEntity",{enumerable:!0,get:function(){return te(rb).default}});var nb=Co();Object.defineProperty(k,"XmlDtdNotation",{enumerable:!0,get:function(){return te(nb).default}});var ib=Do();Object.defineProperty(k,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(ib).default}});var sb=ci();Object.defineProperty(k,"XmlElement",{enumerable:!0,get:function(){return te(sb).default}});var ob=ei();Object.defineProperty(k,"XmlEntityRef",{enumerable:!0,get:function(){return te(ob).default}});var ab=Ir();Object.defineProperty(k,"XmlProcInst",{enumerable:!0,get:function(){return te(ab).default}});function cb(t){return t===void 0&&(t={}),new G1.default(t)}k.document=cb});var Uo=y(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.stringify=re.isMap=re.isSet=re.isFunction=re.isArray=re.isObject=re.isNull=re.isUndefined=void 0;function Dd(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=Dd;function Od(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=Od;function ub(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=ub;function lb(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=lb;function Id(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=Id;function fb(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=fb;function hb(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=hb;function db(t){return!Dd(t)&&!Od(t)&&Id(t?.toString)&&(t=t.toString()),String(t)}re.stringify=db});var Md=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.WrapHandlers=Ie.TypeHandlers=Ie.FormatOptions=Ie.DtdOptions=Ie.DeclarationOptions=Ie.Options=void 0;var $e=Uo(),pb=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,$e.isUndefined)(e.validation)||(this.validation=e.validation),(0,$e.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,$e.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,$e.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,$e.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Ad(e.declaration),this.dtd=new Fd(this.validation,e.dtd),this.format=new Rd(e.format),(0,$e.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new kd(e.typeHandlers),(0,$e.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,$e.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Td(e.wrapHandlers)}return t}();Ie.Options=pb;var Ad=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,$e.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ie.DeclarationOptions=Ad;var Fd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,$e.isUndefined)(r.include)||(this.include=r.include),e&&(0,$e.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}();Ie.DtdOptions=Fd;var Rd=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}();Ie.FormatOptions=Rd;var kd=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}();Ie.TypeHandlers=kd;var Td=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}();Ie.WrapHandlers=Td});var Bd=y(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.parse=gt.parseToExistingElement=gt.Absent=void 0;var jd=Pd(),Nd=Md(),V=Uo(),Xo=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();gt.Absent=Xo;function Go(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 Ld(t,e,r){var n=function(o){return r.cdataInvalidChars&&(o.indexOf("<")!==-1||o.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof jd.XmlElement)if(n(t))for(var i=t.split("]]>"),s=0;s<i.length;s++)n(i[s])?e.cdata({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}),s<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 mb(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Ld((0,V.stringify)(e),i,n)}function qd(t,e,r,n){if(t===n.aliasString){r.name=(0,V.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,V.isObject)(e)){for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i];mb(o,(0,V.stringify)(e[o]),r,n)}return}if(t.indexOf(n.valueString)===0){hi(t,(0,V.stringify)(e),r,n);return}var a=r;if(!(0,V.isArray)(e)&&!(0,V.isSet)(e)){var c=Go(e,n);if(!(0,V.isUndefined)(c)&&c(e)===Xo.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}hi(t,e,a,n)}function gb(t,e,r){if((0,V.isMap)(t))t.forEach(function(o,a){qd((0,V.stringify)(a),o,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];qd(s,t[s],e,r)}}function yb(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 s=t,o=r;if(!(0,V.isUndefined)(i)){var a=i(s,e);(0,V.isNull)(a)||(s=a,o=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var f=o;if(!(0,V.isArray)(c)&&!(0,V.isSet)(c)){var u=Go(c,n);if(!(0,V.isUndefined)(u)&&u(c)===Xo.instance)return;f=o.element({name:s,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}hi(s,c,f,n)})}function hi(t,e,r,n){var i=Go(e,n);if((0,V.isUndefined)(i)||(e=i(e)),(0,V.isObject)(e)||(0,V.isMap)(e)){gb(e,r,n);return}if((0,V.isArray)(e)||(0,V.isSet)(e)){yb(t,e,r,n);return}Ld((0,V.stringify)(e),r,n)}function $d(t,e,r){var n=new Nd.Options(r);hi(t.name,e,t,n)}gt.parseToExistingElement=$d;function vb(t,e,r){var n=new Nd.Options(r),i=new jd.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 s=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return $d(s,e,r),i.toString(n.format)}gt.parse=vb});var Ib={};Vo(Ib,{IS_COMPONENT_LIBRARY:()=>ws,PROJECT_ALIASES:()=>cf,getBuildPagesFromCachedStore:()=>Kl,getBuildPagesFromStore:()=>Cn,getBuildPagesPath:()=>Ql,getConfig:()=>W,logInfo:()=>Ze,logPageSize:()=>Wl,resolveComponentsPath:()=>dt,startRender:()=>np,walk:()=>_r});module.exports=Qo(Ib);var zo=F(require("node:fs")),$r=F(require("node:path"));var mf=require("node:child_process"),tt=F(require("node:path")),gf=F(Ke()),Ne=F(bt());var pf=F(Ke());var je=F(require("node:fs")),ze=F(require("node:path")),Se=F(bt());var et=F(require("node:fs")),se=F(require("node:path")),En=F(bt());var us=F(require("node:path")),zt=F(hn()),Xl=F(Ke()),Xe=F(bt()),Gl=F(Cl()),Hl=F(xn());var Jl=W();Xl.default.config();var H2=!!process.env.GRIDDO_DEBUG_LOGS&&!!JSON.parse(process.env.GRIDDO_DEBUG_LOGS),Fg=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),J2=Hl.default.sync();function _r(t){let e=[];return Xe.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function Ge(t,e="",r=1,n=1){let i=t.split(`
19
+ `+s),t.push(i+"m+"+Bn.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Ny()+e+" "+t[0]}function Ny(){return ae.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ly(...t){return process.stderr.write($n.format(...t)+`
20
+ `)}function $y(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function By(){return process.env.DEBUG}function Uy(t){t.inspectOpts={};let e=Object.keys(ae.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ae.inspectOpts[e[r]]}Bn.exports=Ts()(ae);var{formatters:Qf}=Bn.exports;Qf.o=function(t){return this.inspectOpts.colors=this.useColors,$n.inspect(t,this.inspectOpts).split(`
21
+ `).map(e=>e.trim()).join(" ")};Qf.O=function(t){return this.inspectOpts.colors=this.useColors,$n.inspect(t,this.inspectOpts)}});var ed=y((S_,Ms)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ms.exports=Kf():Ms.exports=Zf()});var rd=y((x_,td)=>{var xr;td.exports=function(){if(!xr){try{xr=ed()("follow-redirects")}catch{}typeof xr!="function"&&(xr=function(){})}xr.apply(null,arguments)}});var Bs=y((E_,$s)=>{var Ct=require("url"),qs=Ct.URL,Xy=require("http"),Gy=require("https"),sd=require("stream").Writable,od=require("assert"),ad=rd(),Ns=["abort","aborted","connect","error","socket","timeout"],Ls=Object.create(null);Ns.forEach(function(t){Ls[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var Hy=Cr("ERR_INVALID_URL","Invalid URL",TypeError),nd=Cr("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),zy=Cr("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),Wy=Cr("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Jy=Cr("ERR_STREAM_WRITE_AFTER_END","write after end");function Re(t,e){sd.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(sd.prototype);Re.prototype.abort=function(){ud(this._currentRequest),this.emit("abort")};Re.prototype.write=function(t,e,r){if(this._ending)throw new Jy;if(!Pt(t)&&!Ky(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Er(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 Wy),this.abort())};Re.prototype.end=function(t,e,r){if(Er(t)?(r=t,t=e=null):Er(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(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},t),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),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",s),this.on("error",s),this.on("response",s),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 Ns)n.on(i,Ls[i]);if(this._currentUrl=/^\//.test(this._options.path)?Ct.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function c(f){if(n===o._currentRequest)if(f)o.emit("error",f);else if(s<a.length){var u=a[s++];n.finished||n.write(u.data,u.encoding,c)}else o._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(ud(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new zy);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var s=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=[],js(/^content-/i,this._options.headers));var o=js(/^host$/i,this._options.headers),a=Ct.parse(this._currentUrl),c=o||a.host,f=/^\w+:/.test(r)?this._currentUrl:Ct.format(Object.assign(a,{host:c})),u;try{u=Ct.resolve(f,r)}catch(b){this.emit("error",new nd({cause:b}));return}ad("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&&!Yy(p.host,c))&&js(/^(?:authorization|cookie)$/i,this._options.headers),Er(i)){var g={headers:t.headers,statusCode:e},m={url:f,method:s,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 nd({cause:b}))}};function cd(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",s=r[i]=t[n],o=e[n]=Object.create(s);function a(f,u,p){if(Pt(f)){var g;try{g=id(new qs(f))}catch{g=Ct.parse(f)}if(!Pt(g.protocol))throw new Hy({input:f});f=g}else qs&&f instanceof qs?f=id(f):(p=u,u=f,f={protocol:i});return Er(u)&&(p=u,u=null),u=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},f,u),u.nativeProtocols=r,!Pt(u.host)&&!Pt(u.hostname)&&(u.hostname="::1"),od.equal(u.protocol,i,"protocol mismatch"),ad("options",u),new Re(u,p)}function c(f,u,p){var g=o.request(f,u,p);return g.end(),g}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Vy(){}function id(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 js(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 Cr(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 ud(t){for(var e of Ns)t.removeListener(e,Ls[e]);t.on("error",Vy),t.abort()}function Yy(t,e){od(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 Er(t){return typeof t=="function"}function Ky(t){return typeof t=="object"&&"length"in t}$s.exports=cd({http:Xy,https:Gy});$s.exports.wrap=cd});var Us=y((C_,Qy)=>{Qy.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 md=y((P_,pd)=>{"use strict";var Pr=xe(),ld=As(),Zy=Fs(),ev=Rn(),tv=require("http"),rv=require("https"),nv=Bs().http,iv=Bs().https,fd=require("url"),sv=require("zlib"),ov=Us(),Un=Mn(),Xs=Tn(),dd=/https:?/;function hd(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(s){s.headers.host=s.host,hd(s,e,s.href)}}pd.exports=function(e){return new Promise(function(n,i){var s=function(P){n(P)},o=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/"+ov.version,a&&!Pr.isStream(a)){if(!Buffer.isBuffer(a))if(Pr.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(Pr.isString(a))a=Buffer.from(a,"utf-8");else return o(Un("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c["Content-Length"]=a.length}var f=void 0;if(e.auth){var u=e.auth.username||"",p=e.auth.password||"";f=u+":"+p}var g=Zy(e.baseURL,e.url),m=fd.parse(g),b=m.protocol||"http:";if(!f&&m.auth){var S=m.auth.split(":"),x=S[0]||"",A=S[1]||"";f=x+":"+A}f&&delete c.Authorization;var N=dd.test(b),B=N?e.httpsAgent:e.httpAgent,$={path:ev(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:B,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?$.socketPath=e.socketPath:($.hostname=m.hostname,$.port=m.port);var V=e.proxy;if(!V&&V!==!1){var le=b.slice(0,-1)+"_proxy",ke=process.env[le]||process.env[le.toUpperCase()];if(ke){var te=fd.parse(ke),D=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(D){var T=D.split(",").map(function(P){return P.trim()});q=!T.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:te.hostname,port:te.port,protocol:te.protocol},te.auth)){var z=te.auth.split(":");V.auth={username:z[0],password:z[1]}}}}V&&($.headers.host=m.hostname+(m.port?":"+m.port:""),hd($,V,b+"//"+m.hostname+(m.port?":"+m.port:"")+$.path));var I,G=N&&(V?dd.test(V.protocol):!0);e.transport?I=e.transport:e.maxRedirects===0?I=G?rv:tv:(e.maxRedirects&&($.maxRedirects=e.maxRedirects),I=G?iv:nv),e.maxBodyLength>-1&&($.maxBodyLength=e.maxBodyLength);var O=I.request($,function(P){if(!O.aborted){var R=P,Ue=P.req||O;if(P.statusCode!==204&&Ue.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":R=R.pipe(sv.createUnzip()),delete P.headers["content-encoding"];break}var Je={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:Ue};if(e.responseType==="stream")Je.data=R,ld(s,o,Je);else{var ge=[],Ee=0;R.on("data",function(ye){ge.push(ye),Ee+=ye.length,e.maxContentLength>-1&&Ee>e.maxContentLength&&(R.destroy(),o(Un("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,Ue)))}),R.on("error",function(ye){O.aborted||o(Xs(ye,e,null,Ue))}),R.on("end",function(){var ye=Buffer.concat(ge);e.responseType!=="arraybuffer"&&(ye=ye.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(ye=Pr.stripBOM(ye))),Je.data=ye,ld(s,o,Je)})}}});if(O.on("error",function(P){O.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||o(Xs(P,e,null,O))}),e.timeout){var U=parseInt(e.timeout,10);if(isNaN(U)){o(Un("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",O));return}O.setTimeout(U,function(){O.abort(),o(Un("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(),o(P))}),Pr.isStream(a)?a.on("error",function(P){o(Xs(P,e,null,O))}).pipe(O):O.end(a)})}});var Gn=y((D_,vd)=>{"use strict";var ce=xe(),gd=Af(),av=Tn(),cv={"Content-Type":"application/x-www-form-urlencoded"};function yd(t,e){!ce.isUndefined(t)&&ce.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function uv(){var t;return typeof XMLHttpRequest<"u"?t=Wf():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=md()),t}function lv(t,e,r){if(ce.isString(t))try{return(e||JSON.parse)(t),ce.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Xn={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:uv(),transformRequest:[function(e,r){return gd(r,"Accept"),gd(r,"Content-Type"),ce.isFormData(e)||ce.isArrayBuffer(e)||ce.isBuffer(e)||ce.isStream(e)||ce.isFile(e)||ce.isBlob(e)?e:ce.isArrayBufferView(e)?e.buffer:ce.isURLSearchParams(e)?(yd(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):ce.isObject(e)||r&&r["Content-Type"]==="application/json"?(yd(r,"application/json"),lv(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||i&&ce.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?av(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Xn.headers={common:{Accept:"application/json, text/plain, */*"}};ce.forEach(["delete","get","head"],function(e){Xn.headers[e]={}});ce.forEach(["post","put","patch"],function(e){Xn.headers[e]=ce.merge(cv)});vd.exports=Xn});var _d=y((O_,bd)=>{"use strict";var fv=xe(),dv=Gn();bd.exports=function(e,r,n){var i=this||dv;return fv.forEach(n,function(o){e=o.call(i,e,r)}),e}});var Gs=y((I_,wd)=>{"use strict";wd.exports=function(e){return!!(e&&e.__CANCEL__)}});var Ed=y((A_,xd)=>{"use strict";var Sd=xe(),Hs=_d(),hv=Gs(),pv=Gn();function zs(t){t.cancelToken&&t.cancelToken.throwIfRequested()}xd.exports=function(e){zs(e),e.headers=e.headers||{},e.data=Hs.call(e,e.data,e.headers,e.transformRequest),e.headers=Sd.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Sd.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||pv.adapter;return r(e).then(function(i){return zs(e),i.data=Hs.call(e,i.data,i.headers,e.transformResponse),i},function(i){return hv(i)||(zs(e),i&&i.response&&(i.response.data=Hs.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var Ws=y((F_,Cd)=>{"use strict";var pe=xe();Cd.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],o=["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 pe.isPlainObject(g)&&pe.isPlainObject(m)?pe.merge(g,m):pe.isPlainObject(m)?pe.merge({},m):pe.isArray(m)?m.slice():m}function f(g){pe.isUndefined(r[g])?pe.isUndefined(e[g])||(n[g]=c(void 0,e[g])):n[g]=c(e[g],r[g])}pe.forEach(i,function(m){pe.isUndefined(r[m])||(n[m]=c(void 0,r[m]))}),pe.forEach(s,f),pe.forEach(o,function(m){pe.isUndefined(r[m])?pe.isUndefined(e[m])||(n[m]=c(void 0,e[m])):n[m]=c(void 0,r[m])}),pe.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(s).concat(o).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return u.indexOf(m)===-1});return pe.forEach(p,f),n}});var Ad=y((R_,Id)=>{"use strict";var Dd=Us(),Js={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){Js[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Pd={},mv=Dd.version.split(".");function Od(t,e){for(var r=e?e.split("."):mv,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}Js.transitional=function(e,r,n){var i=r&&Od(r);function s(o,a){return"[Axios v"+Dd.version+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,c){if(e===!1)throw new Error(s(a," has been removed in "+r));return i&&!Pd[a]&&(Pd[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,c):!0}};function gv(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 s=n[i],o=e[s];if(o){var a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new TypeError("option "+s+" must be "+c);continue}if(r!==!0)throw Error("Unknown option "+s)}}Id.exports={isOlderVersion:Od,assertOptions:gv,validators:Js}});var qd=y((k_,Md)=>{"use strict";var kd=xe(),yv=Rn(),Fd=Of(),Rd=Ed(),Hn=Ws(),Td=Ad(),er=Td.validators;function Dr(t){this.defaults=t,this.interceptors={request:new Fd,response:new Fd}}Dr.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Hn(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&&Td.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 s=[];this.interceptors.response.forEach(function(g){s.push(g.fulfilled,g.rejected)});var o;if(!i){var a=[Rd,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var c=e;n.length;){var f=n.shift(),u=n.shift();try{c=f(c)}catch(p){u(p);break}}try{o=Rd(c)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Dr.prototype.getUri=function(e){return e=Hn(this.defaults,e),yv(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};kd.forEach(["delete","get","head","options"],function(e){Dr.prototype[e]=function(r,n){return this.request(Hn(n||{},{method:e,url:r,data:(n||{}).data}))}});kd.forEach(["post","put","patch"],function(e){Dr.prototype[e]=function(r,n,i){return this.request(Hn(i||{},{method:e,url:r,data:n}))}});Md.exports=Dr});var Ys=y((T_,jd)=>{"use strict";function Vs(t){this.message=t}Vs.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Vs.prototype.__CANCEL__=!0;jd.exports=Vs});var Ld=y((M_,Nd)=>{"use strict";var vv=Ys();function zn(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 vv(i),e(r.reason))})}zn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};zn.source=function(){var e,r=new zn(function(i){e=i});return{token:r,cancel:e}};Nd.exports=zn});var Bd=y((q_,$d)=>{"use strict";$d.exports=function(e){return function(n){return e.apply(null,n)}}});var Xd=y((j_,Ud)=>{"use strict";Ud.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var zd=y((N_,Ks)=>{"use strict";var Gd=xe(),bv=Cs(),Wn=qd(),_v=Ws(),wv=Gn();function Hd(t){var e=new Wn(t),r=bv(Wn.prototype.request,e);return Gd.extend(r,Wn.prototype,e),Gd.extend(r,e),r}var $e=Hd(wv);$e.Axios=Wn;$e.create=function(e){return Hd(_v($e.defaults,e))};$e.Cancel=Ys();$e.CancelToken=Ld();$e.isCancel=Gs();$e.all=function(e){return Promise.all(e)};$e.spread=Bd();$e.isAxiosError=Xd();Ks.exports=$e;Ks.exports.default=$e});var Qs=y((L_,Wd)=>{Wd.exports=zd()});var ee=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 Fv(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=Fv;function Rv(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=Rv;function kv(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=kv;function Tv(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 s=i?2:1,o=s;o<t.length;o++){var a=t.charCodeAt(o);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(o+1===t.length)return!1;var c=t.charCodeAt(o+1);if(a>=55296&&a<=56191&&c>=56320&&c<=57343){o++;continue}return!1}}return!0}Ie.validateName=Tv;function Mv(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),s=r>=55296&&r<=56191&&i>=56320&&i<=57343;s?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var o=s?2:1,a=o;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 f=t.charCodeAt(a+1);if(c>=55296&&c<=56191&&f>=56320&&f<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Ie.fixName=Mv;function qv(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ie.isUndefined=qv});var rr=y(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.StringOptions=void 0;var Kn=ee(),jv=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
22
+ `,this.pretty=!0,(0,Kn.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,Kn.isUndefined)(e.indent)||(this.indent=e.indent),(0,Kn.isUndefined)(e.newline)||(this.newline=e.newline),(0,Kn.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();Qn.StringOptions=jv});var Zn=y(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.escapeDoubleQuotes=Me.escapeSingleQuotes=Me.escapeRightAngleBracketsInCdataTerminator=Me.escapeLeftAngleBrackets=Me.escapeAmpersands=void 0;function Nv(t){return t.replace(/&/g,"&amp;")}Me.escapeAmpersands=Nv;function Lv(t){return t.replace(/</g,"&lt;")}Me.escapeLeftAngleBrackets=Lv;function $v(t){return t.replace(/]]>/g,"]]&gt;")}Me.escapeRightAngleBracketsInCdataTerminator=$v;function Bv(t){return t.replace(/'/g,"&apos;")}Me.escapeSingleQuotes=Bv;function Uv(t){return t.replace(/"/g,"&quot;")}Me.escapeDoubleQuotes=Uv});var ho=y(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var Xv=ue(),yh=Zn(),lo=ee(),Gv=function(){function t(e,r,n){this._validation=r,(0,lo.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,lo.fixChar)(e);else if(this._validation&&!(0,lo.validateChar)(e))throw new Error((0,Xv.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,yh.escapeAmpersands)(e),e=(0,yh.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();fo.default=Gv});var ei=y(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var vh=ue(),bh=ee(),Hv=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,bh.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,bh.validateSingleChar)(e))throw new Error((0,vh.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,vh.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}();po.default=Hv});var ti=y(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});var zv=ue(),Wv=ee(),Jv=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,Wv.validateName)(e))throw new Error((0,zv.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}();mo.default=Jv});var ri=y(Ir=>{"use strict";var vo=Ir&&Ir.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ir,"__esModule",{value:!0});var go=ue(),_h=Zn(),Vv=rr(),yo=ee(),Yv=vo(ho()),Kv=vo(ei()),Qv=vo(ti()),Zv=function(){function t(e,r,n){this._validation=r,(0,yo.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,yo.fixName)(e),e.length===0)throw new Error((0,go.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,yo.validateName)(e))throw e.length===0?new Error((0,go.getContext)(this.up())+": attribute name should not be empty"):new Error((0,go.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 Kv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Qv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new Yv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new Vv.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,s=0,o=this._children;s<o.length;s++){var a=o[s];r.doubleQuotes?i+=(0,_h.escapeDoubleQuotes)(a.toString()):i+=(0,_h.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();Ir.default=Zv});var _o=y(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});var e1=ue(),t1=ee(),r1=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,t1.validateChar)(e))throw new Error((0,e1.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}();bo.default=r1});var So=y(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var n1=ue(),i1=ee(),s1=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,i1.validateChar)(e))throw new Error((0,n1.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}();wo.default=s1});var Eo=y(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var o1=ue(),a1=ee(),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,o1.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}();xo.default=c1});var Po=y(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var u1=ue(),l1=ee(),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())+": 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}();Co.default=f1});var Oo=y(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var d1=ue(),h1=ee(),p1=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,h1.validateName)(e))throw new Error((0,d1.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}();Do.default=p1});var Ar=y(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var ni=ue(),ii=ee(),m1=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,ii.isUndefined)(e)){if(this._validation&&!(0,ii.validateChar)(e))throw new Error((0,ni.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,ni.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,ii.validateName)(e))throw new Error((0,ni.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,ni.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,ii.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();Io.default=m1});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 pt=ue(),g1=rr(),We=ee(),y1=It(Fr()),v1=It(_o()),b1=It(So()),_1=It(Eo()),w1=It(Po()),S1=It(Oo()),x1=It(Ar()),E1=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,We.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,We.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,We.validateName)(e))throw new Error((0,pt.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,We.isUndefined)(e)){if(this._validation&&!wh(e))throw new Error((0,pt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,We.isUndefined)(this._sysId))throw new Error((0,pt.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,We.isUndefined)(e)){if(this._validation&&!(0,We.validateChar)(e))throw new Error((0,pt.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,pt.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 v1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new y1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new b1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new _1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new w1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new S1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new x1.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new g1.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,We.isUndefined)(this._pubId))(0,We.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,We.isUndefined)(this._sysId))throw new Error((0,pt.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,s=this._children;i<s.length;i++){var o=s[i];r.pretty&&(n+=r.newline+r.indent),n+=o.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,pt.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,pt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();Ot.default=E1;function wh(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=wh});var Ro=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var Sh=ue(),Ao=ee(),C1=function(){function t(e,r,n){this._validation=r,(0,Ao.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,Ao.fixChar)(e);else if(this._validation&&!(0,Ao.validateChar)(e))throw new Error((0,Sh.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,Sh.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}();Fo.default=C1});var qo=y(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});var P1=ue(),ko=Zn(),To=ee(),D1=function(){function t(e,r,n){this._validation=r,(0,To.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,To.fixChar)(e);else if(this._validation&&!(0,To.validateChar)(e))throw new Error((0,P1.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,ko.escapeAmpersands)(e),e=(0,ko.escapeLeftAngleBrackets)(e),e=(0,ko.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();Mo.default=D1});var ui=y(Tr=>{"use strict";var At=Tr&&Tr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tr,"__esModule",{value:!0});var oi=ue(),O1=rr(),Rr=ee(),xh=At(ri()),I1=At(Ro()),kr=At(qo()),ai=At(ei()),A1=At(Fr()),ci=At(ti()),F1=At(Ar()),R1=function(){function t(e,r,n){this._validation=r,(0,Rr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,Rr.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,Rr.fixName)(e),e.length===0)throw new Error((0,oi.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,Rr.validateName)(e))throw e.length===0?new Error((0,oi.getContext)(this.up())+": element name should not be empty"):new Error((0,oi.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,oi.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new xh.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new I1.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 ai.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new A1.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 ci.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new F1.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 O1.StringOptions(e),i=r+n.indent,s="<"+this._name,o=[],a=0,c=this._children;a<c.length;a++){var f=c[a];f instanceof xh.default?s+=" "+f.toString(e):o.push(f)}if(o.length>0){for(var u="",p=0;p<o.length;p++){var g=o[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?o[p-1]:void 0;g instanceof kr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(o)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),u+=m)}n.pretty&&(this.allSameLineNodes(o)||(u+=n.newline+r)),u.length===0&&this._useSelfClosingTagIfEmpty?s+="/>":s+=">"+u+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?s+="/>":s+="></"+this._name+">";return s},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof ai.default||i instanceof ci.default||i instanceof kr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof ai.default||e instanceof ci.default||e instanceof kr.default)&&!(0,Rr.isUndefined)(r)&&(r instanceof ai.default||r instanceof ci.default||r instanceof kr.default)},t}();Tr.default=R1});var ue=y(nr=>{"use strict";var fi=nr&&nr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nr,"__esModule",{value:!0});nr.getContext=void 0;var k1=fi(ri()),T1=fi(di()),M1=fi(si()),q1=fi(ui());function li(t){if(t instanceof k1.default)return li(t.up())+(' > attribute "'+t.name+'"');if(t instanceof T1.default)return"in XML document";if(t instanceof M1.default)return li(t.up())+" > DTD";if(t instanceof q1.default)return li(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}nr.getContext=li});var Fr=y(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var jo=ue(),No=ee(),j1=function(){function t(e,r,n){this._validation=r,(0,No.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,No.fixChar)(e);else if(this._validation&&!(0,No.validateChar)(e))throw new Error((0,jo.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,jo.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,jo.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}();Lo.default=j1});var Uo=y(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var $o=ue(),N1=rr(),Mr=ee(),L1=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,Mr.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,Mr.isUndefined)(e)&&!$1(e))throw new Error((0,$o.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,Mr.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,$o.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&&!B1(e))throw new Error((0,$o.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 N1.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,Mr.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,Mr.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();Bo.default=L1;function $1(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 B1(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var di=y(jr=>{"use strict";var Nr=jr&&jr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jr,"__esModule",{value:!0});var U1=rr(),X1=ee(),G1=Nr(Fr()),Eh=Nr(Uo()),Ch=Nr(si()),qr=Nr(ui()),H1=Nr(Ar()),z1=function(){function t(e){this._children=[],this._validation=(0,X1.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new G1.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 Eh.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 qr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Ch.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 qr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new qr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new H1.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(f){return f instanceof qr.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 U1.StringOptions(e),i="",s=0,o=this._children;s<o.length;s++){var a=o[s];a instanceof Eh.default||a instanceof Ch.default||a instanceof qr.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}();jr.default=z1});var Ph=y(k=>{"use strict";var ne=k&&k.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(k,"__esModule",{value:!0});k.document=k.XmlProcInst=k.XmlEntityRef=k.XmlElement=k.XmlDtdParamEntityRef=k.XmlDtdNotation=k.XmlDtdEntity=k.XmlDtdElement=k.XmlDtdAttlist=k.XmlDtd=k.XmlDocument=k.XmlDecl=k.XmlComment=k.XmlCharRef=k.XmlCharData=k.XmlCdata=k.XmlAttributeText=k.XmlAttribute=void 0;var W1=ne(di()),J1=ri();Object.defineProperty(k,"XmlAttribute",{enumerable:!0,get:function(){return ne(J1).default}});var V1=ho();Object.defineProperty(k,"XmlAttributeText",{enumerable:!0,get:function(){return ne(V1).default}});var Y1=Ro();Object.defineProperty(k,"XmlCdata",{enumerable:!0,get:function(){return ne(Y1).default}});var K1=qo();Object.defineProperty(k,"XmlCharData",{enumerable:!0,get:function(){return ne(K1).default}});var Q1=ei();Object.defineProperty(k,"XmlCharRef",{enumerable:!0,get:function(){return ne(Q1).default}});var Z1=Fr();Object.defineProperty(k,"XmlComment",{enumerable:!0,get:function(){return ne(Z1).default}});var eb=Uo();Object.defineProperty(k,"XmlDecl",{enumerable:!0,get:function(){return ne(eb).default}});var tb=di();Object.defineProperty(k,"XmlDocument",{enumerable:!0,get:function(){return ne(tb).default}});var rb=si();Object.defineProperty(k,"XmlDtd",{enumerable:!0,get:function(){return ne(rb).default}});var nb=_o();Object.defineProperty(k,"XmlDtdAttlist",{enumerable:!0,get:function(){return ne(nb).default}});var ib=So();Object.defineProperty(k,"XmlDtdElement",{enumerable:!0,get:function(){return ne(ib).default}});var sb=Eo();Object.defineProperty(k,"XmlDtdEntity",{enumerable:!0,get:function(){return ne(sb).default}});var ob=Po();Object.defineProperty(k,"XmlDtdNotation",{enumerable:!0,get:function(){return ne(ob).default}});var ab=Oo();Object.defineProperty(k,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return ne(ab).default}});var cb=ui();Object.defineProperty(k,"XmlElement",{enumerable:!0,get:function(){return ne(cb).default}});var ub=ti();Object.defineProperty(k,"XmlEntityRef",{enumerable:!0,get:function(){return ne(ub).default}});var lb=Ar();Object.defineProperty(k,"XmlProcInst",{enumerable:!0,get:function(){return ne(lb).default}});function fb(t){return t===void 0&&(t={}),new W1.default(t)}k.document=fb});var Xo=y(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.stringify=ie.isMap=ie.isSet=ie.isFunction=ie.isArray=ie.isObject=ie.isNull=ie.isUndefined=void 0;function Dh(t){return Object.prototype.toString.call(t)==="[object Undefined]"}ie.isUndefined=Dh;function Oh(t){return Object.prototype.toString.call(t)==="[object Null]"}ie.isNull=Oh;function db(t){return Object.prototype.toString.call(t)==="[object Object]"}ie.isObject=db;function hb(t){return Object.prototype.toString.call(t)==="[object Array]"}ie.isArray=hb;function Ih(t){return Object.prototype.toString.call(t)==="[object Function]"}ie.isFunction=Ih;function pb(t){return Object.prototype.toString.call(t)==="[object Set]"}ie.isSet=pb;function mb(t){return Object.prototype.toString.call(t)==="[object Map]"}ie.isMap=mb;function gb(t){return!Dh(t)&&!Oh(t)&&Ih(t?.toString)&&(t=t.toString()),String(t)}ie.stringify=gb});var Mh=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 Be=Xo(),yb=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,Be.isUndefined)(e.validation)||(this.validation=e.validation),(0,Be.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Be.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Be.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Be.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Ah(e.declaration),this.dtd=new Fh(this.validation,e.dtd),this.format=new Rh(e.format),(0,Be.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new kh(e.typeHandlers),(0,Be.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Be.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Th(e.wrapHandlers)}return t}();Ae.Options=yb;var Ah=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Be.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ae.DeclarationOptions=Ah;var Fh=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Be.isUndefined)(r.include)||(this.include=r.include),e&&(0,Be.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=Fh;var Rh=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=Rh;var kh=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=kh;var Th=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=Th});var Bh=y(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.parse=mt.parseToExistingElement=mt.Absent=void 0;var jh=Ph(),Nh=Mh(),Q=Xo(),Go=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();mt.Absent=Go;function Ho(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 Lh(t,e,r){var n=function(o){return r.cdataInvalidChars&&(o.indexOf("<")!==-1||o.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof jh.XmlElement)if(n(t))for(var i=t.split("]]>"),s=0;s<i.length;s++)n(i[s])?e.cdata({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[s],replaceInvalidCharsInCharData:r.replaceInvalidChars}),s<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 vb(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Lh((0,Q.stringify)(e),i,n)}function qh(t,e,r,n){if(t===n.aliasString){r.name=(0,Q.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,Q.isObject)(e)){for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i];vb(o,(0,Q.stringify)(e[o]),r,n)}return}if(t.indexOf(n.valueString)===0){hi(t,(0,Q.stringify)(e),r,n);return}var a=r;if(!(0,Q.isArray)(e)&&!(0,Q.isSet)(e)){var c=Ho(e,n);if(!(0,Q.isUndefined)(c)&&c(e)===Go.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}hi(t,e,a,n)}function bb(t,e,r){if((0,Q.isMap)(t))t.forEach(function(o,a){qh((0,Q.stringify)(a),o,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];qh(s,t[s],e,r)}}function _b(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 s=t,o=r;if(!(0,Q.isUndefined)(i)){var a=i(s,e);(0,Q.isNull)(a)||(s=a,o=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(c){var f=o;if(!(0,Q.isArray)(c)&&!(0,Q.isSet)(c)){var u=Ho(c,n);if(!(0,Q.isUndefined)(u)&&u(c)===Go.instance)return;f=o.element({name:s,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}hi(s,c,f,n)})}function hi(t,e,r,n){var i=Ho(e,n);if((0,Q.isUndefined)(i)||(e=i(e)),(0,Q.isObject)(e)||(0,Q.isMap)(e)){bb(e,r,n);return}if((0,Q.isArray)(e)||(0,Q.isSet)(e)){_b(t,e,r,n);return}Lh((0,Q.stringify)(e),r,n)}function $h(t,e,r){var n=new Nh.Options(r);hi(t.name,e,t,n)}mt.parseToExistingElement=$h;function wb(t,e,r){var n=new Nh.Options(r),i=new jh.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 s=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return $h(s,e,r),i.toString(n.format)}mt.parse=wb});var Fb={};Yo(Fb,{IS_COMPONENT_LIBRARY:()=>ys,PROJECT_ALIASES:()=>Zl,getBuildPagesFromCachedStore:()=>Xl,getBuildPagesFromStore:()=>Cn,getBuildPagesPath:()=>Gl,getConfig:()=>K,logInfo:()=>Ke,logPageSize:()=>df,resolveComponentsPath:()=>ut,startRender:()=>ip,verbose:()=>L,walk:()=>wr});module.exports=Qo(Fb);var Wo=F(require("node:fs")),$r=F(require("node:path"));var mf=require("node:child_process"),Qe=F(require("node:path")),gf=F(tt()),Le=F(_t());var Vt=F(require("node:fs")),sf=F(require("node:path")),ft=F(dn()),of=F(tt()),An=F(_t()),af=F(Cl()),cf=F(xn());var Ne=F(require("node:fs")),Xe=F(require("node:path")),Se=F(_t());var Ye=F(require("node:fs")),oe=F(require("node:path")),En=F(_t());var St=K();function Xl(t){let{__caches:e}=St.paths(t);return Cn({basePath:oe.default.join(e,"store"),withSizeProp:!1})}function*Cn(t){let{basePath:e,withSizeProp:r}=t||{},{__cx:n}=St.paths(),i=e||oe.default.join(n,"store"),s=wr(i).filter(o=>oe.default.extname(o)===".json");for(let o of s)try{let a=En.default.readJsonSync(o,{encoding:"utf-8"});if(r){let c=Ye.default.statSync(o);a.size=c.size/1024}a.path&&(yield a)}catch(a){console.error(`Error: The file ${o} doesn't exist`,a)}}function Gl(){let t=K(),{__cx:e}=t.paths(),r=oe.default.join(e,"store");return wr(r).filter(i=>oe.default.extname(i)===".json")}async function ls(){let{__cx:t}=St.paths(),{sitesToPublish:e,createdPages:r,buildProcessData:n}=En.default.readJSONSync(oe.default.join(t,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:e}}function Hl(){let{__cx:t}=St.paths(),e=oe.default.join(t,"store");Ye.default.existsSync(e)||(Ye.default.mkdirSync(e),Ye.default.mkdirSync(oe.default.join(e,"metadata"))),console.info("Store initialized")}function zl(t,e){let{__cx:r}=St.paths();Ye.default.writeFileSync(oe.default.join(r,"store","metadata","render-info.json"),JSON.stringify(e))}function Rg(t,e){return fs(t).filter(i=>e.includes(i))}function fs(t){return Ye.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=Ye.default.statSync(n);if(i&&i.isDirectory()||oe.default.extname(r)!==".json")return!1;let s=oe.default.basename(r,oe.default.extname(r));return!isNaN(parseInt(s))}).map(r=>{let n=oe.default.basename(r,oe.default.extname(r));return parseInt(n)})}function Wl(t){let{__cx:e}=St.paths();t.forEach(r=>{ds(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=oe.default.join(e,"store",n);En.default.writeJSONSync(i,r)})}function Pn(t){let{__cx:e}=St.paths();t.length!==0&&t.forEach(r=>{let n=oe.default.join(e,"store",`${r}.json`);try{Ye.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function Jl(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:s}=e,o=Rg(t,n),a=i.filter(m=>!o.includes(m)),c=a.concat(r),f=o.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!f.includes(m)),p=Cn(),g=[];for await(let m of p){let b=m.context.page.site,S=m.context.page.id;s.map(x=>x.id).includes(b)||g.push(S)}return{pagesInStore:o,pagesMissingInStore:a,pagesToDeleteFromStore:[...f,...g],pagesToWriteToStore:u}}var kg=K(),hs=t=>{if(!Se.default.statSync(t).isDirectory())return;let r=Se.default.readdirSync(t);if(r.length>0){let i=r.length,s=r.filter(o=>Xe.default.extname(o).toLowerCase()===".xml").length;i===s&&(r.forEach(function(o){let a=Xe.default.join(t,o);Se.default.rmSync(a)}),r=Se.default.readdirSync(t)),r.forEach(function(o){let a=Xe.default.join(t,o);hs(a)}),r=Se.default.readdirSync(t)}if(r.length===0){Se.default.rmdirSync(t);return}};function Dn(t,e){for(let r of t)Ne.default.existsSync(r)||Ne.default.mkdirSync(r,{recursive:!0,...e})}function On(t,e,r,n={withBackup:!1}){let{withBackup:i}=n;for(let s of r){let o=Xe.default.join(t,s),a=Xe.default.join(e,s);if(!Se.default.existsSync(o)){console.log(`Source directory does not exist: ${o}`);continue}i&&Kl(a);try{Se.default.existsSync(a)&&Ne.default.rmSync(a,{recursive:!0,force:!0}),Ne.default.cpSync(o,a,{recursive:!0}),i&&Yl(a)}catch{console.log("Copy failed!"),i&&(Vl(a),console.log("Backup has been restored."))}}}function Jt(t,e,r,n){let{override:i,withBackup:s}=n||{};for(let o of r){let a=Xe.default.join(t,o),c=Xe.default.join(e,o);if(Se.default.existsSync(a)){s&&Kl(c);try{i&&Se.default.existsSync(c)&&Ne.default.rmSync(c,{recursive:!0,force:!0}),Ne.default.renameSync(a,c),s&&Yl(c)}catch{console.log("Move failed!"),s&&(Vl(c),console.log("Backup has been restored."))}}}}function Sr(t,e){for(let r of e){if(!r)continue;let n=Xe.default.join(t,r);Se.default.existsSync(n)&&Ne.default.rmSync(n,{recursive:!0,force:!0})}}function Vl(t,e="-BACKUP"){let r=t+e;try{Ne.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function Yl(t,e="-BACKUP"){let r=t+e;if(Se.default.existsSync(r))try{Ne.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function Kl(t,e="-BACKUP"){let r=t+e;if(Se.default.existsSync(t)){if(Se.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{Ne.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 Tg(t){return Number.isInteger(t)&&t<0}async function Ql(){let{__cx:t}=kg.paths(),e=Xe.default.join(t,"store");try{let r=fs(e).filter(Tg);Pn(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}of.default.config();var uf=K(),Gg=lf(process.env.GRIDDO_DEBUG_LOGS),Hg=lf(process.env.GRIDDO_BUILD_LOGS),t_=cf.default.sync(),Ge={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 K(){try{return(nf(),Qo(rf)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}function L(t){Gg&&console.log(ft.default.hex("#ffff33")("verbose"),ft.default.gray(t.replace(/(\s)\s+/g,"$1").trim()))}function lf(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 wr(t){let e=[];return Vt.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function dt(t,e="",r=1,n=1){let i=t.split(`
23
23
  `).map(b=>b.trim()),s=e?` ${e} `:"",o=e?s.length:0,a=Math.max(...i.map(b=>b.length))+r*2,c=Math.max(a,o),f=`\u2502${" ".repeat(c)}\u2502
24
24
  `.repeat(n),u=c,p=`\u256D${s}${"\u2500".repeat(u-o)}\u256E
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}${f}${m}${f}${g}`)}function Ze(t){Fg&&console.info(t.replace(/(\s)\s+/g,"$1"))}function zl(t){return new Promise(e=>setTimeout(e,t))}function Wl(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 zt.default[n].bold(`${t}${e}`)}function ls(t,e=3){return(t/1e3).toFixed(e)}function fs(t){return"site"in t&&t.site?t?.site:void 0}function hs(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&hs(t[r],e)}function ds(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function Yl(t){let{__cx:e}=Jl.paths(),{version:r}=JSON.parse(Xe.default.readFileSync(us.default.join(e,"package.json"),"utf-8")),n=`
25
+ `,g=`\u2570${"\u2500".repeat(u)}\u256F`,m=i.map(b=>{let S=" ".repeat(c-b.length-r);return`\u2502${" ".repeat(r)}${b}${S}\u2502
26
+ `}).join("");console.log(`${p}${f}${m}${f}${g}`)}function Ke(t){Hg&&console.info(t.replace(/(\s)\s+/g,"$1").trim())}function ff(t){return new Promise(e=>setTimeout(e,t))}function df(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 ft.default[n].bold(`${t}${e}`)}function _s(t,e=3){return(t/1e3).toFixed(e)}function ws(t){return"site"in t&&t.site?t?.site:void 0}function ds(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&ds(t[r],e)}function Ss(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function hf(t){let e=process.version,{griddoVersion:r}=uf,n=`
27
27
  \xB7\xB7
28
28
  \xB7\xB7 Griddo Exporter ${r}
29
29
  \xB7\xB7 Adapter: ${t}
30
+ \xB7\xB7 Node: ${e}
30
31
  \xB7\xB7
31
- `;console.log(Gl.default.cristal(n))}function Vl(){let{__cx:t}=Jl.paths(),e=us.default.join(t,"apiCache"),r=Xe.default.readdirSync(e),n={},i=r.filter(o=>{let a=`${e}/${o}`,c=Xe.default.readJSONSync(a,"utf-8"),{id:f,entity:u,fullUrl:p}=c;return!!(f&&u&&p)});for(let o of i){let a=`${e}/${o}`,c=Xe.default.readJSONSync(a,"utf-8"),f=Xe.default.statSync(a).mtimeMs,{id:u}=c;(!n[u]||f>Xe.default.statSync(`${e}/${n[u]}`).mtimeMs)&&(n[u]=o)}let s=0;for(let o of i){let a=`${e}/${o}`,c=Xe.default.readJSONSync(a,"utf-8"),{id:f}=c;o!==n[f]&&(Xe.default.unlinkSync(a),s++)}console.log(`Sanitize apiCache dir for ${s} files`)}async function ps(...t){let e=process.hrtime();for(let s of t)await s();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function He(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
32
- `),Ge(`\u231B\uFE0F ${t}`,"",1,0),process.stdin.once("data",()=>{r()})})}async function Je(t){let{steps:e,name:r,attempts:n}=t,i=0,s=n||1;for(;i<s;)try{console.info(`
33
- ${zt.default.blue("info")} start ${r} life-cycle`);let o=await ps(...e);console.info(`${zt.default.green("success")} ${r} - ${o}s`);break}catch(o){let a=zt.default.bgRed.black(` Error in ${r} LifeCycle `),c=zt.default.yellow(`Attempt (${i+1})`);console.log(`
32
+ `;console.log(af.default.cristal(n))}function pf(){let{__cx:t}=uf.paths(),e=sf.default.join(t,"apiCache"),r=Vt.default.readdirSync(e),n={},i=r.filter(o=>{let a=`${e}/${o}`,c=An.default.readJSONSync(a,"utf-8"),{id:f,entity:u,fullUrl:p}=c;return!!(f&&u&&p)});for(let o of i){let a=`${e}/${o}`,c=An.default.readJSONSync(a,"utf-8"),f=Vt.default.statSync(a).mtimeMs,{id:u}=c;(!n[u]||f>Vt.default.statSync(`${e}/${n[u]}`).mtimeMs)&&(n[u]=o)}let s=0;for(let o of i){let a=`${e}/${o}`,c=An.default.readJSONSync(a,"utf-8"),{id:f}=c;o!==n[f]&&(Vt.default.unlinkSync(a),s++)}console.log(`Sanitize apiCache dir for ${s} files`)}async function xs(...t){let e=process.hrtime();for(let s of t)await s();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}function He(t){if(JSON.parse(process.env.GRIDDO_RENDER_BREAKPOINTS_FEATURE||"false"))return new Promise(r=>{console.log(`
33
+ `),dt(`\u231B\uFE0F ${t}`,"",1,0),process.stdin.once("data",()=>{r()})})}async function ze(t){let{steps:e,name:r,attempts:n}=t,i=0,s=n||1;for(;i<s;)try{console.info(`
34
+ ${ft.default.blue("info")} start ${r} life-cycle`);let o=await xs(...e);console.info(`${ft.default.green("success")} ${r} - ${o}s`);break}catch(o){let a=ft.default.bgRed.black(` Error in ${r} LifeCycle `),c=ft.default.yellow(`Attempt (${i+1})`);console.log(`
34
35
  ${a} ${c}
35
- `),console.log(o),console.log(),i++}if(i===s)throw new Error(`Exceeded maximum retry attempts (${s}) for ${r} LifeCycle`)}var wt=W();function Kl(t){let{__caches:e}=wt.paths(t);return Cn({basePath:se.default.join(e,"store"),withSizeProp:!1})}function*Cn(t){let{basePath:e,withSizeProp:r}=t||{},{__cx:n}=wt.paths(),i=e||se.default.join(n,"store"),s=_r(i).filter(o=>se.default.extname(o)===".json");for(let o of s)try{let a=En.default.readJsonSync(o,{encoding:"utf-8"});if(r){let c=et.default.statSync(o);a.size=c.size/1024}a.path&&(yield a)}catch(a){console.error(`Error: The file ${o} doesn't exist`,a)}}function Ql(){let t=W(),{__cx:e}=t.paths(),r=se.default.join(e,"store");return _r(r).filter(i=>se.default.extname(i)===".json")}async function ms(){let{__cx:t}=wt.paths(),{sitesToPublish:e,createdPages:r,buildProcessData:n}=En.default.readJSONSync(se.default.join(t,"store","metadata","render-info.json"));return{buildProcessData:n,createdPages:r,sitesToPublish:e}}function Zl(){let{__cx:t}=wt.paths(),e=se.default.join(t,"store");et.default.existsSync(e)||(et.default.mkdirSync(e),et.default.mkdirSync(se.default.join(e,"metadata"))),console.info("Store initialized")}function ef(t,e){let{__cx:r}=wt.paths();et.default.writeFileSync(se.default.join(r,"store","metadata","render-info.json"),JSON.stringify(e))}function Rg(t,e){return gs(t).filter(i=>e.includes(i))}function gs(t){return et.default.readdirSync(t).filter(r=>{let n=`${t}/${r}`,i=et.default.statSync(n);if(i&&i.isDirectory()||se.default.extname(r)!==".json")return!1;let s=se.default.basename(r,se.default.extname(r));return!isNaN(parseInt(s))}).map(r=>{let n=se.default.basename(r,se.default.extname(r));return parseInt(n)})}function tf(t){let{__cx:e}=wt.paths();t.forEach(r=>{hs(r,["editorID","parentEditorID"]);let n=`${r.context.page.id}.json`,i=se.default.join(e,"store",n);En.default.writeJSONSync(i,r)})}function Pn(t){let{__cx:e}=wt.paths();t.length!==0&&t.forEach(r=>{let n=se.default.join(e,"store",`${r}.json`);try{et.default.unlinkSync(n)}catch(i){console.log(`Error removing file ${r}`,i.message)}})}async function rf(t,e){let{changedPages:r,pages:n,validPagesIds:i,sitesToPublish:s}=e,o=Rg(t,n),a=i.filter(m=>!o.includes(m)),c=a.concat(r),f=o.filter(m=>!i.includes(m)),u=Array.from(new Set(c)).filter(m=>!f.includes(m)),p=Cn(),g=[];for await(let m of p){let b=m.context.page.site,w=m.context.page.id;s.map(x=>x.id).includes(b)||g.push(w)}return{pagesInStore:o,pagesMissingInStore:a,pagesToDeleteFromStore:[...f,...g],pagesToWriteToStore:u}}var kg=W(),ys=t=>{if(!Se.default.statSync(t).isDirectory())return;let r=Se.default.readdirSync(t);if(r.length>0){let i=r.length,s=r.filter(o=>ze.default.extname(o).toLowerCase()===".xml").length;i===s&&(r.forEach(function(o){let a=ze.default.join(t,o);Se.default.rmSync(a)}),r=Se.default.readdirSync(t)),r.forEach(function(o){let a=ze.default.join(t,o);ys(a)}),r=Se.default.readdirSync(t)}if(r.length===0){Se.default.rmdirSync(t);return}};function Dn(t,e){for(let r of t)je.default.existsSync(r)||je.default.mkdirSync(r,{recursive:!0,...e})}function On(t,e,r,n={withBackup:!1}){let{withBackup:i}=n;for(let s of r){let o=ze.default.join(t,s),a=ze.default.join(e,s);if(!Se.default.existsSync(o)){console.log(`Source directory does not exist: ${o}`);continue}i&&of(a);try{Se.default.existsSync(a)&&je.default.rmSync(a,{recursive:!0,force:!0}),je.default.cpSync(o,a,{recursive:!0}),i&&sf(a)}catch{console.log("Copy failed!"),i&&(nf(a),console.log("Backup has been restored."))}}}function Wt(t,e,r,n){let{override:i,withBackup:s}=n||{};for(let o of r){let a=ze.default.join(t,o),c=ze.default.join(e,o);if(Se.default.existsSync(a)){s&&of(c);try{i&&Se.default.existsSync(c)&&je.default.rmSync(c,{recursive:!0,force:!0}),je.default.renameSync(a,c),s&&sf(c)}catch{console.log("Move failed!"),s&&(nf(c),console.log("Backup has been restored."))}}}}function wr(t,e){for(let r of e){if(!r)continue;let n=ze.default.join(t,r);Se.default.existsSync(n)&&je.default.rmSync(n,{recursive:!0,force:!0})}}function nf(t,e="-BACKUP"){let r=t+e;try{je.default.renameSync(r,t),console.log(`Backup ${r} has been restored`)}catch{console.log(`Error while delete ${r} backup`)}}function sf(t,e="-BACKUP"){let r=t+e;if(Se.default.existsSync(r))try{je.default.rmSync(r,{recursive:!0,force:!0}),console.log(`Backup ${r} has been deleted`)}catch{console.log(`Error while delete ${r} backup`)}}function of(t,e="-BACKUP"){let r=t+e;if(Se.default.existsSync(t)){if(Se.default.existsSync(r)){console.log(`Destination ${r} already exists`);return}try{je.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 Tg(t){return Number.isInteger(t)&&t<0}async function af(){let{__cx:t}=kg.paths(),e=ze.default.join(t,"store");try{let r=gs(e).filter(Tg);Pn(r)}catch{console.info("`store` folder does not exist. Skipping multipage or static list template cleaning.")}}pf.default.config();var i_=W(),We={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||"1"),relocation:JSON.parse(process.env.GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS||"1"),meta:JSON.parse(process.env.GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS||"1"),archive:JSON.parse(process.env.GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS||"1"),clean:JSON.parse(process.env.GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS||"1")};function W(){try{return(df(),Qo(hf)).default}catch{console.log("Error while reading configuration file"),process.exit(1)}}gf.default.config();var yf=W();function vf(t){let{proDomain:e}=W(),r=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!r||!t||!t.startsWith(e)?"":(process.env.GRIDDO_DEBUG_LOGS&&(console.log(),console.log("-- getGatsbyAssetPrefixWithDomain() --"),console.log("process.env.GRIDDO_ASSET_PREFIX",process.env.GRIDDO_ASSET_PREFIX),console.log("assetPrefix",r),console.log("return",`${r}/${t}`),console.log()),`${r}/${t}`)}function xs(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Gg(i,`c_fill,w_${e},h_${r}`):Xg(i,`f/${n}/w/${e}/h/${r}`):null}function Xg(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Gg(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}function bf(t){process.env.GRIDDO_DEBUG_LOGS&&(console.log("-- gatsbyBuild() --"),console.log("assetPrefixWithDomain",t));let{__ssg:e}=yf.paths();if((0,mf.spawnSync)("yarn",["gatsby-build"],{cwd:e,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign(process.env,{GRIDDO_EXPORTER:"true",SPAWN_ASSET_PREFIX_WITH_DOMAIN:t})}).status!==0)throw new Error("Error in 'yarn gatsby-build'")}async function _f(t,e){let{__cx:r,__ssg:n}=yf.paths(t),i=tt.default.join(r,"dist"),s=tt.default.join(r,"assets"),o=tt.default.join(r,"dist",t),a=tt.default.join(n,"public");console.log(a);let c=Ne.default.readdirSync(a).filter(w=>tt.default.extname(w)===".js"||tt.default.extname(w)===".json"||tt.default.extname(w)===".css"),f=`${a}/page-data`,u=`${s}/page-data`,p=tt.default.join(n,"static"),g=s,m=`${i}/static`,b=`${s}/static`;try{Ne.default.mkdirSync(s,{recursive:!0}),Ne.default.copySync(a,i),e&&(Ne.default.copySync(f,u),Ne.default.existsSync(p)&&Ne.default.copySync(p,g,{overwrite:!1}),Ne.default.copySync(m,b,{overwrite:!1}),Ne.default.existsSync(p)&&Ne.default.copySync(p,o,{overwrite:!1}),c.map(async w=>{let x=`${a}/${w}`,A=`${s}/${w}`;Ne.default.copySync(x,A)}))}catch(w){console.error(w)}}var to=F(require("node:fs")),ro=F(require("node:path")),od=F(Ke());var nd=F(Ks()),id=F(hn()),sd=F(Ke());var Wh=F(require("node:crypto")),Dt=F(require("node:fs")),er=F(require("node:path")),Qs=F(bt());var zn=W();function Yh(){let{__cx:t}=zn.paths(),e=er.default.join(t,"apiCache");Dt.default.existsSync(e)||Dt.default.mkdirSync(e),console.info("Cache initialized")}function Vh(t){let{__cx:e}=zn.paths(),r=er.default.join(e,"apiCache"),n=Wh.default.createHash("sha256");return n.update(JSON.stringify(t)),`${r}/${n.digest("hex")}`}function Kh(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=Vh(t),i=er.default.dirname(n);Dt.default.existsSync(i)||Dt.default.mkdirSync(i,{recursive:!0}),Dt.default.writeFileSync(n,r,"utf8")}function Qh(t){try{let e=Vh(t);return Qs.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function bv(){let{__cx:t}=zn.paths(),r=`${er.default.join(t,"apiCache")}/siteHash.json`;try{return Qs.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function Zh(t,e){let r=bv(),n=r[t],i=e||n||new Date().valueOf(),{__cx:s}=zn.paths(),a=`${er.default.join(s,"apiCache")}/siteHash.json`;return i!==n&&(r[t]=i,Dt.default.writeFileSync(a,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var ed=F(Ks()),td=F(hn()),Zs=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,ed.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(td.default.red(`
36
+ `),console.log(o),console.log(),i++}if(i===s)throw new Error(`Exceeded maximum retry attempts (${s}) for ${r} LifeCycle`)}gf.default.config();var yf=K();function vf(t){let{proDomain:e}=K(),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 Es(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Wg(i,`c_fill,w_${e},h_${r}`):zg(i,`f/${n}/w/${e}/h/${r}`):null}function zg(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Wg(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}function bf(t){L(`read assetPrefixWithDomain, ${t}`);let{__ssg:e}=yf.paths();if((0,mf.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})}).status!==0)throw new Error("Error in 'yarn gatsby-build'")}async function _f(t,e){let{__cx:r,__ssg:n}=yf.paths(t),i=Qe.default.join(r,"dist"),s=Qe.default.join(r,"assets"),o=Qe.default.join(r,"dist",t),a=Qe.default.join(n,"public"),c=Le.default.readdirSync(a).filter(S=>Qe.default.extname(S)===".js"||Qe.default.extname(S)===".json"||Qe.default.extname(S)===".css"),f=`${a}/page-data`,u=`${s}/page-data`,p=Qe.default.join(n,"static"),g=s,m=`${i}/static`,b=`${s}/static`;try{Le.default.mkdirSync(s,{recursive:!0}),Le.default.copySync(a,i),e&&(Le.default.copySync(f,u),Le.default.existsSync(p)&&Le.default.copySync(p,g,{overwrite:!1}),Le.default.copySync(m,b,{overwrite:!1}),Le.default.existsSync(p)&&Le.default.copySync(p,o,{overwrite:!1}),c.map(async S=>{let x=`${a}/${S}`,A=`${s}/${S}`;Le.default.copySync(x,A)}))}catch(S){console.error(S)}}var ro=F(require("node:fs")),no=F(require("node:path")),oh=F(tt());var nh=F(Qs()),ih=F(dn()),sh=F(tt());var Jd=F(require("node:crypto")),Dt=F(require("node:fs")),tr=F(require("node:path")),Zs=F(_t());var Jn=K();function Vd(){let{__cx:t}=Jn.paths(),e=tr.default.join(t,"apiCache");Dt.default.existsSync(e)||Dt.default.mkdirSync(e),console.info("Cache initialized")}function Yd(t){let{__cx:e}=Jn.paths(),r=tr.default.join(e,"apiCache"),n=Jd.default.createHash("sha256");return n.update(JSON.stringify(t)),`${r}/${n.digest("hex")}`}function Kd(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=Yd(t),i=tr.default.dirname(n);Dt.default.existsSync(i)||Dt.default.mkdirSync(i,{recursive:!0}),Dt.default.writeFileSync(n,r,"utf8")}function Qd(t){try{let e=Yd(t);return Zs.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function Sv(){let{__cx:t}=Jn.paths(),r=`${tr.default.join(t,"apiCache")}/siteHash.json`;try{return Zs.default.readJSONSync(r,{encoding:"utf-8"})||{}}catch{return{}}}function Zd(t,e){let r=Sv(),n=r[t],i=e||n||new Date().valueOf(),{__cx:s}=Jn.paths(),a=`${tr.default.join(s,"apiCache")}/siteHash.json`;return i!==n&&(r[t]=i,Dt.default.writeFileSync(a,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var eh=F(Qs()),th=F(dn()),eo=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,eh.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(th.default.red(`
36
37
  \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
37
38
  \u2502 Access credentials failure \u2502
38
39
  \u2502 Check that the login details are correct in your .env file \u2502
39
40
  \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
40
- `)),process.exit(1)}}},rt=new Zs;sd.default.config();var{env:{RETRY_WAIT_SECONDS:_v="4",RETRY_ATTEMPTS:rd="4"}}=process;async function eo(t,e,r=""){let{endpoint:n,body:i,cacheKey:s="",attempt:o=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:s};if(s){let f=new Date,u=Qh(c);if(u){let p=fs(u),g=p?`site: ${p}`:"",m=ls(new Date().getTime()-f.getTime());return Ze(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let f=new Date,{data:u}=await(0,nd.default)({url:n,method:e,headers:Object.assign({},a,rt.headers),data:i}),p=fs(u),g=p?`site: ${p}`:"",m=ls(new Date().getTime()-f.getTime());return Ze(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Kh(c,u),u}catch(f){let u=f;return u.response?.status===404?null:(o>parseInt(rd)&&(console.log(`
41
- Max attempts ${rd} reached
41
+ `)),process.exit(1)}}},Ze=new eo;sh.default.config();var{env:{RETRY_WAIT_SECONDS:xv="4",RETRY_ATTEMPTS:rh="4"}}=process;async function to(t,e,r=""){let{endpoint:n,body:i,cacheKey:s="",attempt:o=1,headers:a}=t,c={endpoint:n,body:i,headers:a,cacheKey:s};if(s){let f=new Date,u=Qd(c);if(u){let p=ws(u),g=p?`site: ${p}`:"",m=_s(new Date().getTime()-f.getTime());return Ke(`${e} (cache) ${g} ${n} - ${m}s ${r}`),u}}try{let f=new Date,{data:u}=await(0,nh.default)({url:n,method:e,headers:Object.assign({},a,Ze.headers),data:i}),p=ws(u),g=p?`site: ${p}`:"",m=_s(new Date().getTime()-f.getTime());return Ke(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Kd(c,u),u}catch(f){let u=f;return u.response?.status===404?null:(o>parseInt(rh)&&(console.log(`
42
+ Max attempts ${rh} reached
42
43
  --------------------------------------
43
44
  - ${e.toUpperCase()} ${n}
44
45
  - BODY: ${JSON.stringify(i)}
45
46
  - HEADERS: ${JSON.stringify(a)}
46
47
  - RESPONSE: ${u.response?.status,JSON.stringify(u.response?.data)}
47
48
  --------------------------------------
48
- `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),wv(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await zl(parseInt(_v)*1e3),eo({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},e,r))}}async function De(t){return await eo(t,"get")}async function Dr(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 eo(t,"post",i||"")}function wv(t,e){let{response:r,message:n,stack:i}=t,{callInfo:s}=e,{status:o,statusText:a,data:c}=r||{},f=[];for(let m of Object.keys(s))f.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let u=f.join(`
49
+ `),process.exit(1)),u.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(u,null,2)),process.exit(1)),Ev(u,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await ff(parseInt(xv)*1e3),to({endpoint:n,body:i,headers:a,cacheKey:s,attempt:o+1},e,r))}}async function Oe(t){return await to(t,"get")}async function Or(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 to(t,"post",i||"")}function Ev(t,e){let{response:r,message:n,stack:i}=t,{callInfo:s}=e,{status:o,statusText:a,data:c}=r||{},f=[];for(let m of Object.keys(s))f.push(`${m}: ${typeof s[m]=="object"?JSON.stringify(s[m]):s[m]}`);let u=f.join(`
49
50
  `),p=r?`Code: ${o} - ${a}
50
51
  Response: ${JSON.stringify(c)}`:"",g=`${n}
51
- ${i}`;console.warn(id.default.bold.red(`
52
+ ${i}`;console.warn(ih.default.bold.red(`
52
53
  =============
53
54
 
54
55
  { Call info }
@@ -61,11 +62,6 @@ ${p}
61
62
  ${g}
62
63
 
63
64
  =============
64
- `))}od.default.config();var Sv=W(),no=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 De({endpoint:this.endpoint});this.robots=e?.filter(r=>!!r.path).map(({path:r,content:n})=>({path:r,content:n||`User-agent: *
65
+ `))}oh.default.config();var Cv=K(),io=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: *
65
66
  \r
66
- \rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let{__cx:r}=Sv.paths(e),n=ro.default.join(r,"dist");await this.getRobots();let i=this.robots.find(({path:s})=>s===`/${e}`);if(!i){console.log(`Robots not found for ${e}`);return}if(to.default.existsSync(n)){let s=ro.default.join(n,"robots.txt");to.default.writeFileSync(s,i?.content)}else console.log(`${n} not found`)}},ad=new no;var Kd=F(require("node:fs")),Jo=F(require("node:path")),Qd=F(Ke()),Zd=F(ns());var cd=F(Ke());cd.default.config();var io=process.env.API_URL,pt=`${io}/site/`,nt={GET_ALL:`${io}/sites/all`,GET_PAGE:[`${io}/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 De({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=nt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=nt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=nt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=nt;return await De({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=nt;return await Dr({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,s){let{GET_DISTRIBUTOR_DATA:[o,a]}=nt,c=i||e.site,f=s||e.language;return await Dr({endpoint:`${o}${c}${a}`,body:r,headers:{lang:f},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=nt;return await De({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=nt;return await De({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Wn=class{static getBody(e,r){let{order:n,sources:i,quantity:s,mode:o,fixed:a,fullRelations:c=!1,allLanguages:f=!1,preferenceLanguage:u=!1,referenceId:p}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:s,fullRelations:c,allLanguages:f,preferenceLanguage:u}:o==="manual"?{mode:o,fixed:a,fullRelations:c}:o==="navigation"?{mode:o,order:n,quantity:s,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${o} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return Ge(`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 Ge(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:s,lang:o}=n,a=this.getBody(n,r);return await ge.getDistributorData(r,a,i,s,o)}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 f in a){if(f==="queriedItems")continue;let p=a[f];!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 Yn=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,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let s=e.find(o=>o.language===n&&o.navigationLanguages?.find(a=>a.navigationId===r))||e.find(o=>o.id===r);return s?{...s}: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:s},templateConfig:{defaultHeader:o,defaultFooter:a,templates:c}}=e,f=b=>{let w=b.find(x=>typeof x=="number");return typeof w=="number"?w:null},u=f([r,c?.[s]?.defaultHeader,o]),p=f([n,c?.[s]?.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 so=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 De({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await Dr({endpoint:e})}},oo=new so;var fd=F(Ke());fd.default.config();var xv=25;function Ev({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?xs(r,1280,768):"",twitterImage:r?xs(r,1280,768):""}}function Cv(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:s,url:o,isIndexed:a,follow:c,metasAdvanced:f,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=f?.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:s,url:o,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 co(t,e){let{id:r,title:n,fullPath:i,language:s,breadcrumb:o,socialDescription:a,socialImage:c,socialTitle:f}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:w,siteScript:x,siteSlug:A,socials:$,theme:U,navigations:{header:q,footer:Y}}=e;t.breadcrumb=o,t.siteSlug=A,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let ye=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),K=Cv(t),D=Ev({socialDescription:a,socialImage:c,socialTitle:f}),j=i.compose,T=new Date().toString();return{path:j,size:void 0,context:{id:r,title:n,fullPath:i,locale:ye,languageId:s,theme:U,siteMetadata:b,pageMetadata:K,openGraph:D,socials:$,siteLangs:m,cloudinaryName:p,siteOptions:w,griddoVersion:g,renderDate:T,siteScript:x,header:q,footer:Y,page:t}}}async function hd(t,e){return await co(t,e)}async function dd({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:s},o){let a=e.map(async(c,f)=>{let u=f===0,p=f+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,id:parseInt("-"+t.id+f),fullPath:{...t.fullPath,compose:ao(m,p,{addEndingSlash:!0})},fullUrl:ao(t.fullUrl,p,{addEndingSlash:!0}),slug:ao(t.slug,p),title:ld(t.title,p),metaTitle:ld(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:s?.length},isRoot:r,defaultLang:n};return await co(b,o)});return Promise.all(a)}function pd(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:o})=>o==="/")||i.push({});let s=i.map(async(o,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:f="/",title:u="",metaTitle:p="",metaDescription:g=""}=o,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",w=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=f?.replace(/\//g,""),$=f==="/"?x:x+"/",U=b.endsWith("/")?"":"/",q=`${b}${U}${$}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${w}/${$}`,c.fullPath.compose=q,c.slug=q,c.template.activeSectionSlug=f,c.template.activeSectionBase=w,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await co(c,e)});return Promise.all(s)}function md(t){return new Promise(r=>{let n=(i,s=0)=>{if(!(!i||typeof i!="object")){for(let o in i){let a=i[o],c=a||typeof a=="object",f=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!f)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,s+1)}s||r(null)}};n([t])})}function Pv(t,e,r){return e?.slice(t*(r-1),t*r)}function Dv(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,s)=>s+1)?.map(i=>Pv(t,e,i))}function gd(t){let e=t.queriedItems||[],r=t?.itemsPerPage||xv;return Dv(r,e)}function ud(t){return t.replace(/\/+$/,"/")}function ao(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?ud(`${t}${i}`):ud(`${t}${n}${e}${i}`)}function ld(t,e){return!t||e<=1?t:`${t} - ${e}`}var Lr=F(require("node:path")),Nr=F(bt()),Ho=F(Bd());var bb=process.env.API_URL,_b=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,nr=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),Ud=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),Gd=W();async function Hd(t){console.info(`API URL ${bb}`),await rt.login();let e=await ge.getAll(),r=_b?e.filter(s=>!nr||s.id===nr):e.filter(s=>nr?s.id===nr:!!s.shouldBeUpdated);if(r.length)for(let s of r){let{items:o}=await ge.getLanguages(s.id);s.domains=o.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(s=>nr?s.id===nr:!!s.isPublished&&s.domains.length>0),i=r.filter(s=>!s.isPublished&&s.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Jd(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 zd(t){let e=await ge.startSiteRender(t),r=await ge.getInfo(t),n=await ge.getLanguages(t),i=await ge.getSocials(t),s=n.items,o=s.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:f}=e,{headers:u,footers:p}=r,g=Ud.length?Ud.filter(b=>f.includes(b)):f;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:s,defaultLang:o,headers:u,footers:p,socials:i}}async function Wd(){let{__cx:t}=Gd.paths(),{buildProcessData:e}=await ms(),r=await rt.login(),n=Object.keys(e).map(s=>({...e[s],siteId:parseInt(s)})),i={authControl:r,sites:n};Nr.default.writeFileSync(Lr.default.join(t,"dist","__build-report__.json"),JSON.stringify(i)),Ze(`Build report saved for ${n.length} site(s)`)}async function Yd(){let{sitesToPublish:t}=await ms(),{__cx:e}=Gd.paths(),r=Lr.default.join(e,"dist"),n=t.map(async i=>{let{id:s,languages:o}=i,a=o.map(async c=>{rt.headers&&(rt.headers.lang=c.id.toString());let f=await ge.getSitemap(s);if(!f)return;let{items:u,url:{home:p,domain:g}}=f;if(!p)return;let m=i.domains.find(q=>Object.keys(q)[0]==c.id.toString());if(!m)return;let b=Object.values(m)[0],w=[],x=Object.keys(u),A=Lr.default.join(r,b.replace(g,""));for(let q of x){let Y=u[q];if(!Y.length)continue;let ue=(0,Ho.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:Y}),ye=`/sitemap-${q.toLowerCase()}.xml`,K=`${A}${ye}`;Xd(K,ue),w.push(`${p.endsWith("/")?p.slice(0,-1):p}${ye}`)}if(!w.length)return;let $=(0,Ho.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:w.map(q=>({loc:q}))}),U=`${A}/sitemap.xml`;Xd(U,$)});return Promise.all(a)});await Promise.all(n)}function Xd(t,e){try{let r=Lr.default.dirname(t);Nr.default.existsSync(r)||Nr.default.mkdirSync(r,{recursive:!0}),Nr.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}var wb=W();Qd.default.config();var Sb=process.env.API_URL,xb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Vd=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Eb=process.env.PUBLIC_API_URL,Cb=new Date().valueOf().toString();async function ep(t){Zl(),console.info(`API calls with ${Vd} threads`);let{__cx:e}=wb.paths(),r=Jo.default.join(e,"store"),{version:n}=JSON.parse(Kd.default.readFileSync(Jo.default.join(e,"package.json"),"utf-8"));try{let i=[],s={},{sitesToPublish:o,sitesToUnpublish:a}=await Hd(t);await oo.getAll(),o.length||a.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${ds(o)}`),console.info(`Sites to unpublish: ${ds(a)}`),await Jd(a);for(let c of o){let{id:f,slug:u,theme:p,favicon:g,changedPages:m=[],pages:b=[]}=c,{siteInfo:w,validPagesIds:x,siteHash:A,unpublishHashes:$,siteLangs:U,defaultLang:q,headers:Y,footers:ue,socials:ye}=await zd(f),{cloudinaryName:K,useMetaTitle:D,useMetaKeywords:j,showBasicMetaRobots:T,avoidHrefLangsOnCanonicals:H,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:X,avoidDebugMetas:O}=oo.settings;s[f]={siteHash:A,unpublishHashes:$,publishHashes:[]};let B=new Yn;B.navigations={headers:Y,footers:ue},c.languages=U;let M=Zh(f,A),P=w.siteScript,R={siteUrl:w.slug,title:w.name,favicon:g},Be={baseUrl:Sb,publicBaseUrl:Eb,instance:xb,siteSlug:u,theme:p,siteMetadata:R,socials:ye,siteLangs:U,cloudinaryName:K,griddoVersion:n,siteOptions:{useMetaTitle:D,useMetaKeywords:j,showBasicMetaRobots:T,avoidHrefLangsOnCanonicals:H,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:X,avoidDebugMetas:O},siteScript:P};Ze(`${c.name} site`);let Ve=async v=>{let S=[],_=await ge.getPage(v,M);if(!_)return;i.push(v);let N=JSON.parse(JSON.stringify(Be));N.navigations=B.getPageNavigations(_);let L=await Wn.getDistributorData({page:_,cacheKey:Cb}),J=await md(L),fe=_?.mode==="list",st=!fe&&J,Ae=!st&&!fe;if(fe){let Ue={page:_,pages:gd(L),isRoot:!1,defaultLang:q,template:L,totalQueriedItems:L.queriedItems};S=await dd(Ue,N)}if(st){let Ue=_;Ue.template=L,Ue.multiPageElements=J,Ue.defaultLang=q,S=await pd(Ue,N)}if(Ae){let Ue=_;Ue.template=L,Ue.defaultLang=q,S=[await hd(Ue,N)]}_.hash!==null&&s[f].publishHashes.push(_.hash),tf(S)},{pagesInStore:ne,pagesMissingInStore:ve,pagesToDeleteFromStore:it,pagesToWriteToStore:le}=await rf(r,{sitesToPublish:o,pages:b,validPagesIds:x,changedPages:m});Pn(it);let l=`Store: ${ne.length} -> ${ne}
67
- ValidPages: ${x.length} -> ${x}
68
- Changed: ${m.length} -> ${m}
69
- Deleted/Unpublished: ${it.length} -> ${it}
70
- Missing in store: ${ve.length} -> ${ve}
71
- Finally to store: ${le.length} -> ${le}`;JSON.parse(process.env.GRIDDO_DEBUG_LOGS||"false")&&Ge(l,`Site store: ${c.name}`,1,0);let d=(0,Zd.default)(Vd),h=le.map(v=>d(()=>Ve(v)));await Promise.all(h)}ef(r,{buildProcessData:s,createdPages:i,sitesToPublish:o})}catch(i){console.error(i.message),process.exit(1)}}async function tp(t){Yh(),await ep(t),Vl()}var Pb=process.env.API_URL,Db={GET_ALL:`${Pb}/domains`},di=class{static async getAll(){let{GET_ALL:e}=Db;return await De({endpoint:e})}};async function rp(){await rt.login();let t=await di.getAll();return Ob(t)}function Ob(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}async function Wo(){Yl("gatsby");let t=await rp(),e=W();for(let r of t){let{__ssg:n,__exports:i,__caches:s,__cx:o,__components:a}=e.paths(r);Ge(`Initializing render for the domain ${r}`,"",1,0);let c=vf(r),f=!!c&&c!=="";await Je({name:"Clean",attempts:We.clean,steps:[()=>wr(o,["store","apiCache","dist"]),()=>wr(n,["dist","public","static",".cache"]),()=>He("Clean LifeCycle")]}),await Je({name:"Prepare",attempts:We.prepare,steps:[()=>Dn([i]),()=>Dn([s]),()=>He("Prepare LifeCycle")]}),await Je({name:"Restore",attempts:We.restore,steps:[()=>On(a,n,["static"]),()=>On(i,o,["assets"]),()=>On(i,n,["dist"]),()=>{zo.default.existsSync($r.default.join(n,"dist"))&&zo.default.renameSync($r.default.join(n,"dist"),$r.default.join(n,"public"))},()=>Wt(s,o,["apiCache","store"]),()=>Wt(s,n,[".cache"]),()=>He("Restore LifeCycle")]}),await Je({name:"Data",attempts:We.data,steps:[()=>tp(r),()=>He("Data LifeCycle")]}),await Je({name:"SSG",attempts:We.ssg,steps:[()=>bf(c),()=>He("SSG LifeCycle")]}),await Je({name:"Relocation",attempts:We.relocation,steps:[()=>_f(r,f),()=>He("Relocation LifeCycle")]}),await Je({name:"Meta",attempts:We.meta,steps:[()=>Wd(),()=>ad.writeFiles(r),()=>Yd(),()=>He("Meta LifeCycle")]}),await Je({name:"Archive",attempts:We.archive,steps:[()=>af(),()=>ys($r.default.join(o,"dist")),()=>Wt(o,i,["dist","assets"],{withBackup:!0}),()=>Wt(o,s,["apiCache","store"]),()=>Wt(n,s,[".cache"]),()=>He("Archive LifeCycle")]}),await Je({name:"Clean",attempts:We.clean,steps:[()=>wr(n,["static","public","dist"]),()=>He("Clean LifeCycle")]})}}async function np(){let t=await ps(Wo).catch(()=>{console.log("<[ Render will be reset ]>"),process.exit(1)});Ge(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}Ss();0&&(module.exports={IS_COMPONENT_LIBRARY,PROJECT_ALIASES,getBuildPagesFromCachedStore,getBuildPagesFromStore,getBuildPagesPath,getConfig,logInfo,logPageSize,resolveComponentsPath,startRender,walk});
67
+ \rAllow: /`}))||[]}catch(e){console.warn(`${this.constructor.name}: ${e.message}`)}}async writeFiles(e){let{__cx:r}=Cv.paths(e),n=no.default.join(r,"dist");await this.getRobots();let i=this.robots.find(({path:s})=>s===`/${e}`);if(!i){console.log(`Robots not found for ${e}`);return}if(ro.default.existsSync(n)){let s=no.default.join(n,"robots.txt");ro.default.writeFileSync(s,i?.content)}else console.log(`${n} not found`)}},ah=new io;var Qh=F(require("node:path")),Zh=F(tt()),ep=F(is());var ch=F(tt());ch.default.config();var so=process.env.API_URL,ht=`${so}/site/`,et={GET_ALL:`${so}/sites/all`,GET_PAGE:[`${so}/page/`,""],INFO:[`${ht}`,"/all"],LANGUAGES:[`${ht}`,"/languages"],BUILD_START:[`${ht}`,"/build/start"],BUILD_END:[`${ht}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${ht}`,"/distributor"],GET_SITEMAP:[`${ht}`,"/sitemap"],SOCIALS:[`${ht}`,"/socials"],GET_PAGES:[`${ht}`,"/pages?pagination=false"]},me=class{static async getAll(){let{GET_ALL:e}=et;return await Oe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=et;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=et;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=et;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=et;return await Oe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=et;return await Or({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,s){let{GET_DISTRIBUTOR_DATA:[o,a]}=et,c=i||e.site,f=s||e.language;return await Or({endpoint:`${o}${c}${a}`,body:r,headers:{lang:f},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=et;return await Oe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=et;return await Oe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Vn=class{static getBody(e,r){let{order:n,sources:i,quantity:s,mode:o,fixed:a,fullRelations:c=!1,allLanguages:f=!1,preferenceLanguage:u=!1,referenceId:p}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:s,fullRelations:c,allLanguages:f,preferenceLanguage:u}:o==="manual"?{mode:o,fixed:a,fullRelations:c}:o==="navigation"?{mode:o,order:n,quantity:s,fullRelations:c,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${o} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return dt(`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 dt(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``,"Empty data.sources in ReferenceField"),[];let{site:s,lang:o}=n,a=this.getBody(n,r);return await me.getDistributorData(r,a,i,s,o)}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 f in a){if(f==="queriedItems")continue;let p=a[f];!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 Yn=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,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,s)=>{let{language:o}=s;return{...i,[o]:s}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let s=e.find(o=>o.language===n&&o.navigationLanguages?.find(a=>a.navigationId===r))||e.find(o=>o.id===r);return s?{...s}: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:s},templateConfig:{defaultHeader:o,defaultFooter:a,templates:c}}=e,f=b=>{let S=b.find(x=>typeof x=="number");return typeof S=="number"?S:null},u=f([r,c?.[s]?.defaultHeader,o]),p=f([n,c?.[s]?.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 oo=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 Or({endpoint:e})}},ao=new oo;var fh=F(tt());fh.default.config();var Pv=25;function Dv({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Es(r,1280,768):"",twitterImage:r?Es(r,1280,768):""}}function Ov(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:s,url:o,isIndexed:a,follow:c,metasAdvanced:f,pageLanguages:u,fullUrl:p,metaKeywords:g}=t,m=f?.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:s,url:o,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 uo(t,e){let{id:r,title:n,fullPath:i,language:s,breadcrumb:o,socialDescription:a,socialImage:c,socialTitle:f}=t,{baseUrl:u,cloudinaryName:p,griddoVersion:g,siteLangs:m,siteMetadata:b,siteOptions:S,siteScript:x,siteSlug:A,socials:N,theme:B,navigations:{header:$,footer:V}}=e;t.breadcrumb=o,t.siteSlug=A,t.apiUrl=u,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let ke=m.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),te=Ov(t),D=Dv({socialDescription:a,socialImage:c,socialTitle:f}),q=i.compose,T=new Date().toString();return{path:q,size:void 0,context:{id:r,title:n,fullPath:i,locale:ke,languageId:s,theme:B,siteMetadata:b,pageMetadata:te,openGraph:D,socials:N,siteLangs:m,cloudinaryName:p,siteOptions:S,griddoVersion:g,renderDate:T,siteScript:x,header:$,footer:V,page:t}}}async function dh(t,e){return await uo(t,e)}async function hh({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:s},o){let a=e.map(async(c,f)=>{let u=f===0,p=f+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,id:parseInt("-"+t.id+f),fullPath:{...t.fullPath,compose:co(m,p,{addEndingSlash:!0})},fullUrl:co(t.fullUrl,p,{addEndingSlash:!0}),slug:co(t.slug,p),title:lh(t.title,p),metaTitle:lh(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:u,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:c,totalQueriedItems:s?.length},isRoot:r,defaultLang:n};return await uo(b,o)});return Promise.all(a)}function ph(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:o})=>o==="/")||i.push({});let s=i.map(async(o,a)=>{let c=JSON.parse(JSON.stringify(n)),{sectionSlug:f="/",title:u="",metaTitle:p="",metaDescription:g=""}=o,m=typeof u=="string"?u:u.content,b=c.fullPath.compose||"",S=c.fullUrl.endsWith("/")?c.fullUrl.slice(0,-1):c.fullUrl,x=f?.replace(/\//g,""),N=f==="/"?x:x+"/",B=b.endsWith("/")?"":"/",$=`${b}${B}${N}`;return m.trim()&&(c.title=m),g.trim()&&(c.metaDescription=g),c.id=parseInt("-"+c.id+a),c.fullUrl=`${S}/${N}`,c.fullPath.compose=$,c.slug=$,c.template.activeSectionSlug=f,c.template.activeSectionBase=S,c.metaTitle=p.trim()||m.trim()||c.metaTitle,await uo(c,e)});return Promise.all(s)}function mh(t){return new Promise(r=>{let n=(i,s=0)=>{if(!(!i||typeof i!="object")){for(let o in i){let a=i[o],c=a||typeof a=="object",f=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!c||!f)continue;let{component:u,hasGriddoMultiPage:p,elements:g}=a;u&&p&&r(g||[]),n(a,s+1)}s||r(null)}};n([t])})}function Iv(t,e,r){return e?.slice(t*(r-1),t*r)}function Av(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,s)=>s+1)?.map(i=>Iv(t,e,i))}function gh(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Pv;return Av(r,e)}function uh(t){return t.replace(/\/+$/,"/")}function co(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?uh(`${t}${i}`):uh(`${t}${n}${e}${i}`)}function lh(t,e){return!t||e<=1?t:`${t} - ${e}`}var Ft=F(require("node:path")),Lr=F(_t()),zo=F(Bh());var Sb=process.env.API_URL,xb=!!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),Uh=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),Gh=K();async function Hh(t){console.info(`API URL ${Sb}`),await Ze.login();let e=await me.getAll(),r=xb?e.filter(s=>!ir||s.id===ir):e.filter(s=>ir?s.id===ir:!!s.shouldBeUpdated);if(r.length)for(let s of r){let{items:o}=await me.getLanguages(s.id);s.domains=o.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(s=>ir?s.id===ir:!!s.isPublished&&s.domains.length>0),i=r.filter(s=>!s.isPublished&&s.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function zh(t){for(let e of t){let r=await me.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};await me.endSiteRender(e.id,i)}}async function Wh(t){let e=await me.startSiteRender(t),r=await me.getInfo(t),n=await me.getLanguages(t),i=await me.getSocials(t),s=n.items,o=s.find(b=>b.isDefault),{siteHash:a,unpublishHashes:c,publishIds:f}=e,{headers:u,footers:p}=r,g=Uh.length?Uh.filter(b=>f.includes(b)):f;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:c,siteLangs:s,defaultLang:o,headers:u,footers:p,socials:i}}async function Jh(){let{__cx:t}=Gh.paths(),{buildProcessData:e}=await ls(),r=await Ze.login(),n=Object.keys(e).map(s=>({...e[s],siteId:parseInt(s)})),i={authControl:r,sites:n};Lr.default.writeFileSync(Ft.default.join(t,"dist","__build-report__.json"),JSON.stringify(i)),Ke(`Build report saved for ${n.length} site(s)`)}async function Vh(){let{sitesToPublish:t}=await ls(),{__cx:e}=Gh.paths(),r=Ft.default.join(e,"dist");for(let n of t){let{id:i,languages:s}=n;for(let o of s){Ze.headers&&(Ze.headers.lang=o.id.toString());let a=await me.getSitemap(i);if(!a)continue;let{items:c,url:{home:f,domain:u}}=a;if(!f)continue;let p=n.domains.find(N=>Object.keys(N)[0]==o.id.toString());if(!p)continue;let g=Object.values(p)[0],m=[],b=Object.keys(c),S=Ft.default.join(r,g.replace(u,""));for(let N of b){let B=c[N];if(!B.length)continue;let $=(0,zo.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-${N.toLowerCase()}.xml`,le=Ft.default.join(S,V);Xh(le,$),m.push(`${f.endsWith("/")?f.slice(0,-1):f}${V}`)}if(!m.length)continue;let x=(0,zo.parse)("sitemapindex",{"@":{xmlns:"http://www.sitemaps.org/schemas/sitemap/0.9"},sitemap:m.map(N=>({loc:N}))}),A=Ft.default.join(S,"sitemap.xml");Xh(A,x)}}}function Xh(t,e){try{let r=Ft.default.dirname(t);Lr.default.existsSync(r)||Lr.default.mkdirSync(r,{recursive:!0}),Lr.default.writeFileSync(t,e)}catch(r){console.error(`Error saving file: ${r}`)}}var Yh=K();Zh.default.config();var Eb=process.env.API_URL,Cb=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Kh=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"10"),Pb=process.env.PUBLIC_API_URL,Db=new Date().valueOf().toString();async function tp(t){Hl(),console.info(`API calls with ${Kh} threads`);let{__cx:e}=Yh.paths(),{griddoVersion:r}=Yh,n=Qh.default.join(e,"store");try{let i=[],s={},{sitesToPublish:o,sitesToUnpublish:a}=await Hh(t);await ao.getAll(),o.length||a.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Ss(o)}`),console.info(`Sites to unpublish: ${Ss(a)}`),await zh(a);for(let c of o){let{id:f,slug:u,theme:p,favicon:g,changedPages:m=[],pages:b=[]}=c,{siteInfo:S,validPagesIds:x,siteHash:A,unpublishHashes:N,siteLangs:B,defaultLang:$,headers:V,footers:le,socials:ke}=await Wh(f),{cloudinaryName:te,useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:T,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O}=ao.settings;s[f]={siteHash:A,unpublishHashes:N,publishHashes:[]};let U=new Yn;U.navigations={headers:V,footers:le},c.languages=B;let M=Zd(f,A),P=S.siteScript,R={siteUrl:S.slug,title:S.name,favicon:g},Ue={baseUrl:Eb,publicBaseUrl:Pb,instance:Cb,siteSlug:u,theme:p,siteMetadata:R,socials:ke,siteLangs:B,cloudinaryName:te,griddoVersion:r,siteOptions:{useMetaTitle:D,useMetaKeywords:q,showBasicMetaRobots:T,avoidHrefLangsOnCanonicals:z,avoidSelfReferenceCanonicals:I,avoidHrefLangXDefault:G,avoidDebugMetas:O},siteScript:P};Ke(`${c.name} site`);let Je=async d=>{let v=[],w=await me.getPage(d,M);if(!w)return;i.push(d);let _=JSON.parse(JSON.stringify(Ue));_.navigations=U.getPageNavigations(w);let j=await Vn.getDistributorData({page:w,cacheKey:Db}),X=await mh(j),W=w?.mode==="list",ve=!W&&X,yt=!ve&&!W;if(W){let Y={page:w,pages:gh(j),isRoot:!1,defaultLang:$,template:j,totalQueriedItems:j.queriedItems};v=await hh(Y,_)}if(ve){let Y=w;Y.template=j,Y.multiPageElements=X,Y.defaultLang=$,v=await ph(Y,_)}if(yt){let Y=w;Y.template=j,Y.defaultLang=$,v=[await dh(Y,_)]}w.hash!==null&&s[f].publishHashes.push(w.hash),Wl(v)},{pagesInStore:ge,pagesMissingInStore:Ee,pagesToDeleteFromStore:gt,pagesToWriteToStore:ye}=await Jl(n,{sitesToPublish:o,pages:b,validPagesIds:x,changedPages:m});Pn(gt),L(`Store site: ${c.name}`),L(`${x.length} valid pages from API`),L(`changed ${gt.length} pages from API`),L(`deleted ${m.length} pages in store`),L(`missing ${Ee.length} pages in store`),L(`write ${ye.length} pages to store`);let l=(0,ep.default)(Kh),h=ye.map(d=>l(()=>Je(d)));await Promise.all(h)}zl(n,{buildProcessData:s,createdPages:i,sitesToPublish:o})}catch(i){console.error(i.message),process.exit(1)}}async function rp(t){Vd(),await tp(t),pf()}var Ob=process.env.API_URL,Ib={GET_ALL:`${Ob}/domains`},pi=class{static async getAll(){let{GET_ALL:e}=Ib;return await Oe({endpoint:e})}};async function np(){await Ze.login();let t=await pi.getAll();return L(`Getting domains slugs (${t.length})`),Ab(t)}function Ab(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}async function Jo(){hf("gatsby");let t=await np(),e=K();for(let r of t){let{__ssg:n,__exports:i,__caches:s,__cx:o,__components:a}=e.paths(r);dt(`Initializing render for the domain ${r}`,"",1,0);let c=vf(r),f=!!c&&c!=="";await ze({name:"Clean",attempts:Ge.clean,steps:[()=>Sr(o,["store","apiCache","dist"]),()=>L("clean `store`, `apiCache` and `dist` directories from `__cx`"),()=>Sr(n,["dist","public","static",".cache"]),()=>L("clean `dist`, `public`, `static` and `.cache` directories from `__ssg`"),()=>He("Clean LifeCycle")]}),await ze({name:"Prepare",attempts:Ge.prepare,steps:[()=>Dn([i]),()=>L("create `exports/sites/<domain>` directory"),()=>Dn([s]),()=>L("create `caches/<domain>` directory"),()=>He("prepare LifeCycle")]}),await ze({name:"Restore",attempts:Ge.restore,steps:[()=>On(a,n,["static"]),()=>L("copy `static` directory from `__components` to `__ssg`"),()=>On(i,o,["assets"]),()=>L("copy `assets` directory from `__exports` to `__cx`"),()=>On(i,n,["dist"]),()=>{Wo.default.existsSync($r.default.join(n,"dist"))&&Wo.default.renameSync($r.default.join(n,"dist"),$r.default.join(n,"public"))},()=>L("rename `__ssg/dist` to `__ssg/public` directory."),()=>Jt(s,o,["apiCache","store"]),()=>L("move `apiCache` and `store` directories from `__caches` to `__cx`"),()=>Jt(s,n,[".cache"]),()=>L("move `.cache` directory from `__caches` to `__ssg`"),()=>He("Restore LifeCycle")]}),await ze({name:"Data",attempts:Ge.data,steps:[()=>rp(r),()=>He("Data LifeCycle")]}),await ze({name:"SSG",attempts:Ge.ssg,steps:[()=>bf(c),()=>He("SSG LifeCycle")]}),await ze({name:"Relocation",attempts:Ge.relocation,steps:[()=>_f(r,f),()=>L("create an `assets` directory from `public`"),()=>He("Relocation LifeCycle")]}),await ze({name:"Meta",attempts:Ge.meta,steps:[()=>Jh(),()=>L("create build report from `store/metadata/render-info.json`"),()=>ah.writeFiles(r),()=>L("create Robots.txt"),()=>Vh(),()=>L("generate sitemaps"),()=>He("Meta LifeCycle")]}),await ze({name:"Archive",attempts:Ge.archive,steps:[()=>Ql(),()=>L("remove virtual pages from store (multipage and static list)"),()=>hs($r.default.join(o,"dist")),()=>L("remove empty site directories from `__cx/dist`"),()=>Jt(o,i,["dist","assets"],{withBackup:!0}),()=>L("move `dist` and `assets` directories from `__cx` to `__exports`"),()=>Jt(o,s,["apiCache","store"]),()=>L("move `apiCache` and `store` directories from `__cx` to `__caches`"),()=>Jt(n,s,[".cache"]),()=>L("move `.cache` directory from `__ssg` to `__caches`"),()=>He("Archive LifeCycle")]}),await ze({name:"Clean",attempts:Ge.clean,steps:[()=>Sr(n,["static","public","dist"]),()=>He("Clean LifeCycle")]})}}async function ip(){let t=await xs(Jo).catch(()=>{console.log("<[ Render will be reset ]>"),process.exit(1)});dt(`All domains rendered in ${t}s.`,"",1,0),process.exit(0)}vs();0&&(module.exports={IS_COMPONENT_LIBRARY,PROJECT_ALIASES,getBuildPagesFromCachedStore,getBuildPagesFromStore,getBuildPagesPath,getConfig,logInfo,logPageSize,resolveComponentsPath,startRender,verbose,walk});