@griddo/cx 10.3.22 → 10.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/download-data.js +23 -23
- package/build/index.js +26 -26
- package/exporter/adapters/gatsby/index.ts +17 -0
- package/exporter/types/global.ts +2 -2
- package/exporter/utils/pages.ts +0 -30
- package/exporter/utils/searches.ts +50 -1
- package/package.json +3 -3
package/build/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`),function(a){if(s=a.indexOf(":"),n=ei.trim(a.substr(0,s)).toLowerCase(),i=ei.trim(a.substr(s+1)),n){if(r[n]&&Mh.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 Jo=y((tb,zo)=>{"use strict";var Wo=me();zo.exports=Wo.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=Wo.isString(o)?i(o):o;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Ko=y((rb,Vo)=>{"use strict";var Rr=me(),qh=Qn(),Th=jo(),Nh=Pr(),jh=Zn(),Lh=Go(),$h=Jo(),ti=Ar();Vo.exports=function(e){return new Promise(function(n,i){var s=e.data,o=e.headers,a=e.responseType;Rr.isFormData(s)&&delete o["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",c=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(h+":"+c)}var p=jh(e.baseURL,e.url);u.open(e.method.toUpperCase(),Nh(p,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function g(){if(u){var b="getAllResponseHeaders"in u?Lh(u.getAllResponseHeaders()):null,C=!a||a==="text"||a==="json"?u.responseText:u.response,I={data:C,status:u.status,statusText:u.statusText,headers:b,config:e,request:u};qh(n,i,I),u=null}}if("onloadend"in u?u.onloadend=g:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(g)},u.onabort=function(){u&&(i(ti("Request aborted",e,"ECONNABORTED",u)),u=null)},u.onerror=function(){i(ti("Network Error",e,null,u)),u=null},u.ontimeout=function(){var C="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),i(ti(C,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},Rr.isStandardBrowserEnv()){var m=(e.withCredentials||$h(p))&&e.xsrfCookieName?Th.read(e.xsrfCookieName):void 0;m&&(o[e.xsrfHeaderName]=m)}"setRequestHeader"in u&&Rr.forEach(o,function(C,I){typeof s>"u"&&I.toLowerCase()==="content-type"?delete o[I]:u.setRequestHeader(I,C)}),Rr.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&a!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(C){u&&(u.abort(),i(C),u=null)}),s||(s=null),u.send(s)})}});var Qo=y((nb,Yo)=>{var yt=1e3,vt=yt*60,bt=vt*60,st=bt*24,Bh=st*7,Uh=st*365.25;Yo.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Xh(t);if(r==="number"&&isFinite(t))return e.long?Gh(t):Hh(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Xh(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*Uh;case"weeks":case"week":case"w":return r*Bh;case"days":case"day":case"d":return r*st;case"hours":case"hour":case"hrs":case"hr":case"h":return r*bt;case"minutes":case"minute":case"mins":case"min":case"m":return r*vt;case"seconds":case"second":case"secs":case"sec":case"s":return r*yt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Hh(t){var e=Math.abs(t);return e>=st?Math.round(t/st)+"d":e>=bt?Math.round(t/bt)+"h":e>=vt?Math.round(t/vt)+"m":e>=yt?Math.round(t/yt)+"s":t+"ms"}function Gh(t){var e=Math.abs(t);return e>=st?Fr(t,e,st,"day"):e>=bt?Fr(t,e,bt,"hour"):e>=vt?Fr(t,e,vt,"minute"):e>=yt?Fr(t,e,yt,"second"):t+" ms"}function Fr(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var ri=y((ib,Zo)=>{function Wh(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=i,r.enabled=o,r.humanize=Qo(),r.destroy=h,Object.keys(t).forEach(c=>{r[c]=t[c]}),r.names=[],r.skips=[],r.formatters={};function e(c){let p=0;for(let g=0;g<c.length;g++)p=(p<<5)-p+c.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(c){let p,g=null,m,b;function C(...I){if(!C.enabled)return;let F=C,L=Number(new Date),U=L-(p||L);F.diff=U,F.prev=p,F.curr=L,p=L,I[0]=r.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let X=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(ne,_e)=>{if(ne==="%%")return"%";X++;let Z=r.formatters[_e];if(typeof Z=="function"){let _=I[X];ne=Z.call(F,_),I.splice(X,1),X--}return ne}),r.formatArgs.call(F,I),(F.log||r.log).apply(F,I)}return C.namespace=c,C.useColors=r.useColors(),C.color=r.selectColor(c),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(c)),b),set:I=>{g=I}}),typeof r.init=="function"&&r.init(C),C}function n(c,p){let g=r(this.namespace+(typeof p>"u"?":":p)+c);return g.log=this.log,g}function i(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let p,g=(typeof c=="string"?c:"").split(/[\s,]+/),m=g.length;for(p=0;p<m;p++)g[p]&&(c=g[p].replace(/\*/g,".*?"),c[0]==="-"?r.skips.push(new RegExp("^"+c.slice(1)+"$")):r.names.push(new RegExp("^"+c+"$")))}function s(){let c=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),c}function o(c){if(c[c.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(c))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function u(c){return c instanceof Error?c.stack||c.message:c}function h(){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}Zo.exports=Wh});var ea=y((De,kr)=>{De.formatArgs=Jh;De.save=Vh;De.load=Kh;De.useColors=zh;De.storage=Yh();De.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`."))}})();De.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 zh(){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 Jh(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+kr.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)}De.log=console.debug||console.log||(()=>{});function Vh(t){try{t?De.storage.setItem("debug",t):De.storage.removeItem("debug")}catch{}}function Kh(){let t;try{t=De.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Yh(){try{return localStorage}catch{}}kr.exports=ri()(De);var{formatters:Qh}=kr.exports;Qh.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var ra=y((sb,ta)=>{"use strict";ta.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 si=y((ob,ia)=>{"use strict";var Zh=require("os"),na=require("tty"),Re=ra(),{env:ee}=process,ze;Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?ze=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(ze=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?ze=1:ee.FORCE_COLOR==="false"?ze=0:ze=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function ni(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function ii(t,e){if(ze===0)return 0;if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2;if(t&&!e&&ze===void 0)return 0;let r=ze||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=Zh.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 ep(t){let e=ii(t,t&&t.isTTY);return ni(e)}ia.exports={supportsColor:ep,stdout:ni(ii(!0,na.isatty(1))),stderr:ni(ii(!0,na.isatty(2)))}});var oa=y((se,qr)=>{var tp=require("tty"),Mr=require("util");se.init=up;se.log=sp;se.formatArgs=np;se.save=op;se.load=ap;se.useColors=rp;se.destroy=Mr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");se.colors=[6,2,3,4,5,1];try{let t=si();t&&(t.stderr||t).level>=2&&(se.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}se.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,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 rp(){return"colors"in se.inspectOpts?!!se.inspectOpts.colors:tp.isatty(process.stderr.fd)}function np(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(`
|
|
2
|
+
"use strict";var fh=Object.create;var Es=Object.defineProperty;var dh=Object.getOwnPropertyDescriptor;var hh=Object.getOwnPropertyNames;var ph=Object.getPrototypeOf,mh=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var gh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hh(e))!mh.call(t,i)&&i!==r&&Es(t,i,{get:()=>e[i],enumerable:!(n=dh(e,i))||n.enumerable});return t};var q=(t,e,r)=>(r=t!=null?fh(ph(t)):{},gh(e||!t||!t.__esModule?Es(r,"default",{value:t,enumerable:!0}):r,t));var Jn=y((W1,Cs)=>{"use strict";Cs.exports=function(e,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(r,i)}}});var me=y((J1,Os)=>{"use strict";var yh=Jn(),it=Object.prototype.toString;function Yn(t){return it.call(t)==="[object Array]"}function Vn(t){return typeof t>"u"}function vh(t){return t!==null&&!Vn(t)&&t.constructor!==null&&!Vn(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function bh(t){return it.call(t)==="[object ArrayBuffer]"}function _h(t){return typeof FormData<"u"&&t instanceof FormData}function wh(t){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function xh(t){return typeof t=="string"}function Sh(t){return typeof t=="number"}function Ps(t){return t!==null&&typeof t=="object"}function Cr(t){if(it.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function Eh(t){return it.call(t)==="[object Date]"}function Ch(t){return it.call(t)==="[object File]"}function Ph(t){return it.call(t)==="[object Blob]"}function Ds(t){return it.call(t)==="[object Function]"}function Dh(t){return Ps(t)&&Ds(t.pipe)}function Oh(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}function Ah(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Ih(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Qn(t,e){if(!(t===null||typeof t>"u"))if(typeof t!="object"&&(t=[t]),Yn(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 Kn(){var t={};function e(i,o){Cr(t[o])&&Cr(i)?t[o]=Kn(t[o],i):Cr(i)?t[o]=Kn({},i):Yn(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)Qn(arguments[r],e);return t}function Rh(t,e,r){return Qn(e,function(i,o){r&&typeof i=="function"?t[o]=yh(i,r):t[o]=i}),t}function Fh(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}Os.exports={isArray:Yn,isArrayBuffer:bh,isBuffer:vh,isFormData:_h,isArrayBufferView:wh,isString:xh,isNumber:Sh,isObject:Ps,isPlainObject:Cr,isUndefined:Vn,isDate:Eh,isFile:Ch,isBlob:Ph,isFunction:Ds,isStream:Dh,isURLSearchParams:Oh,isStandardBrowserEnv:Ih,forEach:Qn,merge:Kn,extend:Rh,trim:Ah,stripBOM:Fh}});var Pr=y((V1,Is)=>{"use strict";var yt=me();function As(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}Is.exports=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(yt.isURLSearchParams(r))i=r.toString();else{var o=[];yt.forEach(r,function(u,h){u===null||typeof u>"u"||(yt.isArray(u)?h=h+"[]":u=[u],yt.forEach(u,function(p){yt.isDate(p)?p=p.toISOString():yt.isObject(p)&&(p=JSON.stringify(p)),o.push(As(h)+"="+As(p))}))}),i=o.join("&")}if(i){var s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}});var Fs=y((K1,Rs)=>{"use strict";var kh=me();function Dr(){this.handlers=[]}Dr.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};Dr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};Dr.prototype.forEach=function(e){kh.forEach(this.handlers,function(n){n!==null&&e(n)})};Rs.exports=Dr});var Ms=y((Y1,ks)=>{"use strict";var Mh=me();ks.exports=function(e,r){Mh.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})}});var Or=y((Q1,Ts)=>{"use strict";Ts.exports=function(e,r,n,i,o){return e.config=r,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}});var Ar=y((Z1,qs)=>{"use strict";var Th=Or();qs.exports=function(e,r,n,i,o){var s=new Error(e);return Th(s,r,n,i,o)}});var Zn=y((eb,Ns)=>{"use strict";var qh=Ar();Ns.exports=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(qh("Request failed with status code "+n.status,n.config,null,n.request,n))}});var Ls=y((tb,js)=>{"use strict";var Ir=me();js.exports=Ir.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,s,a){var u=[];u.push(r+"="+encodeURIComponent(n)),Ir.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),Ir.isString(o)&&u.push("path="+o),Ir.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.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 Bs=y((rb,$s)=>{"use strict";$s.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}});var Xs=y((nb,Us)=>{"use strict";Us.exports=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e}});var ei=y((ib,Hs)=>{"use strict";var Nh=Bs(),jh=Xs();Hs.exports=function(e,r){return e&&!Nh(r)?jh(e,r):r}});var zs=y((ob,Gs)=>{"use strict";var ti=me(),Lh=["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"];Gs.exports=function(e){var r={},n,i,o;return e&&ti.forEach(e.split(`
|
|
3
|
+
`),function(a){if(o=a.indexOf(":"),n=ti.trim(a.substr(0,o)).toLowerCase(),i=ti.trim(a.substr(o+1)),n){if(r[n]&&Lh.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 Vs=y((sb,Js)=>{"use strict";var Ws=me();Js.exports=Ws.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var s=o;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(s){var a=Ws.isString(s)?i(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}()});var Ys=y((ab,Ks)=>{"use strict";var Rr=me(),$h=Zn(),Bh=Ls(),Uh=Pr(),Xh=ei(),Hh=zs(),Gh=Vs(),ri=Ar();Ks.exports=function(e){return new Promise(function(n,i){var o=e.data,s=e.headers,a=e.responseType;Rr.isFormData(o)&&delete s["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",c=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.Authorization="Basic "+btoa(h+":"+c)}var p=Xh(e.baseURL,e.url);u.open(e.method.toUpperCase(),Uh(p,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function g(){if(u){var b="getAllResponseHeaders"in u?Hh(u.getAllResponseHeaders()):null,C=!a||a==="text"||a==="json"?u.responseText:u.response,A={data:C,status:u.status,statusText:u.statusText,headers:b,config:e,request:u};$h(n,i,A),u=null}}if("onloadend"in u?u.onloadend=g:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(g)},u.onabort=function(){u&&(i(ri("Request aborted",e,"ECONNABORTED",u)),u=null)},u.onerror=function(){i(ri("Network Error",e,null,u)),u=null},u.ontimeout=function(){var C="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),i(ri(C,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},Rr.isStandardBrowserEnv()){var m=(e.withCredentials||Gh(p))&&e.xsrfCookieName?Bh.read(e.xsrfCookieName):void 0;m&&(s[e.xsrfHeaderName]=m)}"setRequestHeader"in u&&Rr.forEach(s,function(C,A){typeof o>"u"&&A.toLowerCase()==="content-type"?delete s[A]:u.setRequestHeader(A,C)}),Rr.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&a!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(C){u&&(u.abort(),i(C),u=null)}),o||(o=null),u.send(o)})}});var Zs=y((ub,Qs)=>{var vt=1e3,bt=vt*60,_t=bt*60,ot=_t*24,zh=ot*7,Wh=ot*365.25;Qs.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Jh(t);if(r==="number"&&isFinite(t))return e.long?Kh(t):Vh(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Jh(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*Wh;case"weeks":case"week":case"w":return r*zh;case"days":case"day":case"d":return r*ot;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_t;case"minutes":case"minute":case"mins":case"min":case"m":return r*bt;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 Vh(t){var e=Math.abs(t);return e>=ot?Math.round(t/ot)+"d":e>=_t?Math.round(t/_t)+"h":e>=bt?Math.round(t/bt)+"m":e>=vt?Math.round(t/vt)+"s":t+"ms"}function Kh(t){var e=Math.abs(t);return e>=ot?Fr(t,e,ot,"day"):e>=_t?Fr(t,e,_t,"hour"):e>=bt?Fr(t,e,bt,"minute"):e>=vt?Fr(t,e,vt,"second"):t+" ms"}function Fr(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var ni=y((cb,ea)=>{function Yh(t){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=s,r.humanize=Zs(),r.destroy=h,Object.keys(t).forEach(c=>{r[c]=t[c]}),r.names=[],r.skips=[],r.formatters={};function e(c){let p=0;for(let g=0;g<c.length;g++)p=(p<<5)-p+c.charCodeAt(g),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(c){let p,g=null,m,b;function C(...A){if(!C.enabled)return;let F=C,N=Number(new Date),U=N-(p||N);F.diff=U,F.prev=p,F.curr=N,p=N,A[0]=r.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");let X=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,(ne,_e)=>{if(ne==="%%")return"%";X++;let Z=r.formatters[_e];if(typeof Z=="function"){let _=A[X];ne=Z.call(F,_),A.splice(X,1),X--}return ne}),r.formatArgs.call(F,A),(F.log||r.log).apply(F,A)}return C.namespace=c,C.useColors=r.useColors(),C.color=r.selectColor(c),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(m!==r.namespaces&&(m=r.namespaces,b=r.enabled(c)),b),set:A=>{g=A}}),typeof r.init=="function"&&r.init(C),C}function n(c,p){let g=r(this.namespace+(typeof p>"u"?":":p)+c);return g.log=this.log,g}function i(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let p,g=(typeof c=="string"?c:"").split(/[\s,]+/),m=g.length;for(p=0;p<m;p++)g[p]&&(c=g[p].replace(/\*/g,".*?"),c[0]==="-"?r.skips.push(new RegExp("^"+c.slice(1)+"$")):r.names.push(new RegExp("^"+c+"$")))}function o(){let c=[...r.names.map(a),...r.skips.map(a).map(p=>"-"+p)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let p,g;for(p=0,g=r.skips.length;p<g;p++)if(r.skips[p].test(c))return!1;for(p=0,g=r.names.length;p<g;p++)if(r.names[p].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function u(c){return c instanceof Error?c.stack||c.message:c}function h(){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}ea.exports=Yh});var ta=y((De,kr)=>{De.formatArgs=Zh;De.save=ep;De.load=tp;De.useColors=Qh;De.storage=rp();De.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`."))}})();De.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 Qh(){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 Zh(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+kr.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)}De.log=console.debug||console.log||(()=>{});function ep(t){try{t?De.storage.setItem("debug",t):De.storage.removeItem("debug")}catch{}}function tp(){let t;try{t=De.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function rp(){try{return localStorage}catch{}}kr.exports=ni()(De);var{formatters:np}=kr.exports;np.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var na=y((lb,ra)=>{"use strict";ra.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 si=y((fb,oa)=>{"use strict";var ip=require("os"),ia=require("tty"),Re=na(),{env:ee}=process,Je;Re("no-color")||Re("no-colors")||Re("color=false")||Re("color=never")?Je=0:(Re("color")||Re("colors")||Re("color=true")||Re("color=always"))&&(Je=1);"FORCE_COLOR"in ee&&(ee.FORCE_COLOR==="true"?Je=1:ee.FORCE_COLOR==="false"?Je=0:Je=ee.FORCE_COLOR.length===0?1:Math.min(parseInt(ee.FORCE_COLOR,10),3));function ii(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function oi(t,e){if(Je===0)return 0;if(Re("color=16m")||Re("color=full")||Re("color=truecolor"))return 3;if(Re("color=256"))return 2;if(t&&!e&&Je===void 0)return 0;let r=Je||0;if(ee.TERM==="dumb")return r;if(process.platform==="win32"){let n=ip.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 op(t){let e=oi(t,t&&t.isTTY);return ii(e)}oa.exports={supportsColor:op,stdout:ii(oi(!0,ia.isatty(1))),stderr:ii(oi(!0,ia.isatty(2)))}});var aa=y((oe,Tr)=>{var sp=require("tty"),Mr=require("util");oe.init=hp;oe.log=lp;oe.formatArgs=up;oe.save=fp;oe.load=dp;oe.useColors=ap;oe.destroy=Mr.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=si();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,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function ap(){return"colors"in oe.inspectOpts?!!oe.inspectOpts.colors:sp.isatty(process.stderr.fd)}function up(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
|
|
4
4
|
`).join(`
|
|
5
|
-
`+
|
|
6
|
-
`)}function
|
|
7
|
-
`).map(e=>e.trim()).join(" ")};sa.O=function(t){return this.inspectOpts.colors=this.useColors,Mr.inspect(t,this.inspectOpts)}});var aa=y((ab,oi)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?oi.exports=ea():oi.exports=oa()});var ca=y((ub,ua)=>{var Ht;ua.exports=function(){if(!Ht){try{Ht=aa()("follow-redirects")}catch{}typeof Ht!="function"&&(Ht=function(){})}Ht.apply(null,arguments)}});var di=y((cb,fi)=>{var ot=require("url"),ai=ot.URL,cp=require("http"),lp=require("https"),da=require("stream").Writable,ha=require("assert"),pa=ca(),ci=["abort","aborted","connect","error","socket","timeout"],li=Object.create(null);ci.forEach(function(t){li[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var fp=Wt("ERR_INVALID_URL","Invalid URL",TypeError),la=Wt("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),dp=Wt("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),hp=Wt("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),pp=Wt("ERR_STREAM_WRITE_AFTER_END","write after end");function Oe(t,e){da.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()}Oe.prototype=Object.create(da.prototype);Oe.prototype.abort=function(){ga(this._currentRequest),this.emit("abort")};Oe.prototype.write=function(t,e,r){if(this._ending)throw new pp;if(!at(t)&&!yp(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Gt(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 hp),this.abort())};Oe.prototype.end=function(t,e,r){if(Gt(t)?(r=t,t=e=null):Gt(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}};Oe.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Oe.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Oe.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){Oe.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Oe.prototype,t,{get:function(){return this._currentRequest[t]}})});Oe.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))}};Oe.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 ci)n.on(i,li[i]);if(this._currentUrl=/^\//.test(this._options.path)?ot.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function u(h){if(n===o._currentRequest)if(h)o.emit("error",h);else if(s<a.length){var c=a[s++];n.finished||n.write(c.data,c.encoding,u)}else o._ended&&n.end()})()}};Oe.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(ga(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new dp);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=[],ui(/^content-/i,this._options.headers));var o=ui(/^host$/i,this._options.headers),a=ot.parse(this._currentUrl),u=o||a.host,h=/^\w+:/.test(r)?this._currentUrl:ot.format(Object.assign(a,{host:u})),c;try{c=ot.resolve(h,r)}catch(b){this.emit("error",new la({cause:b}));return}pa("redirecting to",c),this._isRedirect=!0;var p=ot.parse(c);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==u&&!gp(p.host,u))&&ui(/^(?:authorization|cookie)$/i,this._options.headers),Gt(i)){var g={headers:t.headers,statusCode:e},m={url:h,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 la({cause:b}))}};function ma(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(h,c,p){if(at(h)){var g;try{g=fa(new ai(h))}catch{g=ot.parse(h)}if(!at(g.protocol))throw new fp({input:h});h=g}else ai&&h instanceof ai?h=fa(h):(p=c,c=h,h={protocol:i});return Gt(c)&&(p=c,c=null),c=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,c),c.nativeProtocols=r,!at(c.host)&&!at(c.hostname)&&(c.hostname="::1"),ha.equal(c.protocol,i,"protocol mismatch"),pa("options",c),new Oe(c,p)}function u(h,c,p){var g=o.request(h,c,p);return g.end(),g}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),e}function mp(){}function fa(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 ui(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 Wt(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 ga(t){for(var e of ci)t.removeListener(e,li[e]);t.on("error",mp),t.abort()}function gp(t,e){ha(at(t)&&at(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function at(t){return typeof t=="string"||t instanceof String}function Gt(t){return typeof t=="function"}function yp(t){return typeof t=="object"&&"length"in t}fi.exports=ma({http:cp,https:lp});fi.exports.wrap=ma});var hi=y((lb,vp)=>{vp.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 xa=y((fb,wa)=>{"use strict";var zt=me(),ya=Qn(),bp=Zn(),_p=Pr(),wp=require("http"),xp=require("https"),Sp=di().http,Ep=di().https,va=require("url"),Cp=require("zlib"),Pp=hi(),Tr=Ar(),pi=Or(),ba=/https:?/;function _a(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,_a(s,e,s.href)}}wa.exports=function(e){return new Promise(function(n,i){var s=function(P){n(P)},o=function(P){i(P)},a=e.data,u=e.headers;if("User-Agent"in u||"user-agent"in u?!u["User-Agent"]&&!u["user-agent"]&&(delete u["User-Agent"],delete u["user-agent"]):u["User-Agent"]="axios/"+Pp.version,a&&!zt.isStream(a)){if(!Buffer.isBuffer(a))if(zt.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(zt.isString(a))a=Buffer.from(a,"utf-8");else return o(Tr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));u["Content-Length"]=a.length}var h=void 0;if(e.auth){var c=e.auth.username||"",p=e.auth.password||"";h=c+":"+p}var g=bp(e.baseURL,e.url),m=va.parse(g),b=m.protocol||"http:";if(!h&&m.auth){var C=m.auth.split(":"),I=C[0]||"",F=C[1]||"";h=I+":"+F}h&&delete u.Authorization;var L=ba.test(b),U=L?e.httpsAgent:e.httpAgent,X={path:_p(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:u,agent:U,agents:{http:e.httpAgent,https:e.httpsAgent},auth:h};e.socketPath?X.socketPath=e.socketPath:(X.hostname=m.hostname,X.port=m.port);var z=e.proxy;if(!z&&z!==!1){var ne=b.slice(0,-1)+"_proxy",_e=process.env[ne]||process.env[ne.toUpperCase()];if(_e){var Z=va.parse(_e),_=process.env.no_proxy||process.env.NO_PROXY,w=!0;if(_){var E=_.split(",").map(function(P){return P.trim()});w=!E.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(w&&(z={host:Z.hostname,port:Z.port,protocol:Z.protocol},Z.auth)){var $=Z.auth.split(":");z.auth={username:$[0],password:$[1]}}}}z&&(X.headers.host=m.hostname+(m.port?":"+m.port:""),_a(X,z,b+"//"+m.hostname+(m.port?":"+m.port:"")+X.path));var R,j=L&&(z?ba.test(z.protocol):!0);e.transport?R=e.transport:e.maxRedirects===0?R=j?xp:wp:(e.maxRedirects&&(X.maxRedirects=e.maxRedirects),R=j?Ep:Sp),e.maxBodyLength>-1&&(X.maxBodyLength=e.maxBodyLength);var D=R.request(X,function(P){if(!D.aborted){var k=P,ie=P.req||D;if(P.statusCode!==204&&ie.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":k=k.pipe(Cp.createUnzip()),delete P.headers["content-encoding"];break}var Ae={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:ie};if(e.responseType==="stream")Ae.data=k,ya(s,o,Ae);else{var J=[],he=0;k.on("data",function(pe){J.push(pe),he+=pe.length,e.maxContentLength>-1&&he>e.maxContentLength&&(k.destroy(),o(Tr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,ie)))}),k.on("error",function(pe){D.aborted||o(pi(pe,e,null,ie))}),k.on("end",function(){var pe=Buffer.concat(J);e.responseType!=="arraybuffer"&&(pe=pe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(pe=zt.stripBOM(pe))),Ae.data=pe,ya(s,o,Ae)})}}});if(D.on("error",function(P){D.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||o(pi(P,e,null,D))}),e.timeout){var N=parseInt(e.timeout,10);if(isNaN(N)){o(Tr("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",D));return}D.setTimeout(N,function(){D.abort(),o(Tr("timeout of "+N+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",D))})}e.cancelToken&&e.cancelToken.promise.then(function(P){D.aborted||(D.abort(),o(P))}),zt.isStream(a)?a.on("error",function(P){o(pi(P,e,null,D))}).pipe(D):D.end(a)})}});var jr=y((db,Ca)=>{"use strict";var oe=me(),Sa=ko(),Dp=Or(),Op={"Content-Type":"application/x-www-form-urlencoded"};function Ea(t,e){!oe.isUndefined(t)&&oe.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Ap(){var t;return typeof XMLHttpRequest<"u"?t=Ko():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=xa()),t}function Ip(t,e,r){if(oe.isString(t))try{return(e||JSON.parse)(t),oe.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Nr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Ap(),transformRequest:[function(e,r){return Sa(r,"Accept"),Sa(r,"Content-Type"),oe.isFormData(e)||oe.isArrayBuffer(e)||oe.isBuffer(e)||oe.isStream(e)||oe.isFile(e)||oe.isBlob(e)?e:oe.isArrayBufferView(e)?e.buffer:oe.isURLSearchParams(e)?(Ea(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):oe.isObject(e)||r&&r["Content-Type"]==="application/json"?(Ea(r,"application/json"),Ip(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&&oe.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?Dp(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}};Nr.headers={common:{Accept:"application/json, text/plain, */*"}};oe.forEach(["delete","get","head"],function(e){Nr.headers[e]={}});oe.forEach(["post","put","patch"],function(e){Nr.headers[e]=oe.merge(Op)});Ca.exports=Nr});var Da=y((hb,Pa)=>{"use strict";var Rp=me(),Fp=jr();Pa.exports=function(e,r,n){var i=this||Fp;return Rp.forEach(n,function(o){e=o.call(i,e,r)}),e}});var mi=y((pb,Oa)=>{"use strict";Oa.exports=function(e){return!!(e&&e.__CANCEL__)}});var Ra=y((mb,Ia)=>{"use strict";var Aa=me(),gi=Da(),kp=mi(),Mp=jr();function yi(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Ia.exports=function(e){yi(e),e.headers=e.headers||{},e.data=gi.call(e,e.data,e.headers,e.transformRequest),e.headers=Aa.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Aa.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||Mp.adapter;return r(e).then(function(i){return yi(e),i.data=gi.call(e,i.data,i.headers,e.transformResponse),i},function(i){return kp(i)||(yi(e),i&&i.response&&(i.response.data=gi.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var vi=y((gb,Fa)=>{"use strict";var ce=me();Fa.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 u(g,m){return ce.isPlainObject(g)&&ce.isPlainObject(m)?ce.merge(g,m):ce.isPlainObject(m)?ce.merge({},m):ce.isArray(m)?m.slice():m}function h(g){ce.isUndefined(r[g])?ce.isUndefined(e[g])||(n[g]=u(void 0,e[g])):n[g]=u(e[g],r[g])}ce.forEach(i,function(m){ce.isUndefined(r[m])||(n[m]=u(void 0,r[m]))}),ce.forEach(s,h),ce.forEach(o,function(m){ce.isUndefined(r[m])?ce.isUndefined(e[m])||(n[m]=u(void 0,e[m])):n[m]=u(void 0,r[m])}),ce.forEach(a,function(m){m in r?n[m]=u(e[m],r[m]):m in e&&(n[m]=u(void 0,e[m]))});var c=i.concat(s).concat(o).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return c.indexOf(m)===-1});return ce.forEach(p,h),n}});var Na=y((yb,Ta)=>{"use strict";var Ma=hi(),bi={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){bi[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var ka={},qp=Ma.version.split(".");function qa(t,e){for(var r=e?e.split("."):qp,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}bi.transitional=function(e,r,n){var i=r&&qa(r);function s(o,a){return"[Axios v"+Ma.version+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,u){if(e===!1)throw new Error(s(a," has been removed in "+r));return i&&!ka[a]&&(ka[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,u):!0}};function Tp(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],u=a===void 0||o(a,s,t);if(u!==!0)throw new TypeError("option "+s+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+s)}}Ta.exports={isOlderVersion:qa,assertOptions:Tp,validators:bi}});var Xa=y((vb,Ua)=>{"use strict";var $a=me(),Np=Pr(),ja=Ro(),La=Ra(),Lr=vi(),Ba=Na(),_t=Ba.validators;function Jt(t){this.defaults=t,this.interceptors={request:new ja,response:new ja}}Jt.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Lr(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&&Ba.assertOptions(r,{silentJSONParsing:_t.transitional(_t.boolean,"1.0.0"),forcedJSONParsing:_t.transitional(_t.boolean,"1.0.0"),clarifyTimeoutError:_t.transitional(_t.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=[La,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 u=e;n.length;){var h=n.shift(),c=n.shift();try{u=h(u)}catch(p){c(p);break}}try{o=La(u)}catch(p){return Promise.reject(p)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};Jt.prototype.getUri=function(e){return e=Lr(this.defaults,e),Np(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};$a.forEach(["delete","get","head","options"],function(e){Jt.prototype[e]=function(r,n){return this.request(Lr(n||{},{method:e,url:r,data:(n||{}).data}))}});$a.forEach(["post","put","patch"],function(e){Jt.prototype[e]=function(r,n,i){return this.request(Lr(i||{},{method:e,url:r,data:n}))}});Ua.exports=Jt});var wi=y((bb,Ha)=>{"use strict";function _i(t){this.message=t}_i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};_i.prototype.__CANCEL__=!0;Ha.exports=_i});var Wa=y((_b,Ga)=>{"use strict";var jp=wi();function $r(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 jp(i),e(r.reason))})}$r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};$r.source=function(){var e,r=new $r(function(i){e=i});return{token:r,cancel:e}};Ga.exports=$r});var Ja=y((wb,za)=>{"use strict";za.exports=function(e){return function(n){return e.apply(null,n)}}});var Ka=y((xb,Va)=>{"use strict";Va.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var Za=y((Sb,xi)=>{"use strict";var Ya=me(),Lp=zn(),Br=Xa(),$p=vi(),Bp=jr();function Qa(t){var e=new Br(t),r=Lp(Br.prototype.request,e);return Ya.extend(r,Br.prototype,e),Ya.extend(r,e),r}var qe=Qa(Bp);qe.Axios=Br;qe.create=function(e){return Qa($p(qe.defaults,e))};qe.Cancel=wi();qe.CancelToken=Wa();qe.isCancel=mi();qe.all=function(e){return Promise.all(e)};qe.spread=Ja();qe.isAxiosError=Ka();xi.exports=qe;xi.exports.default=qe});var Si=y((Eb,eu)=>{eu.exports=Za()});var ru=y((Cb,tu)=>{"use strict";var Up=/[|\\{}()[\]^$+*?.]/g;tu.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Up,"\\$&")}});var iu=y((Pb,nu)=>{"use strict";nu.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 Ei=y((Db,uu)=>{var ut=iu(),au={};for(Ur in ut)ut.hasOwnProperty(Ur)&&(au[ut[Ur]]=Ur);var Ur,O=uu.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(ge in O)if(O.hasOwnProperty(ge)){if(!("channels"in O[ge]))throw new Error("missing channels property: "+ge);if(!("labels"in O[ge]))throw new Error("missing channel labels property: "+ge);if(O[ge].labels.length!==O[ge].channels)throw new Error("channel and label counts mismatch: "+ge);su=O[ge].channels,ou=O[ge].labels,delete O[ge].channels,delete O[ge].labels,Object.defineProperty(O[ge],"channels",{value:su}),Object.defineProperty(O[ge],"labels",{value:ou})}var su,ou,ge;O.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,u,h;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),h=(i+s)/2,s===i?u=0:h<=.5?u=o/(s+i):u=o/(2-s-i),[a,u*100,h*100]};O.rgb.hsv=function(t){var e,r,n,i,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,h=Math.max(o,a,u),c=h-Math.min(o,a,u),p=function(g){return(h-g)/6/c+1/2};return c===0?i=s=0:(s=c/h,e=p(o),r=p(a),n=p(u),o===h?i=n-r:a===h?i=1/3+e-n:u===h&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,h*100]};O.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=O.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]};O.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 Xp(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}O.rgb.keyword=function(t){var e=au[t];if(e)return e;var r=1/0,n;for(var i in ut)if(ut.hasOwnProperty(i)){var s=ut[i],o=Xp(t,s);o<r&&(r=o,n=i)}return n};O.keyword.rgb=function(t){return ut[t]};O.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]};O.rgb.lab=function(t){var e=O.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]};O.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,s,o,a,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r,i=2*n-s,a=[0,0,0];for(var h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?u=i+(s-i)*6*o:2*o<1?u=s:3*o<2?u=i+(s-i)*(2/3-o)*6:u=i,a[h]=u*255;return a};O.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]};O.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),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}};O.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]};O.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,s,o,a,u;i>1&&(r/=i,n/=i),s=Math.floor(6*e),o=1-n,a=6*e-s,s&1&&(a=1-a),u=r+a*(o-r);var h,c,p;switch(s){default:case 6:case 0:h=o,c=u,p=r;break;case 1:h=u,c=o,p=r;break;case 2:h=r,c=o,p=u;break;case 3:h=r,c=u,p=o;break;case 4:h=u,c=r,p=o;break;case 5:h=o,c=r,p=u;break}return[h*255,c*255,p*255]};O.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]};O.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]};O.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]};O.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),u=Math.pow(i,3),h=Math.pow(o,3);return s=a>.008856?a:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o=h>.008856?h:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};O.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]};O.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]};O.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:O.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};O.hsv.ansi16=function(t){return O.rgb.ansi16(O.hsv.rgb(t),t[2])};O.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};O.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]};O.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]};O.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};O.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]};O.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,u;return o<1?a=s/(1-o):a=0,o<=0?u=0:i===e?u=(r-n)/o%6:i===r?u=2+(n-e)/o:u=4+(e-r)/o+4,u/=6,u%=1,[u*360,o*100,a*100]};O.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]};O.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]};O.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,u=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 u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};O.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]};O.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]};O.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]};O.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]};O.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};O.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};O.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};O.gray.hsl=O.gray.hsv=function(t){return[0,0,t[0]]};O.gray.hwb=function(t){return[0,100,t[0]]};O.gray.cmyk=function(t){return[0,0,0,t[0]]};O.gray.lab=function(t){return[t[0],0,0]};O.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};O.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var lu=y((Ob,cu)=>{var Xr=Ei();function Hp(){for(var t={},e=Object.keys(Xr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Gp(t){var e=Hp(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Xr[n]),s=i.length,o=0;o<s;o++){var a=i[o],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}return e}function Wp(t,e){return function(r){return e(t(r))}}function zp(t,e){for(var r=[e[t].parent,t],n=Xr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=Wp(Xr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}cu.exports=function(t){for(var e=Gp(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]=zp(o,e))}return r}});var du=y((Ab,fu)=>{var Ci=Ei(),Jp=lu(),wt={},Vp=Object.keys(Ci);function Kp(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 Yp(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}Vp.forEach(function(t){wt[t]={},Object.defineProperty(wt[t],"channels",{value:Ci[t].channels}),Object.defineProperty(wt[t],"labels",{value:Ci[t].labels});var e=Jp(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];wt[t][n]=Yp(i),wt[t][n].raw=Kp(i)})});fu.exports=wt});var pu=y((Ib,hu)=>{"use strict";var xt=du(),Hr=(t,e)=>function(){return`\x1B[${t.apply(xt,arguments)+e}m`},Gr=(t,e)=>function(){let r=t.apply(xt,arguments);return`\x1B[${38+e};5;${r}m`},Wr=(t,e)=>function(){let r=t.apply(xt,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function Qp(){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:Hr(r,0)},e.color.ansi256={ansi256:Gr(r,0)},e.color.ansi16m={rgb:Wr(n,0)},e.bgColor.ansi={ansi:Hr(r,10)},e.bgColor.ansi256={ansi256:Gr(r,10)},e.bgColor.ansi16m={rgb:Wr(n,10)};for(let i of Object.keys(xt)){if(typeof xt[i]!="object")continue;let s=xt[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=Hr(s.ansi16,0),e.bgColor.ansi[i]=Hr(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=Gr(s.ansi256,0),e.bgColor.ansi256[i]=Gr(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=Wr(s.rgb,0),e.bgColor.ansi16m[i]=Wr(s.rgb,10))}return e}Object.defineProperty(hu,"exports",{enumerable:!0,get:Qp})});var gu=y((Rb,mu)=>{"use strict";mu.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 vu=y((Fb,yu)=>{"use strict";var Zp=require("os"),Te=gu(),le=process.env,St;Te("no-color")||Te("no-colors")||Te("color=false")?St=!1:(Te("color")||Te("colors")||Te("color=true")||Te("color=always"))&&(St=!0);"FORCE_COLOR"in le&&(St=le.FORCE_COLOR.length===0||parseInt(le.FORCE_COLOR,10)!==0);function e0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function t0(t){if(St===!1)return 0;if(Te("color=16m")||Te("color=full")||Te("color=truecolor"))return 3;if(Te("color=256"))return 2;if(t&&!t.isTTY&&St!==!0)return 0;let e=St?1:0;if(process.platform==="win32"){let r=Zp.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 le)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in le)||le.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in le)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(le.TEAMCITY_VERSION)?1:0;if(le.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in le){let r=parseInt((le.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(le.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(le.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(le.TERM)||"COLORTERM"in le?1:(le.TERM==="dumb",e)}function Pi(t){let e=t0(t);return e0(e)}yu.exports={supportsColor:Pi,stdout:Pi(process.stdout),stderr:Pi(process.stderr)}});var Su=y((kb,xu)=>{"use strict";var r0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,bu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,s0=new Map([["n",`
|
|
8
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function
|
|
9
|
-
`,
|
|
10
|
-
GFS4: `),console.error(t)});W[ae]||(Lu=global[ae]||[],Bu(W,Lu),W.close=function(t){function e(r,n){return t.call(W,r,function(i){i||$u(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Yr,{value:t}),e}(W.close),W.closeSync=function(t){function e(r){t.apply(W,arguments),$u()}return Object.defineProperty(e,Yr,{value:t}),e}(W.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ct(W[ae]),require("assert").equal(W[ae].length,0)}));var Lu;global[ae]||Bu(global,W[ae]);qi.exports=ki(D0(W));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!W.__patched&&(qi.exports=ki(W),W.__patched=!0);function ki(t){C0(t),t.gracefulify=ki,t.createReadStream=z,t.createWriteStream=ne;var e=t.readFile;t.readFile=r;function r(_,w,E){return typeof w=="function"&&(E=w,w=null),$(_,w,E);function $(R,j,D,N){return e(R,j,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Pt([$,[R,j,D],M,N||Date.now(),Date.now()]):typeof D=="function"&&D.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(_,w,E,$){return typeof E=="function"&&($=E,E=null),R(_,w,E,$);function R(j,D,N,M,P){return n(j,D,N,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pt([R,[j,D,N,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(_,w,E,$){return typeof E=="function"&&($=E,E=null),R(_,w,E,$);function R(j,D,N,M,P){return s(j,D,N,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pt([R,[j,D,N,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=u);function u(_,w,E,$){return typeof E=="function"&&($=E,E=0),R(_,w,E,$);function R(j,D,N,M,P){return a(j,D,N,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pt([R,[j,D,N,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var h=t.readdir;t.readdir=p;var c=/^v[0-5]\./;function p(_,w,E){typeof w=="function"&&(E=w,w=null);var $=c.test(process.version)?function(D,N,M,P){return h(D,R(D,N,M,P))}:function(D,N,M,P){return h(D,N,R(D,N,M,P))};return $(_,w,E);function R(j,D,N,M){return function(P,k){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Pt([$,[j,D,N],P,M||Date.now(),Date.now()]):(k&&k.sort&&k.sort(),typeof N=="function"&&N.call(this,P,k))}}}if(process.version.substr(0,4)==="v0.8"){var g=P0(t);F=g.ReadStream,U=g.WriteStream}var m=t.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=L);var b=t.WriteStream;b&&(U.prototype=Object.create(b.prototype),U.prototype.open=X),Object.defineProperty(t,"ReadStream",{get:function(){return F},set:function(_){F=_},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return U},set:function(_){U=_},enumerable:!0,configurable:!0});var C=F;Object.defineProperty(t,"FileReadStream",{get:function(){return C},set:function(_){C=_},enumerable:!0,configurable:!0});var I=U;Object.defineProperty(t,"FileWriteStream",{get:function(){return I},set:function(_){I=_},enumerable:!0,configurable:!0});function F(_,w){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function L(){var _=this;Z(_.path,_.flags,_.mode,function(w,E){w?(_.autoClose&&_.destroy(),_.emit("error",w)):(_.fd=E,_.emit("open",E),_.read())})}function U(_,w){return this instanceof U?(b.apply(this,arguments),this):U.apply(Object.create(U.prototype),arguments)}function X(){var _=this;Z(_.path,_.flags,_.mode,function(w,E){w?(_.destroy(),_.emit("error",w)):(_.fd=E,_.emit("open",E))})}function z(_,w){return new t.ReadStream(_,w)}function ne(_,w){return new t.WriteStream(_,w)}var _e=t.open;t.open=Z;function Z(_,w,E,$){return typeof E=="function"&&($=E,E=null),R(_,w,E,$);function R(j,D,N,M,P){return _e(j,D,N,function(k,ie){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Pt([R,[j,D,N,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Pt(t){ct("ENQUEUE",t[0].name,t[1]),W[ae].push(t),Mi()}var Kr;function $u(){for(var t=Date.now(),e=0;e<W[ae].length;++e)W[ae][e].length>2&&(W[ae][e][3]=t,W[ae][e][4]=t);Mi()}function Mi(){if(clearTimeout(Kr),Kr=void 0,W[ae].length!==0){var t=W[ae].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)ct("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){ct("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,u=Math.max(s-i,1),h=Math.min(u*1.2,100);a>=h?(ct("RETRY",e.name,r),e.apply(null,r.concat([i]))):W[ae].push(t)}Kr===void 0&&(Kr=setTimeout(Mi,0))}}});var Qt=y(Ve=>{"use strict";var Uu=we().fromCallback,ye=fe(),A0=["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 ye[t]=="function");Object.keys(ye).forEach(t=>{t!=="promises"&&(Ve[t]=ye[t])});A0.forEach(t=>{Ve[t]=Uu(ye[t])});Ve.exists=function(t,e){return typeof e=="function"?ye.exists(t,e):new Promise(r=>ye.exists(t,r))};Ve.read=function(t,e,r,n,i,s){return typeof s=="function"?ye.read(t,e,r,n,i,s):new Promise((o,a)=>{ye.read(t,e,r,n,i,(u,h,c)=>{if(u)return a(u);o({bytesRead:h,buffer:c})})})};Ve.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ye.write(t,e,...r):new Promise((n,i)=>{ye.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};typeof ye.writev=="function"&&(Ve.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ye.writev(t,e,...r):new Promise((n,i)=>{ye.writev(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})});typeof ye.realpath.native=="function"&&(Ve.realpath.native=Uu(ye.realpath.native))});var Ti=y((Xb,Xu)=>{Xu.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 Ju=y((Hb,Ni)=>{"use strict";var Dt=Qt(),He=require("path"),I0=Ti(),Hu=I0("10.12.0"),Gu=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(He.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},Wu=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},zu=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};Ni.exports.makeDir=async(t,e)=>{if(Gu(t),e=Wu(e),Hu){let n=He.resolve(t);return Dt.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Dt.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(He.dirname(n)===n)throw zu(n);if(i.message.includes("null bytes"))throw i;return await r(He.dirname(n)),r(n)}try{if(!(await Dt.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(He.resolve(t))};Ni.exports.makeDirSync=(t,e)=>{if(Gu(t),e=Wu(e),Hu){let n=He.resolve(t);return Dt.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Dt.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(He.dirname(n)===n)throw zu(n);if(i.message.includes("null bytes"))throw i;return r(He.dirname(n)),r(n)}try{if(!Dt.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(He.resolve(t))}});var Ne=y((Gb,Vu)=>{"use strict";var R0=we().fromPromise,{makeDir:F0,makeDirSync:ji}=Ju(),Li=R0(F0);Vu.exports={mkdirs:Li,mkdirsSync:ji,mkdirp:Li,mkdirpSync:ji,ensureDir:Li,ensureDirSync:ji}});var $i=y((Wb,Ku)=>{"use strict";var Ot=fe();function k0(t,e,r,n){Ot.open(t,"r+",(i,s)=>{if(i)return n(i);Ot.futimes(s,e,r,o=>{Ot.close(s,a=>{n&&n(o||a)})})})}function M0(t,e,r){let n=Ot.openSync(t,"r+");return Ot.futimesSync(n,e,r),Ot.closeSync(n)}Ku.exports={utimesMillis:k0,utimesMillisSync:M0}});var Zt=y((zb,ec)=>{"use strict";var At=Qt(),xe=require("path"),q0=require("util"),T0=Ti(),Qr=T0("10.5.0"),Yu=t=>Qr?At.stat(t,{bigint:!0}):At.stat(t),Bi=t=>Qr?At.statSync(t,{bigint:!0}):At.statSync(t);function N0(t,e){return Promise.all([Yu(t),Yu(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function j0(t,e){let r,n=Bi(t);try{r=Bi(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function L0(t,e,r,n){q0.callbackify(N0)(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()&&Ui(t,e)?n(new Error(en(t,e,r))):n(null,{srcStat:o,destStat:a})})}function $0(t,e,r){let{srcStat:n,destStat:i}=j0(t,e);if(i&&Zr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Ui(t,e))throw new Error(en(t,e,r));return{srcStat:n,destStat:i}}function Qu(t,e,r,n,i){let s=xe.resolve(xe.dirname(t)),o=xe.resolve(xe.dirname(r));if(o===s||o===xe.parse(o).root)return i();let a=(u,h)=>u?u.code==="ENOENT"?i():i(u):Zr(e,h)?i(new Error(en(t,r,n))):Qu(t,e,o,n,i);Qr?At.stat(o,{bigint:!0},a):At.stat(o,a)}function Zu(t,e,r,n){let i=xe.resolve(xe.dirname(t)),s=xe.resolve(xe.dirname(r));if(s===i||s===xe.parse(s).root)return;let o;try{o=Bi(s)}catch(a){if(a.code==="ENOENT")return;throw a}if(Zr(e,o))throw new Error(en(t,r,n));return Zu(t,e,s,n)}function Zr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(Qr||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 Ui(t,e){let r=xe.resolve(t).split(xe.sep).filter(i=>i),n=xe.resolve(e).split(xe.sep).filter(i=>i);return r.reduce((i,s,o)=>i&&n[o]===s,!0)}function en(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}ec.exports={checkPaths:L0,checkPathsSync:$0,checkParentPaths:Qu,checkParentPathsSync:Zu,isSrcSubdir:Ui}});var sc=y((Jb,ic)=>{"use strict";var de=fe(),er=require("path"),B0=Ne().mkdirsSync,U0=$i().utimesMillisSync,tr=Zt();function X0(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;
|
|
5
|
+
`+o),t.push(i+"m+"+Tr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=cp()+e+" "+t[0]}function cp(){return oe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function lp(...t){return process.stderr.write(Mr.format(...t)+`
|
|
6
|
+
`)}function fp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function dp(){return process.env.DEBUG}function hp(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]]}Tr.exports=ni()(oe);var{formatters:sa}=Tr.exports;sa.o=function(t){return this.inspectOpts.colors=this.useColors,Mr.inspect(t,this.inspectOpts).split(`
|
|
7
|
+
`).map(e=>e.trim()).join(" ")};sa.O=function(t){return this.inspectOpts.colors=this.useColors,Mr.inspect(t,this.inspectOpts)}});var ua=y((db,ai)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ai.exports=ta():ai.exports=aa()});var la=y((hb,ca)=>{var Gt;ca.exports=function(){if(!Gt){try{Gt=ua()("follow-redirects")}catch{}typeof Gt!="function"&&(Gt=function(){})}Gt.apply(null,arguments)}});var hi=y((pb,di)=>{var st=require("url"),ui=st.URL,pp=require("http"),mp=require("https"),ha=require("stream").Writable,pa=require("assert"),ma=la(),li=["abort","aborted","connect","error","socket","timeout"],fi=Object.create(null);li.forEach(function(t){fi[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var gp=Wt("ERR_INVALID_URL","Invalid URL",TypeError),fa=Wt("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),yp=Wt("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),vp=Wt("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),bp=Wt("ERR_STREAM_WRITE_AFTER_END","write after end");function Oe(t,e){ha.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()}Oe.prototype=Object.create(ha.prototype);Oe.prototype.abort=function(){ya(this._currentRequest),this.emit("abort")};Oe.prototype.write=function(t,e,r){if(this._ending)throw new bp;if(!at(t)&&!xp(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(zt(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 vp),this.abort())};Oe.prototype.end=function(t,e,r){if(zt(t)?(r=t,t=e=null):zt(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}};Oe.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};Oe.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};Oe.prototype.setTimeout=function(t,e){var r=this;function n(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function i(s){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(s)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){Oe.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(Oe.prototype,t,{get:function(){return this._currentRequest[t]}})});Oe.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))}};Oe.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 li)n.on(i,fi[i]);if(this._currentUrl=/^\//.test(this._options.path)?st.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,a=this._requestBodyBuffers;(function u(h){if(n===s._currentRequest)if(h)s.emit("error",h);else if(o<a.length){var c=a[o++];n.finished||n.write(c.data,c.encoding,u)}else s._ended&&n.end()})()}};Oe.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(ya(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new yp);return}var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ci(/^content-/i,this._options.headers));var s=ci(/^host$/i,this._options.headers),a=st.parse(this._currentUrl),u=s||a.host,h=/^\w+:/.test(r)?this._currentUrl:st.format(Object.assign(a,{host:u})),c;try{c=st.resolve(h,r)}catch(b){this.emit("error",new fa({cause:b}));return}ma("redirecting to",c),this._isRedirect=!0;var p=st.parse(c);if(Object.assign(this._options,p),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==u&&!wp(p.host,u))&&ci(/^(?:authorization|cookie)$/i,this._options.headers),zt(i)){var g={headers:t.headers,statusCode:e},m={url:h,method:o,headers:n};try{i(this._options,g,m)}catch(b){this.emit("error",b);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(b){this.emit("error",new fa({cause:b}))}};function ga(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],s=e[n]=Object.create(o);function a(h,c,p){if(at(h)){var g;try{g=da(new ui(h))}catch{g=st.parse(h)}if(!at(g.protocol))throw new gp({input:h});h=g}else ui&&h instanceof ui?h=da(h):(p=c,c=h,h={protocol:i});return zt(c)&&(p=c,c=null),c=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},h,c),c.nativeProtocols=r,!at(c.host)&&!at(c.hostname)&&(c.hostname="::1"),pa.equal(c.protocol,i,"protocol mismatch"),ma("options",c),new Oe(c,p)}function u(h,c,p){var g=s.request(h,c,p);return g.end(),g}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),e}function _p(){}function da(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 ci(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 Wt(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 ya(t){for(var e of li)t.removeListener(e,fi[e]);t.on("error",_p),t.abort()}function wp(t,e){pa(at(t)&&at(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function at(t){return typeof t=="string"||t instanceof String}function zt(t){return typeof t=="function"}function xp(t){return typeof t=="object"&&"length"in t}di.exports=ga({http:pp,https:mp});di.exports.wrap=ga});var pi=y((mb,Sp)=>{Sp.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 Sa=y((gb,xa)=>{"use strict";var Jt=me(),va=Zn(),Ep=ei(),Cp=Pr(),Pp=require("http"),Dp=require("https"),Op=hi().http,Ap=hi().https,ba=require("url"),Ip=require("zlib"),Rp=pi(),qr=Ar(),mi=Or(),_a=/https:?/;function wa(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(o){o.headers.host=o.host,wa(o,e,o.href)}}xa.exports=function(e){return new Promise(function(n,i){var o=function(P){n(P)},s=function(P){i(P)},a=e.data,u=e.headers;if("User-Agent"in u||"user-agent"in u?!u["User-Agent"]&&!u["user-agent"]&&(delete u["User-Agent"],delete u["user-agent"]):u["User-Agent"]="axios/"+Rp.version,a&&!Jt.isStream(a)){if(!Buffer.isBuffer(a))if(Jt.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(Jt.isString(a))a=Buffer.from(a,"utf-8");else return s(qr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));u["Content-Length"]=a.length}var h=void 0;if(e.auth){var c=e.auth.username||"",p=e.auth.password||"";h=c+":"+p}var g=Ep(e.baseURL,e.url),m=ba.parse(g),b=m.protocol||"http:";if(!h&&m.auth){var C=m.auth.split(":"),A=C[0]||"",F=C[1]||"";h=A+":"+F}h&&delete u.Authorization;var N=_a.test(b),U=N?e.httpsAgent:e.httpAgent,X={path:Cp(m.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:u,agent:U,agents:{http:e.httpAgent,https:e.httpsAgent},auth:h};e.socketPath?X.socketPath=e.socketPath:(X.hostname=m.hostname,X.port=m.port);var W=e.proxy;if(!W&&W!==!1){var ne=b.slice(0,-1)+"_proxy",_e=process.env[ne]||process.env[ne.toUpperCase()];if(_e){var Z=ba.parse(_e),_=process.env.no_proxy||process.env.NO_PROXY,w=!0;if(_){var E=_.split(",").map(function(P){return P.trim()});w=!E.some(function(P){return P?P==="*"||P[0]==="."&&m.hostname.substr(m.hostname.length-P.length)===P?!0:m.hostname===P:!1})}if(w&&(W={host:Z.hostname,port:Z.port,protocol:Z.protocol},Z.auth)){var $=Z.auth.split(":");W.auth={username:$[0],password:$[1]}}}}W&&(X.headers.host=m.hostname+(m.port?":"+m.port:""),wa(X,W,b+"//"+m.hostname+(m.port?":"+m.port:"")+X.path));var R,j=N&&(W?_a.test(W.protocol):!0);e.transport?R=e.transport:e.maxRedirects===0?R=j?Dp:Pp:(e.maxRedirects&&(X.maxRedirects=e.maxRedirects),R=j?Ap:Op),e.maxBodyLength>-1&&(X.maxBodyLength=e.maxBodyLength);var I=R.request(X,function(P){if(!I.aborted){var k=P,ie=P.req||I;if(P.statusCode!==204&&ie.method!=="HEAD"&&e.decompress!==!1)switch(P.headers["content-encoding"]){case"gzip":case"compress":case"deflate":k=k.pipe(Ip.createUnzip()),delete P.headers["content-encoding"];break}var Ae={status:P.statusCode,statusText:P.statusMessage,headers:P.headers,config:e,request:ie};if(e.responseType==="stream")Ae.data=k,va(o,s,Ae);else{var J=[],he=0;k.on("data",function(pe){J.push(pe),he+=pe.length,e.maxContentLength>-1&&he>e.maxContentLength&&(k.destroy(),s(qr("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,ie)))}),k.on("error",function(pe){I.aborted||s(mi(pe,e,null,ie))}),k.on("end",function(){var pe=Buffer.concat(J);e.responseType!=="arraybuffer"&&(pe=pe.toString(e.responseEncoding),(!e.responseEncoding||e.responseEncoding==="utf8")&&(pe=Jt.stripBOM(pe))),Ae.data=pe,va(o,s,Ae)})}}});if(I.on("error",function(P){I.aborted&&P.code!=="ERR_FR_TOO_MANY_REDIRECTS"||s(mi(P,e,null,I))}),e.timeout){var L=parseInt(e.timeout,10);if(isNaN(L)){s(qr("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",I));return}I.setTimeout(L,function(){I.abort(),s(qr("timeout of "+L+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",I))})}e.cancelToken&&e.cancelToken.promise.then(function(P){I.aborted||(I.abort(),s(P))}),Jt.isStream(a)?a.on("error",function(P){s(mi(P,e,null,I))}).pipe(I):I.end(a)})}});var jr=y((yb,Pa)=>{"use strict";var se=me(),Ea=Ms(),Fp=Or(),kp={"Content-Type":"application/x-www-form-urlencoded"};function Ca(t,e){!se.isUndefined(t)&&se.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function Mp(){var t;return typeof XMLHttpRequest<"u"?t=Ys():typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(t=Sa()),t}function Tp(t,e,r){if(se.isString(t))try{return(e||JSON.parse)(t),se.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var Nr={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Mp(),transformRequest:[function(e,r){return Ea(r,"Accept"),Ea(r,"Content-Type"),se.isFormData(e)||se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e)?e:se.isArrayBufferView(e)?e.buffer:se.isURLSearchParams(e)?(Ca(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):se.isObject(e)||r&&r["Content-Type"]==="application/json"?(Ca(r,"application/json"),Tp(e)):e}],transformResponse:[function(e){var r=this.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&se.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(o)throw s.name==="SyntaxError"?Fp(s,this,"E_JSON_PARSE"):s}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Nr.headers={common:{Accept:"application/json, text/plain, */*"}};se.forEach(["delete","get","head"],function(e){Nr.headers[e]={}});se.forEach(["post","put","patch"],function(e){Nr.headers[e]=se.merge(kp)});Pa.exports=Nr});var Oa=y((vb,Da)=>{"use strict";var qp=me(),Np=jr();Da.exports=function(e,r,n){var i=this||Np;return qp.forEach(n,function(s){e=s.call(i,e,r)}),e}});var gi=y((bb,Aa)=>{"use strict";Aa.exports=function(e){return!!(e&&e.__CANCEL__)}});var Fa=y((_b,Ra)=>{"use strict";var Ia=me(),yi=Oa(),jp=gi(),Lp=jr();function vi(t){t.cancelToken&&t.cancelToken.throwIfRequested()}Ra.exports=function(e){vi(e),e.headers=e.headers||{},e.data=yi.call(e,e.data,e.headers,e.transformRequest),e.headers=Ia.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Ia.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||Lp.adapter;return r(e).then(function(i){return vi(e),i.data=yi.call(e,i.data,i.headers,e.transformResponse),i},function(i){return jp(i)||(vi(e),i&&i.response&&(i.response.data=yi.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var bi=y((wb,ka)=>{"use strict";var ce=me();ka.exports=function(e,r){r=r||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(g,m){return ce.isPlainObject(g)&&ce.isPlainObject(m)?ce.merge(g,m):ce.isPlainObject(m)?ce.merge({},m):ce.isArray(m)?m.slice():m}function h(g){ce.isUndefined(r[g])?ce.isUndefined(e[g])||(n[g]=u(void 0,e[g])):n[g]=u(e[g],r[g])}ce.forEach(i,function(m){ce.isUndefined(r[m])||(n[m]=u(void 0,r[m]))}),ce.forEach(o,h),ce.forEach(s,function(m){ce.isUndefined(r[m])?ce.isUndefined(e[m])||(n[m]=u(void 0,e[m])):n[m]=u(void 0,r[m])}),ce.forEach(a,function(m){m in r?n[m]=u(e[m],r[m]):m in e&&(n[m]=u(void 0,e[m]))});var c=i.concat(o).concat(s).concat(a),p=Object.keys(e).concat(Object.keys(r)).filter(function(m){return c.indexOf(m)===-1});return ce.forEach(p,h),n}});var ja=y((xb,Na)=>{"use strict";var Ta=pi(),_i={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){_i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Ma={},$p=Ta.version.split(".");function qa(t,e){for(var r=e?e.split("."):$p,n=t.split("."),i=0;i<3;i++){if(r[i]>n[i])return!0;if(r[i]<n[i])return!1}return!1}_i.transitional=function(e,r,n){var i=r&&qa(r);function o(s,a){return"[Axios v"+Ta.version+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return function(s,a,u){if(e===!1)throw new Error(o(a," has been removed in "+r));return i&&!Ma[a]&&(Ma[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,a,u):!0}};function Bp(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],s=e[o];if(s){var a=t[o],u=a===void 0||s(a,o,t);if(u!==!0)throw new TypeError("option "+o+" must be "+u);continue}if(r!==!0)throw Error("Unknown option "+o)}}Na.exports={isOlderVersion:qa,assertOptions:Bp,validators:_i}});var Ha=y((Sb,Xa)=>{"use strict";var Ba=me(),Up=Pr(),La=Fs(),$a=Fa(),Lr=bi(),Ua=ja(),wt=Ua.validators;function Vt(t){this.defaults=t,this.interceptors={request:new La,response:new La}}Vt.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=Lr(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&&Ua.assertOptions(r,{silentJSONParsing:wt.transitional(wt.boolean,"1.0.0"),forcedJSONParsing:wt.transitional(wt.boolean,"1.0.0"),clarifyTimeoutError:wt.transitional(wt.boolean,"1.0.0")},!1);var n=[],i=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(e)===!1||(i=i&&g.synchronous,n.unshift(g.fulfilled,g.rejected))});var o=[];this.interceptors.response.forEach(function(g){o.push(g.fulfilled,g.rejected)});var s;if(!i){var a=[$a,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),s=Promise.resolve(e);a.length;)s=s.then(a.shift(),a.shift());return s}for(var u=e;n.length;){var h=n.shift(),c=n.shift();try{u=h(u)}catch(p){c(p);break}}try{s=$a(u)}catch(p){return Promise.reject(p)}for(;o.length;)s=s.then(o.shift(),o.shift());return s};Vt.prototype.getUri=function(e){return e=Lr(this.defaults,e),Up(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};Ba.forEach(["delete","get","head","options"],function(e){Vt.prototype[e]=function(r,n){return this.request(Lr(n||{},{method:e,url:r,data:(n||{}).data}))}});Ba.forEach(["post","put","patch"],function(e){Vt.prototype[e]=function(r,n,i){return this.request(Lr(i||{},{method:e,url:r,data:n}))}});Xa.exports=Vt});var xi=y((Eb,Ga)=>{"use strict";function wi(t){this.message=t}wi.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};wi.prototype.__CANCEL__=!0;Ga.exports=wi});var Wa=y((Cb,za)=>{"use strict";var Xp=xi();function $r(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 Xp(i),e(r.reason))})}$r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};$r.source=function(){var e,r=new $r(function(i){e=i});return{token:r,cancel:e}};za.exports=$r});var Va=y((Pb,Ja)=>{"use strict";Ja.exports=function(e){return function(n){return e.apply(null,n)}}});var Ya=y((Db,Ka)=>{"use strict";Ka.exports=function(e){return typeof e=="object"&&e.isAxiosError===!0}});var eu=y((Ob,Si)=>{"use strict";var Qa=me(),Hp=Jn(),Br=Ha(),Gp=bi(),zp=jr();function Za(t){var e=new Br(t),r=Hp(Br.prototype.request,e);return Qa.extend(r,Br.prototype,e),Qa.extend(r,e),r}var Te=Za(zp);Te.Axios=Br;Te.create=function(e){return Za(Gp(Te.defaults,e))};Te.Cancel=xi();Te.CancelToken=Wa();Te.isCancel=gi();Te.all=function(e){return Promise.all(e)};Te.spread=Va();Te.isAxiosError=Ya();Si.exports=Te;Si.exports.default=Te});var Ei=y((Ab,tu)=>{tu.exports=eu()});var nu=y((Ib,ru)=>{"use strict";var Wp=/[|\\{}()[\]^$+*?.]/g;ru.exports=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Wp,"\\$&")}});var ou=y((Rb,iu)=>{"use strict";iu.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 Ci=y((Fb,cu)=>{var ut=ou(),uu={};for(Ur in ut)ut.hasOwnProperty(Ur)&&(uu[ut[Ur]]=Ur);var Ur,D=cu.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(ge in D)if(D.hasOwnProperty(ge)){if(!("channels"in D[ge]))throw new Error("missing channels property: "+ge);if(!("labels"in D[ge]))throw new Error("missing channel labels property: "+ge);if(D[ge].labels.length!==D[ge].channels)throw new Error("channel and label counts mismatch: "+ge);su=D[ge].channels,au=D[ge].labels,delete D[ge].channels,delete D[ge].labels,Object.defineProperty(D[ge],"channels",{value:su}),Object.defineProperty(D[ge],"labels",{value:au})}var su,au,ge;D.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,u,h;return o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360),h=(i+o)/2,o===i?u=0:h<=.5?u=s/(o+i):u=s/(2-o-i),[a,u*100,h*100]};D.rgb.hsv=function(t){var e,r,n,i,o,s=t[0]/255,a=t[1]/255,u=t[2]/255,h=Math.max(s,a,u),c=h-Math.min(s,a,u),p=function(g){return(h-g)/6/c+1/2};return c===0?i=o=0:(o=c/h,e=p(s),r=p(a),n=p(u),s===h?i=n-r:a===h?i=1/3+e-n:u===h&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,h*100]};D.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2],i=D.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};D.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i,o,s,a;return a=Math.min(1-e,1-r,1-n),i=(1-e-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,[i*100,o*100,s*100,a*100]};function Jp(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}D.rgb.keyword=function(t){var e=uu[t];if(e)return e;var r=1/0,n;for(var i in ut)if(ut.hasOwnProperty(i)){var o=ut[i],s=Jp(t,o);s<r&&(r=s,n=i)}return n};D.keyword.rgb=function(t){return ut[t]};D.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};D.rgb.lab=function(t){var e=D.rgb.xyz(t),r=e[0],n=e[1],i=e[2],o,s,a;return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=116*n-16,s=500*(r-n),a=200*(n-i),[o,s,a]};D.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s,a,u;if(r===0)return u=n*255,[u,u,u];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,a=[0,0,0];for(var h=0;h<3;h++)s=e+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?u=i+(o-i)*6*s:2*s<1?u=o:3*s<2?u=i+(o-i)*(2/3-s)*6:u=i,a[h]=u*255;return a};D.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01),s,a;return n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o,a=(n+r)/2,s=n===0?2*i/(o+i):2*r/(n+r),[e,s*100,a*100]};D.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),u=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}};D.hsv.hsl=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s,a;return a=(2-r)*n,o=(2-r)*i,s=r*i,s/=o<=1?o:2-o,s=s||0,a/=2,[e,s*100,a*100]};D.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o,s,a,u;i>1&&(r/=i,n/=i),o=Math.floor(6*e),s=1-n,a=6*e-o,o&1&&(a=1-a),u=r+a*(s-r);var h,c,p;switch(o){default:case 6:case 0:h=s,c=u,p=r;break;case 1:h=u,c=s,p=r;break;case 2:h=r,c=s,p=u;break;case 3:h=r,c=u,p=s;break;case 4:h=u,c=r,p=s;break;case 5:h=s,c=r,p=u;break}return[h*255,c*255,p*255]};D.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o,s,a;return o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[o*255,s*255,a*255]};D.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};D.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*r-16,o=500*(e-r),s=200*(r-n),[i,o,s]};D.lab.xyz=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;var a=Math.pow(o,3),u=Math.pow(i,3),h=Math.pow(s,3);return o=a>.008856?a:(o-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,s=h>.008856?h:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};D.lab.lch=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return i=Math.atan2(n,r),o=i*360/2/Math.PI,o<0&&(o+=360),s=Math.sqrt(r*r+n*n),[e,s,o]};D.lch.lab=function(t){var e=t[0],r=t[1],n=t[2],i,o,s;return s=n/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s),[e,i,o]};D.rgb.ansi16=function(t){var e=t[0],r=t[1],n=t[2],i=1 in arguments?arguments[1]:D.rgb.hsv(t)[2];if(i=Math.round(i/50),i===0)return 30;var o=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return i===2&&(o+=60),o};D.hsv.ansi16=function(t){return D.rgb.ansi16(D.hsv.rgb(t),t[2])};D.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};D.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};D.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,n=Math.floor(t/36)/5*255,i=Math.floor((r=t%36)/6)/5*255,o=r%6/5*255;return[n,i,o]};D.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};D.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(a){return a+a}).join(""));var n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};D.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,u;return s<1?a=o/(1-s):a=0,s<=0?u=0:i===e?u=(r-n)/s%6:i===r?u=2+(n-e)/s:u=4+(e-r)/s+4,u/=6,u%=1,[u*360,s*100,a*100]};D.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]};D.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]};D.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];var i=[0,0,0],o=e%1*6,s=o%1,a=1-s,u=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};D.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]};D.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]};D.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]};D.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=1-r,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};D.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};D.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};D.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};D.gray.hsl=D.gray.hsv=function(t){return[0,0,t[0]]};D.gray.hwb=function(t){return[0,100,t[0]]};D.gray.cmyk=function(t){return[0,0,0,t[0]]};D.gray.lab=function(t){return[t[0],0,0]};D.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};D.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var fu=y((kb,lu)=>{var Xr=Ci();function Vp(){for(var t={},e=Object.keys(Xr),r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Kp(t){var e=Vp(),r=[t];for(e[t].distance=0;r.length;)for(var n=r.pop(),i=Object.keys(Xr[n]),o=i.length,s=0;s<o;s++){var a=i[s],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}return e}function Yp(t,e){return function(r){return e(t(r))}}function Qp(t,e){for(var r=[e[t].parent,t],n=Xr[e[t].parent][t],i=e[t].parent;e[i].parent;)r.unshift(e[i].parent),n=Yp(Xr[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}lu.exports=function(t){for(var e=Kp(t),r={},n=Object.keys(e),i=n.length,o=0;o<i;o++){var s=n[o],a=e[s];a.parent!==null&&(r[s]=Qp(s,e))}return r}});var hu=y((Mb,du)=>{var Pi=Ci(),Zp=fu(),xt={},e0=Object.keys(Pi);function t0(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 r0(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var n=t(r);if(typeof n=="object")for(var i=n.length,o=0;o<i;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}e0.forEach(function(t){xt[t]={},Object.defineProperty(xt[t],"channels",{value:Pi[t].channels}),Object.defineProperty(xt[t],"labels",{value:Pi[t].labels});var e=Zp(t),r=Object.keys(e);r.forEach(function(n){var i=e[n];xt[t][n]=r0(i),xt[t][n].raw=t0(i)})});du.exports=xt});var mu=y((Tb,pu)=>{"use strict";var St=hu(),Hr=(t,e)=>function(){return`\x1B[${t.apply(St,arguments)+e}m`},Gr=(t,e)=>function(){let r=t.apply(St,arguments);return`\x1B[${38+e};5;${r}m`},zr=(t,e)=>function(){let r=t.apply(St,arguments);return`\x1B[${38+e};2;${r[0]};${r[1]};${r[2]}m`};function n0(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let o=e[i];for(let s of Object.keys(o)){let a=o[s];e[s]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},o[s]=e[s],t.set(a[0],a[1])}Object.defineProperty(e,i,{value:o,enumerable:!1}),Object.defineProperty(e,"codes",{value:t,enumerable:!1})}let r=i=>i,n=(i,o,s)=>[i,o,s];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Hr(r,0)},e.color.ansi256={ansi256:Gr(r,0)},e.color.ansi16m={rgb:zr(n,0)},e.bgColor.ansi={ansi:Hr(r,10)},e.bgColor.ansi256={ansi256:Gr(r,10)},e.bgColor.ansi16m={rgb:zr(n,10)};for(let i of Object.keys(St)){if(typeof St[i]!="object")continue;let o=St[i];i==="ansi16"&&(i="ansi"),"ansi16"in o&&(e.color.ansi[i]=Hr(o.ansi16,0),e.bgColor.ansi[i]=Hr(o.ansi16,10)),"ansi256"in o&&(e.color.ansi256[i]=Gr(o.ansi256,0),e.bgColor.ansi256[i]=Gr(o.ansi256,10)),"rgb"in o&&(e.color.ansi16m[i]=zr(o.rgb,0),e.bgColor.ansi16m[i]=zr(o.rgb,10))}return e}Object.defineProperty(pu,"exports",{enumerable:!0,get:n0})});var yu=y((qb,gu)=>{"use strict";gu.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 bu=y((Nb,vu)=>{"use strict";var i0=require("os"),qe=yu(),le=process.env,Et;qe("no-color")||qe("no-colors")||qe("color=false")?Et=!1:(qe("color")||qe("colors")||qe("color=true")||qe("color=always"))&&(Et=!0);"FORCE_COLOR"in le&&(Et=le.FORCE_COLOR.length===0||parseInt(le.FORCE_COLOR,10)!==0);function o0(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function s0(t){if(Et===!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&&Et!==!0)return 0;let e=Et?1:0;if(process.platform==="win32"){let r=i0.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 le)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in le)||le.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in le)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(le.TEAMCITY_VERSION)?1:0;if(le.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in le){let r=parseInt((le.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(le.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(le.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(le.TERM)||"COLORTERM"in le?1:(le.TERM==="dumb",e)}function Di(t){let e=s0(t);return o0(e)}vu.exports={supportsColor:Di,stdout:Di(process.stdout),stderr:Di(process.stderr)}});var Eu=y((jb,Su)=>{"use strict";var a0=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,_u=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,u0=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,c0=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,l0=new Map([["n",`
|
|
8
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function xu(t){return t[0]==="u"&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):l0.get(t)||t}function f0(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n)if(!isNaN(o))r.push(Number(o));else if(i=o.match(u0))r.push(i[2].replace(c0,(s,a,u)=>a?xu(a):u));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`);return r}function d0(t){_u.lastIndex=0;let e=[],r;for(;(r=_u.exec(t))!==null;){let n=r[1];if(r[2]){let i=f0(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function wu(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let i of Object.keys(r))if(Array.isArray(r[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);r[i].length>0?n=n[i].apply(n,r[i]):n=n[i]}return n}Su.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(a0,(o,s,a,u,h,c)=>{if(s)i.push(xu(s));else if(u){let p=i.join("");i=[],n.push(r.length===0?p:wu(t,r)(p)),r.push({inverse:a,styles:d0(u)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(wu(t,r)(i.join(""))),i=[],r.pop()}else i.push(c)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var Qt=y((Lb,Yt)=>{"use strict";var Ai=nu(),Y=mu(),Oi=bu().stdout,h0=Eu(),Pu=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Du=["ansi","ansi","ansi256","ansi16m"],Ou=new Set(["gray"]),Ct=Object.create(null);function Cu(t,e){e=e||{};let r=Oi?Oi.level:0;t.level=e.level===void 0?r:e.level,t.enabled="enabled"in e?e.enabled:t.level>0}function Kt(t){if(!this||!(this instanceof Kt)||this.template){let e={};return Cu(e,t),e.template=function(){let r=[].slice.call(arguments);return g0.apply(null,[e.template].concat(r))},Object.setPrototypeOf(e,Kt.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=Kt,e.template}Cu(this,t)}Pu&&(Y.blue.open="\x1B[94m");for(let t of Object.keys(Y))Y[t].closeRe=new RegExp(Ai(Y[t].close),"g"),Ct[t]={get(){let e=Y[t];return Wr.call(this,this._styles?this._styles.concat(e):[e],this._empty,t)}};Ct.visible={get(){return Wr.call(this,this._styles||[],!0,"visible")}};Y.color.closeRe=new RegExp(Ai(Y.color.close),"g");for(let t of Object.keys(Y.color.ansi))Ou.has(t)||(Ct[t]={get(){let e=this.level;return function(){let n={open:Y.color[Du[e]][t].apply(null,arguments),close:Y.color.close,closeRe:Y.color.closeRe};return Wr.call(this,this._styles?this._styles.concat(n):[n],this._empty,t)}}});Y.bgColor.closeRe=new RegExp(Ai(Y.bgColor.close),"g");for(let t of Object.keys(Y.bgColor.ansi)){if(Ou.has(t))continue;let e="bg"+t[0].toUpperCase()+t.slice(1);Ct[e]={get(){let r=this.level;return function(){let i={open:Y.bgColor[Du[r]][t].apply(null,arguments),close:Y.bgColor.close,closeRe:Y.bgColor.closeRe};return Wr.call(this,this._styles?this._styles.concat(i):[i],this._empty,t)}}}}var p0=Object.defineProperties(()=>{},Ct);function Wr(t,e,r){let n=function(){return m0.apply(n,arguments)};n._styles=t,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(o){i.level=o}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(o){i.enabled=o}}),n.hasGrey=this.hasGrey||r==="gray"||r==="grey",n.__proto__=p0,n}function m0(){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=Y.dim.open;Pu&&this.hasGrey&&(Y.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 Y.dim.open=n,r}function g0(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 h0(t,n.join(""))}Object.defineProperties(Kt.prototype,Ct);Yt.exports=Kt();Yt.exports.supportsColor=Oi;Yt.exports.default=Yt.exports});var Xe=y((Bb,Ri)=>{var y0=require("fs"),v0=require("path");function Ru(t){console.log(`[dotenv][DEBUG] ${t}`)}var b0=`
|
|
9
|
+
`,_0=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,w0=/\\n/g,x0=/\n|\r|\r\n/;function Fu(t,e){let r=!!(e&&e.debug),n={};return t.toString().split(x0).forEach(function(i,o){let s=i.match(_0);if(s!=null){let a=s[1],u=s[2]||"",h=u.length-1,c=u[0]==='"'&&u[h]==='"';u[0]==="'"&&u[h]==="'"||c?(u=u.substring(1,h),c&&(u=u.replace(w0,b0))):u=u.trim(),n[a]=u}else r&&Ru(`did not match key and value when parsing line ${o+1}: ${i}`)}),n}function S0(t){let e=v0.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=Fu(y0.readFileSync(e,{encoding:r}),{debug:n});return Object.keys(i).forEach(function(o){Object.prototype.hasOwnProperty.call(process.env,o)?n&&Ru(`"${o}" is already defined in \`process.env\` and will not be overwritten`):process.env[o]=i[o]}),{parsed:i}}catch(i){return{error:i}}}Ri.exports.config=S0;Ri.exports.parse=Fu});var we=y(Fi=>{"use strict";Fi.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{t.call(this,...e,(i,o)=>i!=null?n(i):r(o))})},"name",{value:t.name})};Fi.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 Mu=y((Xb,ku)=>{var Ve=require("constants"),E0=process.cwd,Jr=null,C0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Jr||(Jr=E0.call(process)),Jr};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ki=process.chdir,process.chdir=function(t){Jr=null,ki.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ki));var ki;ku.exports=P0;function P0(t){Ve.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,g){g&&process.nextTick(g)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,g,m){m&&process.nextTick(m)},t.lchownSync=function(){}),C0==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(g,m,b){var C=Date.now(),A=0;c(g,m,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM")&&Date.now()-C<6e4){setTimeout(function(){t.stat(m,function(U,X){U&&U.code==="ENOENT"?c(g,m,F):b(N)})},A),A<100&&(A+=10);return}b&&b(N)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(g,m,b,C,A,F){var N;if(F&&typeof F=="function"){var U=0;N=function(X,W,ne){if(X&&X.code==="EAGAIN"&&U<10)return U++,c.call(t,g,m,b,C,A,N);F.apply(this,arguments)}}return c.call(t,g,m,b,C,A,N)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,g,m,b,C){for(var A=0;;)try{return c.call(t,p,g,m,b,C)}catch(F){if(F.code==="EAGAIN"&&A<10){A++;continue}throw F}}}(t.readSync);function e(c){c.lchmod=function(p,g,m){c.open(p,Ve.O_WRONLY|Ve.O_SYMLINK,g,function(b,C){if(b){m&&m(b);return}c.fchmod(C,g,function(A){c.close(C,function(F){m&&m(A||F)})})})},c.lchmodSync=function(p,g){var m=c.openSync(p,Ve.O_WRONLY|Ve.O_SYMLINK,g),b=!0,C;try{C=c.fchmodSync(m,g),b=!1}finally{if(b)try{c.closeSync(m)}catch{}else c.closeSync(m)}return C}}function r(c){Ve.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,g,m,b){c.open(p,Ve.O_SYMLINK,function(C,A){if(C){b&&b(C);return}c.futimes(A,g,m,function(F){c.close(A,function(N){b&&b(F||N)})})})},c.lutimesSync=function(p,g,m){var b=c.openSync(p,Ve.O_SYMLINK),C,A=!0;try{C=c.futimesSync(b,g,m),A=!1}finally{if(A)try{c.closeSync(b)}catch{}else c.closeSync(b)}return C}):c.futimes&&(c.lutimes=function(p,g,m,b){b&&process.nextTick(b)},c.lutimesSync=function(){})}function n(c){return c&&function(p,g,m){return c.call(t,p,g,function(b){h(b)&&(b=null),m&&m.apply(this,arguments)})}}function i(c){return c&&function(p,g){try{return c.call(t,p,g)}catch(m){if(!h(m))throw m}}}function o(c){return c&&function(p,g,m,b){return c.call(t,p,g,m,function(C){h(C)&&(C=null),b&&b.apply(this,arguments)})}}function s(c){return c&&function(p,g,m){try{return c.call(t,p,g,m)}catch(b){if(!h(b))throw b}}}function a(c){return c&&function(p,g,m){typeof g=="function"&&(m=g,g=null);function b(C,A){A&&(A.uid<0&&(A.uid+=4294967296),A.gid<0&&(A.gid+=4294967296)),m&&m.apply(this,arguments)}return g?c.call(t,p,g,b):c.call(t,p,b)}}function u(c){return c&&function(p,g){var m=g?c.call(t,p,g):c.call(t,p);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function h(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var Nu=y((Hb,qu)=>{var Tu=require("stream").Stream;qu.exports=D0;function D0(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);Tu.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,u=s.length;a<u;a++){var h=s[a];this[h]=i[h]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){o.emit("error",c),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);Tu.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var u=o[s];this[u]=i[u]}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 Lu=y((Gb,ju)=>{"use strict";ju.exports=A0;var O0=Object.getPrototypeOf||function(t){return t.__proto__};function A0(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:O0(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((zb,qi)=>{var z=require("fs"),I0=Mu(),R0=Nu(),F0=Lu(),Vr=require("util"),ae,Yr;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ae=Symbol.for("graceful-fs.queue"),Yr=Symbol.for("graceful-fs.previous")):(ae="___graceful-fs.queue",Yr="___graceful-fs.previous");function k0(){}function Uu(t,e){Object.defineProperty(t,ae,{get:function(){return e}})}var ct=k0;Vr.debuglog?ct=Vr.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(ct=function(){var t=Vr.format.apply(Vr,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
10
|
+
GFS4: `),console.error(t)});z[ae]||($u=global[ae]||[],Uu(z,$u),z.close=function(t){function e(r,n){return t.call(z,r,function(i){i||Bu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Yr,{value:t}),e}(z.close),z.closeSync=function(t){function e(r){t.apply(z,arguments),Bu()}return Object.defineProperty(e,Yr,{value:t}),e}(z.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ct(z[ae]),require("assert").equal(z[ae].length,0)}));var $u;global[ae]||Uu(global,z[ae]);qi.exports=Mi(F0(z));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!z.__patched&&(qi.exports=Mi(z),z.__patched=!0);function Mi(t){I0(t),t.gracefulify=Mi,t.createReadStream=W,t.createWriteStream=ne;var e=t.readFile;t.readFile=r;function r(_,w,E){return typeof w=="function"&&(E=w,w=null),$(_,w,E);function $(R,j,I,L){return e(R,j,function(M){M&&(M.code==="EMFILE"||M.code==="ENFILE")?Dt([$,[R,j,I],M,L||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(_,w,E,$){return typeof E=="function"&&($=E,E=null),R(_,w,E,$);function R(j,I,L,M,P){return n(j,I,L,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Dt([R,[j,I,L,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=s);function s(_,w,E,$){return typeof E=="function"&&($=E,E=null),R(_,w,E,$);function R(j,I,L,M,P){return o(j,I,L,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Dt([R,[j,I,L,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=u);function u(_,w,E,$){return typeof E=="function"&&($=E,E=0),R(_,w,E,$);function R(j,I,L,M,P){return a(j,I,L,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Dt([R,[j,I,L,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}var h=t.readdir;t.readdir=p;var c=/^v[0-5]\./;function p(_,w,E){typeof w=="function"&&(E=w,w=null);var $=c.test(process.version)?function(I,L,M,P){return h(I,R(I,L,M,P))}:function(I,L,M,P){return h(I,L,R(I,L,M,P))};return $(_,w,E);function R(j,I,L,M){return function(P,k){P&&(P.code==="EMFILE"||P.code==="ENFILE")?Dt([$,[j,I,L],P,M||Date.now(),Date.now()]):(k&&k.sort&&k.sort(),typeof L=="function"&&L.call(this,P,k))}}}if(process.version.substr(0,4)==="v0.8"){var g=R0(t);F=g.ReadStream,U=g.WriteStream}var m=t.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=N);var b=t.WriteStream;b&&(U.prototype=Object.create(b.prototype),U.prototype.open=X),Object.defineProperty(t,"ReadStream",{get:function(){return F},set:function(_){F=_},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return U},set:function(_){U=_},enumerable:!0,configurable:!0});var C=F;Object.defineProperty(t,"FileReadStream",{get:function(){return C},set:function(_){C=_},enumerable:!0,configurable:!0});var A=U;Object.defineProperty(t,"FileWriteStream",{get:function(){return A},set:function(_){A=_},enumerable:!0,configurable:!0});function F(_,w){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function N(){var _=this;Z(_.path,_.flags,_.mode,function(w,E){w?(_.autoClose&&_.destroy(),_.emit("error",w)):(_.fd=E,_.emit("open",E),_.read())})}function U(_,w){return this instanceof U?(b.apply(this,arguments),this):U.apply(Object.create(U.prototype),arguments)}function X(){var _=this;Z(_.path,_.flags,_.mode,function(w,E){w?(_.destroy(),_.emit("error",w)):(_.fd=E,_.emit("open",E))})}function W(_,w){return new t.ReadStream(_,w)}function ne(_,w){return new t.WriteStream(_,w)}var _e=t.open;t.open=Z;function Z(_,w,E,$){return typeof E=="function"&&($=E,E=null),R(_,w,E,$);function R(j,I,L,M,P){return _e(j,I,L,function(k,ie){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Dt([R,[j,I,L,M],k,P||Date.now(),Date.now()]):typeof M=="function"&&M.apply(this,arguments)})}}return t}function Dt(t){ct("ENQUEUE",t[0].name,t[1]),z[ae].push(t),Ti()}var Kr;function Bu(){for(var t=Date.now(),e=0;e<z[ae].length;++e)z[ae][e].length>2&&(z[ae][e][3]=t,z[ae][e][4]=t);Ti()}function Ti(){if(clearTimeout(Kr),Kr=void 0,z[ae].length!==0){var t=z[ae].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)ct("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){ct("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,u=Math.max(o-i,1),h=Math.min(u*1.2,100);a>=h?(ct("RETRY",e.name,r),e.apply(null,r.concat([i]))):z[ae].push(t)}Kr===void 0&&(Kr=setTimeout(Ti,0))}}});var Zt=y(Ke=>{"use strict";var Xu=we().fromCallback,ye=fe(),M0=["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 ye[t]=="function");Object.keys(ye).forEach(t=>{t!=="promises"&&(Ke[t]=ye[t])});M0.forEach(t=>{Ke[t]=Xu(ye[t])});Ke.exists=function(t,e){return typeof e=="function"?ye.exists(t,e):new Promise(r=>ye.exists(t,r))};Ke.read=function(t,e,r,n,i,o){return typeof o=="function"?ye.read(t,e,r,n,i,o):new Promise((s,a)=>{ye.read(t,e,r,n,i,(u,h,c)=>{if(u)return a(u);s({bytesRead:h,buffer:c})})})};Ke.write=function(t,e,...r){return typeof r[r.length-1]=="function"?ye.write(t,e,...r):new Promise((n,i)=>{ye.write(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof ye.writev=="function"&&(Ke.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?ye.writev(t,e,...r):new Promise((n,i)=>{ye.writev(t,e,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof ye.realpath.native=="function"&&(Ke.realpath.native=Xu(ye.realpath.native))});var Ni=y((Jb,Hu)=>{Hu.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 Vu=y((Vb,ji)=>{"use strict";var Ot=Zt(),He=require("path"),T0=Ni(),Gu=T0("10.12.0"),zu=t=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(He.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}},Wu=t=>{let e={mode:511};return typeof t=="number"&&(t={mode:t}),{...e,...t}},Ju=t=>{let e=new Error(`operation not permitted, mkdir '${t}'`);return e.code="EPERM",e.errno=-4048,e.path=t,e.syscall="mkdir",e};ji.exports.makeDir=async(t,e)=>{if(zu(t),e=Wu(e),Gu){let n=He.resolve(t);return Ot.mkdir(n,{mode:e.mode,recursive:!0})}let r=async n=>{try{await Ot.mkdir(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(He.dirname(n)===n)throw Ju(n);if(i.message.includes("null bytes"))throw i;return await r(He.dirname(n)),r(n)}try{if(!(await Ot.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(He.resolve(t))};ji.exports.makeDirSync=(t,e)=>{if(zu(t),e=Wu(e),Gu){let n=He.resolve(t);return Ot.mkdirSync(n,{mode:e.mode,recursive:!0})}let r=n=>{try{Ot.mkdirSync(n,e.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(He.dirname(n)===n)throw Ju(n);if(i.message.includes("null bytes"))throw i;return r(He.dirname(n)),r(n)}try{if(!Ot.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(He.resolve(t))}});var Ne=y((Kb,Ku)=>{"use strict";var q0=we().fromPromise,{makeDir:N0,makeDirSync:Li}=Vu(),$i=q0(N0);Ku.exports={mkdirs:$i,mkdirsSync:Li,mkdirp:$i,mkdirpSync:Li,ensureDir:$i,ensureDirSync:Li}});var Bi=y((Yb,Yu)=>{"use strict";var At=fe();function j0(t,e,r,n){At.open(t,"r+",(i,o)=>{if(i)return n(i);At.futimes(o,e,r,s=>{At.close(o,a=>{n&&n(s||a)})})})}function L0(t,e,r){let n=At.openSync(t,"r+");return At.futimesSync(n,e,r),At.closeSync(n)}Yu.exports={utimesMillis:j0,utimesMillisSync:L0}});var er=y((Qb,tc)=>{"use strict";var It=Zt(),xe=require("path"),$0=require("util"),B0=Ni(),Qr=B0("10.5.0"),Qu=t=>Qr?It.stat(t,{bigint:!0}):It.stat(t),Ui=t=>Qr?It.statSync(t,{bigint:!0}):It.statSync(t);function U0(t,e){return Promise.all([Qu(t),Qu(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function X0(t,e){let r,n=Ui(t);try{r=Ui(e)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function H0(t,e,r,n){$0.callbackify(U0)(t,e,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&Zr(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&Xi(t,e)?n(new Error(en(t,e,r))):n(null,{srcStat:s,destStat:a})})}function G0(t,e,r){let{srcStat:n,destStat:i}=X0(t,e);if(i&&Zr(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Xi(t,e))throw new Error(en(t,e,r));return{srcStat:n,destStat:i}}function Zu(t,e,r,n,i){let o=xe.resolve(xe.dirname(t)),s=xe.resolve(xe.dirname(r));if(s===o||s===xe.parse(s).root)return i();let a=(u,h)=>u?u.code==="ENOENT"?i():i(u):Zr(e,h)?i(new Error(en(t,r,n))):Zu(t,e,s,n,i);Qr?It.stat(s,{bigint:!0},a):It.stat(s,a)}function ec(t,e,r,n){let i=xe.resolve(xe.dirname(t)),o=xe.resolve(xe.dirname(r));if(o===i||o===xe.parse(o).root)return;let s;try{s=Ui(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(Zr(e,s))throw new Error(en(t,r,n));return ec(t,e,o,n)}function Zr(t,e){return!!(e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev&&(Qr||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 Xi(t,e){let r=xe.resolve(t).split(xe.sep).filter(i=>i),n=xe.resolve(e).split(xe.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function en(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}tc.exports={checkPaths:H0,checkPathsSync:G0,checkParentPaths:Zu,checkParentPathsSync:ec,isSrcSubdir:Xi}});var sc=y((Zb,oc)=>{"use strict";var de=fe(),tr=require("path"),z0=Ne().mkdirsSync,W0=Bi().utimesMillisSync,rr=er();function J0(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;
|
|
11
11
|
|
|
12
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=
|
|
12
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=rr.checkPathsSync(t,e,"copy");return rr.checkParentPathsSync(t,n,e,"copy"),V0(i,t,e,r)}function V0(t,e,r,n){if(n.filter&&!n.filter(e,r))return;let i=tr.dirname(r);return de.existsSync(i)||z0(i),rc(t,e,r,n)}function rc(t,e,r,n){if(!(n.filter&&!n.filter(e,r)))return K0(t,e,r,n)}function K0(t,e,r,n){let o=(n.dereference?de.statSync:de.lstatSync)(e);if(o.isDirectory())return nm(o,t,e,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Y0(o,t,e,r,n);if(o.isSymbolicLink())return sm(t,e,r,n)}function Y0(t,e,r,n,i){return e?Q0(t,r,n,i):nc(t,r,n,i)}function Q0(t,e,r,n){if(n.overwrite)return de.unlinkSync(r),nc(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function nc(t,e,r,n){return de.copyFileSync(e,r),n.preserveTimestamps&&Z0(t.mode,e,r),Hi(r,t.mode)}function Z0(t,e,r){return em(t)&&tm(r,t),rm(e,r)}function em(t){return(t&128)===0}function tm(t,e){return Hi(t,e|128)}function Hi(t,e){return de.chmodSync(t,e)}function rm(t,e){let r=de.statSync(t);return W0(e,r.atime,r.mtime)}function nm(t,e,r,n,i){if(!e)return im(t.mode,r,n,i);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return ic(r,n,i)}function im(t,e,r,n){return de.mkdirSync(r),ic(e,r,n),Hi(r,t)}function ic(t,e,r){de.readdirSync(t).forEach(n=>om(n,t,e,r))}function om(t,e,r,n){let i=tr.join(e,t),o=tr.join(r,t),{destStat:s}=rr.checkPathsSync(i,o,"copy");return rc(s,i,o,n)}function sm(t,e,r,n){let i=de.readlinkSync(e);if(n.dereference&&(i=tr.resolve(process.cwd(),i)),t){let o;try{o=de.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return de.symlinkSync(i,r);throw s}if(n.dereference&&(o=tr.resolve(process.cwd(),o)),rr.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(de.statSync(r).isDirectory()&&rr.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return am(i,r)}else return de.symlinkSync(i,r)}function am(t,e){return de.unlinkSync(e),de.symlinkSync(t,e)}oc.exports=J0});var Gi=y((e2,ac)=>{"use strict";ac.exports={copySync:sc()}});var Ye=y((t2,cc)=>{"use strict";var um=we().fromPromise,uc=Zt();function cm(t){return uc.access(t).then(()=>!0).catch(()=>!1)}cc.exports={pathExists:um(cm),pathExistsSync:uc.existsSync}});var vc=y((r2,yc)=>{"use strict";var Se=fe(),nr=require("path"),lm=Ne().mkdirs,fm=Ye().pathExists,dm=Bi().utimesMillis,ir=er();function hm(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;
|
|
13
13
|
|
|
14
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`),
|
|
15
|
-
`,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function Wm(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}al.exports={stringify:Gm,stripBom:Wm}});var fl=y((c2,ll)=>{var Rt;try{Rt=fe()}catch{Rt=require("fs")}var cn=we(),{stringify:ul,stripBom:cl}=un();async function zm(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Rt,n="throws"in e?e.throws:!0,i=await cn.fromCallback(r.readFile)(t,e);i=cl(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 Jm=cn.fromPromise(zm);function Vm(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Rt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=cl(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function Km(t,e,r={}){let n=r.fs||Rt,i=ul(e,r);await cn.fromCallback(n.writeFile)(t,i,r)}var Ym=cn.fromPromise(Km);function Qm(t,e,r={}){let n=r.fs||Rt,i=ul(e,r);return n.writeFileSync(t,i,r)}var Zm={readFile:Jm,readFileSync:Vm,writeFile:Ym,writeFileSync:Qm};ll.exports=Zm});var hl=y((l2,dl)=>{"use strict";var ln=fl();dl.exports={readJson:ln.readFile,readJsonSync:ln.readFileSync,writeJson:ln.writeFile,writeJsonSync:ln.writeFileSync}});var fn=y((f2,gl)=>{"use strict";var eg=we().fromCallback,ar=fe(),pl=require("path"),ml=Ne(),tg=Ke().pathExists;function rg(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=pl.dirname(t);tg(i,(s,o)=>{if(s)return n(s);if(o)return ar.writeFile(t,e,r,n);ml.mkdirs(i,a=>{if(a)return n(a);ar.writeFile(t,e,r,n)})})}function ng(t,...e){let r=pl.dirname(t);if(ar.existsSync(r))return ar.writeFileSync(t,...e);ml.mkdirsSync(r),ar.writeFileSync(t,...e)}gl.exports={outputFile:eg(rg),outputFileSync:ng}});var vl=y((d2,yl)=>{"use strict";var{stringify:ig}=un(),{outputFile:sg}=fn();async function og(t,e,r={}){let n=ig(e,r);await sg(t,n,r)}yl.exports=og});var _l=y((h2,bl)=>{"use strict";var{stringify:ag}=un(),{outputFileSync:ug}=fn();function cg(t,e,r){let n=ag(e,r);ug(t,n,r)}bl.exports=cg});var xl=y((p2,wl)=>{"use strict";var lg=we().fromPromise,ve=hl();ve.outputJson=lg(vl());ve.outputJsonSync=_l();ve.outputJSON=ve.outputJson;ve.outputJSONSync=ve.outputJsonSync;ve.writeJSON=ve.writeJson;ve.writeJSONSync=ve.writeJsonSync;ve.readJSON=ve.readJson;ve.readJSONSync=ve.readJsonSync;wl.exports=ve});var Ol=y((m2,Dl)=>{"use strict";var Cl=fe(),fg=require("path"),dg=Hi().copySync,Pl=sr().removeSync,hg=Ne().mkdirpSync,Sl=Zt();function pg(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=Sl.checkPathsSync(t,e,"move");return Sl.checkParentPathsSync(t,i,e,"move"),hg(fg.dirname(e)),mg(t,e,n)}function mg(t,e,r){if(r)return Pl(e),El(t,e,r);if(Cl.existsSync(e))throw new Error("dest already exists.");return El(t,e,r)}function El(t,e,r){try{Cl.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return gg(t,e,r)}}function gg(t,e,r){return dg(t,e,{overwrite:r,errorOnExist:!0}),Pl(t)}Dl.exports=pg});var Il=y((g2,Al)=>{"use strict";Al.exports={moveSync:Ol()}});var ql=y((y2,Ml)=>{"use strict";var yg=fe(),vg=require("path"),bg=Wi().copy,kl=sr().remove,_g=Ne().mkdirp,wg=Ke().pathExists,Rl=Zt();function xg(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;Rl.checkPaths(t,e,"move",(s,o)=>{if(s)return n(s);let{srcStat:a}=o;Rl.checkParentPaths(t,a,e,"move",u=>{if(u)return n(u);_g(vg.dirname(e),h=>h?n(h):Sg(t,e,i,n))})})}function Sg(t,e,r,n){if(r)return kl(e,i=>i?n(i):Fl(t,e,r,n));wg(e,(i,s)=>i?n(i):s?n(new Error("dest already exists.")):Fl(t,e,r,n))}function Fl(t,e,r,n){yg.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Eg(t,e,r,n):n())}function Eg(t,e,r,n){bg(t,e,{overwrite:r,errorOnExist:!0},s=>s?n(s):kl(t,n))}Ml.exports=xg});var Nl=y((v2,Tl)=>{"use strict";var Cg=we().fromCallback;Tl.exports={move:Cg(ql())}});var Ft=y((b2,Ji)=>{"use strict";Ji.exports={...Qt(),...Hi(),...Wi(),...Nc(),...ol(),...xl(),...Ne(),...Il(),...Nl(),...fn(),...Ke(),...sr()};var jl=require("fs");Object.getOwnPropertyDescriptor(jl,"promises")&&Object.defineProperty(Ji.exports,"promises",{get(){return jl.promises}})});var zl=y((w2,Wl)=>{"use strict";Wl.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 Yi=y((x2,Vl)=>{var ur=zl(),Jl={};for(let t of Object.keys(ur))Jl[ur[t]]=t;var A={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"]}};Vl.exports=A;for(let t of Object.keys(A)){if(!("channels"in A[t]))throw new Error("missing channels property: "+t);if(!("labels"in A[t]))throw new Error("missing channel labels property: "+t);if(A[t].labels.length!==A[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=A[t];delete A[t].channels,delete A[t].labels,Object.defineProperty(A[t],"channels",{value:e}),Object.defineProperty(A[t],"labels",{value:r})}A.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,u;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 h=(i+s)/2;return s===i?u=0:h<=.5?u=o/(s+i):u=o/(2-s-i),[a,u*100,h*100]};A.rgb.hsv=function(t){let e,r,n,i,s,o=t[0]/255,a=t[1]/255,u=t[2]/255,h=Math.max(o,a,u),c=h-Math.min(o,a,u),p=function(g){return(h-g)/6/c+1/2};return c===0?(i=0,s=0):(s=c/h,e=p(o),r=p(a),n=p(u),o===h?i=n-r:a===h?i=1/3+e-n:u===h&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,h*100]};A.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=A.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]};A.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 Dg(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}A.rgb.keyword=function(t){let e=Jl[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(ur)){let s=ur[i],o=Dg(t,s);o<r&&(r=o,n=i)}return n};A.keyword.rgb=function(t){return ur[t]};A.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]};A.rgb.lab=function(t){let e=A.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]};A.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,u=[0,0,0];for(let h=0;h<3;h++)s=e+1/3*-(h-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,u[h]=o*255;return u};A.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]};A.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),u=255*n*(1-r*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}};A.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]};A.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 u=r+s*(a-r),h,c,p;switch(o){default:case 6:case 0:h=a,c=u,p=r;break;case 1:h=u,c=a,p=r;break;case 2:h=r,c=a,p=u;break;case 3:h=r,c=u,p=a;break;case 4:h=u,c=r,p=a;break;case 5:h=a,c=r,p=u;break}return[h*255,c*255,p*255]};A.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]};A.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]};A.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]};A.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,u=i**3,h=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o=h>.008856?h:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};A.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]};A.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]};A.rgb.ansi16=function(t,e=null){let[r,n,i]=t,s=e===null?A.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};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.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)};A.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]};A.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]};A.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};A.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]};A.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,u;return o<1?a=s/(1-o):a=0,o<=0?u=0:i===e?u=(r-n)/o%6:i===r?u=2+(n-e)/o:u=4+(e-r)/o,u/=6,u%=1,[u*360,o*100,a*100]};A.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]};A.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]};A.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,u=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 u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};A.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]};A.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]};A.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]};A.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]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=function(t){return[0,0,t[0]]};A.gray.hsv=A.gray.hsl;A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.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};A.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Yl=y((S2,Kl)=>{var pn=Yi();function Og(){let t={},e=Object.keys(pn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Ag(t){let e=Og(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(pn[n]);for(let s=i.length,o=0;o<s;o++){let a=i[o],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}}return e}function Ig(t,e){return function(r){return e(t(r))}}function Rg(t,e){let r=[e[t].parent,t],n=pn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Ig(pn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Kl.exports=function(t){let e=Ag(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]=Rg(o,e))}return r}});var Zl=y((E2,Ql)=>{var Qi=Yi(),Fg=Yl(),kt={},kg=Object.keys(Qi);function Mg(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 qg(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}kg.forEach(t=>{kt[t]={},Object.defineProperty(kt[t],"channels",{value:Qi[t].channels}),Object.defineProperty(kt[t],"labels",{value:Qi[t].labels});let e=Fg(t);Object.keys(e).forEach(n=>{let i=e[n];kt[t][n]=qg(i),kt[t][n].raw=Mg(i)})});Ql.exports=kt});var of=y((C2,sf)=>{"use strict";var ef=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,tf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},rf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},mn=t=>t,nf=(t,e,r)=>[t,e,r],Mt=(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})},Zi,qt=(t,e,r,n)=>{Zi===void 0&&(Zi=Zl());let i=n?10:0,s={};for(let[o,a]of Object.entries(Zi)){let u=o==="ansi16"?"ansi":o;o===e?s[u]=t(r,i):typeof a=="object"&&(s[u]=t(a[e],i))}return s};function Tg(){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",Mt(e.color,"ansi",()=>qt(ef,"ansi16",mn,!1)),Mt(e.color,"ansi256",()=>qt(tf,"ansi256",mn,!1)),Mt(e.color,"ansi16m",()=>qt(rf,"rgb",nf,!1)),Mt(e.bgColor,"ansi",()=>qt(ef,"ansi16",mn,!0)),Mt(e.bgColor,"ansi256",()=>qt(tf,"ansi256",mn,!0)),Mt(e.bgColor,"ansi16m",()=>qt(rf,"rgb",nf,!0)),e}Object.defineProperty(sf,"exports",{enumerable:!0,get:Tg})});var uf=y((P2,af)=>{"use strict";var Ng=(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},jg=(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
|
|
14
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`),ir.checkPaths(t,e,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;ir.checkParentPaths(t,s,e,"copy",u=>u?n(u):r.filter?hc(lc,a,t,e,r,n):lc(a,t,e,r,n))})}function lc(t,e,r,n,i){let o=nr.dirname(r);fm(o,(s,a)=>{if(s)return i(s);if(a)return zi(t,e,r,n,i);lm(o,u=>u?i(u):zi(t,e,r,n,i))})}function hc(t,e,r,n,i,o){Promise.resolve(i.filter(r,n)).then(s=>s?t(e,r,n,i,o):o(),s=>o(s))}function zi(t,e,r,n,i){return n.filter?hc(fc,t,e,r,n,i):fc(t,e,r,n,i)}function fc(t,e,r,n,i){(n.dereference?Se.stat:Se.lstat)(e,(s,a)=>{if(s)return i(s);if(a.isDirectory())return _m(a,t,e,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return pm(a,t,e,r,n,i);if(a.isSymbolicLink())return Sm(t,e,r,n,i)})}function pm(t,e,r,n,i,o){return e?mm(t,r,n,i,o):pc(t,r,n,i,o)}function mm(t,e,r,n,i){if(n.overwrite)Se.unlink(r,o=>o?i(o):pc(t,e,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function pc(t,e,r,n,i){Se.copyFile(e,r,o=>o?i(o):n.preserveTimestamps?gm(t.mode,e,r,i):tn(r,t.mode,i))}function gm(t,e,r,n){return ym(t)?vm(r,t,i=>i?n(i):dc(t,e,r,n)):dc(t,e,r,n)}function ym(t){return(t&128)===0}function vm(t,e,r){return tn(t,e|128,r)}function dc(t,e,r,n){bm(e,r,i=>i?n(i):tn(r,t,n))}function tn(t,e,r){return Se.chmod(t,e,r)}function bm(t,e,r){Se.stat(t,(n,i)=>n?r(n):dm(e,i.atime,i.mtime,r))}function _m(t,e,r,n,i,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):mc(r,n,i,o):wm(t.mode,r,n,i,o)}function wm(t,e,r,n,i){Se.mkdir(r,o=>{if(o)return i(o);mc(e,r,n,s=>s?i(s):tn(r,t,i))})}function mc(t,e,r,n){Se.readdir(t,(i,o)=>i?n(i):gc(o,t,e,r,n))}function gc(t,e,r,n,i){let o=t.pop();return o?xm(t,o,e,r,n,i):i()}function xm(t,e,r,n,i,o){let s=nr.join(r,e),a=nr.join(n,e);ir.checkPaths(s,a,"copy",(u,h)=>{if(u)return o(u);let{destStat:c}=h;zi(c,s,a,i,p=>p?o(p):gc(t,r,n,i,o))})}function Sm(t,e,r,n,i){Se.readlink(e,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=nr.resolve(process.cwd(),s)),t)Se.readlink(r,(a,u)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Se.symlink(s,r,i):i(a):(n.dereference&&(u=nr.resolve(process.cwd(),u)),ir.isSrcSubdir(s,u)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${u}'.`)):t.isDirectory()&&ir.isSrcSubdir(u,s)?i(new Error(`Cannot overwrite '${u}' with '${s}'.`)):Em(s,r,i)));else return Se.symlink(s,r,i)})}function Em(t,e,r){Se.unlink(e,n=>n?r(n):Se.symlink(t,e,r))}yc.exports=hm});var Wi=y((n2,bc)=>{"use strict";var Cm=we().fromCallback;bc.exports={copy:Cm(vc())}});var Oc=y((i2,Dc)=>{"use strict";var _c=fe(),Ec=require("path"),G=require("assert"),or=process.platform==="win32";function Cc(t){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{t[r]=t[r]||_c[r],r=r+"Sync",t[r]=t[r]||_c[r]}),t.maxBusyTries=t.maxBusyTries||3}function Ji(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"),Cc(e),wc(t,e,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<e.maxBusyTries){n++;let s=n*100;return setTimeout(()=>wc(t,e,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function wc(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"&&or)return xc(t,e,n,r);if(i&&i.isDirectory())return rn(t,e,n,r);e.unlink(t,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return or?xc(t,e,o,r):rn(t,e,o,r);if(o.code==="EISDIR")return rn(t,e,o,r)}return r(o)})})}function xc(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,(o,s)=>{o?n(o.code==="ENOENT"?null:r):s.isDirectory()?rn(t,e,r,n):e.unlink(t,n)})})}function Sc(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()?nn(t,e,r):e.unlinkSync(t)}function rn(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")?Pm(t,e,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function Pm(t,e,r){G(t),G(e),G(typeof r=="function"),e.readdir(t,(n,i)=>{if(n)return r(n);let o=i.length,s;if(o===0)return e.rmdir(t,r);i.forEach(a=>{Ji(Ec.join(t,a),e,u=>{if(!s){if(u)return r(s=u);--o===0&&e.rmdir(t,r)}})})})}function Pc(t,e){let r;e=e||{},Cc(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"&&or&&Sc(t,e,n)}try{r&&r.isDirectory()?nn(t,e,null):e.unlinkSync(t)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return or?Sc(t,e,n):nn(t,e,n);if(n.code!=="EISDIR")throw n;nn(t,e,n)}}function nn(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")Dm(t,e);else if(n.code!=="ENOENT")throw n}}function Dm(t,e){if(G(t),G(e),e.readdirSync(t).forEach(r=>Pc(Ec.join(t,r),e)),or){let r=Date.now();do try{return e.rmdirSync(t,e)}catch{}while(Date.now()-r<500)}else return e.rmdirSync(t,e)}Dc.exports=Ji;Ji.sync=Pc});var sr=y((o2,Ic)=>{"use strict";var Om=we().fromCallback,Ac=Oc();Ic.exports={remove:Om(Ac),removeSync:Ac.sync}});var jc=y((s2,Nc)=>{"use strict";var Am=we().fromCallback,kc=fe(),Mc=require("path"),Tc=Ne(),qc=sr(),Rc=Am(function(e,r){r=r||function(){},kc.readdir(e,(n,i)=>{if(n)return Tc.mkdirs(e,r);i=i.map(s=>Mc.join(e,s)),o();function o(){let s=i.pop();if(!s)return r();qc.remove(s,a=>{if(a)return r(a);o()})}})});function Fc(t){let e;try{e=kc.readdirSync(t)}catch{return Tc.mkdirsSync(t)}e.forEach(r=>{r=Mc.join(t,r),qc.removeSync(r)})}Nc.exports={emptyDirSync:Fc,emptydirSync:Fc,emptyDir:Rc,emptydir:Rc}});var Uc=y((a2,Bc)=>{"use strict";var Im=we().fromCallback,Lc=require("path"),Qe=fe(),$c=Ne();function Rm(t,e){function r(){Qe.writeFile(t,"",n=>{if(n)return e(n);e()})}Qe.stat(t,(n,i)=>{if(!n&&i.isFile())return e();let o=Lc.dirname(t);Qe.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?$c.mkdirs(o,u=>{if(u)return e(u);r()}):e(s);a.isDirectory()?r():Qe.readdir(o,u=>{if(u)return e(u)})})})}function Fm(t){let e;try{e=Qe.statSync(t)}catch{}if(e&&e.isFile())return;let r=Lc.dirname(t);try{Qe.statSync(r).isDirectory()||Qe.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")$c.mkdirsSync(r);else throw n}Qe.writeFileSync(t,"")}Bc.exports={createFile:Im(Rm),createFileSync:Fm}});var Wc=y((u2,zc)=>{"use strict";var km=we().fromCallback,Hc=require("path"),lt=fe(),Gc=Ne(),Xc=Ye().pathExists;function Mm(t,e,r){function n(i,o){lt.link(i,o,s=>{if(s)return r(s);r(null)})}Xc(e,(i,o)=>{if(i)return r(i);if(o)return r(null);lt.lstat(t,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=Hc.dirname(e);Xc(a,(u,h)=>{if(u)return r(u);if(h)return n(t,e);Gc.mkdirs(a,c=>{if(c)return r(c);n(t,e)})})})})}function Tm(t,e){if(lt.existsSync(e))return;try{lt.lstatSync(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=Hc.dirname(e);return lt.existsSync(n)||Gc.mkdirsSync(n),lt.linkSync(t,e)}zc.exports={createLink:km(Mm),createLinkSync:Tm}});var Vc=y((c2,Jc)=>{"use strict";var Ze=require("path"),ar=fe(),qm=Ye().pathExists;function Nm(t,e,r){if(Ze.isAbsolute(t))return ar.lstat(t,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:t,toDst:t}));{let n=Ze.dirname(e),i=Ze.join(n,t);return qm(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:t}):ar.lstat(t,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:t,toDst:Ze.relative(n,t)})))}}function jm(t,e){let r;if(Ze.isAbsolute(t)){if(r=ar.existsSync(t),!r)throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}else{let n=Ze.dirname(e),i=Ze.join(n,t);if(r=ar.existsSync(i),r)return{toCwd:i,toDst:t};if(r=ar.existsSync(t),!r)throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:Ze.relative(n,t)}}}Jc.exports={symlinkPaths:Nm,symlinkPathsSync:jm}});var Qc=y((l2,Yc)=>{"use strict";var Kc=fe();function Lm(t,e,r){if(r=typeof e=="function"?e:r,e=typeof e=="function"?!1:e,e)return r(null,e);Kc.lstat(t,(n,i)=>{if(n)return r(null,"file");e=i&&i.isDirectory()?"dir":"file",r(null,e)})}function $m(t,e){let r;if(e)return e;try{r=Kc.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Yc.exports={symlinkType:Lm,symlinkTypeSync:$m}});var ol=y((f2,il)=>{"use strict";var Bm=we().fromCallback,el=require("path"),Rt=fe(),tl=Ne(),Um=tl.mkdirs,Xm=tl.mkdirsSync,rl=Vc(),Hm=rl.symlinkPaths,Gm=rl.symlinkPathsSync,nl=Qc(),zm=nl.symlinkType,Wm=nl.symlinkTypeSync,Zc=Ye().pathExists;function Jm(t,e,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,Zc(e,(i,o)=>{if(i)return n(i);if(o)return n(null);Hm(t,e,(s,a)=>{if(s)return n(s);t=a.toDst,zm(a.toCwd,r,(u,h)=>{if(u)return n(u);let c=el.dirname(e);Zc(c,(p,g)=>{if(p)return n(p);if(g)return Rt.symlink(t,e,h,n);Um(c,m=>{if(m)return n(m);Rt.symlink(t,e,h,n)})})})})})}function Vm(t,e,r){if(Rt.existsSync(e))return;let i=Gm(t,e);t=i.toDst,r=Wm(i.toCwd,r);let o=el.dirname(e);return Rt.existsSync(o)||Xm(o),Rt.symlinkSync(t,e,r)}il.exports={createSymlink:Bm(Jm),createSymlinkSync:Vm}});var al=y((d2,sl)=>{"use strict";var on=Uc(),sn=Wc(),an=ol();sl.exports={createFile:on.createFile,createFileSync:on.createFileSync,ensureFile:on.createFile,ensureFileSync:on.createFileSync,createLink:sn.createLink,createLinkSync:sn.createLinkSync,ensureLink:sn.createLink,ensureLinkSync:sn.createLinkSync,createSymlink:an.createSymlink,createSymlinkSync:an.createSymlinkSync,ensureSymlink:an.createSymlink,ensureSymlinkSync:an.createSymlinkSync}});var un=y((h2,ul)=>{function Km(t,{EOL:e=`
|
|
15
|
+
`,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+o}function Ym(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}ul.exports={stringify:Km,stripBom:Ym}});var dl=y((p2,fl)=>{var Ft;try{Ft=fe()}catch{Ft=require("fs")}var cn=we(),{stringify:cl,stripBom:ll}=un();async function Qm(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Ft,n="throws"in e?e.throws:!0,i=await cn.fromCallback(r.readFile)(t,e);i=ll(i);let o;try{o=JSON.parse(i,e?e.reviver:null)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}return o}var Zm=cn.fromPromise(Qm);function eg(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Ft,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=ll(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function tg(t,e,r={}){let n=r.fs||Ft,i=cl(e,r);await cn.fromCallback(n.writeFile)(t,i,r)}var rg=cn.fromPromise(tg);function ng(t,e,r={}){let n=r.fs||Ft,i=cl(e,r);return n.writeFileSync(t,i,r)}var ig={readFile:Zm,readFileSync:eg,writeFile:rg,writeFileSync:ng};fl.exports=ig});var pl=y((m2,hl)=>{"use strict";var ln=dl();hl.exports={readJson:ln.readFile,readJsonSync:ln.readFileSync,writeJson:ln.writeFile,writeJsonSync:ln.writeFileSync}});var fn=y((g2,yl)=>{"use strict";var og=we().fromCallback,ur=fe(),ml=require("path"),gl=Ne(),sg=Ye().pathExists;function ag(t,e,r,n){typeof r=="function"&&(n=r,r="utf8");let i=ml.dirname(t);sg(i,(o,s)=>{if(o)return n(o);if(s)return ur.writeFile(t,e,r,n);gl.mkdirs(i,a=>{if(a)return n(a);ur.writeFile(t,e,r,n)})})}function ug(t,...e){let r=ml.dirname(t);if(ur.existsSync(r))return ur.writeFileSync(t,...e);gl.mkdirsSync(r),ur.writeFileSync(t,...e)}yl.exports={outputFile:og(ag),outputFileSync:ug}});var bl=y((y2,vl)=>{"use strict";var{stringify:cg}=un(),{outputFile:lg}=fn();async function fg(t,e,r={}){let n=cg(e,r);await lg(t,n,r)}vl.exports=fg});var wl=y((v2,_l)=>{"use strict";var{stringify:dg}=un(),{outputFileSync:hg}=fn();function pg(t,e,r){let n=dg(e,r);hg(t,n,r)}_l.exports=pg});var Sl=y((b2,xl)=>{"use strict";var mg=we().fromPromise,ve=pl();ve.outputJson=mg(bl());ve.outputJsonSync=wl();ve.outputJSON=ve.outputJson;ve.outputJSONSync=ve.outputJsonSync;ve.writeJSON=ve.writeJson;ve.writeJSONSync=ve.writeJsonSync;ve.readJSON=ve.readJson;ve.readJSONSync=ve.readJsonSync;xl.exports=ve});var Al=y((_2,Ol)=>{"use strict";var Pl=fe(),gg=require("path"),yg=Gi().copySync,Dl=sr().removeSync,vg=Ne().mkdirpSync,El=er();function bg(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=El.checkPathsSync(t,e,"move");return El.checkParentPathsSync(t,i,e,"move"),vg(gg.dirname(e)),_g(t,e,n)}function _g(t,e,r){if(r)return Dl(e),Cl(t,e,r);if(Pl.existsSync(e))throw new Error("dest already exists.");return Cl(t,e,r)}function Cl(t,e,r){try{Pl.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return wg(t,e,r)}}function wg(t,e,r){return yg(t,e,{overwrite:r,errorOnExist:!0}),Dl(t)}Ol.exports=bg});var Rl=y((w2,Il)=>{"use strict";Il.exports={moveSync:Al()}});var ql=y((x2,Tl)=>{"use strict";var xg=fe(),Sg=require("path"),Eg=Wi().copy,Ml=sr().remove,Cg=Ne().mkdirp,Pg=Ye().pathExists,Fl=er();function Dg(t,e,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;Fl.checkPaths(t,e,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;Fl.checkParentPaths(t,a,e,"move",u=>{if(u)return n(u);Cg(Sg.dirname(e),h=>h?n(h):Og(t,e,i,n))})})}function Og(t,e,r,n){if(r)return Ml(e,i=>i?n(i):kl(t,e,r,n));Pg(e,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):kl(t,e,r,n))}function kl(t,e,r,n){xg.rename(t,e,i=>i?i.code!=="EXDEV"?n(i):Ag(t,e,r,n):n())}function Ag(t,e,r,n){Eg(t,e,{overwrite:r,errorOnExist:!0},o=>o?n(o):Ml(t,n))}Tl.exports=Dg});var jl=y((S2,Nl)=>{"use strict";var Ig=we().fromCallback;Nl.exports={move:Ig(ql())}});var ft=y((E2,Vi)=>{"use strict";Vi.exports={...Zt(),...Gi(),...Wi(),...jc(),...al(),...Sl(),...Ne(),...Rl(),...jl(),...fn(),...Ye(),...sr()};var Ll=require("fs");Object.getOwnPropertyDescriptor(Ll,"promises")&&Object.defineProperty(Vi.exports,"promises",{get(){return Ll.promises}})});var Jl=y((P2,Wl)=>{"use strict";Wl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Qi=y((D2,Kl)=>{var cr=Jl(),Vl={};for(let t of Object.keys(cr))Vl[cr[t]]=t;var O={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"]}};Kl.exports=O;for(let t of Object.keys(O)){if(!("channels"in O[t]))throw new Error("missing channels property: "+t);if(!("labels"in O[t]))throw new Error("missing channel labels property: "+t);if(O[t].labels.length!==O[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=O[t];delete O[t].channels,delete O[t].labels,Object.defineProperty(O[t],"channels",{value:e}),Object.defineProperty(O[t],"labels",{value:r})}O.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=o-i,a,u;o===i?a=0:e===o?a=(r-n)/s:r===o?a=2+(n-e)/s:n===o&&(a=4+(e-r)/s),a=Math.min(a*60,360),a<0&&(a+=360);let h=(i+o)/2;return o===i?u=0:h<=.5?u=s/(o+i):u=s/(2-o-i),[a,u*100,h*100]};O.rgb.hsv=function(t){let e,r,n,i,o,s=t[0]/255,a=t[1]/255,u=t[2]/255,h=Math.max(s,a,u),c=h-Math.min(s,a,u),p=function(g){return(h-g)/6/c+1/2};return c===0?(i=0,o=0):(o=c/h,e=p(s),r=p(a),n=p(u),s===h?i=n-r:a===h?i=1/3+e-n:u===h&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,h*100]};O.rgb.hwb=function(t){let e=t[0],r=t[1],n=t[2],i=O.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(r,n));return n=1-1/255*Math.max(e,Math.max(r,n)),[i,o*100,n*100]};O.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n),o=(1-e-i)/(1-i)||0,s=(1-r-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function Fg(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}O.rgb.keyword=function(t){let e=Vl[t];if(e)return e;let r=1/0,n;for(let i of Object.keys(cr)){let o=cr[i],s=Fg(t,o);s<r&&(r=s,n=i)}return n};O.keyword.rgb=function(t){return cr[t]};O.rgb.xyz=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+r*.3576+n*.1805,o=e*.2126+r*.7152+n*.0722,s=e*.0193+r*.1192+n*.9505;return[i*100,o*100,s*100]};O.rgb.lab=function(t){let e=O.rgb.xyz(t),r=e[0],n=e[1],i=e[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-i);return[o,s,a]};O.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i,o,s;if(r===0)return s=n*255,[s,s,s];n<.5?i=n*(1+r):i=n+r-n*r;let a=2*n-i,u=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,u[h]=s*255;return u};O.hsl.hsv=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+r)/2,a=n===0?2*i/(o+i):2*r/(n+r);return[e,a*100,s*100]};O.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,n=t[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-r),a=255*n*(1-r*o),u=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,u,s];case 1:return[a,n,s];case 2:return[s,n,u];case 3:return[s,a,n];case 4:return[u,s,n];case 5:return[n,s,a]}};O.hsv.hsl=function(t){let e=t[0],r=t[1]/100,n=t[2]/100,i=Math.max(n,.01),o,s;s=(2-r)*n;let a=(2-r)*i;return o=r*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};O.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100,i=r+n,o;i>1&&(r/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,s&1&&(o=1-o);let u=r+o*(a-r),h,c,p;switch(s){default:case 6:case 0:h=a,c=u,p=r;break;case 1:h=u,c=a,p=r;break;case 2:h=r,c=a,p=u;break;case 3:h=r,c=u,p=a;break;case 4:h=u,c=r,p=a;break;case 5:h=a,c=r,p=u;break}return[h*255,c*255,p*255]};O.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,r*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};O.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,n=t[2]/100,i,o,s;return i=e*3.2406+r*-1.5372+n*-.4986,o=e*-.9689+r*1.8758+n*.0415,s=e*.0557+r*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};O.xyz.lab=function(t){let e=t[0],r=t[1],n=t[2];e/=95.047,r/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*r-16,o=500*(e-r),s=200*(r-n);return[i,o,s]};O.lab.xyz=function(t){let e=t[0],r=t[1],n=t[2],i,o,s;o=(e+16)/116,i=r/500+o,s=o-n/200;let a=o**3,u=i**3,h=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,s=h>.008856?h:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};O.lab.lch=function(t){let e=t[0],r=t[1],n=t[2],i;i=Math.atan2(n,r)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(r*r+n*n);return[e,s,i]};O.lch.lab=function(t){let e=t[0],r=t[1],i=t[2]/360*2*Math.PI,o=r*Math.cos(i),s=r*Math.sin(i);return[e,o,s]};O.rgb.ansi16=function(t,e=null){let[r,n,i]=t,o=e===null?O.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(s+=60),s};O.hsv.ansi16=function(t){return O.rgb.ansi16(O.hsv.rgb(t),t[2])};O.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)};O.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,n=(e&1)*r*255,i=(e>>1&1)*r*255,o=(e>>2&1)*r*255;return[n,i,o]};O.ansi256.rgb=function(t){if(t>=232){let o=(t-232)*10+8;return[o,o,o]}t-=16;let e,r=Math.floor(t/36)/5*255,n=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[r,n,i]};O.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};O.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};O.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.max(Math.max(e,r),n),o=Math.min(Math.min(e,r),n),s=i-o,a,u;return s<1?a=o/(1-s):a=0,s<=0?u=0:i===e?u=(r-n)/s%6:i===r?u=2+(n-e)/s:u=4+(e-r)/s,u/=6,u%=1,[u*360,s*100,a*100]};O.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]};O.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]};O.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,n=t[2]/100;if(r===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,u=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return u=(1-r)*n,[(r*i[0]+u)*255,(r*i[1]+u)*255,(r*i[2]+u)*255]};O.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]};O.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]};O.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]};O.hwb.hcg=function(t){let e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],i*100,o*100]};O.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};O.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};O.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};O.gray.hsl=function(t){return[0,0,t[0]]};O.gray.hsv=O.gray.hsl;O.gray.hwb=function(t){return[0,100,t[0]]};O.gray.cmyk=function(t){return[0,0,0,t[0]]};O.gray.lab=function(t){return[t[0],0,0]};O.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};O.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var Ql=y((O2,Yl)=>{var pn=Qi();function kg(){let t={},e=Object.keys(pn);for(let r=e.length,n=0;n<r;n++)t[e[n]]={distance:-1,parent:null};return t}function Mg(t){let e=kg(),r=[t];for(e[t].distance=0;r.length;){let n=r.pop(),i=Object.keys(pn[n]);for(let o=i.length,s=0;s<o;s++){let a=i[s],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,r.unshift(a))}}return e}function Tg(t,e){return function(r){return e(t(r))}}function qg(t,e){let r=[e[t].parent,t],n=pn[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)r.unshift(e[i].parent),n=Tg(pn[e[i].parent][i],n),i=e[i].parent;return n.conversion=r,n}Yl.exports=function(t){let e=Mg(t),r={},n=Object.keys(e);for(let i=n.length,o=0;o<i;o++){let s=n[o];e[s].parent!==null&&(r[s]=qg(s,e))}return r}});var ef=y((A2,Zl)=>{var Zi=Qi(),Ng=Ql(),kt={},jg=Object.keys(Zi);function Lg(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 $g(t){let e=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let i=t(r);if(typeof i=="object")for(let o=i.length,s=0;s<o;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}jg.forEach(t=>{kt[t]={},Object.defineProperty(kt[t],"channels",{value:Zi[t].channels}),Object.defineProperty(kt[t],"labels",{value:Zi[t].labels});let e=Ng(t);Object.keys(e).forEach(n=>{let i=e[n];kt[t][n]=$g(i),kt[t][n].raw=Lg(i)})});Zl.exports=kt});var af=y((I2,sf)=>{"use strict";var tf=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,rf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};5;${n}m`},nf=(t,e)=>(...r)=>{let n=t(...r);return`\x1B[${38+e};2;${n[0]};${n[1]};${n[2]}m`},mn=t=>t,of=(t,e,r)=>[t,e,r],Mt=(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})},eo,Tt=(t,e,r,n)=>{eo===void 0&&(eo=ef());let i=n?10:0,o={};for(let[s,a]of Object.entries(eo)){let u=s==="ansi16"?"ansi":s;s===e?o[u]=t(r,i):typeof a=="object"&&(o[u]=t(a[e],i))}return o};function Bg(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,n]of Object.entries(e)){for(let[i,o]of Object.entries(n))e[i]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[i]=e[i],t.set(o[0],o[1]);Object.defineProperty(e,r,{value:n,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Mt(e.color,"ansi",()=>Tt(tf,"ansi16",mn,!1)),Mt(e.color,"ansi256",()=>Tt(rf,"ansi256",mn,!1)),Mt(e.color,"ansi16m",()=>Tt(nf,"rgb",of,!1)),Mt(e.bgColor,"ansi",()=>Tt(tf,"ansi16",mn,!0)),Mt(e.bgColor,"ansi256",()=>Tt(rf,"ansi256",mn,!0)),Mt(e.bgColor,"ansi16m",()=>Tt(nf,"rgb",of,!0)),e}Object.defineProperty(sf,"exports",{enumerable:!0,get:Bg})});var cf=y((R2,uf)=>{"use strict";var Ug=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;let i=e.length,o=0,s="";do s+=t.substr(o,n-o)+e+r,o=n+i,n=t.indexOf(e,o);while(n!==-1);return s+=t.substr(o),s},Xg=(t,e,r,n)=>{let i=0,o="";do{let s=t[n-1]==="\r";o+=t.substr(i,(s?n-1:n)-i)+e+(s?`\r
|
|
16
16
|
`:`
|
|
17
17
|
`)+r,i=n+1,n=t.indexOf(`
|
|
18
|
-
`,i)}while(n!==-1);return
|
|
19
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function
|
|
20
|
-
`);return s!==-1&&(e=Wg(e,i,n,s)),n+e+i},es,vf=(t,...e)=>{let[r]=e;if(!gn(r)||!gn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let s=1;s<r.length;s++)i.push(String(n[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return es===void 0&&(es=hf()),es(t,i.join(""))};Object.defineProperties(yn.prototype,Tt);var bn=yn();bn.supportsColor=ts;bn.stderr=yn({level:rs?rs.level:0});bn.stderr.supportsColor=rs;bf.exports=bn});var wf=y((ss,os)=>{(function(t,e){typeof ss=="object"&&typeof os<"u"?os.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(ss,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,f){if(l=l||"",f=f||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,f);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=f.format||d.format,this._gradientType=f.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 f=this.toRgb();return(f.r*299+f.g*587+f.b*114)/1e3},getLuminance:function(){var f=this.toRgb(),d,v,S,x,B,H;return d=f.r/255,v=f.g/255,S=f.b/255,d<=.03928?x=d/12.92:x=Math.pow((d+.055)/1.055,2.4),v<=.03928?B=v/12.92:B=Math.pow((v+.055)/1.055,2.4),S<=.03928?H=S/12.92:H=Math.pow((S+.055)/1.055,2.4),.2126*x+.7152*B+.0722*H},setAlpha:function(f){return this._a=$(f),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var f=u(this._r,this._g,this._b);return{h:f.h*360,s:f.s,v:f.v,a:this._a}},toHsvString:function(){var f=u(this._r,this._g,this._b),d=Math.round(f.h*360),v=Math.round(f.s*100),S=Math.round(f.v*100);return this._a==1?"hsv("+d+", "+v+"%, "+S+"%)":"hsva("+d+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var f=o(this._r,this._g,this._b);return{h:f.h*360,s:f.s,l:f.l,a:this._a}},toHslString:function(){var f=o(this._r,this._g,this._b),d=Math.round(f.h*360),v=Math.round(f.s*100),S=Math.round(f.l*100);return this._a==1?"hsl("+d+", "+v+"%, "+S+"%)":"hsla("+d+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(f){return c(this._r,this._g,this._b,f)},toHexString:function(f){return"#"+this.toHex(f)},toHex8:function(f){return p(this._r,this._g,this._b,this._a,f)},toHex8String:function(f){return"#"+this.toHex8(f)},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(R(this._r,255)*100)+"%",g:Math.round(R(this._g,255)*100)+"%",b:Math.round(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%)":"rgba("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:w[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(f){var d="#"+g(this._r,this._g,this._b,this._a),v=d,S=this._gradientType?"GradientType = 1, ":"";if(f){var x=n(f);v="#"+g(x._r,x._g,x._b,x._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+d+",endColorstr="+v+")"},toString:function(f){var d=!!f;f=f||this._format;var v=!1,S=this._a<1&&this._a>=0,x=!d&&S&&(f==="hex"||f==="hex6"||f==="hex3"||f==="hex4"||f==="hex8"||f==="name");return x?f==="name"&&this._a===0?this.toName():this.toRgbString():(f==="rgb"&&(v=this.toRgbString()),f==="prgb"&&(v=this.toPercentageRgbString()),(f==="hex"||f==="hex6")&&(v=this.toHexString()),f==="hex3"&&(v=this.toHexString(!0)),f==="hex4"&&(v=this.toHex8String(!0)),f==="hex8"&&(v=this.toHex8String()),f==="name"&&(v=this.toName()),f==="hsl"&&(v=this.toHslString()),f==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(f,d){var v=f.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(I,arguments)},brighten:function(){return this._applyModification(F,arguments)},darken:function(){return this._applyModification(L,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(C,arguments)},spin:function(){return this._applyModification(U,arguments)},_applyCombination:function(f,d){return f.apply(null,[this].concat([].slice.call(d)))},analogous:function(){return this._applyCombination(_e,arguments)},complement:function(){return this._applyCombination(X,arguments)},monochromatic:function(){return this._applyCombination(Z,arguments)},splitcomplement:function(){return this._applyCombination(ne,arguments)},triad:function(){return this._applyCombination(z,[3])},tetrad:function(){return this._applyCombination(z,[4])}},n.fromRatio=function(l,f){if(t(l)=="object"){var d={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?d[v]=l[v]:d[v]=k(l[v]));l=d}return n(l,f)};function i(l){var f={r:0,g:0,b:0},d=1,v=null,S=null,x=null,B=!1,H=!1;return typeof l=="string"&&(l=We(l)),t(l)=="object"&&(he(l.r)&&he(l.g)&&he(l.b)?(f=s(l.r,l.g,l.b),B=!0,H=String(l.r).substr(-1)==="%"?"prgb":"rgb"):he(l.h)&&he(l.s)&&he(l.v)?(v=k(l.s),S=k(l.v),f=h(l.h,v,S),B=!0,H="hsv"):he(l.h)&&he(l.s)&&he(l.l)&&(v=k(l.s),x=k(l.l),f=a(l.h,v,x),B=!0,H="hsl"),l.hasOwnProperty("a")&&(d=l.a)),d=$(d),{ok:B,format:l.format||H,r:Math.min(255,Math.max(f.r,0)),g:Math.min(255,Math.max(f.g,0)),b:Math.min(255,Math.max(f.b,0)),a:d}}function s(l,f,d){return{r:R(l,255)*255,g:R(f,255)*255,b:R(d,255)*255}}function o(l,f,d){l=R(l,255),f=R(f,255),d=R(d,255);var v=Math.max(l,f,d),S=Math.min(l,f,d),x,B,H=(v+S)/2;if(v==S)x=B=0;else{var V=v-S;switch(B=H>.5?V/(2-v-S):V/(v+S),v){case l:x=(f-d)/V+(f<d?6:0);break;case f:x=(d-l)/V+2;break;case d:x=(l-f)/V+4;break}x/=6}return{h:x,s:B,l:H}}function a(l,f,d){var v,S,x;l=R(l,360),f=R(f,100),d=R(d,100);function B(Ie,Xt,Me){return Me<0&&(Me+=1),Me>1&&(Me-=1),Me<1/6?Ie+(Xt-Ie)*6*Me:Me<1/2?Xt:Me<2/3?Ie+(Xt-Ie)*(2/3-Me)*6:Ie}if(f===0)v=S=x=d;else{var H=d<.5?d*(1+f):d+f-d*f,V=2*d-H;v=B(V,H,l+1/3),S=B(V,H,l),x=B(V,H,l-1/3)}return{r:v*255,g:S*255,b:x*255}}function u(l,f,d){l=R(l,255),f=R(f,255),d=R(d,255);var v=Math.max(l,f,d),S=Math.min(l,f,d),x,B,H=v,V=v-S;if(B=v===0?0:V/v,v==S)x=0;else{switch(v){case l:x=(f-d)/V+(f<d?6:0);break;case f:x=(d-l)/V+2;break;case d:x=(l-f)/V+4;break}x/=6}return{h:x,s:B,v:H}}function h(l,f,d){l=R(l,360)*6,f=R(f,100),d=R(d,100);var v=Math.floor(l),S=l-v,x=d*(1-f),B=d*(1-S*f),H=d*(1-(1-S)*f),V=v%6,Ie=[d,B,x,x,H,d][V],Xt=[H,d,d,B,x,x][V],Me=[x,x,H,d,d,B][V];return{r:Ie*255,g:Xt*255,b:Me*255}}function c(l,f,d,v){var S=[P(Math.round(l).toString(16)),P(Math.round(f).toString(16)),P(Math.round(d).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,f,d,v,S){var x=[P(Math.round(l).toString(16)),P(Math.round(f).toString(16)),P(Math.round(d).toString(16)),P(ie(v))];return S&&x[0].charAt(0)==x[0].charAt(1)&&x[1].charAt(0)==x[1].charAt(1)&&x[2].charAt(0)==x[2].charAt(1)&&x[3].charAt(0)==x[3].charAt(1)?x[0].charAt(0)+x[1].charAt(0)+x[2].charAt(0)+x[3].charAt(0):x.join("")}function g(l,f,d,v){var S=[P(ie(v)),P(Math.round(l).toString(16)),P(Math.round(f).toString(16)),P(Math.round(d).toString(16))];return S.join("")}n.equals=function(l,f){return!l||!f?!1:n(l).toRgbString()==n(f).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.s-=f/100,d.s=j(d.s),n(d)}function b(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.s+=f/100,d.s=j(d.s),n(d)}function C(l){return n(l).desaturate(100)}function I(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.l+=f/100,d.l=j(d.l),n(d)}function F(l,f){f=f===0?0:f||10;var d=n(l).toRgb();return d.r=Math.max(0,Math.min(255,d.r-Math.round(255*-(f/100)))),d.g=Math.max(0,Math.min(255,d.g-Math.round(255*-(f/100)))),d.b=Math.max(0,Math.min(255,d.b-Math.round(255*-(f/100)))),n(d)}function L(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.l-=f/100,d.l=j(d.l),n(d)}function U(l,f){var d=n(l).toHsl(),v=(d.h+f)%360;return d.h=v<0?360+v:v,n(d)}function X(l){var f=n(l).toHsl();return f.h=(f.h+180)%360,n(f)}function z(l,f){if(isNaN(f)||f<=0)throw new Error("Argument to polyad must be a positive number");for(var d=n(l).toHsl(),v=[n(l)],S=360/f,x=1;x<f;x++)v.push(n({h:(d.h+x*S)%360,s:d.s,l:d.l}));return v}function ne(l){var f=n(l).toHsl(),d=f.h;return[n(l),n({h:(d+72)%360,s:f.s,l:f.l}),n({h:(d+216)%360,s:f.s,l:f.l})]}function _e(l,f,d){f=f||6,d=d||30;var v=n(l).toHsl(),S=360/d,x=[n(l)];for(v.h=(v.h-(S*f>>1)+720)%360;--f;)v.h=(v.h+S)%360,x.push(n(v));return x}function Z(l,f){f=f||6;for(var d=n(l).toHsv(),v=d.h,S=d.s,x=d.v,B=[],H=1/f;f--;)B.push(n({h:v,s:S,v:x})),x=(x+H)%1;return B}n.mix=function(l,f,d){d=d===0?0:d||50;var v=n(l).toRgb(),S=n(f).toRgb(),x=d/100,B={r:(S.r-v.r)*x+v.r,g:(S.g-v.g)*x+v.g,b:(S.b-v.b)*x+v.b,a:(S.a-v.a)*x+v.a};return n(B)},n.readability=function(l,f){var d=n(l),v=n(f);return(Math.max(d.getLuminance(),v.getLuminance())+.05)/(Math.min(d.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,f,d){var v=n.readability(l,f),S,x;switch(x=!1,S=pe(d),S.level+S.size){case"AAsmall":case"AAAlarge":x=v>=4.5;break;case"AAlarge":x=v>=3;break;case"AAAsmall":x=v>=7;break}return x},n.mostReadable=function(l,f,d){var v=null,S=0,x,B,H,V;d=d||{},B=d.includeFallbackColors,H=d.level,V=d.size;for(var Ie=0;Ie<f.length;Ie++)x=n.readability(l,f[Ie]),x>S&&(S=x,v=n(f[Ie]));return n.isReadable(l,v,{level:H,size:V})||!B?v:(d.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],d))};var _=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"},w=n.hexNames=E(_);function E(l){var f={};for(var d in l)l.hasOwnProperty(d)&&(f[l[d]]=d);return f}function $(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function R(l,f){N(l)&&(l="100%");var d=M(l);return l=Math.min(f,Math.max(0,parseFloat(l))),d&&(l=parseInt(l*f,10)/100),Math.abs(l-f)<1e-6?1:l%f/parseFloat(f)}function j(l){return Math.min(1,Math.max(0,l))}function D(l){return parseInt(l,16)}function N(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 k(l){return l<=1&&(l=l*100+"%"),l}function ie(l){return Math.round(parseFloat(l)*255).toString(16)}function Ae(l){return D(l)/255}var J=function(){var l="[-\\+]?\\d+%?",f="[-\\+]?\\d*\\.\\d+%?",d="(?:"+f+")|(?:"+l+")",v="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?",S="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?";return{CSS_UNIT:new RegExp(d),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 he(l){return!!J.CSS_UNIT.exec(l)}function We(l){l=l.replace(e,"").replace(r,"").toLowerCase();var f=!1;if(_[l])l=_[l],f=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var d;return(d=J.rgb.exec(l))?{r:d[1],g:d[2],b:d[3]}:(d=J.rgba.exec(l))?{r:d[1],g:d[2],b:d[3],a:d[4]}:(d=J.hsl.exec(l))?{h:d[1],s:d[2],l:d[3]}:(d=J.hsla.exec(l))?{h:d[1],s:d[2],l:d[3],a:d[4]}:(d=J.hsv.exec(l))?{h:d[1],s:d[2],v:d[3]}:(d=J.hsva.exec(l))?{h:d[1],s:d[2],v:d[3],a:d[4]}:(d=J.hex8.exec(l))?{r:D(d[1]),g:D(d[2]),b:D(d[3]),a:Ae(d[4]),format:f?"name":"hex8"}:(d=J.hex6.exec(l))?{r:D(d[1]),g:D(d[2]),b:D(d[3]),format:f?"name":"hex"}:(d=J.hex4.exec(l))?{r:D(d[1]+""+d[1]),g:D(d[2]+""+d[2]),b:D(d[3]+""+d[3]),a:Ae(d[4]+""+d[4]),format:f?"name":"hex8"}:(d=J.hex3.exec(l))?{r:D(d[1]+""+d[1]),g:D(d[2]+""+d[2]),b:D(d[3]+""+d[3]),format:f?"name":"hex"}:!1}function pe(l){var f,d;return l=l||{level:"AA",size:"small"},f=(l.level||"AA").toUpperCase(),d=(l.size||"small").toLowerCase(),f!=="AA"&&f!=="AAA"&&(f="AA"),d!=="small"&&d!=="large"&&(d="small"),{level:f,size:d}}return n})});var Of=y((A2,Df)=>{var lr=wf(),Cf={r:256,g:256,b:256,a:1},Pf={h:360,s:1,v:1,a:1};function us(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 cs(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 as(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),s=us(n,i,r),o=[t.color];for(let a=1;a<r;a++){let u=cs(s,n,a,Cf);o.push(lr(u))}return o}function xf(t,e,r,n){let i=t.color.toHsv(),s=e.color.toHsv();if(i.s===0||s.s===0)return as(t,e,r);let o;if(typeof n=="boolean")o=n;else{let c=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;o=n==="long"&&c||n==="short"&&!c}let a=us(i,s,r),u=[t.color],h;i.h<=s.h&&!o||i.h>=s.h&&o?h=s.h-i.h:o?h=360-s.h+i.h:h=360-i.h+s.h,a.h=Math.pow(-1,o?1:0)*Math.abs(h)/r;for(let c=1;c<r;c++){let p=cs(a,i,c,Pf);u.push(lr(p))}return u}function Sf(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 Ef(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,s;for(let u=0,h=t.length;u<h-1;u++)if(e>=t[u].pos&&e<t[u+1].pos){i=t[u],s=t[u+1];break}i||(i=s=t[t.length-1]);let o=us(i.color[r](),s.color[r](),(s.pos-i.pos)*100),a=cs(o,i.color[r](),(e-i.pos)*100,n);return lr(a)}var Nt=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 u=o.pos!==void 0;if(r^u)throw new Error("Cannot mix positionned and not posionned color stops");if(u){let h=o.color!==void 0;if(!h&&(s||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!h,o={color:h?lr(o.color):null,colorLess:!h,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:lr(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 Nt(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 Nt(e.concat(r.reverse()))}rgb(e){let r=Sf(this.stops,e),n=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=as(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=as(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=Sf(this.stops,e),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=xf(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=xf(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 Ef(this.stops,e,"toRgb",Cf)}hsvAt(e){return Ef(this.stops,e,"toHsv",Pf)}};Df.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 Nt(t)}});var kf=y((I2,_n)=>{"use strict";var If=_f(),Vg=Of(),Af=/\s/g;function ls(...t){let e=Vg.apply(this,t),r=(n,i)=>Kg(n?n.toString():"",e,i);return r.multiline=(n,i)=>Yg(n?n.toString():"",e,i),r}var Rf=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function Kg(t,e,r){let n=Ff(r),i=Math.max(t.replace(Af,"").length,e.stops.length),s=Rf(e,n,i),o="";for(let a of t)o+=a.match(Af)?a:If.hex(s.shift().toHex())(a);return o}function Yg(t,e,r){let n=Ff(r),i=t.split(`
|
|
21
|
-
`),
|
|
22
|
-
`)}function
|
|
23
|
-
`,this.pretty=!0,(0,An.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,An.isUndefined)(e.indent)||(this.indent=e.indent),(0,An.isUndefined)(e.newline)||(this.newline=e.newline),(0,An.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();In.StringOptions=Ny});var Rn=y(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function jy(t){return t.replace(/&/g,"&")}ke.escapeAmpersands=jy;function Ly(t){return t.replace(/</g,"<")}ke.escapeLeftAngleBrackets=Ly;function $y(t){return t.replace(/]]>/g,"]]>")}ke.escapeRightAngleBracketsInCdataTerminator=$y;function By(t){return t.replace(/'/g,"'")}ke.escapeSingleQuotes=By;function Uy(t){return t.replace(/"/g,""")}ke.escapeDoubleQuotes=Uy});var js=y(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var Xy=ue(),bd=Rn(),Ts=Q(),Hy=function(){function t(e,r,n){this._validation=r,(0,Ts.isUndefined)(n.replaceInvalidCharsInCharData)?this._replaceInvalidCharsInCharData=!1:this._replaceInvalidCharsInCharData=n.replaceInvalidCharsInCharData,this._parent=e,this.charData=n.charData}return Object.defineProperty(t.prototype,"charData",{get:function(){return this._charData},set:function(e){if(this._replaceInvalidCharsInCharData)e=(0,Ts.fixChar)(e);else if(this._validation&&!(0,Ts.validateChar)(e))throw new Error((0,Xy.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,bd.escapeAmpersands)(e),e=(0,bd.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();Ns.default=Hy});var Fn=y(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var _d=ue(),wd=Q(),Gy=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,wd.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,wd.validateSingleChar)(e))throw new Error((0,_d.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,_d.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}();Ls.default=Gy});var kn=y($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Wy=ue(),zy=Q(),Jy=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,zy.validateName)(e))throw new Error((0,Wy.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}();$s.default=Jy});var Mn=y(pr=>{"use strict";var Xs=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,"__esModule",{value:!0});var Bs=ue(),xd=Rn(),Vy=Lt(),Us=Q(),Ky=Xs(js()),Yy=Xs(Fn()),Qy=Xs(kn()),Zy=function(){function t(e,r,n){this._validation=r,(0,Us.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,Us.fixName)(e),e.length===0)throw new Error((0,Bs.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,Us.validateName)(e))throw e.length===0?new Error((0,Bs.getContext)(this.up())+": attribute name should not be empty"):new Error((0,Bs.getContext)(this.up())+": attribute name"+(' "'+e+'" should not contain characters not')+" allowed in XML names");this._name=e},enumerable:!1,configurable:!0}),t.prototype.charRef=function(e){var r=new Yy.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Qy.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new Ky.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new Vy.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,xd.escapeDoubleQuotes)(a.toString()):i+=(0,xd.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();pr.default=Zy});var Gs=y(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});var ev=ue(),tv=Q(),rv=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,tv.validateChar)(e))throw new Error((0,ev.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}();Hs.default=rv});var zs=y(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});var nv=ue(),iv=Q(),sv=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,iv.validateChar)(e))throw new Error((0,nv.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}();Ws.default=sv});var Vs=y(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var ov=ue(),av=Q(),uv=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,av.validateChar)(e))throw new Error((0,ov.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}();Js.default=uv});var Ys=y(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});var cv=ue(),lv=Q(),fv=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,lv.validateChar)(e))throw new Error((0,cv.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}();Ks.default=fv});var Zs=y(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});var dv=ue(),hv=Q(),pv=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,hv.validateName)(e))throw new Error((0,dv.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}();Qs.default=pv});var mr=y(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var qn=ue(),Tn=Q(),mv=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,Tn.isUndefined)(e)){if(this._validation&&!(0,Tn.validateChar)(e))throw new Error((0,qn.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,qn.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,Tn.validateName)(e))throw new Error((0,qn.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,qn.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,Tn.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();eo.default=mv});var Nn=y(ht=>{"use strict";var pt=ht&&ht.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ht,"__esModule",{value:!0});ht.validatePubId=void 0;var rt=ue(),gv=Lt(),Be=Q(),yv=pt(gr()),vv=pt(Gs()),bv=pt(zs()),_v=pt(Vs()),wv=pt(Ys()),xv=pt(Zs()),Sv=pt(mr()),Ev=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,Be.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Be.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,Be.validateName)(e))throw new Error((0,rt.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,Be.isUndefined)(e)){if(this._validation&&!Sd(e))throw new Error((0,rt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Be.isUndefined)(this._sysId))throw new Error((0,rt.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,Be.isUndefined)(e)){if(this._validation&&!(0,Be.validateChar)(e))throw new Error((0,rt.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,rt.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 vv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new yv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new _v.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new wv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new xv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Sv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new gv.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Be.isUndefined)(this._pubId))(0,Be.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Be.isUndefined)(this._sysId))throw new Error((0,rt.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,rt.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,rt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();ht.default=Ev;function Sd(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}ht.validatePubId=Sd});var no=y(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var Ed=ue(),to=Q(),Cv=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,Ed.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,Ed.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}();ro.default=Cv});var ao=y(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var Pv=ue(),io=Rn(),so=Q(),Dv=function(){function t(e,r,n){this._validation=r,(0,so.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,so.fixChar)(e);else if(this._validation&&!(0,so.validateChar)(e))throw new Error((0,Pv.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,io.escapeAmpersands)(e),e=(0,io.escapeLeftAngleBrackets)(e),e=(0,io.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();oo.default=Dv});var Bn=y(br=>{"use strict";var mt=br&&br.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(br,"__esModule",{value:!0});var jn=ue(),Ov=Lt(),yr=Q(),Cd=mt(Mn()),Av=mt(no()),vr=mt(ao()),Ln=mt(Fn()),Iv=mt(gr()),$n=mt(kn()),Rv=mt(mr()),Fv=function(){function t(e,r,n){this._validation=r,(0,yr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,yr.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,yr.fixName)(e),e.length===0)throw new Error((0,jn.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,yr.validateName)(e))throw e.length===0?new Error((0,jn.getContext)(this.up())+": element name should not be empty"):new Error((0,jn.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,jn.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Cd.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new Av.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new vr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new Ln.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Iv.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 $n.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Rv.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 Ov.StringOptions(e),i=r+n.indent,s="<"+this._name,o=[],a=0,u=this._children;a<u.length;a++){var h=u[a];h instanceof Cd.default?s+=" "+h.toString(e):o.push(h)}if(o.length>0){for(var c="",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 vr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(o)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),c+=m)}n.pretty&&(this.allSameLineNodes(o)||(c+=n.newline+r)),c.length===0&&this._useSelfClosingTagIfEmpty?s+="/>":s+=">"+c+"</"+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 Ln.default||i instanceof $n.default||i instanceof vr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Ln.default||e instanceof $n.default||e instanceof vr.default)&&!(0,yr.isUndefined)(r)&&(r instanceof Ln.default||r instanceof $n.default||r instanceof vr.default)},t}();br.default=Fv});var ue=y($t=>{"use strict";var Xn=$t&&$t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($t,"__esModule",{value:!0});$t.getContext=void 0;var kv=Xn(Mn()),Mv=Xn(Hn()),qv=Xn(Nn()),Tv=Xn(Bn());function Un(t){if(t instanceof kv.default)return Un(t.up())+(' > attribute "'+t.name+'"');if(t instanceof Mv.default)return"in XML document";if(t instanceof qv.default)return Un(t.up())+" > DTD";if(t instanceof Tv.default)return Un(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}$t.getContext=Un});var gr=y(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});var uo=ue(),co=Q(),Nv=function(){function t(e,r,n){this._validation=r,(0,co.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,co.fixChar)(e);else if(this._validation&&!(0,co.validateChar)(e))throw new Error((0,uo.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,uo.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,uo.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=Nv});var po=y(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});var fo=ue(),jv=Lt(),_r=Q(),Lv=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,_r.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,_r.isUndefined)(e)&&!$v(e))throw new Error((0,fo.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,_r.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,fo.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&&!Bv(e))throw new Error((0,fo.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 jv.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,_r.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,_r.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();ho.default=Lv;function $v(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 Bv(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var Hn=y(xr=>{"use strict";var Sr=xr&&xr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xr,"__esModule",{value:!0});var Uv=Lt(),Xv=Q(),Hv=Sr(gr()),Pd=Sr(po()),Dd=Sr(Nn()),wr=Sr(Bn()),Gv=Sr(mr()),Wv=function(){function t(e){this._children=[],this._validation=(0,Xv.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new Hv.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 Pd.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 wr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Dd.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 wr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new wr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new Gv.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(h){return h instanceof wr.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 Uv.StringOptions(e),i="",s=0,o=this._children;s<o.length;s++){var a=o[s];a instanceof Pd.default||a instanceof Dd.default||a instanceof wr.default?i+=a.toString(e):i+=a.toString(),n.pretty&&(i+=n.newline)}var u=i.length-n.newline.length;return i.substr(u)===n.newline&&(i=i.substr(0,u)),i},t}();xr.default=Wv});var Od=y(q=>{"use strict";var te=q&&q.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(q,"__esModule",{value:!0});q.document=q.XmlProcInst=q.XmlEntityRef=q.XmlElement=q.XmlDtdParamEntityRef=q.XmlDtdNotation=q.XmlDtdEntity=q.XmlDtdElement=q.XmlDtdAttlist=q.XmlDtd=q.XmlDocument=q.XmlDecl=q.XmlComment=q.XmlCharRef=q.XmlCharData=q.XmlCdata=q.XmlAttributeText=q.XmlAttribute=void 0;var zv=te(Hn()),Jv=Mn();Object.defineProperty(q,"XmlAttribute",{enumerable:!0,get:function(){return te(Jv).default}});var Vv=js();Object.defineProperty(q,"XmlAttributeText",{enumerable:!0,get:function(){return te(Vv).default}});var Kv=no();Object.defineProperty(q,"XmlCdata",{enumerable:!0,get:function(){return te(Kv).default}});var Yv=ao();Object.defineProperty(q,"XmlCharData",{enumerable:!0,get:function(){return te(Yv).default}});var Qv=Fn();Object.defineProperty(q,"XmlCharRef",{enumerable:!0,get:function(){return te(Qv).default}});var Zv=gr();Object.defineProperty(q,"XmlComment",{enumerable:!0,get:function(){return te(Zv).default}});var e1=po();Object.defineProperty(q,"XmlDecl",{enumerable:!0,get:function(){return te(e1).default}});var t1=Hn();Object.defineProperty(q,"XmlDocument",{enumerable:!0,get:function(){return te(t1).default}});var r1=Nn();Object.defineProperty(q,"XmlDtd",{enumerable:!0,get:function(){return te(r1).default}});var n1=Gs();Object.defineProperty(q,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(n1).default}});var i1=zs();Object.defineProperty(q,"XmlDtdElement",{enumerable:!0,get:function(){return te(i1).default}});var s1=Vs();Object.defineProperty(q,"XmlDtdEntity",{enumerable:!0,get:function(){return te(s1).default}});var o1=Ys();Object.defineProperty(q,"XmlDtdNotation",{enumerable:!0,get:function(){return te(o1).default}});var a1=Zs();Object.defineProperty(q,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(a1).default}});var u1=Bn();Object.defineProperty(q,"XmlElement",{enumerable:!0,get:function(){return te(u1).default}});var c1=kn();Object.defineProperty(q,"XmlEntityRef",{enumerable:!0,get:function(){return te(c1).default}});var l1=mr();Object.defineProperty(q,"XmlProcInst",{enumerable:!0,get:function(){return te(l1).default}});function f1(t){return t===void 0&&(t={}),new zv.default(t)}q.document=f1});var mo=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 Ad(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=Ad;function Id(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=Id;function d1(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=d1;function h1(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=h1;function Rd(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=Rd;function p1(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=p1;function m1(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=m1;function g1(t){return!Ad(t)&&!Id(t)&&Rd(t?.toString)&&(t=t.toString()),String(t)}re.stringify=g1});var Nd=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.WrapHandlers=Ce.TypeHandlers=Ce.FormatOptions=Ce.DtdOptions=Ce.DeclarationOptions=Ce.Options=void 0;var Le=mo(),y1=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,Le.isUndefined)(e.validation)||(this.validation=e.validation),(0,Le.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Le.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Le.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Le.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Fd(e.declaration),this.dtd=new kd(this.validation,e.dtd),this.format=new Md(e.format),(0,Le.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new qd(e.typeHandlers),(0,Le.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Le.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new Td(e.wrapHandlers)}return t}();Ce.Options=y1;var Fd=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Le.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ce.DeclarationOptions=Fd;var kd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Le.isUndefined)(r.include)||(this.include=r.include),e&&(0,Le.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}();Ce.DtdOptions=kd;var Md=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}();Ce.FormatOptions=Md;var qd=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}();Ce.TypeHandlers=qd;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}();Ce.WrapHandlers=Td});var Xd=y(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.parse=nt.parseToExistingElement=nt.Absent=void 0;var Ld=Od(),$d=Nd(),K=mo(),go=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();nt.Absent=go;function yo(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 Bd(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 Ld.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 v1(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Bd((0,K.stringify)(e),i,n)}function jd(t,e,r,n){if(t===n.aliasString){r.name=(0,K.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,K.isObject)(e)){for(var i=0,s=Object.keys(e);i<s.length;i++){var o=s[i];v1(o,(0,K.stringify)(e[o]),r,n)}return}if(t.indexOf(n.valueString)===0){Gn(t,(0,K.stringify)(e),r,n);return}var a=r;if(!(0,K.isArray)(e)&&!(0,K.isSet)(e)){var u=yo(e,n);if(!(0,K.isUndefined)(u)&&u(e)===go.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Gn(t,e,a,n)}function b1(t,e,r){if((0,K.isMap)(t))t.forEach(function(o,a){jd((0,K.stringify)(a),o,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];jd(s,t[s],e,r)}}function _1(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,K.isUndefined)(i)){var a=i(s,e);(0,K.isNull)(a)||(s=a,o=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(u){var h=o;if(!(0,K.isArray)(u)&&!(0,K.isSet)(u)){var c=yo(u,n);if(!(0,K.isUndefined)(c)&&c(u)===go.instance)return;h=o.element({name:s,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Gn(s,u,h,n)})}function Gn(t,e,r,n){var i=yo(e,n);if((0,K.isUndefined)(i)||(e=i(e)),(0,K.isObject)(e)||(0,K.isMap)(e)){b1(e,r,n);return}if((0,K.isArray)(e)||(0,K.isSet)(e)){_1(t,e,r,n);return}Bd((0,K.stringify)(e),r,n)}function Ud(t,e,r){var n=new $d.Options(r);Gn(t.name,e,t,n)}nt.parseToExistingElement=Ud;function w1(t,e,r){var n=new $d.Options(r),i=new Ld.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 Ud(s,e,r),i.toString(n.format)}nt.parse=w1});var Ou=T(Si()),Au=T(Yt()),Ai=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,Ou.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(Au.default.red(`
|
|
18
|
+
`,i)}while(n!==-1);return o+=t.substr(i),o};uf.exports={stringReplaceAll:Ug,stringEncaseCRLFWithFirstIndex:Xg}});var pf=y((F2,hf)=>{"use strict";var Hg=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,lf=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Gg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,zg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Wg=new Map([["n",`
|
|
19
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function df(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)):Wg.get(t)||t}function Jg(t,e){let r=[],n=e.trim().split(/\s*,\s*/g),i;for(let o of n){let s=Number(o);if(!Number.isNaN(s))r.push(s);else if(i=o.match(Gg))r.push(i[2].replace(zg,(a,u,h)=>u?df(u):h));else throw new Error(`Invalid Chalk template style argument: ${o} (in style '${t}')`)}return r}function Vg(t){lf.lastIndex=0;let e=[],r;for(;(r=lf.exec(t))!==null;){let n=r[1];if(r[2]){let i=Jg(n,r[2]);e.push([n].concat(i))}else e.push([n])}return e}function ff(t,e){let r={};for(let i of e)for(let o of i.styles)r[o[0]]=i.inverse?null:o.slice(1);let n=t;for(let[i,o]of Object.entries(r))if(Array.isArray(o)){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);n=o.length>0?n[i](...o):n[i]}return n}hf.exports=(t,e)=>{let r=[],n=[],i=[];if(e.replace(Hg,(o,s,a,u,h,c)=>{if(s)i.push(df(s));else if(u){let p=i.join("");i=[],n.push(r.length===0?p:ff(t,r)(p)),r.push({inverse:a,styles:Vg(u)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(ff(t,r)(i.join(""))),i=[],r.pop()}else i.push(c)}),n.push(i.join("")),r.length>0){let o=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(o)}return n.join("")}});var wf=y((k2,_f)=>{"use strict";var lr=af(),{stdout:ro,stderr:no}=si(),{stringReplaceAll:Kg,stringEncaseCRLFWithFirstIndex:Yg}=cf(),{isArray:gn}=Array,gf=["ansi","ansi","ansi256","ansi16m"],qt=Object.create(null),Qg=(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=ro?ro.level:0;t.level=e.level===void 0?r:e.level},io=class{constructor(e){return yf(e)}},yf=t=>{let e={};return Qg(e,t),e.template=(...r)=>bf(e.template,...r),Object.setPrototypeOf(e,yn.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=io,e.template};function yn(t){return yf(t)}for(let[t,e]of Object.entries(lr))qt[t]={get(){let r=vn(this,oo(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};qt.visible={get(){let t=vn(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var vf=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of vf)qt[t]={get(){let{level:e}=this;return function(...r){let n=oo(lr.color[gf[e]][t](...r),lr.color.close,this._styler);return vn(this,n,this._isEmpty)}}};for(let t of vf){let e="bg"+t[0].toUpperCase()+t.slice(1);qt[e]={get(){let{level:r}=this;return function(...n){let i=oo(lr.bgColor[gf[r]][t](...n),lr.bgColor.close,this._styler);return vn(this,i,this._isEmpty)}}}}var Zg=Object.defineProperties(()=>{},{...qt,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),oo=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},vn=(t,e,r)=>{let n=(...i)=>gn(i[0])&&gn(i[0].raw)?mf(n,bf(n,...i)):mf(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Zg),n._generator=t,n._styler=e,n._isEmpty=r,n},mf=(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=Kg(e,r.close,r.open),r=r.parent;let o=e.indexOf(`
|
|
20
|
+
`);return o!==-1&&(e=Yg(e,i,n,o)),n+e+i},to,bf=(t,...e)=>{let[r]=e;if(!gn(r)||!gn(r.raw))return e.join(" ");let n=e.slice(1),i=[r.raw[0]];for(let o=1;o<r.length;o++)i.push(String(n[o-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[o]));return to===void 0&&(to=pf()),to(t,i.join(""))};Object.defineProperties(yn.prototype,qt);var bn=yn();bn.supportsColor=ro;bn.stderr=yn({level:no?no.level:0});bn.stderr.supportsColor=no;_f.exports=bn});var xf=y((so,ao)=>{(function(t,e){typeof so=="object"&&typeof ao<"u"?ao.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.tinycolor=e())})(so,function(){"use strict";function t(l){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},t(l)}var e=/^\s+/,r=/\s+$/;function n(l,f){if(l=l||"",f=f||{},l instanceof n)return l;if(!(this instanceof n))return new n(l,f);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=f.format||d.format,this._gradientType=f.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 f=this.toRgb();return(f.r*299+f.g*587+f.b*114)/1e3},getLuminance:function(){var f=this.toRgb(),d,v,S,x,B,H;return d=f.r/255,v=f.g/255,S=f.b/255,d<=.03928?x=d/12.92:x=Math.pow((d+.055)/1.055,2.4),v<=.03928?B=v/12.92:B=Math.pow((v+.055)/1.055,2.4),S<=.03928?H=S/12.92:H=Math.pow((S+.055)/1.055,2.4),.2126*x+.7152*B+.0722*H},setAlpha:function(f){return this._a=$(f),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var f=u(this._r,this._g,this._b);return{h:f.h*360,s:f.s,v:f.v,a:this._a}},toHsvString:function(){var f=u(this._r,this._g,this._b),d=Math.round(f.h*360),v=Math.round(f.s*100),S=Math.round(f.v*100);return this._a==1?"hsv("+d+", "+v+"%, "+S+"%)":"hsva("+d+", "+v+"%, "+S+"%, "+this._roundA+")"},toHsl:function(){var f=s(this._r,this._g,this._b);return{h:f.h*360,s:f.s,l:f.l,a:this._a}},toHslString:function(){var f=s(this._r,this._g,this._b),d=Math.round(f.h*360),v=Math.round(f.s*100),S=Math.round(f.l*100);return this._a==1?"hsl("+d+", "+v+"%, "+S+"%)":"hsla("+d+", "+v+"%, "+S+"%, "+this._roundA+")"},toHex:function(f){return c(this._r,this._g,this._b,f)},toHexString:function(f){return"#"+this.toHex(f)},toHex8:function(f){return p(this._r,this._g,this._b,this._a,f)},toHex8String:function(f){return"#"+this.toHex8(f)},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(R(this._r,255)*100)+"%",g:Math.round(R(this._g,255)*100)+"%",b:Math.round(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%)":"rgba("+Math.round(R(this._r,255)*100)+"%, "+Math.round(R(this._g,255)*100)+"%, "+Math.round(R(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:w[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(f){var d="#"+g(this._r,this._g,this._b,this._a),v=d,S=this._gradientType?"GradientType = 1, ":"";if(f){var x=n(f);v="#"+g(x._r,x._g,x._b,x._a)}return"progid:DXImageTransform.Microsoft.gradient("+S+"startColorstr="+d+",endColorstr="+v+")"},toString:function(f){var d=!!f;f=f||this._format;var v=!1,S=this._a<1&&this._a>=0,x=!d&&S&&(f==="hex"||f==="hex6"||f==="hex3"||f==="hex4"||f==="hex8"||f==="name");return x?f==="name"&&this._a===0?this.toName():this.toRgbString():(f==="rgb"&&(v=this.toRgbString()),f==="prgb"&&(v=this.toPercentageRgbString()),(f==="hex"||f==="hex6")&&(v=this.toHexString()),f==="hex3"&&(v=this.toHexString(!0)),f==="hex4"&&(v=this.toHex8String(!0)),f==="hex8"&&(v=this.toHex8String()),f==="name"&&(v=this.toName()),f==="hsl"&&(v=this.toHslString()),f==="hsv"&&(v=this.toHsvString()),v||this.toHexString())},clone:function(){return n(this.toString())},_applyModification:function(f,d){var v=f.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(A,arguments)},brighten:function(){return this._applyModification(F,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(C,arguments)},spin:function(){return this._applyModification(U,arguments)},_applyCombination:function(f,d){return f.apply(null,[this].concat([].slice.call(d)))},analogous:function(){return this._applyCombination(_e,arguments)},complement:function(){return this._applyCombination(X,arguments)},monochromatic:function(){return this._applyCombination(Z,arguments)},splitcomplement:function(){return this._applyCombination(ne,arguments)},triad:function(){return this._applyCombination(W,[3])},tetrad:function(){return this._applyCombination(W,[4])}},n.fromRatio=function(l,f){if(t(l)=="object"){var d={};for(var v in l)l.hasOwnProperty(v)&&(v==="a"?d[v]=l[v]:d[v]=k(l[v]));l=d}return n(l,f)};function i(l){var f={r:0,g:0,b:0},d=1,v=null,S=null,x=null,B=!1,H=!1;return typeof l=="string"&&(l=We(l)),t(l)=="object"&&(he(l.r)&&he(l.g)&&he(l.b)?(f=o(l.r,l.g,l.b),B=!0,H=String(l.r).substr(-1)==="%"?"prgb":"rgb"):he(l.h)&&he(l.s)&&he(l.v)?(v=k(l.s),S=k(l.v),f=h(l.h,v,S),B=!0,H="hsv"):he(l.h)&&he(l.s)&&he(l.l)&&(v=k(l.s),x=k(l.l),f=a(l.h,v,x),B=!0,H="hsl"),l.hasOwnProperty("a")&&(d=l.a)),d=$(d),{ok:B,format:l.format||H,r:Math.min(255,Math.max(f.r,0)),g:Math.min(255,Math.max(f.g,0)),b:Math.min(255,Math.max(f.b,0)),a:d}}function o(l,f,d){return{r:R(l,255)*255,g:R(f,255)*255,b:R(d,255)*255}}function s(l,f,d){l=R(l,255),f=R(f,255),d=R(d,255);var v=Math.max(l,f,d),S=Math.min(l,f,d),x,B,H=(v+S)/2;if(v==S)x=B=0;else{var V=v-S;switch(B=H>.5?V/(2-v-S):V/(v+S),v){case l:x=(f-d)/V+(f<d?6:0);break;case f:x=(d-l)/V+2;break;case d:x=(l-f)/V+4;break}x/=6}return{h:x,s:B,l:H}}function a(l,f,d){var v,S,x;l=R(l,360),f=R(f,100),d=R(d,100);function B(Ie,Ht,Me){return Me<0&&(Me+=1),Me>1&&(Me-=1),Me<1/6?Ie+(Ht-Ie)*6*Me:Me<1/2?Ht:Me<2/3?Ie+(Ht-Ie)*(2/3-Me)*6:Ie}if(f===0)v=S=x=d;else{var H=d<.5?d*(1+f):d+f-d*f,V=2*d-H;v=B(V,H,l+1/3),S=B(V,H,l),x=B(V,H,l-1/3)}return{r:v*255,g:S*255,b:x*255}}function u(l,f,d){l=R(l,255),f=R(f,255),d=R(d,255);var v=Math.max(l,f,d),S=Math.min(l,f,d),x,B,H=v,V=v-S;if(B=v===0?0:V/v,v==S)x=0;else{switch(v){case l:x=(f-d)/V+(f<d?6:0);break;case f:x=(d-l)/V+2;break;case d:x=(l-f)/V+4;break}x/=6}return{h:x,s:B,v:H}}function h(l,f,d){l=R(l,360)*6,f=R(f,100),d=R(d,100);var v=Math.floor(l),S=l-v,x=d*(1-f),B=d*(1-S*f),H=d*(1-(1-S)*f),V=v%6,Ie=[d,B,x,x,H,d][V],Ht=[H,d,d,B,x,x][V],Me=[x,x,H,d,d,B][V];return{r:Ie*255,g:Ht*255,b:Me*255}}function c(l,f,d,v){var S=[P(Math.round(l).toString(16)),P(Math.round(f).toString(16)),P(Math.round(d).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,f,d,v,S){var x=[P(Math.round(l).toString(16)),P(Math.round(f).toString(16)),P(Math.round(d).toString(16)),P(ie(v))];return S&&x[0].charAt(0)==x[0].charAt(1)&&x[1].charAt(0)==x[1].charAt(1)&&x[2].charAt(0)==x[2].charAt(1)&&x[3].charAt(0)==x[3].charAt(1)?x[0].charAt(0)+x[1].charAt(0)+x[2].charAt(0)+x[3].charAt(0):x.join("")}function g(l,f,d,v){var S=[P(ie(v)),P(Math.round(l).toString(16)),P(Math.round(f).toString(16)),P(Math.round(d).toString(16))];return S.join("")}n.equals=function(l,f){return!l||!f?!1:n(l).toRgbString()==n(f).toRgbString()},n.random=function(){return n.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function m(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.s-=f/100,d.s=j(d.s),n(d)}function b(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.s+=f/100,d.s=j(d.s),n(d)}function C(l){return n(l).desaturate(100)}function A(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.l+=f/100,d.l=j(d.l),n(d)}function F(l,f){f=f===0?0:f||10;var d=n(l).toRgb();return d.r=Math.max(0,Math.min(255,d.r-Math.round(255*-(f/100)))),d.g=Math.max(0,Math.min(255,d.g-Math.round(255*-(f/100)))),d.b=Math.max(0,Math.min(255,d.b-Math.round(255*-(f/100)))),n(d)}function N(l,f){f=f===0?0:f||10;var d=n(l).toHsl();return d.l-=f/100,d.l=j(d.l),n(d)}function U(l,f){var d=n(l).toHsl(),v=(d.h+f)%360;return d.h=v<0?360+v:v,n(d)}function X(l){var f=n(l).toHsl();return f.h=(f.h+180)%360,n(f)}function W(l,f){if(isNaN(f)||f<=0)throw new Error("Argument to polyad must be a positive number");for(var d=n(l).toHsl(),v=[n(l)],S=360/f,x=1;x<f;x++)v.push(n({h:(d.h+x*S)%360,s:d.s,l:d.l}));return v}function ne(l){var f=n(l).toHsl(),d=f.h;return[n(l),n({h:(d+72)%360,s:f.s,l:f.l}),n({h:(d+216)%360,s:f.s,l:f.l})]}function _e(l,f,d){f=f||6,d=d||30;var v=n(l).toHsl(),S=360/d,x=[n(l)];for(v.h=(v.h-(S*f>>1)+720)%360;--f;)v.h=(v.h+S)%360,x.push(n(v));return x}function Z(l,f){f=f||6;for(var d=n(l).toHsv(),v=d.h,S=d.s,x=d.v,B=[],H=1/f;f--;)B.push(n({h:v,s:S,v:x})),x=(x+H)%1;return B}n.mix=function(l,f,d){d=d===0?0:d||50;var v=n(l).toRgb(),S=n(f).toRgb(),x=d/100,B={r:(S.r-v.r)*x+v.r,g:(S.g-v.g)*x+v.g,b:(S.b-v.b)*x+v.b,a:(S.a-v.a)*x+v.a};return n(B)},n.readability=function(l,f){var d=n(l),v=n(f);return(Math.max(d.getLuminance(),v.getLuminance())+.05)/(Math.min(d.getLuminance(),v.getLuminance())+.05)},n.isReadable=function(l,f,d){var v=n.readability(l,f),S,x;switch(x=!1,S=pe(d),S.level+S.size){case"AAsmall":case"AAAlarge":x=v>=4.5;break;case"AAlarge":x=v>=3;break;case"AAAsmall":x=v>=7;break}return x},n.mostReadable=function(l,f,d){var v=null,S=0,x,B,H,V;d=d||{},B=d.includeFallbackColors,H=d.level,V=d.size;for(var Ie=0;Ie<f.length;Ie++)x=n.readability(l,f[Ie]),x>S&&(S=x,v=n(f[Ie]));return n.isReadable(l,v,{level:H,size:V})||!B?v:(d.includeFallbackColors=!1,n.mostReadable(l,["#fff","#000"],d))};var _=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"},w=n.hexNames=E(_);function E(l){var f={};for(var d in l)l.hasOwnProperty(d)&&(f[l[d]]=d);return f}function $(l){return l=parseFloat(l),(isNaN(l)||l<0||l>1)&&(l=1),l}function R(l,f){L(l)&&(l="100%");var d=M(l);return l=Math.min(f,Math.max(0,parseFloat(l))),d&&(l=parseInt(l*f,10)/100),Math.abs(l-f)<1e-6?1:l%f/parseFloat(f)}function j(l){return Math.min(1,Math.max(0,l))}function I(l){return parseInt(l,16)}function L(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 k(l){return l<=1&&(l=l*100+"%"),l}function ie(l){return Math.round(parseFloat(l)*255).toString(16)}function Ae(l){return I(l)/255}var J=function(){var l="[-\\+]?\\d+%?",f="[-\\+]?\\d*\\.\\d+%?",d="(?:"+f+")|(?:"+l+")",v="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?",S="[\\s|\\(]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")[,|\\s]+("+d+")\\s*\\)?";return{CSS_UNIT:new RegExp(d),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 he(l){return!!J.CSS_UNIT.exec(l)}function We(l){l=l.replace(e,"").replace(r,"").toLowerCase();var f=!1;if(_[l])l=_[l],f=!0;else if(l=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var d;return(d=J.rgb.exec(l))?{r:d[1],g:d[2],b:d[3]}:(d=J.rgba.exec(l))?{r:d[1],g:d[2],b:d[3],a:d[4]}:(d=J.hsl.exec(l))?{h:d[1],s:d[2],l:d[3]}:(d=J.hsla.exec(l))?{h:d[1],s:d[2],l:d[3],a:d[4]}:(d=J.hsv.exec(l))?{h:d[1],s:d[2],v:d[3]}:(d=J.hsva.exec(l))?{h:d[1],s:d[2],v:d[3],a:d[4]}:(d=J.hex8.exec(l))?{r:I(d[1]),g:I(d[2]),b:I(d[3]),a:Ae(d[4]),format:f?"name":"hex8"}:(d=J.hex6.exec(l))?{r:I(d[1]),g:I(d[2]),b:I(d[3]),format:f?"name":"hex"}:(d=J.hex4.exec(l))?{r:I(d[1]+""+d[1]),g:I(d[2]+""+d[2]),b:I(d[3]+""+d[3]),a:Ae(d[4]+""+d[4]),format:f?"name":"hex8"}:(d=J.hex3.exec(l))?{r:I(d[1]+""+d[1]),g:I(d[2]+""+d[2]),b:I(d[3]+""+d[3]),format:f?"name":"hex"}:!1}function pe(l){var f,d;return l=l||{level:"AA",size:"small"},f=(l.level||"AA").toUpperCase(),d=(l.size||"small").toLowerCase(),f!=="AA"&&f!=="AAA"&&(f="AA"),d!=="small"&&d!=="large"&&(d="small"),{level:f,size:d}}return n})});var Af=y((M2,Of)=>{var fr=xf(),Pf={r:256,g:256,b:256,a:1},Df={h:360,s:1,v:1,a:1};function co(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 lo(t,e,r,n){let i={};for(let o in e)e.hasOwnProperty(o)&&(i[o]=t[o]*r+e[o],i[o]=i[o]<0?i[o]+n[o]:n[o]!==1?i[o]%n[o]:i[o]);return i}function uo(t,e,r){let n=t.color.toRgb(),i=e.color.toRgb(),o=co(n,i,r),s=[t.color];for(let a=1;a<r;a++){let u=lo(o,n,a,Pf);s.push(fr(u))}return s}function Sf(t,e,r,n){let i=t.color.toHsv(),o=e.color.toHsv();if(i.s===0||o.s===0)return uo(t,e,r);let s;if(typeof n=="boolean")s=n;else{let c=i.h<o.h&&o.h-i.h<180||i.h>o.h&&i.h-o.h>180;s=n==="long"&&c||n==="short"&&!c}let a=co(i,o,r),u=[t.color],h;i.h<=o.h&&!s||i.h>=o.h&&s?h=o.h-i.h:s?h=360-o.h+i.h:h=360-i.h+o.h,a.h=Math.pow(-1,s?1:0)*Math.abs(h)/r;for(let c=1;c<r;c++){let p=lo(a,i,c,Df);u.push(fr(p))}return u}function Ef(t,e){let r=t.length;if(e=parseInt(e,10),isNaN(e)||e<2)throw new Error("Invalid number of steps (< 2)");if(e<r)throw new Error("Number of steps cannot be inferior to number of stops");let n=[];for(let o=1;o<r;o++){let s=(e-1)*(t[o].pos-t[o-1].pos);n.push(Math.max(1,Math.round(s)))}let i=1;for(let o=r-1;o--;)i+=n[o];for(;i!==e;)if(i<e){let o=Math.min.apply(null,n);n[n.indexOf(o)]++,i++}else{let o=Math.max.apply(null,n);n[n.indexOf(o)]--,i--}return n}function Cf(t,e,r,n){if(e<0||e>1)throw new Error("Position must be between 0 and 1");let i,o;for(let u=0,h=t.length;u<h-1;u++)if(e>=t[u].pos&&e<t[u+1].pos){i=t[u],o=t[u+1];break}i||(i=o=t[t.length-1]);let s=co(i.color[r](),o.color[r](),(o.pos-i.pos)*100),a=lo(s,i.color[r](),(e-i.pos)*100,n);return fr(a)}var Nt=class{constructor(e){if(e.length<2)throw new Error("Invalid number of stops (< 2)");let r=e[0].pos!==void 0,n=e.length,i=-1,o=!1;this.stops=e.map((s,a)=>{let u=s.pos!==void 0;if(r^u)throw new Error("Cannot mix positionned and not posionned color stops");if(u){let h=s.color!==void 0;if(!h&&(o||a===0||a===n-1))throw new Error("Cannot define two consecutive position-only stops");if(o=!h,s={color:h?fr(s.color):null,colorLess:!h,pos:s.pos},s.pos<0||s.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(s.pos<i)throw new Error("Color stops positions are not ordered");i=s.pos}else s={color:fr(s.color!==void 0?s.color:s),pos:a/(n-1)};return s}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),n++),this.stops[n-1].pos!==1&&this.stops.push({color:this.stops[n-1].color,pos:1})}reverse(){let e=[];return this.stops.forEach(function(r){e.push({color:r.color,pos:1-r.pos})}),new Nt(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 Nt(e.concat(r.reverse()))}rgb(e){let r=Ef(this.stops,e),n=[];this.stops.forEach((i,o)=>{i.colorLess&&(i.color=uo(this.stops[o-1],this.stops[o+1],2)[1])});for(let i=0,o=this.stops.length;i<o-1;i++){let s=uo(this.stops[i],this.stops[i+1],r[i]);n.splice(n.length,0,...s)}return n.push(this.stops[this.stops.length-1].color),n}hsv(e,r){let n=Ef(this.stops,e),i=[];this.stops.forEach((o,s)=>{o.colorLess&&(o.color=Sf(this.stops[s-1],this.stops[s+1],2,r)[1])});for(let o=0,s=this.stops.length;o<s-1;o++){let a=Sf(this.stops[o],this.stops[o+1],n[o],r);i.splice(i.length,0,...a)}return i.push(this.stops[this.stops.length-1].color),i}css(e,r){e=e||"linear",r=r||(e==="linear"?"to right":"ellipse at center");let n=e+"-gradient("+r;return this.stops.forEach(function(i){n+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),n+=")",n}rgbAt(e){return Cf(this.stops,e,"toRgb",Pf)}hsvAt(e){return Cf(this.stops,e,"toHsv",Df)}};Of.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 Nt(t)}});var Mf=y((T2,_n)=>{"use strict";var Rf=wf(),ey=Af(),If=/\s/g;function fo(...t){let e=ey.apply(this,t),r=(n,i)=>ty(n?n.toString():"",e,i);return r.multiline=(n,i)=>ry(n?n.toString():"",e,i),r}var Ff=(t,e,r)=>e.interpolation.toLowerCase()==="hsv"?t.hsv(r,e.hsvSpin.toLowerCase()):t.rgb(r);function ty(t,e,r){let n=kf(r),i=Math.max(t.replace(If,"").length,e.stops.length),o=Ff(e,n,i),s="";for(let a of t)s+=a.match(If)?a:Rf.hex(o.shift().toHex())(a);return s}function ry(t,e,r){let n=kf(r),i=t.split(`
|
|
21
|
+
`),o=Math.max.apply(null,i.map(u=>u.length).concat([e.stops.length])),s=Ff(e,n,o),a=[];for(let u of i){let h=s.slice(0),c="";for(let p of u)c+=Rf.hex(h.shift().toHex())(p);a.push(c)}return a.join(`
|
|
22
|
+
`)}function kf(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 dr={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};_n.exports=fo;for(let t in dr)_n.exports[t]=e=>new fo(dr[t].colors)(e,dr[t].options),_n.exports[t].multiline=e=>new fo(dr[t].colors).multiline(e,dr[t].options)});var qf=y((q2,Tf)=>{var ho=class{constructor(e){this.value=e,this.next=void 0}},po=class{constructor(){this.clear()}enqueue(e){let r=new ho(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}};Tf.exports=po});var mo=y((N2,Nf)=>{"use strict";var ny=qf(),iy=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 ny,r=0,n=()=>{r--,e.size>0&&e.dequeue()()},i=async(a,u,...h)=>{r++;let c=(async()=>a(...h))();u(c);try{await c}catch{}n()},o=(a,u,...h)=>{e.enqueue(i.bind(null,a,u,...h)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},s=(a,...u)=>new Promise(h=>{o(a,h,...u)});return Object.defineProperties(s,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),s};Nf.exports=iy});var $f=y((j2,Lf)=>{"use strict";var jf=mo(),wn=class extends Error{constructor(e){super(),this.value=e}},oy=async(t,e)=>e(await t),sy=async t=>{let e=await Promise.all(t);if(e[1]===!0)throw new wn(e[0]);return!1},ay=async(t,e,r)=>{r={concurrency:1/0,preserveOrder:!0,...r};let n=jf(r.concurrency),i=[...t].map(s=>[s,n(oy,s,e)]),o=jf(r.preserveOrder?1:1/0);try{await Promise.all(i.map(s=>o(sy,s)))}catch(s){if(s instanceof wn)return s.value;throw s}};Lf.exports=ay});var zf=y((L2,go)=>{"use strict";var Bf=require("path"),xn=require("fs"),{promisify:Uf}=require("util"),uy=$f(),cy=Uf(xn.stat),ly=Uf(xn.lstat),Xf={directory:"isDirectory",file:"isFile"};function Hf({type:t}){if(!(t in Xf))throw new Error(`Invalid type specified: ${t}`)}var Gf=(t,e)=>t===void 0||e[Xf[t]]();go.exports=async(t,e)=>{e={cwd:process.cwd(),type:"file",allowSymlinks:!0,...e},Hf(e);let r=e.allowSymlinks?cy:ly;return uy(t,async n=>{try{let i=await r(Bf.resolve(e.cwd,n));return Gf(e.type,i)}catch{return!1}},e)};go.exports.sync=(t,e)=>{e={cwd:process.cwd(),allowSymlinks:!0,type:"file",...e},Hf(e);let r=e.allowSymlinks?xn.statSync:xn.lstatSync;for(let n of t)try{let i=r(Bf.resolve(e.cwd,n));if(Gf(e.type,i))return n}catch{}}});var Jf=y(($2,yo)=>{"use strict";var Wf=require("fs"),{promisify:fy}=require("util"),dy=fy(Wf.access);yo.exports=async t=>{try{return await dy(t),!0}catch{return!1}};yo.exports.sync=t=>{try{return Wf.accessSync(t),!0}catch{return!1}}});var Kf=y((B2,jt)=>{"use strict";var et=require("path"),Sn=zf(),Vf=Jf(),vo=Symbol("findUp.stop");jt.exports=async(t,e={})=>{let r=et.resolve(e.cwd||""),{root:n}=et.parse(r),i=[].concat(t),o=async s=>{if(typeof t!="function")return Sn(i,s);let a=await t(s.cwd);return typeof a=="string"?Sn([a],s):a};for(;;){let s=await o({...e,cwd:r});if(s===vo)return;if(s)return et.resolve(r,s);if(r===n)return;r=et.dirname(r)}};jt.exports.sync=(t,e={})=>{let r=et.resolve(e.cwd||""),{root:n}=et.parse(r),i=[].concat(t),o=s=>{if(typeof t!="function")return Sn.sync(i,s);let a=t(s.cwd);return typeof a=="string"?Sn.sync([a],s):a};for(;;){let s=o({...e,cwd:r});if(s===vo)return;if(s)return et.resolve(r,s);if(r===n)return;r=et.dirname(r)}};jt.exports.exists=Vf;jt.exports.sync.exists=Vf.sync;jt.exports.stop=vo});var _o=y((U2,bo)=>{"use strict";var Yf=require("path"),Qf=Kf(),hy=async t=>{let e=await Qf("package.json",{cwd:t});return e&&Yf.dirname(e)};bo.exports=hy;bo.exports.sync=t=>{let e=Qf.sync("package.json",{cwd:t});return e&&Yf.dirname(e)}});var Q=y(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.isUndefined=Ee.fixName=Ee.validateName=Ee.validateSingleChar=Ee.fixChar=Ee.validateChar=void 0;function Iy(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}Ee.validateChar=Iy;function Ry(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}Ee.fixChar=Ry;function Fy(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}Ee.validateSingleChar=Fy;function ky(t){if(t.length===0)return!1;var e=t.charCodeAt(0),r=e===58||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533;if(t.length===1)return r;var n=t.charCodeAt(1),i=e>=55296&&e<=56191&&n>=56320&&n<=57343;if(!r&&!i)return!1;for(var o=i?2:1,s=o;s<t.length;s++){var a=t.charCodeAt(s);if(!(a===58||a===95||a===45||a===46||a===183||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=768&&a<=879||a>=880&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533)){if(s+1===t.length)return!1;var u=t.charCodeAt(s+1);if(a>=55296&&a<=56191&&u>=56320&&u<=57343){s++;continue}return!1}}return!0}Ee.validateName=ky;function My(t){var e="";if(t.length===0)return e;var r=t.charCodeAt(0),n=r===58||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533;if(t.length===1)return n?e=t[0]:e="\uFFFD",e;var i=t.charCodeAt(1),o=r>=55296&&r<=56191&&i>=56320&&i<=57343;o?e=t[0]+t[1]:n?e=t[0]:e="\uFFFD";for(var s=o?2:1,a=s;a<t.length;a++){var u=t.charCodeAt(a);if(u===58||u===95||u===45||u===46||u===183||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||u>=192&&u<=214||u>=216&&u<=246||u>=248&&u<=767||u>=768&&u<=879||u>=880&&u<=893||u>=895&&u<=8191||u>=8204&&u<=8205||u>=8255&&u<=8256||u>=8304&&u<=8591||u>=11264&&u<=12271||u>=12289&&u<=55295||u>=63744&&u<=64975||u>=65008&&u<=65533){e+=t[a];continue}if(a+1===t.length)return e+="\uFFFD",e;var h=t.charCodeAt(a+1);if(u>=55296&&u<=56191&&h>=56320&&h<=57343){e+=t[a]+t[a+1],a++;continue}e+="\uFFFD"}return e}Ee.fixName=My;function Ty(t){return Object.prototype.toString.call(t)==="[object Undefined]"}Ee.isUndefined=Ty});var $t=y(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.StringOptions=void 0;var An=Q(),qy=function(){function t(e){this.doubleQuotes=!1,this.indent=" ",this.newline=`
|
|
23
|
+
`,this.pretty=!0,(0,An.isUndefined)(e.doubleQuotes)||(this.doubleQuotes=e.doubleQuotes),(0,An.isUndefined)(e.indent)||(this.indent=e.indent),(0,An.isUndefined)(e.newline)||(this.newline=e.newline),(0,An.isUndefined)(e.pretty)||(this.pretty=e.pretty)}return t}();In.StringOptions=qy});var Rn=y(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.escapeDoubleQuotes=ke.escapeSingleQuotes=ke.escapeRightAngleBracketsInCdataTerminator=ke.escapeLeftAngleBrackets=ke.escapeAmpersands=void 0;function Ny(t){return t.replace(/&/g,"&")}ke.escapeAmpersands=Ny;function jy(t){return t.replace(/</g,"<")}ke.escapeLeftAngleBrackets=jy;function Ly(t){return t.replace(/]]>/g,"]]>")}ke.escapeRightAngleBracketsInCdataTerminator=Ly;function $y(t){return t.replace(/'/g,"'")}ke.escapeSingleQuotes=$y;function By(t){return t.replace(/"/g,""")}ke.escapeDoubleQuotes=By});var Lo=y(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var Uy=ue(),bd=Rn(),No=Q(),Xy=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,Uy.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,bd.escapeAmpersands)(e),e=(0,bd.escapeLeftAngleBrackets)(e),e},t.prototype.up=function(){return this._parent},t}();jo.default=Xy});var Fn=y($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});var _d=ue(),wd=Q(),Hy=function(){function t(e,r,n){this._hex=!1,this._validation=r,this._parent=e,this.char=n.char,(0,wd.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,wd.validateSingleChar)(e))throw new Error((0,_d.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,_d.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}();$o.default=Hy});var kn=y(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});var Gy=ue(),zy=Q(),Wy=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,zy.validateName)(e))throw new Error((0,Gy.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}();Bo.default=Wy});var Mn=y(pr=>{"use strict";var Ho=pr&&pr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pr,"__esModule",{value:!0});var Uo=ue(),xd=Rn(),Jy=$t(),Xo=Q(),Vy=Ho(Lo()),Ky=Ho(Fn()),Yy=Ho(kn()),Qy=function(){function t(e,r,n){this._validation=r,(0,Xo.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,Xo.fixName)(e),e.length===0)throw new Error((0,Uo.getContext)(this.up())+": attribute name should not be empty")}else if(this._validation&&!(0,Xo.validateName)(e))throw e.length===0?new Error((0,Uo.getContext)(this.up())+": attribute name should not be empty"):new Error((0,Uo.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 Ky.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entityRef=function(e){var r=new Yy.default(this,this._validation,e);return this._children.push(r),r},t.prototype.text=function(e){var r=new Vy.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});for(var r=new Jy.StringOptions(e),n=r.doubleQuotes?'"':"'",i=this._name+"="+n,o=0,s=this._children;o<s.length;o++){var a=s[o];r.doubleQuotes?i+=(0,xd.escapeDoubleQuotes)(a.toString()):i+=(0,xd.escapeSingleQuotes)(a.toString())}return i+=n,i},t.prototype.up=function(){return this._parent},t}();pr.default=Qy});var zo=y(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var Zy=ue(),ev=Q(),tv=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,ev.validateChar)(e))throw new Error((0,Zy.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}();Go.default=tv});var Jo=y(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var rv=ue(),nv=Q(),iv=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,nv.validateChar)(e))throw new Error((0,rv.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=iv});var Ko=y(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var ov=ue(),sv=Q(),av=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,sv.validateChar)(e))throw new Error((0,ov.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}();Vo.default=av});var Qo=y(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var uv=ue(),cv=Q(),lv=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,cv.validateChar)(e))throw new Error((0,uv.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}();Yo.default=lv});var es=y(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var fv=ue(),dv=Q(),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,dv.validateName)(e))throw new Error((0,fv.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}();Zo.default=hv});var mr=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var Tn=ue(),qn=Q(),pv=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,qn.isUndefined)(e)){if(this._validation&&!(0,qn.validateChar)(e))throw new Error((0,Tn.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,Tn.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,qn.validateName)(e))throw new Error((0,Tn.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,Tn.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,qn.isUndefined)(this._content)?"<?"+this._target+"?>":"<?"+this._target+" "+this._content+"?>"},t.prototype.up=function(){return this._parent},t}();ts.default=pv});var Nn=y(pt=>{"use strict";var mt=pt&&pt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pt,"__esModule",{value:!0});pt.validatePubId=void 0;var rt=ue(),mv=$t(),Be=Q(),gv=mt(gr()),yv=mt(zo()),vv=mt(Jo()),bv=mt(Ko()),_v=mt(Qo()),wv=mt(es()),xv=mt(mr()),Sv=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,Be.isUndefined)(n.sysId)||(this.sysId=n.sysId),(0,Be.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,Be.validateName)(e))throw new Error((0,rt.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,Be.isUndefined)(e)){if(this._validation&&!Sd(e))throw new Error((0,rt.getContext)(this.up())+": DTD public"+(' identifier "'+e+'" should not contain')+" characters not allowed in public identifiers");if(this._validation&&(0,Be.isUndefined)(this._sysId))throw new Error((0,rt.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,Be.isUndefined)(e)){if(this._validation&&!(0,Be.validateChar)(e))throw new Error((0,rt.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,rt.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 yv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new gv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.element=function(e){var r=new vv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.entity=function(e){var r=new bv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.notation=function(e){var r=new _v.default(this,this._validation,e);return this._children.push(r),r},t.prototype.paramEntityRef=function(e){var r=new wv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new xv.default(this,this._validation,e);return this._children.push(r),r},t.prototype.toString=function(e){e===void 0&&(e={});var r=new mv.StringOptions(e),n="<!DOCTYPE "+this._name;if((0,Be.isUndefined)(this._pubId))(0,Be.isUndefined)(this._sysId)||(n+=" ",n=this.appendId("SYSTEM",this._sysId,n,r));else{if((0,Be.isUndefined)(this._sysId))throw new Error((0,rt.getContext)(this.up())+": DTD system identifier is not undefined");n+=" ",n=this.appendId("PUBLIC",this._pubId,n,r),n=this.appendId("",this._sysId,n,r)}if(this._children.length!==0){n+=" [";for(var i=0,o=this._children;i<o.length;i++){var s=o[i];r.pretty&&(n+=r.newline+r.indent),n+=s.toString()}r.pretty&&(n+=r.newline),n+="]>"}else n+=">";return n},t.prototype.up=function(){return this._parent},t.prototype.appendId=function(e,r,n,i){if(n+=e+" ",i.doubleQuotes){if(this._validation&&r.indexOf('"')!==-1)throw new Error((0,rt.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,rt.getContext)(this)+": doubleQuotes option inconsistent with DTD system identifier or public identifier");n+="'"+r+"'"}return n},t}();pt.default=Sv;function Sd(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}pt.validatePubId=Sd});var is=y(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var Ed=ue(),rs=Q(),Ev=function(){function t(e,r,n){this._validation=r,(0,rs.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,rs.fixChar)(e);else if(this._validation&&!(0,rs.validateChar)(e))throw new Error((0,Ed.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,Ed.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}();ns.default=Ev});var us=y(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var Cv=ue(),os=Rn(),ss=Q(),Pv=function(){function t(e,r,n){this._validation=r,(0,ss.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,ss.fixChar)(e);else if(this._validation&&!(0,ss.validateChar)(e))throw new Error((0,Cv.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,os.escapeAmpersands)(e),e=(0,os.escapeLeftAngleBrackets)(e),e=(0,os.escapeRightAngleBracketsInCdataTerminator)(e),e},t.prototype.up=function(){return this._parent},t}();as.default=Pv});var Bn=y(br=>{"use strict";var gt=br&&br.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(br,"__esModule",{value:!0});var jn=ue(),Dv=$t(),yr=Q(),Cd=gt(Mn()),Ov=gt(is()),vr=gt(us()),Ln=gt(Fn()),Av=gt(gr()),$n=gt(kn()),Iv=gt(mr()),Rv=function(){function t(e,r,n){this._validation=r,(0,yr.isUndefined)(n.replaceInvalidCharsInName)?this._replaceInvalidCharsInName=!1:this._replaceInvalidCharsInName=n.replaceInvalidCharsInName,(0,yr.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,yr.fixName)(e),e.length===0)throw new Error((0,jn.getContext)(this.up())+": element name should not be empty")}else if(this._validation&&!(0,yr.validateName)(e))throw e.length===0?new Error((0,jn.getContext)(this.up())+": element name should not be empty"):new Error((0,jn.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,jn.getContext)(this.up())+': element "'+this.name+'" already contains an attribute with the'+(' name "'+e.name+'"'));var r=new Cd.default(this,this._validation,e);return this._children.push(r),this._attributeNames.push(e.name),r},t.prototype.cdata=function(e){var r=new Ov.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charData=function(e){var r=new vr.default(this,this._validation,e);return this._children.push(r),r},t.prototype.charRef=function(e){var r=new Ln.default(this,this._validation,e);return this._children.push(r),r},t.prototype.comment=function(e){var r=new Av.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 $n.default(this,this._validation,e);return this._children.push(r),r},t.prototype.procInst=function(e){var r=new Iv.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 Dv.StringOptions(e),i=r+n.indent,o="<"+this._name,s=[],a=0,u=this._children;a<u.length;a++){var h=u[a];h instanceof Cd.default?o+=" "+h.toString(e):s.push(h)}if(s.length>0){for(var c="",p=0;p<s.length;p++){var g=s[p],m="";g instanceof t?m+=g.toStringWithIndent(n,i):m+=g.toString();var b=p>0?s[p-1]:void 0;g instanceof vr.default&&g.toString()===""||(n.pretty&&(this.allSameLineNodes(s)||p>0&&this.onSameLine(g,b)||(m=n.newline+i+m)),c+=m)}n.pretty&&(this.allSameLineNodes(s)||(c+=n.newline+r)),c.length===0&&this._useSelfClosingTagIfEmpty?o+="/>":o+=">"+c+"</"+this._name+">"}else this._useSelfClosingTagIfEmpty?o+="/>":o+="></"+this._name+">";return o},t.prototype.allSameLineNodes=function(e){for(var r=0,n=e;r<n.length;r++){var i=n[r];if(!(i instanceof Ln.default||i instanceof $n.default||i instanceof vr.default))return!1}return!0},t.prototype.onSameLine=function(e,r){return(e instanceof Ln.default||e instanceof $n.default||e instanceof vr.default)&&!(0,yr.isUndefined)(r)&&(r instanceof Ln.default||r instanceof $n.default||r instanceof vr.default)},t}();br.default=Rv});var ue=y(Bt=>{"use strict";var Xn=Bt&&Bt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.getContext=void 0;var Fv=Xn(Mn()),kv=Xn(Hn()),Mv=Xn(Nn()),Tv=Xn(Bn());function Un(t){if(t instanceof Fv.default)return Un(t.up())+(' > attribute "'+t.name+'"');if(t instanceof kv.default)return"in XML document";if(t instanceof Mv.default)return Un(t.up())+" > DTD";if(t instanceof Tv.default)return Un(t.up())+(' > element "'+t.name+'"');throw new Error("Unrecognized object of type "+Object.prototype.toString.call(t))}Bt.getContext=Un});var gr=y(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var cs=ue(),ls=Q(),qv=function(){function t(e,r,n){this._validation=r,(0,ls.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,ls.fixChar)(e);else if(this._validation&&!(0,ls.validateChar)(e))throw new Error((0,cs.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,cs.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,cs.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}();fs.default=qv});var ps=y(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var ds=ue(),Nv=$t(),_r=Q(),jv=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,_r.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,_r.isUndefined)(e)&&!Lv(e))throw new Error((0,ds.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,_r.isUndefined)(e)&&e!=="yes"&&e!=="no")throw new Error((0,ds.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&&!$v(e))throw new Error((0,ds.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 Nv.StringOptions(e),n=r.doubleQuotes?'"':"'",i="<?xml version="+n+this._version+n;return(0,_r.isUndefined)(this._encoding)||(i+=" encoding="+n+this._encoding+n),(0,_r.isUndefined)(this._standalone)||(i+=" standalone="+n+this._standalone+n),i+="?>",i},t.prototype.up=function(){return this._parent},t}();hs.default=jv;function Lv(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 $v(t){for(var e=0;e<=9;e++)if(t==="1."+e)return!0;return!1}});var Hn=y(xr=>{"use strict";var Sr=xr&&xr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xr,"__esModule",{value:!0});var Bv=$t(),Uv=Q(),Xv=Sr(gr()),Pd=Sr(ps()),Dd=Sr(Nn()),wr=Sr(Bn()),Hv=Sr(mr()),Gv=function(){function t(e){this._children=[],this._validation=(0,Uv.isUndefined)(e.validation)?!0:e.validation}return t.prototype.comment=function(e){var r=new Xv.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 Pd.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 wr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: DTD must precede the root element");var n=new Dd.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 wr.default});if(this._validation&&r.length!==0)throw new Error("in XML document: only one root element is permitted");var n=new wr.default(this,this._validation,e);return this._children.push(n),n},t.prototype.procInst=function(e){var r=new Hv.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(h){return h instanceof wr.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 Bv.StringOptions(e),i="",o=0,s=this._children;o<s.length;o++){var a=s[o];a instanceof Pd.default||a instanceof Dd.default||a instanceof wr.default?i+=a.toString(e):i+=a.toString(),n.pretty&&(i+=n.newline)}var u=i.length-n.newline.length;return i.substr(u)===n.newline&&(i=i.substr(0,u)),i},t}();xr.default=Gv});var Od=y(T=>{"use strict";var te=T&&T.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(T,"__esModule",{value:!0});T.document=T.XmlProcInst=T.XmlEntityRef=T.XmlElement=T.XmlDtdParamEntityRef=T.XmlDtdNotation=T.XmlDtdEntity=T.XmlDtdElement=T.XmlDtdAttlist=T.XmlDtd=T.XmlDocument=T.XmlDecl=T.XmlComment=T.XmlCharRef=T.XmlCharData=T.XmlCdata=T.XmlAttributeText=T.XmlAttribute=void 0;var zv=te(Hn()),Wv=Mn();Object.defineProperty(T,"XmlAttribute",{enumerable:!0,get:function(){return te(Wv).default}});var Jv=Lo();Object.defineProperty(T,"XmlAttributeText",{enumerable:!0,get:function(){return te(Jv).default}});var Vv=is();Object.defineProperty(T,"XmlCdata",{enumerable:!0,get:function(){return te(Vv).default}});var Kv=us();Object.defineProperty(T,"XmlCharData",{enumerable:!0,get:function(){return te(Kv).default}});var Yv=Fn();Object.defineProperty(T,"XmlCharRef",{enumerable:!0,get:function(){return te(Yv).default}});var Qv=gr();Object.defineProperty(T,"XmlComment",{enumerable:!0,get:function(){return te(Qv).default}});var Zv=ps();Object.defineProperty(T,"XmlDecl",{enumerable:!0,get:function(){return te(Zv).default}});var e1=Hn();Object.defineProperty(T,"XmlDocument",{enumerable:!0,get:function(){return te(e1).default}});var t1=Nn();Object.defineProperty(T,"XmlDtd",{enumerable:!0,get:function(){return te(t1).default}});var r1=zo();Object.defineProperty(T,"XmlDtdAttlist",{enumerable:!0,get:function(){return te(r1).default}});var n1=Jo();Object.defineProperty(T,"XmlDtdElement",{enumerable:!0,get:function(){return te(n1).default}});var i1=Ko();Object.defineProperty(T,"XmlDtdEntity",{enumerable:!0,get:function(){return te(i1).default}});var o1=Qo();Object.defineProperty(T,"XmlDtdNotation",{enumerable:!0,get:function(){return te(o1).default}});var s1=es();Object.defineProperty(T,"XmlDtdParamEntityRef",{enumerable:!0,get:function(){return te(s1).default}});var a1=Bn();Object.defineProperty(T,"XmlElement",{enumerable:!0,get:function(){return te(a1).default}});var u1=kn();Object.defineProperty(T,"XmlEntityRef",{enumerable:!0,get:function(){return te(u1).default}});var c1=mr();Object.defineProperty(T,"XmlProcInst",{enumerable:!0,get:function(){return te(c1).default}});function l1(t){return t===void 0&&(t={}),new zv.default(t)}T.document=l1});var ms=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 Ad(t){return Object.prototype.toString.call(t)==="[object Undefined]"}re.isUndefined=Ad;function Id(t){return Object.prototype.toString.call(t)==="[object Null]"}re.isNull=Id;function f1(t){return Object.prototype.toString.call(t)==="[object Object]"}re.isObject=f1;function d1(t){return Object.prototype.toString.call(t)==="[object Array]"}re.isArray=d1;function Rd(t){return Object.prototype.toString.call(t)==="[object Function]"}re.isFunction=Rd;function h1(t){return Object.prototype.toString.call(t)==="[object Set]"}re.isSet=h1;function p1(t){return Object.prototype.toString.call(t)==="[object Map]"}re.isMap=p1;function m1(t){return!Ad(t)&&!Id(t)&&Rd(t?.toString)&&(t=t.toString()),String(t)}re.stringify=m1});var Nd=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.WrapHandlers=Ce.TypeHandlers=Ce.FormatOptions=Ce.DtdOptions=Ce.DeclarationOptions=Ce.Options=void 0;var Le=ms(),g1=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,Le.isUndefined)(e.validation)||(this.validation=e.validation),(0,Le.isUndefined)(e.aliasString)||(this.aliasString=e.aliasString),(0,Le.isUndefined)(e.attributeString)||(this.attributeString=e.attributeString),(0,Le.isUndefined)(e.cdataInvalidChars)||(this.cdataInvalidChars=e.cdataInvalidChars),(0,Le.isUndefined)(e.cdataKeys)||(this.cdataKeys=e.cdataKeys),this.declaration=new Fd(e.declaration),this.dtd=new kd(this.validation,e.dtd),this.format=new Md(e.format),(0,Le.isUndefined)(e.replaceInvalidChars)||(this.replaceInvalidChars=e.replaceInvalidChars),this.typeHandlers=new Td(e.typeHandlers),(0,Le.isUndefined)(e.useSelfClosingTagIfEmpty)||(this.useSelfClosingTagIfEmpty=e.useSelfClosingTagIfEmpty),(0,Le.isUndefined)(e.valueString)||(this.valueString=e.valueString),this.wrapHandlers=new qd(e.wrapHandlers)}return t}();Ce.Options=g1;var Fd=function(){function t(e){e===void 0&&(e={}),this.include=!0,(0,Le.isUndefined)(e.include)||(this.include=e.include),this.encoding=e.encoding,this.standalone=e.standalone,this.version=e.version}return t}();Ce.DeclarationOptions=Fd;var kd=function(){function t(e,r){if(r===void 0&&(r={}),this.include=!1,(0,Le.isUndefined)(r.include)||(this.include=r.include),e&&(0,Le.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}();Ce.DtdOptions=kd;var Md=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}();Ce.FormatOptions=Md;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}();Ce.TypeHandlers=Td;var qd=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}();Ce.WrapHandlers=qd});var Xd=y(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.parse=nt.parseToExistingElement=nt.Absent=void 0;var Ld=Od(),$d=Nd(),K=ms(),gs=function(){function t(){}return Object.defineProperty(t,"instance",{get:function(){return t._instance},enumerable:!1,configurable:!0}),t._instance=new t,t}();nt.Absent=gs;function ys(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 Bd(t,e,r){var n=function(s){return r.cdataInvalidChars&&(s.indexOf("<")!==-1||s.indexOf("&")!==-1)||r.cdataKeys.indexOf(e.name)!==-1||r.cdataKeys.indexOf("*")!==-1};if(e instanceof Ld.XmlElement)if(n(t))for(var i=t.split("]]>"),o=0;o<i.length;o++)n(i[o])?e.cdata({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}):e.charData({charData:i[o],replaceInvalidCharsInCharData:r.replaceInvalidChars}),o<i.length-1&&e.charData({charData:"]]>",replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.charData({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars});else e.text({charData:t,replaceInvalidCharsInCharData:r.replaceInvalidChars})}function y1(t,e,r,n){var i=r.attribute({name:t,replaceInvalidCharsInName:n.replaceInvalidChars});Bd((0,K.stringify)(e),i,n)}function jd(t,e,r,n){if(t===n.aliasString){r.name=(0,K.stringify)(e);return}if(t.indexOf(n.attributeString)===0&&(0,K.isObject)(e)){for(var i=0,o=Object.keys(e);i<o.length;i++){var s=o[i];y1(s,(0,K.stringify)(e[s]),r,n)}return}if(t.indexOf(n.valueString)===0){Gn(t,(0,K.stringify)(e),r,n);return}var a=r;if(!(0,K.isArray)(e)&&!(0,K.isSet)(e)){var u=ys(e,n);if(!(0,K.isUndefined)(u)&&u(e)===gs.instance)return;a=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Gn(t,e,a,n)}function v1(t,e,r){if((0,K.isMap)(t))t.forEach(function(s,a){jd((0,K.stringify)(a),s,e,r)});else for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];jd(o,t[o],e,r)}}function b1(t,e,r,n){var i;Object.prototype.hasOwnProperty.call(n.wrapHandlers,"*")&&(i=n.wrapHandlers["*"]),Object.prototype.hasOwnProperty.call(n.wrapHandlers,t)&&(i=n.wrapHandlers[t]);var o=t,s=r;if(!(0,K.isUndefined)(i)){var a=i(o,e);(0,K.isNull)(a)||(o=a,s=r.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty}))}e.forEach(function(u){var h=s;if(!(0,K.isArray)(u)&&!(0,K.isSet)(u)){var c=ys(u,n);if(!(0,K.isUndefined)(c)&&c(u)===gs.instance)return;h=s.element({name:o,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty})}Gn(o,u,h,n)})}function Gn(t,e,r,n){var i=ys(e,n);if((0,K.isUndefined)(i)||(e=i(e)),(0,K.isObject)(e)||(0,K.isMap)(e)){v1(e,r,n);return}if((0,K.isArray)(e)||(0,K.isSet)(e)){b1(t,e,r,n);return}Bd((0,K.stringify)(e),r,n)}function Ud(t,e,r){var n=new $d.Options(r);Gn(t.name,e,t,n)}nt.parseToExistingElement=Ud;function _1(t,e,r){var n=new $d.Options(r),i=new Ld.XmlDocument({validation:n.validation});n.declaration.include&&i.decl(n.declaration),n.dtd.include&&i.dtd({name:n.dtd.name,pubId:n.dtd.pubId,sysId:n.dtd.sysId});var o=i.element({name:t,replaceInvalidCharsInName:n.replaceInvalidChars,useSelfClosingTagIfEmpty:n.useSelfClosingTagIfEmpty});return Ud(o,e,r),i.toString(n.format)}nt.parse=_1});var Au=q(Ei()),Iu=q(Qt()),Ii=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,Au.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(Iu.default.red(`
|
|
24
24
|
\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
|
|
25
25
|
\u2502 Access credentials failure \u2502
|
|
26
26
|
\u2502 Check that the login details are correct in your .env file \u2502
|
|
27
27
|
\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
|
|
28
|
-
`)),process.exit(1)}}},
|
|
29
|
-
`,
|
|
30
|
-
\u2570${"\u2500".repeat(r)}\u256F`,
|
|
28
|
+
`)),process.exit(1)}}},Pt=new Ii;var ad=q(Ei()),ud=q(Qt()),cd=q(Xe());var dn=q(require("node:crypto")),dt=q(require("node:fs")),Ki=q(require("node:path")),Yi=q(ft()),hn=Ki.default.resolve(__dirname,"./../apiCache"),$l=`${hn}/siteHash.json`;function Bl(){dt.default.existsSync(hn)||dt.default.mkdirSync(hn),console.info("Cache initialized")}function Ul(t){let e=dn.default.createHash("sha256");return e.update(JSON.stringify(t)),`${hn}/${e.digest("hex")}`}function Xl(t){let e=dn.default.randomBytes(16).toString("hex"),r=dn.default.createHash("sha256");return r.update(`${t}${e}`),r.digest("hex")}function Hl(t,e){let r=typeof e=="string"?e:JSON.stringify(e),n=Ul(t),i=Ki.default.dirname(n);dt.default.existsSync(i)||dt.default.mkdirSync(i,{recursive:!0}),dt.default.writeFileSync(n,r,"utf8")}function Gl(t){try{let e=Ul(t);return Yi.default.readJSONSync(e,{encoding:"utf-8"})}catch{return null}}function Rg(){try{return Yi.default.readJSONSync($l,{encoding:"utf-8"})||{}}catch{return{}}}function zl(t,e){let r=Rg(),n=r[t],i=e||n||new Date().valueOf();return i!==n&&(r[t]=i,dt.default.writeFileSync($l,JSON.stringify(r),{encoding:"utf-8"})),i.toString()}var my=q(Qt()),Zf=q(Xe()),Ge=q(ft()),ed=q(Mf()),wo=q(_o());var En="10.3.24";Zf.default.config();var gy=!!process.env.GRIDDO_BUILD_LOGS&&!!JSON.parse(process.env.GRIDDO_BUILD_LOGS)||!!process.env.LOGS&&!!JSON.parse(process.env.LOGS),td=wo.default.sync(__dirname),rd=wo.default.sync();function nd(t){let e=[];return Ge.default.readdirSync(t).forEach(n=>{let i=`${t}/${n}`;e.push(i)}),e}function xo(t){let e=t.length,r=t.length+2,n=" ".repeat(Math.floor((r-e)/2)),i=`\u256D${"\u2500".repeat(r)}\u256E
|
|
29
|
+
`,o=`
|
|
30
|
+
\u2570${"\u2500".repeat(r)}\u256F`,s=`\u2502${n}${t}${n}\u2502`;console.log(`${i}${s}${o}`)}function je(t){gy&&console.info(t.replace(/(\s)\s+/g,"$1"))}function id(t){return new Promise(e=>setTimeout(e,t))}function So(t,e=3){return(t/1e3).toFixed(e)}function Eo(t){return"site"in t&&t.site?t?.site:void 0}function Co(t,e){for(let r in t)e.includes(r)?delete t[r]:typeof t[r]=="object"&&Co(t[r],e)}function Po(t){return t.map(({name:e,id:r})=>`${e} (${r})`).join(", ")}function Do(t){let e=`
|
|
31
31
|
\xB7\xB7
|
|
32
32
|
\xB7\xB7 _______ _ _ _____ _____ ______ _______ _______ ______
|
|
33
33
|
\xB7\xB7 |______ \\___/ |_____] | | |_____/ | |______ |_____/
|
|
@@ -36,18 +36,18 @@ GFS4: `),console.error(t)});W[ae]||(Lu=global[ae]||[],Bu(W,Lu),W.close=function(
|
|
|
36
36
|
\xB7\xB7 Griddo Exporter ${En}
|
|
37
37
|
\xB7\xB7 Adapter: ${t}
|
|
38
38
|
\xB7\xB7
|
|
39
|
-
`;console.log(
|
|
40
|
-
Max attempts ${
|
|
39
|
+
`;console.log(ed.default.cristal(e))}function od(t){let e=Ge.default.readdirSync(t),r={},n=e.filter(o=>{let s=`${t}/${o}`,a=Ge.default.readJSONSync(s,"utf-8"),{id:u,entity:h,fullUrl:c}=a;return!!(u&&h&&c)});for(let o of n){let s=`${t}/${o}`,a=Ge.default.readJSONSync(s,"utf-8"),u=Ge.default.statSync(s).mtimeMs,{id:h}=a;(!r[h]||u>Ge.default.statSync(`${t}/${r[h]}`).mtimeMs)&&(r[h]=o)}let i=0;for(let o of n){let s=`${t}/${o}`,a=Ge.default.readJSONSync(s,"utf-8"),{id:u}=a;o!==r[u]&&(Ge.default.unlinkSync(s),i++)}console.log(`Sanitize apiCache folder for ${i} files`)}async function Lt(...t){let e=process.hrtime();for(let o of t)await o();let[r,n]=process.hrtime(e);return+(r+n/1e9).toFixed(3)}cd.default.config();var{env:{RETRY_WAIT_SECONDS:yy="4",RETRY_ATTEMPTS:sd="4"}}=process;async function Oo(t,e,r=""){let{endpoint:n,body:i,cacheKey:o="",attempt:s=1,headers:a}=t,u={endpoint:n,body:i,headers:a,cacheKey:o};if(o){let h=new Date,c=Gl(u);if(c){let p=Eo(c),g=p?`site: ${p}`:"",m=So(new Date().getTime()-h.getTime());return je(`${e} (cache) ${g} ${n} - ${m}s ${r}`),c}}try{let h=new Date,{data:c}=await(0,ad.default)({url:n,method:e,headers:Object.assign({},a,Pt.headers),data:i}),p=Eo(c),g=p?`site: ${p}`:"",m=So(new Date().getTime()-h.getTime());return je(`${e} (fetch) ${g} ${n} - ${m}s ${r}`),Hl(u,c),c}catch(h){let c=h;return c.response?.status===404?null:(s>parseInt(sd)&&(console.log(`
|
|
40
|
+
Max attempts ${sd} reached
|
|
41
41
|
--------------------------------------
|
|
42
42
|
- ${e.toUpperCase()} ${n}
|
|
43
43
|
- BODY: ${JSON.stringify(i)}
|
|
44
44
|
- HEADERS: ${JSON.stringify(a)}
|
|
45
45
|
- RESPONSE: ${c.response?.status,JSON.stringify(c.response?.data)}
|
|
46
46
|
--------------------------------------
|
|
47
|
-
`),process.exit(1)),c.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(c,null,2)),process.exit(1)),
|
|
48
|
-
`),p=r?`Code: ${
|
|
47
|
+
`),process.exit(1)),c.response||(console.log("Unknown error occurred"),console.log(JSON.stringify(c,null,2)),process.exit(1)),vy(c,{callInfo:{endpoint:n,body:i}}),console.warn(`Waiting for retry: ${e}`,n),await id(parseInt(yy)*1e3),Oo({endpoint:n,body:i,headers:a,cacheKey:o,attempt:s+1},e,r))}}async function Fe(t){return await Oo(t,"get")}async function ht(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 Oo(t,"post",i||"")}function vy(t,e){let{response:r,message:n,stack:i}=t,{callInfo:o}=e,{status:s,statusText:a,data:u}=r||{},h=[];for(let m of Object.keys(o))h.push(`${m}: ${typeof o[m]=="object"?JSON.stringify(o[m]):o[m]}`);let c=h.join(`
|
|
48
|
+
`),p=r?`Code: ${s} - ${a}
|
|
49
49
|
Response: ${JSON.stringify(u)}`:"",g=`${n}
|
|
50
|
-
${i}`;console.warn(
|
|
50
|
+
${i}`;console.warn(ud.default.bold.red(`
|
|
51
51
|
=============
|
|
52
52
|
|
|
53
53
|
{ Call info }
|
|
@@ -60,4 +60,4 @@ ${p}
|
|
|
60
60
|
${g}
|
|
61
61
|
|
|
62
62
|
=============
|
|
63
|
-
`))}var py=process.env.API_URL,my={GET_ALL:`${py}/domains`},Cn=class{static async getAll(){let{GET_ALL:e}=my;return await Fe({endpoint:e})}};async function Ds(){await Ct.login();let t=await Cn.getAll();return gy(t)}function gy(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var bo=T(require("node:path"));var Er=T(require("node:fs")),Kd=T(require("node:fs/promises")),Ut=T(require("node:path")),Yd=T(Xe()),Wn=T(Ft()),Qd=T(hs());var ud=T(Xe());ud.default.config();var Os=process.env.API_URL,tt=`${Os}/site/`,Ge={GET_ALL:`${Os}/sites/all`,GET_PAGE:[`${Os}/page/`,""],INFO:[`${tt}`,"/all"],LANGUAGES:[`${tt}`,"/languages"],BUILD_START:[`${tt}`,"/build/start"],BUILD_END:[`${tt}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${tt}`,"/distributor"],GET_SITEMAP:[`${tt}`,"/sitemap"],SOCIALS:[`${tt}`,"/socials"],GET_PAGES:[`${tt}`,"/pages?pagination=false"]},be=class{static async getAll(){let{GET_ALL:e}=Ge;return await Fe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=Ge;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=Ge;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=Ge;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=Ge;return await Fe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=Ge;return await dt({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,s){let{GET_DISTRIBUTOR_DATA:[o,a]}=Ge,u=i||e.site,h=s||e.language;return await dt({endpoint:`${o}${u}${a}`,body:r,headers:{lang:h},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=Ge;return await Fe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=Ge;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Pn=class{static getBody(e,r){let{order:n,sources:i,quantity:s,mode:o,fixed:a,fullRelations:u=!1,allLanguages:h=!1,preferenceLanguage:c=!1,referenceId:p}=e;return o==="auto"?{mode:o,order:n,sources:i,quantity:s,fullRelations:u,allLanguages:h,preferenceLanguage:c}:o==="manual"?{mode:o,fixed:a,fullRelations:u}:o==="navigation"?{mode:o,order:n,quantity:s,fullRelations:u,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 _s(`Error: Page ${r.id} has \`hasDistributorData: true\` but it doesn't have a \`data\` prop`),[];if(Array.isArray(n.sources)&&n.sources.length<1)return _s(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``),[];let{site:s,lang:o}=n,a=this.getBody(n,r);return await be.getDistributorData(r,a,i,s,o)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,u=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let h in a){if(h==="queriedItems")continue;let p=a[h];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,u+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Dn=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:u}}=e,h=b=>{let C=b.find(I=>typeof I=="number");return typeof C=="number"?C:null},c=h([r,u?.[s]?.defaultHeader,o]),p=h([n,u?.[s]?.defaultFooter,a]),g=c?this.getPageHeader(c,i):c===0?null:this._defaultHeaders[i],m=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:g,footer:m}}};var As=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 Fe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await dt({endpoint:e})}},Is=new As;var Rs=T(require("node:path")),hr=T(Ft());async function On(t){for await(let e of t)for(let r of e.domains){let n=Object.values(r)[0],i=Rs.default.resolve(__dirname,`../../dist${n}`),s=Rs.default.resolve(__dirname,`../../assets/page-data${n}`);if(je(`Site dir ${i}`),je(`Page data dir ${s}`),!hr.default.existsSync(i))return;try{await hr.default.rm(i,{recursive:!0}),je(`${i} is deleted!`)}catch(o){console.log(o)}if(!hr.default.existsSync(s))return;try{await hr.default.rm(s,{recursive:!0}),console.info(`${s} is deleted!`)}catch(o){console.log(o)}}}var Ms=T(require("node:fs")),dd=T(require("node:path")),hd=T(Xe());var yy=process.env.API_URL;async function cd(t){let{title:e,description:r,image:n,pageId:i,languageId:s,siteId:o,url:a,content:u,template:h}=t;return await dt({endpoint:`${yy}/search`,body:{title:e,description:r,image:n,pageId:i,languageId:s,siteId:o,url:a,template:h,content:vy(u)}})}function vy(t){let e=by(["meta","link","style","script","noscript","nav","header","footer"],t),r=_y(e);return wy(r)}function by(t,e){let r=e;return t.forEach(n=>{r=r.replace(new RegExp(`<${n}.*?>.*?</${n}>`,"gis")," ").replace(new RegExp(`(<${n}([^>]+)>)`,"gis")," ")}),r}function _y(t){return t.replace(/(<([^>]+)>)/gis," ")}function wy(t){return t.replace(/\s+/g," ")}function Fs(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Sy(i,`c_fill,w_${e},h_${r}`):xy(i,`f/${n}/w/${e}/h/${r}`):null}function xy(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Sy(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}hd.default.config();var Ey=!!JSON.parse(process.env.GRIDDO_SEARCH_FEATURE||"false"),Cy=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false"),Py=25;function Dy({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Fs(r,1280,768):"",twitterImage:r?Fs(r,1280,768):""}}function Oy(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:s,url:o,isIndexed:a,follow:u,metasAdvanced:h,pageLanguages:c,fullUrl:p,metaKeywords:g}=t,m=h?.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:u?"follow":"nofollow",translate:m.includes("notranslate")?"notranslate":"",metasAdvanced:m.filter(b=>b!=="notranslate").join(),pageLanguages:c,metaKeywords:g?.filter(Boolean).map(b=>b.replace(/"/g,"'")).join(", ")}}async function qs(t,e,r=!1){let{id:n,title:i,fullPath:s,language:o,breadcrumb:a,socialDescription:u,socialImage:h,socialTitle:c}=t,{baseUrl:p,BUILD_MODE:g,cloudinaryName:m,griddoVersion:b,siteLangs:C,siteMetadata:I,siteOptions:F,siteScript:L,siteSlug:U,socials:X,theme:z,navigations:{header:ne,footer:_e}}=e;t.breadcrumb=a,t.siteSlug=U,t.apiUrl=p,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let _=C.find(({id:D})=>D===t?.language)?.locale.replace(/_/g,"-"),w=Oy(t),E=Dy({socialDescription:u,socialImage:h,socialTitle:c}),$=Cy?s.compose:`${s.domain}${s.compose}`,R=new Date().toString(),j={path:$,size:void 0,context:{id:n,title:i,fullPath:s,locale:_,languageId:o,theme:z,siteMetadata:I,pageMetadata:w,openGraph:E,socials:X,siteLangs:C,cloudinaryName:m,siteOptions:F,BUILD_MODE:g,griddoVersion:b,renderDate:R,siteScript:L,header:ne,footer:_e,page:t}};if(Ey&&!r){let D=dd.default.resolve(__dirname,"../../dist/",`./${$}index.html`),N=Ms.default.existsSync(D)?Ms.default.readFileSync(D).toString():"";await cd({title:i,description:E.description||"",image:E.image||"",pageId:n,languageId:o,template:t?.template?.templateType||t?.templateId||null,siteId:t.site,url:t.fullUrl,content:N})}return j}async function pd(t,e){return await qs(t,e)}async function md({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:s},o){let a=e.map(async(u,h)=>{let c=h===0,p=h+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,fullPath:{...t.fullPath,compose:ks(m,p,{addEndingSlash:!0})},fullUrl:ks(t.fullUrl,p,{addEndingSlash:!0}),slug:ks(t.slug,p),title:fd(t.title,p),metaTitle:fd(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:c,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:u,totalQueriedItems:s?.length},isRoot:r,defaultLang:n};return await qs(b,o,!c)});return Promise.all(a)}function gd(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=>{let a=JSON.parse(JSON.stringify(n)),{sectionSlug:u="/",title:h="",metaTitle:c="",metaDescription:p=""}=o,g=typeof h=="string"?h:h.content,m=a.fullPath.compose||"",b=a.fullUrl.endsWith("/")?a.fullUrl.slice(0,-1):a.fullUrl,C=u?.replace(/\//g,""),F=u==="/"?C:C+"/",L=m.endsWith("/")?"":"/",U=`${m}${L}${F}`;return g.trim()&&(a.title=g),p.trim()&&(a.metaDescription=p),a.fullUrl=`${b}/${F}`,a.fullPath.compose=U,a.slug=U,a.template.activeSectionSlug=u,a.template.activeSectionBase=b,a.metaTitle=c.trim()||g.trim()||a.metaTitle,await qs(a,e)});return Promise.all(s)}function yd(t){return new Promise(r=>{let n=(i,s=0)=>{if(!(!i||typeof i!="object")){for(let o in i){let a=i[o],u=a||typeof a=="object",h=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!u||!h)continue;let{component:c,hasGriddoMultiPage:p,elements:g}=a;c&&p&&r(g||[]),n(a,s+1)}s||r(null)}};n([t])})}function Ay(t,e,r){return e?.slice(t*(r-1),t*r)}function Iy(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,s)=>s+1)?.map(i=>Ay(t,e,i))}function vd(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Py;return Iy(r,e)}function ld(t){return t.replace(/\/+$/,"/")}function ks(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?ld(`${t}${i}`):ld(`${t}${n}${e}${i}`)}function fd(t,e){return!t||e<=1?t:`${t} - ${e}`}var x1=T(Ft()),S1=T(Xd());var E1=process.env.API_URL,C1=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Bt=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),Hd=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),B_=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");async function Gd(t){console.info(`API URL ${E1}`),await Ct.login();let e=await be.getAll(),r=C1?e.filter(s=>!Bt||s.id===Bt):e.filter(s=>Bt?s.id===Bt:!!s.shouldBeUpdated);if(r.length){let s=r.map(async o=>{let a=await be.getLanguages(o.id);return o.domains=a.items.filter(u=>u.domain&&u.domain.slug.indexOf(t)>0).map(u=>({[u.id]:`${u.domain.slug}${u.path}`}))});await Promise.all(s)}let n=r.filter(s=>Bt?s.id===Bt:!!s.isPublished&&s.domains.length>0),i=r.filter(s=>!s.isPublished&&s.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function Wd(t){for(let e of t){let r=await be.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};je(`Unpublish site(s): ${r.publishIds}`),await be.endSiteRender(e.id,i)}await On(t)}async function zd(t){let e=await be.startSiteRender(t),r=await be.getInfo(t),n=await be.getLanguages(t),i=await be.getSocials(t),s=n.items,o=s.find(b=>b.isDefault),{siteHash:a,unpublishHashes:u,publishIds:h}=e,{headers:c,footers:p}=r,g=Hd.length?Hd.filter(b=>h.includes(b)):h;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:u,siteLangs:s,defaultLang:o,headers:c,footers:p,socials:i}}Yd.default.config();var P1=process.env.API_URL,D1=process.env.CXBRANCH,O1=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Jd=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"")||10,A1=process.env.PUBLIC_API_URL,I1=process.env.GRIDDO_RENDERID||new Date().valueOf().toString(),Vd=[],vo={};async function Zd(t,e){console.info(`API calls with ${Jd} threads`),Er.default.existsSync(t)&&Er.default.rmSync(t,{recursive:!0}),Er.default.mkdirSync(t),Er.default.mkdirSync(Ut.default.resolve(t,"metadata"));try{let{sitesToPublish:r,sitesToUnpublish:n}=await Gd(e);await Is.getAll(),r.length||n.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Es(r)}`),console.info(`Sites to unpublish: ${Es(n)}`),await Wd(n),await On([...r]);for(let i of r){let{id:s,slug:o,theme:a,favicon:u}=i,{siteInfo:h,validPagesIds:c,siteHash:p,unpublishHashes:g,siteLangs:m,defaultLang:b,headers:C,footers:I,socials:F}=await zd(s),{cloudinaryName:L,useMetaTitle:U,useMetaKeywords:X,showBasicMetaRobots:z,avoidHrefLangsOnCanonicals:ne,avoidSelfReferenceCanonicals:_e,avoidHrefLangXDefault:Z,avoidDebugMetas:_}=Is.settings;vo[s]={siteHash:p,unpublishHashes:g,publishHashes:[]};let w=new Dn;w.navigations={headers:C,footers:I},i.languages=m;let E=Gl(s,p),$=h.siteScript,R={siteUrl:h.slug,title:h.name,favicon:u},j={baseUrl:P1,publicBaseUrl:A1,instance:O1,siteSlug:o,theme:a,siteMetadata:R,socials:F,siteLangs:m,cloudinaryName:L,griddoVersion:En,siteOptions:{useMetaTitle:U,useMetaKeywords:X,showBasicMetaRobots:z,avoidHrefLangsOnCanonicals:ne,avoidSelfReferenceCanonicals:_e,avoidHrefLangXDefault:Z,avoidDebugMetas:_},BUILD_MODE:D1,siteScript:$};je(`${i.name} site`);let D=async P=>{let k=[],ie=await be.getPage(P,E);if(!ie)return;Vd.push(P);let Ae=JSON.parse(JSON.stringify(j));Ae.navigations=w.getPageNavigations(ie);let J=await Pn.getDistributorData({page:ie,cacheKey:I1}),he=await yd(J),We=ie?.mode==="list",pe=!We&&he,l=!pe&&!We;if(We){let f={page:ie,pages:vd(J),isRoot:!1,defaultLang:b,template:J,totalQueriedItems:J.queriedItems};k=await md(f,Ae)}if(pe){let f=ie;f.template=J,f.multiPageElements=he,f.defaultLang=b,k=await gd(f,Ae)}if(l){let f=ie;f.template=J,f.defaultLang=b,k=[await pd(f,Ae)]}vo[s].publishHashes.push(ie.hash),await M1(t,k),k1(t,r),R1(t,vo),F1(t,Vd)},N=(0,Qd.default)(Jd),M=c.map(P=>N(()=>D(P)));await Promise.all(M)}}catch(r){console.error(r.message),process.exit(1)}}function R1(t,e){Wn.default.writeJSONSync(Ut.default.resolve(t,"metadata","buildProcessData.json"),e)}function F1(t,e){Wn.default.writeJSONSync(Ut.default.resolve(t,"metadata","createdPages.json"),e)}function k1(t,e){Wn.default.writeJSONSync(Ut.default.resolve(t,"metadata","sitesToPublish.json"),e)}async function M1(t,e){e.forEach(n=>Ss(n,["editorID","parentEditorID"]));let r=e.map(async n=>{let i=`${Ul(n.path)}.json`,s=JSON.stringify(n),o=Ut.default.resolve(t,i);await Kd.default.writeFile(o,s)});await Promise.all(r)}var q1=bo.default.resolve(__dirname,"../store/"),T1=bo.default.resolve(__dirname,"../apiCache");async function _o(t){$l(),await Zd(q1,t),nd(T1)}var eh=require("node:child_process"),th=T(Xe()),rh=T(vs());th.default.config();var N1=rh.default.sync(__dirname);function wo(t){return e=>j1(e,t)}function j1(t,e){let[r,...n]=t.split(" "),{error:i,status:s}=(0,eh.spawnSync)(r,n,{cwd:N1,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign({GRIDDO_EXPORTER:"true"},process.env,e)});i&&(console.error(i),process.exit(1)),s!==0&&(console.error(`Command \`${t}\` exited with code ${s}`),process.exit(1))}var nh=T(Xe());nh.default.config();var $e=T(require("node:fs")),Ue=T(require("node:path"));var Pe=T(Yt()),ih=T(Xe());ih.default.config();function sh(t){let e=["dist","assets"],r=["public","store"],n=["apiCache"];JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false")?n.push(".cache"):r.push(".cache");let s=Ue.default.resolve(td,"exports/sites"),o=Ue.default.resolve(__dirname,"../caches"),a=L1(t),u=wo({DOMAIN:t,GRIDDO_ASSET_PREFIX:a,NEEDS_ASSET_DOMAIN_PREFIX:a&&a!=="",GRIDDO_RENDERID:new Date().valueOf()}),h=()=>{console.info(`Initializing exporter for the domain ${t}`),g(),m()},c=()=>{for(let _ of e){let{currentExportArchivePath:w,currentExportWorkingPath:E}=p(_);$e.default.existsSync(w)&&(console.log(`\uFE0FRestoring ${Pe.default.gray(w)}`),u(`cp -R ${w} ${E}`))}ne()},p=(_="")=>{if(_==="/")throw new Error(`Artifact path cannot be root: ${_}`);let w=Ue.default.resolve(s,t),E=Ue.default.resolve(w,_),$=Ue.default.resolve(E,t),R=Ue.default.resolve(o,t),j=Ue.default.resolve(R,_),D=Ue.default.resolve(j,t),N=`${E}-BACKUP`,M=Ue.default.resolve(ed,_);return{domainExportArchiveBasePath:w,currentExportArchivePath:E,currentExportBackupPath:N,currentExportWorkingPath:M,currentExportArchivePathInDomain:$,domainCacheArchiveBasePath:R,currentExportArchiveCachePath:j,currentExportArchiveCachePathInDomain:D}},g=()=>{for(let _ of[...e,...r,...n]){let{currentExportWorkingPath:w}=p(_);$e.default.existsSync(w)&&(console.log(`Cleanup dirty ${Pe.default.gray(w)}`),u(`rm -rf ${w}`))}},m=()=>{let{domainExportArchiveBasePath:_,domainCacheArchiveBasePath:w}=p();for(let E of[_,w])$e.default.existsSync(E)||(console.info(`Creating ${E}`),u(`mkdir -p ${E}`))},b=_=>{let{currentExportArchivePath:w,currentExportWorkingPath:E}=p(_);console.info(`Moving files from ${Pe.default.gray(E)} to ${Pe.default.gray(w)}`),u(`mv ${E} ${w}`)},C=()=>{for(let _ of e){let{currentExportWorkingPath:w,currentExportArchivePath:E}=p(_);if(!$e.default.existsSync(w)){console.log("Source directory has not been created:",w);continue}try{I(_),b(_),L(_)}catch($){console.log(`Error moving files to ${E}`,$.message),F(_);continue}}},I=_=>{let{currentExportArchivePath:w,currentExportBackupPath:E}=p(_);$e.default.existsSync(w)&&(console.info(`Creating backup of ${Pe.default.gray(w)}`),u(`mv ${w} ${E}`))},F=_=>{let{currentExportArchivePath:w,currentExportBackupPath:E}=p(_);$e.default.existsSync(E)&&(console.log(`\uFE0FRestoring backup ${Pe.default.gray(w)}`),u(`mv ${E} ${w}`))},L=_=>{let{currentExportArchivePath:w,currentExportBackupPath:E}=p(_);console.log(`\uFE0FRemoving backup ${Pe.default.gray(w)}`),u(`rm -rf ${E}`)},U=()=>{for(let _ of n){let{currentExportArchiveCachePath:w,currentExportWorkingPath:E}=p(_);if($e.default.existsSync(E))console.info(`Moving files from ${Pe.default.gray(E)} to ${Pe.default.gray(w)}`),u(`mv ${E} ${w}`);else throw new Error(`Error moving files from ${E}: Path does not exist.`)}},X=()=>{for(let _ of n){let{currentExportArchiveCachePath:w,currentExportWorkingPath:E}=p(_);$e.default.existsSync(w)&&(console.log(`\uFE0FRestoring ${Pe.default.gray(w)}`),u(`mv ${w} ${E}`))}},z=()=>{u("yarn gatsby-build")},ne=()=>{let{currentExportWorkingPath:_}=p("dist"),{currentExportWorkingPath:w}=p("public");$e.default.existsSync(_)&&(console.log(`Moving ${Pe.default.gray(_)} to ${Pe.default.gray(w)}`),u(`mv ${_} ${w}`))},_e=()=>{for(let _ of r){let{currentExportWorkingPath:w}=p(_);$e.default.existsSync(w)&&(console.log(`\uFE0FRemoving ${Pe.default.gray(w)}`),u(`rm -rf ${w}`))}},Z=()=>{g()};return{init:h,getArtifactPaths:p,archiveExportArtifact:b,archiveArtifacts:C,restoreArtifacts:c,createArtifactBackup:I,restoreArtifactBackup:F,deleteArtifactBackup:L,archiveCacheArtifacts:U,restoreCacheArtifacts:X,runGatsbyBuild:z,removeDisposableArtifacts:_e}}function L1(t){let e=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!e||!t||!t.startsWith("pro-")?"":`${e}/${t}`}async function xo(){Cs("gatsby");let t=0,e=await Ds();for(let r of e){let n=sh(r);t=await dr(n.init,n.restoreArtifacts,n.restoreCacheArtifacts).catch(i=>{console.error("Error in init() || restoreArtifacts() || restoreCacheArtifacts() :",i?.stdout?.toString()||i),process.exit(1)}),console.info(`success restore ${r} - ${t}s`),t=await dr(async()=>await _o(r)).catch(i=>{console.error("Error in downloadBuildData() :",i?.stdout?.toString()||i),process.exit(1)}),console.info(`success download ${r} - ${t}s`),t=await dr(n.runGatsbyBuild).catch(i=>{console.error("Error in runGatsbyBuild() :",i?.stdout?.toString()||i),process.exit(1)}),console.info(`success gatsby build command - ${t}s`),t=await dr(n.removeDisposableArtifacts,n.archiveArtifacts,n.archiveCacheArtifacts).catch(i=>{console.error("Error in removeDisposableArtifacts() || archiveArtifacts()|| archiveCacheArtifacts() :",i?.stdout?.toString()||i),process.exit(1)}),console.info(`success archive ${r} - ${t}s`)}}async function $1(){await xo()}$1().catch(t=>{console.error("Error in main():",t?.stdout?.toString()||t),process.exit(1)});
|
|
63
|
+
`))}var by=process.env.API_URL,_y={GET_ALL:`${by}/domains`},Cn=class{static async getAll(){let{GET_ALL:e}=_y;return await Fe({endpoint:e})}};async function Ao(){await Pt.login();let t=await Cn.getAll();return wy(t)}function wy(t){let e=t.filter(({slug:r})=>!!r).map(({slug:r})=>r.replace("/",""));return[...new Set(e)]}var bs=q(require("node:path"));var Er=q(require("node:fs")),Kd=q(require("node:fs/promises")),Xt=q(require("node:path")),Yd=q(Xe()),zn=q(ft()),Qd=q(mo());var ld=q(Xe());ld.default.config();var Io=process.env.API_URL,tt=`${Io}/site/`,ze={GET_ALL:`${Io}/sites/all`,GET_PAGE:[`${Io}/page/`,""],INFO:[`${tt}`,"/all"],LANGUAGES:[`${tt}`,"/languages"],BUILD_START:[`${tt}`,"/build/start"],BUILD_END:[`${tt}`,"/build/end"],GET_DISTRIBUTOR_DATA:[`${tt}`,"/distributor"],GET_SITEMAP:[`${tt}`,"/sitemap"],SOCIALS:[`${tt}`,"/socials"],GET_PAGES:[`${tt}`,"/pages?pagination=false"]},be=class{static async getAll(){let{GET_ALL:e}=ze;return await Fe({endpoint:e})}static async getPage(e,r){let{GET_PAGE:[n,i]}=ze;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getInfo(e,r=""){let{INFO:[n,i]}=ze;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async getLanguages(e,r=""){let{LANGUAGES:[n,i]}=ze;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}static async startSiteRender(e){let{BUILD_START:[r,n]}=ze;return await Fe({endpoint:`${r}${e}${n}`})}static async endSiteRender(e,r){let{BUILD_END:[n,i]}=ze;return await ht({endpoint:`${n}${e}${i}`,body:r})}static async getDistributorData(e,r,n,i,o){let{GET_DISTRIBUTOR_DATA:[s,a]}=ze,u=i||e.site,h=o||e.language;return await ht({endpoint:`${s}${u}${a}`,body:r,headers:{lang:h},cacheKey:n})}static async getSitemap(e){let{GET_SITEMAP:[r,n]}=ze;return await Fe({endpoint:`${r}${e}${n}`})}static async getSocials(e,r=""){let{SOCIALS:[n,i]}=ze;return await Fe({endpoint:`${n}${e}${i}`,cacheKey:r})}};var Pn=class{static getBody(e,r){let{order:n,sources:i,quantity:o,mode:s,fixed:a,fullRelations:u=!1,allLanguages:h=!1,preferenceLanguage:c=!1,referenceId:p}=e;return s==="auto"?{mode:s,order:n,sources:i,quantity:o,fullRelations:u,allLanguages:h,preferenceLanguage:c}:s==="manual"?{mode:s,fixed:a,fullRelations:u}:s==="navigation"?{mode:s,order:n,quantity:o,fullRelations:u,referenceId:p||r?.structuredDataContent?.id}:(console.log(`Error: Distribuidor mode: ${s} is not recognized on page ${r?.id}.`),e)}static async fetchContentTypeData(e){let{page:r,component:{data:n},cacheKey:i}=e;if(!n)return xo(`Error: Page ${r.id} has \`hasDistributorData: true\` but it doesn't have a \`data\` prop`),[];if(Array.isArray(n.sources)&&n.sources.length<1)return xo(`Warning: Page with id: ${r.id} has a ReferenceField with empty \`data.sources\``),[];let{site:o,lang:s}=n,a=this.getBody(n,r);return await be.getDistributorData(r,a,i,o,s)}static async getDistributorData({page:e,cacheKey:r=""}){try{let{template:n}=e,i=async(a,u=1)=>{if(!(!a||typeof a!="object")&&JSON.stringify(a).includes('"hasDistributorData":true'))for(let h in a){if(h==="queriedItems")continue;let p=a[h];!p||typeof p!="object"||(p.hasDistributorData&&(p.queriedItems=await this.fetchContentTypeData({page:e,cacheKey:r,component:p})),await i(p,u+1))}};return await(async a=>(await i([a]),a))(n)}catch(n){console.error(`Error en get distributor ${n}`),process.exit(1)}}};var Dn=class{_defaultHeaders;_defaultFooters;_navigations;constructor(){this._navigations={footers:[],headers:[]},this._defaultHeaders={},this._defaultFooters={}}set navigations(e){this._navigations=e,this._defaultFooters=this.getDefaultFooters(),this._defaultHeaders=this.getDefaultHeaders()}get navigations(){return this._navigations}getDefaultFooters(){return[...this.navigations.footers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getDefaultHeaders(){return[...this.navigations.headers].filter(i=>!!i.setAsDefault).reduce((i,o)=>{let{language:s}=o;return{...i,[s]:o}},{})}getRightLanguage(e,r,n){if(!e||!r)return null;let o=e.find(s=>s.language===n&&s.navigationLanguages?.find(a=>a.navigationId===r))||e.find(s=>s.id===r);return o?{...o}:null}getPageHeader(e,r){return this.getRightLanguage(this.navigations.headers,e,r)}getPageFooter(e,r){return this.getRightLanguage(this.navigations.footers,e,r)}getPageNavigations(e){let{header:r,footer:n,language:i,template:{templateType:o},templateConfig:{defaultHeader:s,defaultFooter:a,templates:u}}=e,h=b=>{let C=b.find(A=>typeof A=="number");return typeof C=="number"?C:null},c=h([r,u?.[o]?.defaultHeader,s]),p=h([n,u?.[o]?.defaultFooter,a]),g=c?this.getPageHeader(c,i):c===0?null:this._defaultHeaders[i],m=p?this.getPageFooter(p,i):p===0?null:this._defaultFooters[i];return{header:g,footer:m}}};var Ro=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 Fe({endpoint:e});this.settings=r}async resetRender(){let{resetRender:e}=this.ENDPOINTS;await ht({endpoint:e})}},Fo=new Ro;var ko=q(require("node:path")),hr=q(ft());async function On(t){for await(let e of t)for(let r of e.domains){let n=Object.values(r)[0],i=ko.default.resolve(__dirname,`../../dist${n}`),o=ko.default.resolve(__dirname,`../../assets/page-data${n}`);if(je(`Site dir ${i}`),je(`Page data dir ${o}`),!hr.default.existsSync(i))return;try{await hr.default.rm(i,{recursive:!0}),je(`${i} is deleted!`)}catch(s){console.log(s)}if(!hr.default.existsSync(o))return;try{await hr.default.rm(o,{recursive:!0}),console.info(`${o} is deleted!`)}catch(s){console.log(s)}}}var hd=q(Xe());function Mo(t,e,r,n="jpg"){let i=typeof t=="string"?t:t?.url;return i?i.split("/")[2].includes("cloudinary.com")?Sy(i,`c_fill,w_${e},h_${r}`):xy(i,`f/${n}/w/${e}/h/${r}`):null}function xy(t,e){let r=t.split("/"),n=r.slice(0,-1).join("/"),i=r.slice(-1)[0];return`${n}/${e}/${i}`}function Sy(t,e){let r=t.replace("https://",""),n=r.split("/").slice(0,4).join("/"),i=r.replace(n,"");return`https://${n}/${e}${i}`}hd.default.config();var Ey=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false"),Cy=25;function Py({socialTitle:t,socialDescription:e,socialImage:r}){return{type:"website",title:t,description:e,image:r?Mo(r,1280,768):"",twitterImage:r?Mo(r,1280,768):""}}function Dy(t){let{title:e,metaTitle:r,metaDescription:n,canonicalURL:i,locale:o,url:s,isIndexed:a,follow:u,metasAdvanced:h,pageLanguages:c,fullUrl:p,metaKeywords:g}=t,m=h?.split(",").filter(Boolean).map(b=>b.trim().toLowerCase())||[];return{title:(r||e||"").trim(),description:n,canonical:i&&i.trim()&&i!==p?i.trim():a?p:void 0,locale:o,url:s,index:a?"index":"noindex",follow:u?"follow":"nofollow",translate:m.includes("notranslate")?"notranslate":"",metasAdvanced:m.filter(b=>b!=="notranslate").join(),pageLanguages:c,metaKeywords:g?.filter(Boolean).map(b=>b.replace(/"/g,"'")).join(", ")}}async function qo(t,e,r=!1){let{id:n,title:i,fullPath:o,language:s,breadcrumb:a,socialDescription:u,socialImage:h,socialTitle:c}=t,{baseUrl:p,BUILD_MODE:g,cloudinaryName:m,griddoVersion:b,siteLangs:C,siteMetadata:A,siteOptions:F,siteScript:N,siteSlug:U,socials:X,theme:W,navigations:{header:ne,footer:_e}}=e;t.breadcrumb=a,t.siteSlug=U,t.apiUrl=p,t.publicApiUrl=e.publicBaseUrl,t.instance=e.instance;let _=C.find(({id:I})=>I===t?.language)?.locale.replace(/_/g,"-"),w=Dy(t),E=Py({socialDescription:u,socialImage:h,socialTitle:c}),$=Ey?o.compose:`${o.domain}${o.compose}`,R=new Date().toString();return{path:$,size:void 0,context:{id:n,title:i,fullPath:o,locale:_,languageId:s,theme:W,siteMetadata:A,pageMetadata:w,openGraph:E,socials:X,siteLangs:C,cloudinaryName:m,siteOptions:F,BUILD_MODE:g,griddoVersion:b,renderDate:R,siteScript:N,header:ne,footer:_e,page:t}}}async function pd(t,e){return await qo(t,e)}async function md({page:t,pages:e,isRoot:r=!1,defaultLang:n,template:i,totalQueriedItems:o},s){let a=e.map(async(u,h)=>{let c=h===0,p=h+1,{domainUrl:g,compose:m}=t.fullPath,b={...t,fullPath:{...t.fullPath,compose:To(m,p,{addEndingSlash:!0})},fullUrl:To(t.fullUrl,p,{addEndingSlash:!0}),slug:To(t.slug,p),title:dd(t.title,p),metaTitle:dd(t.metaTitle||"",p),disableHrefLangs:p>1,template:{...i,isFirstPage:c,pageNumber:p,totalPages:e.length,baseLink:`${g}${m}`,queriedItems:u,totalQueriedItems:o?.length},isRoot:r,defaultLang:n};return await qo(b,s,!c)});return Promise.all(a)}function gd(t,e){let{multiPageElements:r,...n}=t,i=JSON.parse(JSON.stringify(r));i.find(({sectionSlug:s})=>s==="/")||i.push({});let o=i.map(async s=>{let a=JSON.parse(JSON.stringify(n)),{sectionSlug:u="/",title:h="",metaTitle:c="",metaDescription:p=""}=s,g=typeof h=="string"?h:h.content,m=a.fullPath.compose||"",b=a.fullUrl.endsWith("/")?a.fullUrl.slice(0,-1):a.fullUrl,C=u?.replace(/\//g,""),F=u==="/"?C:C+"/",N=m.endsWith("/")?"":"/",U=`${m}${N}${F}`;return g.trim()&&(a.title=g),p.trim()&&(a.metaDescription=p),a.fullUrl=`${b}/${F}`,a.fullPath.compose=U,a.slug=U,a.template.activeSectionSlug=u,a.template.activeSectionBase=b,a.metaTitle=c.trim()||g.trim()||a.metaTitle,await qo(a,e)});return Promise.all(o)}function yd(t){return new Promise(r=>{let n=(i,o=0)=>{if(!(!i||typeof i!="object")){for(let s in i){let a=i[s],u=a||typeof a=="object",h=JSON.stringify(a).includes('"hasGriddoMultiPage":true');if(!u||!h)continue;let{component:c,hasGriddoMultiPage:p,elements:g}=a;c&&p&&r(g||[]),n(a,o+1)}o||r(null)}};n([t])})}function Oy(t,e,r){return e?.slice(t*(r-1),t*r)}function Ay(t,e){let r=Math.ceil(e.length/t)||1;return Array.from({length:r},(i,o)=>o+1)?.map(i=>Oy(t,e,i))}function vd(t){let e=t.queriedItems||[],r=t?.itemsPerPage||Cy;return Ay(r,e)}function fd(t){return t.replace(/\/+$/,"/")}function To(t,e,r){let n=t.endsWith("/")?"":"/",i=r?.addEndingSlash?"/":"";return e<=1?fd(`${t}${i}`):fd(`${t}${n}${e}${i}`)}function dd(t,e){return!t||e<=1?t:`${t} - ${e}`}var w1=q(ft()),x1=q(Xd());var S1=process.env.API_URL,E1=!!process.env.GRIDDO_RENDER_ALL_SITES||!!process.env.updateAllSites,Ut=process.env.GRIDDO_RENDER_SITE&&parseInt(process.env.GRIDDO_RENDER_SITE)||process.env.testSite&&parseInt(process.env.testSite),Hd=(process.env.GRIDDO_RENDER_PAGES||process.env.testPage||"").split(",").map(t=>parseInt(t)).filter(Boolean),X_=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");async function Gd(t){console.info(`API URL ${S1}`),await Pt.login();let e=await be.getAll(),r=E1?e.filter(o=>!Ut||o.id===Ut):e.filter(o=>Ut?o.id===Ut:!!o.shouldBeUpdated);if(r.length){let o=r.map(async s=>{let a=await be.getLanguages(s.id);return s.domains=a.items.filter(u=>u.domain&&u.domain.slug.indexOf(t)>0).map(u=>({[u.id]:`${u.domain.slug}${u.path}`}))});await Promise.all(o)}let n=r.filter(o=>Ut?o.id===Ut:!!o.isPublished&&o.domains.length>0),i=r.filter(o=>!o.isPublished&&o.shouldBeUpdated);return{sitesToPublish:n,sitesToUnpublish:i}}async function zd(t){for(let e of t){let r=await be.startSiteRender(e.id),{siteHash:n}=r,i={siteHash:n,publishHashes:[],unpublishHashes:[]};je(`Unpublish site(s): ${r.publishIds}`),await be.endSiteRender(e.id,i)}await On(t)}async function Wd(t){let e=await be.startSiteRender(t),r=await be.getInfo(t),n=await be.getLanguages(t),i=await be.getSocials(t),o=n.items,s=o.find(b=>b.isDefault),{siteHash:a,unpublishHashes:u,publishIds:h}=e,{headers:c,footers:p}=r,g=Hd.length?Hd.filter(b=>h.includes(b)):h;return{siteInfo:r,validPagesIds:g,siteHash:a,unpublishHashes:u,siteLangs:o,defaultLang:s,headers:c,footers:p,socials:i}}Yd.default.config();var C1=process.env.API_URL,P1=process.env.CXBRANCH,D1=process.env.GRIDDO_REACT_APP_INSTANCE||process.env.REACT_APP_INSTANCE,Jd=parseInt(process.env.GRIDDO_API_CONCURRENCY_COUNT||"")||10,O1=process.env.PUBLIC_API_URL,A1=process.env.GRIDDO_RENDERID||new Date().valueOf().toString(),Vd=[],vs={};async function Zd(t,e){console.info(`API calls with ${Jd} threads`),Er.default.existsSync(t)&&Er.default.rmSync(t,{recursive:!0}),Er.default.mkdirSync(t),Er.default.mkdirSync(Xt.default.resolve(t,"metadata"));try{let{sitesToPublish:r,sitesToUnpublish:n}=await Gd(e);await Fo.getAll(),r.length||n.length||(console.warn("There are no sites to update"),process.exit(0)),console.info(`Sites to publish: ${Po(r)}`),console.info(`Sites to unpublish: ${Po(n)}`),await zd(n),await On([...r]);for(let i of r){let{id:o,slug:s,theme:a,favicon:u}=i,{siteInfo:h,validPagesIds:c,siteHash:p,unpublishHashes:g,siteLangs:m,defaultLang:b,headers:C,footers:A,socials:F}=await Wd(o),{cloudinaryName:N,useMetaTitle:U,useMetaKeywords:X,showBasicMetaRobots:W,avoidHrefLangsOnCanonicals:ne,avoidSelfReferenceCanonicals:_e,avoidHrefLangXDefault:Z,avoidDebugMetas:_}=Fo.settings;vs[o]={siteHash:p,unpublishHashes:g,publishHashes:[]};let w=new Dn;w.navigations={headers:C,footers:A},i.languages=m;let E=zl(o,p),$=h.siteScript,R={siteUrl:h.slug,title:h.name,favicon:u},j={baseUrl:C1,publicBaseUrl:O1,instance:D1,siteSlug:s,theme:a,siteMetadata:R,socials:F,siteLangs:m,cloudinaryName:N,griddoVersion:En,siteOptions:{useMetaTitle:U,useMetaKeywords:X,showBasicMetaRobots:W,avoidHrefLangsOnCanonicals:ne,avoidSelfReferenceCanonicals:_e,avoidHrefLangXDefault:Z,avoidDebugMetas:_},BUILD_MODE:P1,siteScript:$};je(`${i.name} site`);let I=async P=>{let k=[],ie=await be.getPage(P,E);if(!ie)return;Vd.push(P);let Ae=JSON.parse(JSON.stringify(j));Ae.navigations=w.getPageNavigations(ie);let J=await Pn.getDistributorData({page:ie,cacheKey:A1}),he=await yd(J),We=ie?.mode==="list",pe=!We&&he,l=!pe&&!We;if(We){let f={page:ie,pages:vd(J),isRoot:!1,defaultLang:b,template:J,totalQueriedItems:J.queriedItems};k=await md(f,Ae)}if(pe){let f=ie;f.template=J,f.multiPageElements=he,f.defaultLang=b,k=await gd(f,Ae)}if(l){let f=ie;f.template=J,f.defaultLang=b,k=[await pd(f,Ae)]}vs[o].publishHashes.push(ie.hash),await k1(t,k),F1(t,r),I1(t,vs),R1(t,Vd)},L=(0,Qd.default)(Jd),M=c.map(P=>L(()=>I(P)));await Promise.all(M)}}catch(r){console.error(r.message),process.exit(1)}}function I1(t,e){zn.default.writeJSONSync(Xt.default.resolve(t,"metadata","buildProcessData.json"),e)}function R1(t,e){zn.default.writeJSONSync(Xt.default.resolve(t,"metadata","createdPages.json"),e)}function F1(t,e){zn.default.writeJSONSync(Xt.default.resolve(t,"metadata","sitesToPublish.json"),e)}async function k1(t,e){e.forEach(n=>Co(n,["editorID","parentEditorID"]));let r=e.map(async n=>{let i=`${Xl(n.path)}.json`,o=JSON.stringify(n),s=Xt.default.resolve(t,i);await Kd.default.writeFile(s,o)});await Promise.all(r)}var M1=bs.default.resolve(__dirname,"../store/"),T1=bs.default.resolve(__dirname,"../apiCache");async function _s(t){Bl(),await Zd(M1,t),od(T1)}var eh=require("node:child_process"),th=q(Xe()),rh=q(_o());th.default.config();var q1=rh.default.sync(__dirname);function ws(t){return e=>N1(e,t)}function N1(t,e){let[r,...n]=t.split(" "),{error:i,status:o}=(0,eh.spawnSync)(r,n,{cwd:q1,stdio:["ignore","inherit","ignore"],encoding:"utf8",shell:!0,env:Object.assign({GRIDDO_EXPORTER:"true"},process.env,e)});i&&(console.error(i),process.exit(1)),o!==0&&(console.error(`Command \`${t}\` exited with code ${o}`),process.exit(1))}var nh=q(Xe());nh.default.config();var ah=q(require("node:fs")),Wn=q(require("node:path"));var ih=q(require("node:fs/promises")),xs=q(require("node:path")),oh=q(ft());async function*sh(t){let e=xs.default.resolve(t),r=nd(e).filter(n=>xs.default.extname(n)===".json");for(let n of r)try{let i=await ih.default.stat(n),o=await oh.default.readJSON(n,{encoding:"utf-8"});o.size=i.size/1024,yield o}catch(i){console.error(`Error: The file ${n} doesn't exist`,i)}}var j1=process.env.API_URL;async function L1(t){let{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,content:u,template:h}=t;return await ht({endpoint:`${j1}/search`,body:{title:e,description:r,image:n,pageId:i,languageId:o,siteId:s,url:a,template:h,content:$1(u)}})}function $1(t){let e=B1(["meta","link","style","script","noscript","nav","header","footer"],t),r=U1(e);return X1(r)}function B1(t,e){let r=e;return t.forEach(n=>{r=r.replace(new RegExp(`<${n}.*?>.*?</${n}>`,"gis")," ").replace(new RegExp(`(<${n}([^>]+)>)`,"gis")," ")}),r}function U1(t){return t.replace(/(<([^>]+)>)/gis," ")}function X1(t){return t.replace(/\s+/g," ")}async function uh(){let t=Wn.default.resolve(__dirname,"../store"),e=JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false");for await(let r of sh(t)){let{context:{page:n,openGraph:i}}=r,{compose:o,domain:s}=n.fullPath,a=e?Wn.default.resolve(__dirname,`../dist/${o}/index.html`):Wn.default.resolve(__dirname,`../dist${s}${o}/index.html`),u=ah.default.readFileSync(a).toString(),h={siteId:n.site,pageId:n.id,title:n.title,languageId:n.language,url:n.fullUrl,template:n.template.templateType||n.templateId,description:i.description,image:i.image,content:u};await L1(h)}}var $e=q(require("node:fs")),Ue=q(require("node:path"));var Pe=q(Qt()),ch=q(Xe());ch.default.config();function lh(t){let e=["dist","assets"],r=["public","store"],n=["apiCache"];JSON.parse(process.env.GRIDDO_EXPORT_STRIP_DOMAIN_FROM_PATH||"false")?n.push(".cache"):r.push(".cache");let o=Ue.default.resolve(rd,"exports/sites"),s=Ue.default.resolve(__dirname,"../caches"),a=H1(t),u=ws({DOMAIN:t,GRIDDO_ASSET_PREFIX:a,NEEDS_ASSET_DOMAIN_PREFIX:a&&a!=="",GRIDDO_RENDERID:new Date().valueOf()}),h=()=>{console.info(`Initializing exporter for the domain ${t}`),g(),m()},c=()=>{for(let _ of e){let{currentExportArchivePath:w,currentExportWorkingPath:E}=p(_);$e.default.existsSync(w)&&(console.log(`\uFE0FRestoring ${Pe.default.gray(w)}`),u(`cp -R ${w} ${E}`))}ne()},p=(_="")=>{if(_==="/")throw new Error(`Artifact path cannot be root: ${_}`);let w=Ue.default.resolve(o,t),E=Ue.default.resolve(w,_),$=Ue.default.resolve(E,t),R=Ue.default.resolve(s,t),j=Ue.default.resolve(R,_),I=Ue.default.resolve(j,t),L=`${E}-BACKUP`,M=Ue.default.resolve(td,_);return{domainExportArchiveBasePath:w,currentExportArchivePath:E,currentExportBackupPath:L,currentExportWorkingPath:M,currentExportArchivePathInDomain:$,domainCacheArchiveBasePath:R,currentExportArchiveCachePath:j,currentExportArchiveCachePathInDomain:I}},g=()=>{for(let _ of[...e,...r,...n]){let{currentExportWorkingPath:w}=p(_);$e.default.existsSync(w)&&(console.log(`Cleanup dirty ${Pe.default.gray(w)}`),u(`rm -rf ${w}`))}},m=()=>{let{domainExportArchiveBasePath:_,domainCacheArchiveBasePath:w}=p();for(let E of[_,w])$e.default.existsSync(E)||(console.info(`Creating ${E}`),u(`mkdir -p ${E}`))},b=_=>{let{currentExportArchivePath:w,currentExportWorkingPath:E}=p(_);console.info(`Moving files from ${Pe.default.gray(E)} to ${Pe.default.gray(w)}`),u(`mv ${E} ${w}`)},C=()=>{for(let _ of e){let{currentExportWorkingPath:w,currentExportArchivePath:E}=p(_);if(!$e.default.existsSync(w)){console.log("Source directory has not been created:",w);continue}try{A(_),b(_),N(_)}catch($){console.log(`Error moving files to ${E}`,$.message),F(_);continue}}},A=_=>{let{currentExportArchivePath:w,currentExportBackupPath:E}=p(_);$e.default.existsSync(w)&&(console.info(`Creating backup of ${Pe.default.gray(w)}`),u(`mv ${w} ${E}`))},F=_=>{let{currentExportArchivePath:w,currentExportBackupPath:E}=p(_);$e.default.existsSync(E)&&(console.log(`\uFE0FRestoring backup ${Pe.default.gray(w)}`),u(`mv ${E} ${w}`))},N=_=>{let{currentExportArchivePath:w,currentExportBackupPath:E}=p(_);console.log(`\uFE0FRemoving backup ${Pe.default.gray(w)}`),u(`rm -rf ${E}`)},U=()=>{for(let _ of n){let{currentExportArchiveCachePath:w,currentExportWorkingPath:E}=p(_);if($e.default.existsSync(E))console.info(`Moving files from ${Pe.default.gray(E)} to ${Pe.default.gray(w)}`),u(`mv ${E} ${w}`);else throw new Error(`Error moving files from ${E}: Path does not exist.`)}},X=()=>{for(let _ of n){let{currentExportArchiveCachePath:w,currentExportWorkingPath:E}=p(_);$e.default.existsSync(w)&&(console.log(`\uFE0FRestoring ${Pe.default.gray(w)}`),u(`mv ${w} ${E}`))}},W=()=>{u("yarn gatsby-build")},ne=()=>{let{currentExportWorkingPath:_}=p("dist"),{currentExportWorkingPath:w}=p("public");$e.default.existsSync(_)&&(console.log(`Moving ${Pe.default.gray(_)} to ${Pe.default.gray(w)}`),u(`mv ${_} ${w}`))},_e=()=>{for(let _ of r){let{currentExportWorkingPath:w}=p(_);$e.default.existsSync(w)&&(console.log(`\uFE0FRemoving ${Pe.default.gray(w)}`),u(`rm -rf ${w}`))}},Z=()=>{g()};return{init:h,getArtifactPaths:p,archiveExportArtifact:b,archiveArtifacts:C,restoreArtifacts:c,createArtifactBackup:A,restoreArtifactBackup:F,deleteArtifactBackup:N,archiveCacheArtifacts:U,restoreCacheArtifacts:X,runGatsbyBuild:W,removeDisposableArtifacts:_e}}function H1(t){let e=process.env.GRIDDO_ASSET_PREFIX||process.env.ASSET_PREFIX;return!e||!t||!t.startsWith("pro-")?"":`${e}/${t}`}async function Ss(){Do("gatsby");let t=0,e=await Ao();for(let r of e){let n=lh(r);t=await Lt(n.init,n.restoreArtifacts,n.restoreCacheArtifacts).catch(o=>{console.error("Error in init() || restoreArtifacts() || restoreCacheArtifacts() :",o?.stdout?.toString()||o),process.exit(1)}),console.info(`success restore ${r} - ${t}s`),t=await Lt(async()=>await _s(r)).catch(o=>{console.error("Error in downloadBuildData() :",o?.stdout?.toString()||o),process.exit(1)}),console.info(`success download ${r} - ${t}s`),t=await Lt(n.runGatsbyBuild).catch(o=>{console.error("Error in runGatsbyBuild() :",o?.stdout?.toString()||o),process.exit(1)}),console.info(`success gatsby build command - ${t}s`),JSON.parse(process.env.GRIDDO_SEARCH_FEATURE||"false")&&(t=await Lt(uh).catch(o=>{console.error("Error while uploads search content in DDBB :",o?.stdout?.toString()||o),process.exit(1)}),console.info(`success upload search information to DDBB - ${t}s`)),t=await Lt(n.removeDisposableArtifacts,n.archiveArtifacts,n.archiveCacheArtifacts).catch(o=>{console.error("Error in removeDisposableArtifacts() || archiveArtifacts()|| archiveCacheArtifacts() :",o?.stdout?.toString()||o),process.exit(1)}),console.info(`success archive ${r} - ${t}s`)}}async function G1(){await Ss()}G1().catch(t=>{console.error("Error in main():",t?.stdout?.toString()||t),process.exit(1)});
|