metaapi.cloud-copyfactory-sdk
Version:
Javascript SDK for SDK for CopyFactory trade copying API. Can copy trades both between MetaTrader 5 (MT5) and MetaTrader 4 (MT4). (https://metaapi.cloud)
2 lines • 400 kB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
(()=>{var e={6310:(e,t,n)=>{class o{log(){}isLevelEnabled(){return!1}addContext(){}removeContext(){}clearContext(){}}["Trace","Debug","Info","Warn","Error","Fatal","Mark"].forEach((e=>{o.prototype[e.toLowerCase()]=()=>{},o.prototype[`is${e}Enabled`]=()=>!1}));const i=(()=>{try{return n(4296)}catch(e){return null}})(),a=i?i.getLogger:()=>new o;e.exports={getLogger:a}},4666:e=>{"use strict";var t;"Set"in global?"function"==typeof Set.prototype.forEach&&(t=!1,new Set([!0]).forEach((function(e){t=e})),!0===t)?e.exports=function(e){var t=[];return new Set(e).forEach((function(e){t.push(e)})),t}:e.exports=function(e){var t=new Set;return e.filter((function(e){if(!t.has(e))return t.add(e),!0}))}:e.exports=function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}},7453:(e,t,n)=>{"use strict";var o=n(6750),i=n(8583),a=n(3489),r=n(760),s=n(9358),c=n(7036),p=n(7961),u=n(8263),l=n(5697),d=n(7379),m=n(9981),f=Object("a"),h="a"!==f[0]||!(0 in f),x=d("String.prototype.split");e.exports=function(e){var t,n=u(this),d=h&&m(n)?x(n,""):n,f=p(d.length);if(!c(e))throw new TypeError("Array.prototype.map callback must be a function");arguments.length>1&&(t=arguments[1]);for(var v=o(n,f),g=0;g<f;){var b=l(g);if(s(n,b)){var y=r(n,b),w=i(e,t,[y,g,n]);a(v,b,w)}g+=1}return v}},4770:(e,t,n)=>{"use strict";var o=n(4289),i=n(1781),a=n(5559),r=n(7379),s=n(7453),c=n(7373),p=a.apply(c()),u=n(2717),l=r("Array.prototype.slice"),d=function(e,t){return i(e),p(e,l(arguments,1))};o(d,{getPolyfill:c,implementation:s,shim:u}),e.exports=d},7373:(e,t,n)=>{"use strict";var o=n(2868),i=n(7453);e.exports=function(){var e=Array.prototype.map;return o(e)?e:i}},2717:(e,t,n)=>{"use strict";var o=n(4289),i=n(7373);e.exports=function(){var e=i();return o(Array.prototype,{map:e},{map:function(){return Array.prototype.map!==e}}),e}},9118:(e,t,n)=>{e.exports={parallel:n(9162),serial:n(1357),serialOrdered:n(9087)}},7651:e=>{function t(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=function(e){Object.keys(e.jobs).forEach(t.bind(e)),e.jobs={}}},5912:(e,t,n)=>{var o=n(9265);e.exports=function(e){var t=!1;return o((function(){t=!0})),function(n,i){t?e(n,i):o((function(){e(n,i)}))}}},9265:e=>{e.exports=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)}},7594:(e,t,n)=>{var o=n(5912),i=n(7651);e.exports=function(e,t,n,a){var r=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[r]=function(e,t,n,i){return 2==e.length?e(n,o(i)):e(n,t,o(i))}(t,r,e[r],(function(e,t){r in n.jobs&&(delete n.jobs[r],e?i(n):n.results[r]=t,a(e,n.results))}))}},4528:e=>{e.exports=function(e,t){var n=!Array.isArray(e),o={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&o.keyedList.sort(n?t:function(n,o){return t(e[n],e[o])}),o}},5353:(e,t,n)=>{var o=n(7651),i=n(5912);e.exports=function(e){Object.keys(this.jobs).length&&(this.index=this.size,o(this),i(e)(null,this.results))}},9162:(e,t,n)=>{var o=n(7594),i=n(4528),a=n(5353);e.exports=function(e,t,n){for(var r=i(e);r.index<(r.keyedList||e).length;)o(e,t,r,(function(e,t){e?n(e,t):0!==Object.keys(r.jobs).length||n(null,r.results)})),r.index++;return a.bind(r,n)}},1357:(e,t,n)=>{var o=n(9087);e.exports=function(e,t,n){return o(e,t,null,n)}},9087:(e,t,n)=>{var o=n(7594),i=n(4528),a=n(5353);function r(e,t){return e<t?-1:e>t?1:0}e.exports=function(e,t,n,r){var s=i(e,n);return o(e,t,s,(function n(i,a){i?r(i,a):(s.index++,s.index<(s.keyedList||e).length?o(e,t,s,n):r(null,s.results))})),a.bind(s,r)},e.exports.ascending=r,e.exports.descending=function(e,t){return-1*r(e,t)}},5116:(e,t,n)=>{"use strict";var o=n(8612),i=n(1768),a=n(8928),r=n(9770);e.exports=r||o.call(a,i)},3192:(e,t,n)=>{"use strict";var o=n(8612),i=n(1768),a=n(5116);e.exports=function(){return a(o,i,arguments)}},1768:e=>{"use strict";e.exports=Function.prototype.apply},8928:e=>{"use strict";e.exports=Function.prototype.call},319:(e,t,n)=>{"use strict";var o=n(8612),i=n(4453),a=n(8928),r=n(5116);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return r(o,a,e)}},9770:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},5559:(e,t,n)=>{"use strict";var o=n(7771),i=n(4429),a=n(319),r=n(3192);e.exports=function(e){var t=a(arguments),n=e.length-(arguments.length-1);return o(t,1+(n>0?n:0),!0)},i?i(e.exports,"apply",{value:r}):e.exports.apply=r},7379:(e,t,n)=>{"use strict";var o=n(210),i=n(319),a=i([o("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=o(e,!!t);return"function"==typeof n&&a(e,".prototype.")>-1?i([n]):n}},9779:(e,t,n)=>{var o=n(3837),i=n(2781).Stream,a=n(3463);function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}e.exports=r,o.inherits(r,i),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof a)){var t=a.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,t){return i.prototype.pipe.call(this,e,t),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){t.dataSize&&(e.dataSize+=t.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},520:e=>{"use strict";function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}function n(e){return t(e,2)}function o(o,i){"string"!=typeof o&&(i=o,o=e.exports.ISO8601_FORMAT),i||(i=e.exports.now());var a,r,s,c,p=n(i.getDate()),u=n(i.getMonth()+1),l=n(i.getFullYear()),d=n(l.substring(2,4)),m=o.indexOf("yyyy")>-1?l:d,f=n(i.getHours()),h=n(i.getMinutes()),x=n(i.getSeconds()),v=t(i.getMilliseconds(),3),g=(a=i.getTimezoneOffset(),r=Math.abs(a),s=String(Math.floor(r/60)),c=String(r%60),s=("0"+s).slice(-2),c=("0"+c).slice(-2),0===a?"Z":(a<0?"+":"-")+s+":"+c);return o.replace(/dd/g,p).replace(/MM/g,u).replace(/y{1,4}/g,m).replace(/hh/g,f).replace(/mm/g,h).replace(/ss/g,x).replace(/SSS/g,v).replace(/O/g,g)}function i(e,t,n,o){e["set"+(o?"":"UTC")+t](n)}e.exports=o,e.exports.asString=o,e.exports.parse=function(t,n,o){if(!t)throw new Error("pattern must be supplied");return function(t,n,o){var a=t.indexOf("O")<0,r=!1,s=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){i(e,"FullYear",t,a)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){i(e,"Month",t-1,a),e.getMonth()!==t-1&&(r=!0)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){r&&i(e,"Month",e.getMonth()-1,a),i(e,"Date",t,a)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){i(e,"Hours",t,a)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){i(e,"Minutes",t,a)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){i(e,"Seconds",t,a)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){i(e,"Milliseconds",t,a)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(e,t){t="Z"===t?0:t.replace(":","");var n=Math.abs(t),o=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+o)}}],c=s.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),p=s.filter((function(e){return e.index>-1}));p.sort((function(e,t){return e.index-t.index}));var u=new RegExp(c.regexp).exec(n);if(u){var l=o||e.exports.now();return p.forEach((function(e,t){e.fn(l,u[t+1])})),l}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,o)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"},1227:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(o++,"%c"===e&&(i=o))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=n(2447)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},2447:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,a,r=null;function s(...e){if(!s.enabled)return;const o=s,i=Number(new Date),a=i-(n||i);o.diff=a,o.prev=n,o.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";r++;const a=t.formatters[i];if("function"==typeof a){const t=e[r];n=a.call(o,t),e.splice(r,1),r--}return n})),t.formatArgs.call(o,e),(o.log||t.log).apply(o,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=o,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function i(e,t){let n=0,o=0,i=-1,a=0;for(;n<e.length;)if(o<t.length&&(t[o]===e[n]||"*"===t[o]))"*"===t[o]?(i=o,a=n,o++):(n++,o++);else{if(-1===i)return!1;o=i+1,a++,n=a}for(;o<t.length&&"*"===t[o];)o++;return o===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(7824),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},5158:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(1227):e.exports=n(39)},39:(e,t,n)=>{const o=n(6224),i=n(3837);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let o=0;o<n.length;o++)e.inspectOpts[n[o]]=t.inspectOpts[n[o]]},t.log=function(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:o,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),a=` ${i};1m${o} [0m`;n[0]=a+n[0].split("\n").join("\n"+a),n.push(i+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+o+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):o.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(2130);e&&(e.stderr||e).level>=2&&(t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let o=process.env[t];return o=!!/^(yes|on|true|enabled)$/i.test(o)||!/^(no|off|false|disabled)$/i.test(o)&&("null"===o?null:Number(o)),e[n]=o,e}),{}),e.exports=n(2447)(t);const{formatters:a}=e.exports;a.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},a.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},2296:(e,t,n)=>{"use strict";var o=n(4429),i=n(3464),a=n(4453),r=n(7296);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],l=!!r&&r(e,t);if(o)o(e,t,{configurable:null===p&&l?l.configurable:!p,enumerable:null===s&&l?l.enumerable:!s,value:n,writable:null===c&&l?l.writable:!c});else{if(!u&&(s||c||p))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},4289:(e,t,n)=>{"use strict";var o=n(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,r=Array.prototype.concat,s=n(2296),c=n(1044)(),p=function(e,t,n,o){if(t in e)if(!0===o){if(e[t]===n)return}else if("function"!=typeof(i=o)||"[object Function]"!==a.call(i)||!o())return;var i;c?s(e,t,n,!0):s(e,t,n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},a=o(t);i&&(a=r.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;s+=1)p(e,a[s],t[a[s]],n[a[s]])};u.supportsDescriptors=!!c,e.exports=u},3463:(e,t,n)=>{var o=n(2781).Stream,i=n(3837);function a(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=a,i.inherits(a,o),a.create=function(e,t){var n=new this;for(var o in t=t||{})n[o]=t[o];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",(function(){})),n.pauseStream&&e.pause(),n},Object.defineProperty(a.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),a.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},a.prototype.resume=function(){this._released||this.release(),this.source.resume()},a.prototype.pause=function(){this.source.pause()},a.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},a.prototype.pipe=function(){var e=o.prototype.pipe.apply(this,arguments);return this.resume(),e},a.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},a.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}},6504:(e,t,n)=>{"use strict";var o,i=n(319),a=n(7296);try{o=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!o&&a&&a(Object.prototype,"__proto__"),s=Object,c=s.getPrototypeOf;e.exports=r&&"function"==typeof r.get?i([r.get]):"function"==typeof c&&function(e){return c(null==e?e:s(e))}},3706:(e,t,n)=>{"use strict";var o=n(319),i=n(7296),a=n(4453),r={};try{r.__proto__=null}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!("toString"in r),c=i&&i(Object.prototype,"__proto__");e.exports=s&&(!!c&&"function"==typeof c.set&&o([c.set])||function(e,t){if(null==e)throw new a("set Object.prototype.__proto__ called on null or undefined");return e.__proto__=t,t})},9373:(e,t,n)=>{"use strict";var o=n(3489),i=n(8613),a=n(1221),r=n(1044)(),s=n(9480),c=n(9314),p=n(1648);function u(e,t){var n=new p(t);c(n,l),delete n.constructor;var i=s(a(e,"SYNC"));return o(n,"errors",i),n}r&&Object.defineProperty(u,"prototype",{writable:!1});var l=u.prototype;if(!i(l,"constructor",u)||!i(l,"message","")||!i(l,"name","AggregateError"))throw new p("unable to install AggregateError.prototype properties; please report this!");c(u.prototype,Error.prototype),e.exports=u},7114:(e,t,n)=>{"use strict";var o=n(9373);e.exports=function(){return"function"==typeof AggregateError?AggregateError:o}},2868:e=>{e.exports=function(e){var t=!0,n=!0,o=!1;if("function"==typeof e){try{e.call("f",(function(e,n,o){"object"!=typeof o&&(t=!1)})),e.call([null],(function(){"use strict";n="string"==typeof this}),"x")}catch(e){o=!0}return!o&&t&&n}return!1}},4429:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},3981:e=>{"use strict";e.exports=EvalError},1648:e=>{"use strict";e.exports=Error},4726:e=>{"use strict";e.exports=RangeError},6712:e=>{"use strict";e.exports=ReferenceError},3464:e=>{"use strict";e.exports=SyntaxError},4453:e=>{"use strict";e.exports=TypeError},3915:e=>{"use strict";e.exports=URIError},1781:(e,t,n)=>{"use strict";var o=n(4453);e.exports=function(e){if(null==e)throw new o(arguments.length>0&&arguments[1]||"Cannot call method on "+e);return e}},8263:(e,t,n)=>{"use strict";var o=n(8892),i=n(1781);e.exports=function(e){return i(e),o(e)}},8892:e=>{"use strict";e.exports=Object},4105:(e,t,n)=>{"use strict";var o=n(210)("%Object.defineProperty%",!0),i=n(6410)(),a=n(8824),r=n(4453),s=i?Symbol.toStringTag:null;e.exports=function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==n&&"boolean"!=typeof n||void 0!==i&&"boolean"!=typeof i)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!s||!n&&a(e,s)||(o?o(e,s,{configurable:!i,enumerable:!1,value:t,writable:!1}):e[s]=t)}},1503:(e,t,n)=>{"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=n(4149),a=n(5320),r=n(8923),s=n(2636);e.exports=function(e){if(i(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),o&&(Symbol.toPrimitive?t=function(e,t){var n=e[t];if(null!=n){if(!a(n))throw new TypeError(n+" returned for property "+String(t)+" of object "+e+" is not a function");return n}}(e,Symbol.toPrimitive):s(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var c=t.call(e,n);if(i(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===n&&(r(e)||s(e))&&(n="string"),function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var n,o,r,s="string"===t?["toString","valueOf"]:["valueOf","toString"];for(r=0;r<s.length;++r)if(n=e[s[r]],a(n)&&(o=n.call(e),i(o)))return o;throw new TypeError("No default value")}(e,"default"===n?"number":n)}},4149:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2261:(e,t,n)=>{var o;e.exports=function(){if(!o){try{o=n(5158)("follow-redirects")}catch(e){}"function"!=typeof o&&(o=function(){})}o.apply(null,arguments)}},938:(e,t,n)=>{var o,i,a,r=n(7310),s=r.URL,c=n(3685),p=n(5687),u=n(2781).Writable,l=n(9491),d=n(2261);o="undefined"!=typeof process,i="undefined"!=typeof window&&"undefined"!=typeof document,a=P(Error.captureStackTrace),o||!i&&a||console.warn("The follow-redirects package should be excluded from browser builds.");var m=!1;try{l(new s(""))}catch(e){m="ERR_INVALID_URL"===e.code}var f=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],h=["abort","aborted","connect","error","socket","timeout"],x=Object.create(null);h.forEach((function(e){x[e]=function(t,n,o){this._redirectable.emit(e,t,n,o)}}));var v=A("ERR_INVALID_URL","Invalid URL",TypeError),g=A("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),b=A("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",g),y=A("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),w=A("ERR_STREAM_WRITE_AFTER_END","write after end"),S=u.prototype.destroy||k;function _(e,t){u.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof g?e:new g({cause:e}))}},this._performRequest()}function E(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(o){var i=o+":",a=n[i]=e[o],r=t[o]=Object.create(a);Object.defineProperties(r,{request:{value:function(e,o,a){return s&&e instanceof s?e=T(e):L(e)?e=T(j(e)):(a=o,o=O(e),e={protocol:i}),P(o)&&(a=o,o=null),(o=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,o)).nativeProtocols=n,L(o.host)||L(o.hostname)||(o.hostname="::1"),l.equal(o.protocol,i,"protocol mismatch"),d("options",o),new _(o,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var o=r.request(e,t,n);return o.end(),o},configurable:!0,enumerable:!0,writable:!0}})})),t}function k(){}function j(e){var t;if(m)t=new s(e);else if(!L((t=O(r.parse(e))).protocol))throw new v({input:e});return t}function O(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new v({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new v({input:e.href||e});return e}function T(e,t){var n=t||{};for(var o of f)n[o]=e[o];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function C(e,t){var n;for(var o in t)e.test(o)&&(n=t[o],delete t[o]);return null==n?void 0:String(n).trim()}function A(e,t,n){function o(n){P(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return o.prototype=new(n||Error),Object.defineProperties(o.prototype,{constructor:{value:o,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),o}function F(e,t){for(var n of h)e.removeListener(n,x[n]);e.on("error",k),e.destroy(t)}function L(e){return"string"==typeof e||e instanceof String}function P(e){return"function"==typeof e}_.prototype=Object.create(u.prototype),_.prototype.abort=function(){F(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},_.prototype.destroy=function(e){return F(this._currentRequest,e),S.call(this,e),this},_.prototype.write=function(e,t,n){if(this._ending)throw new w;if(!(L(e)||"object"==typeof(o=e)&&"length"in o))throw new TypeError("data should be a string, Buffer or Uint8Array");var o;P(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new y),this.abort()):n&&n()},_.prototype.end=function(e,t,n){if(P(e)?(n=e,e=t=null):P(t)&&(n=t,t=null),e){var o=this,i=this._currentRequest;this.write(e,t,(function(){o._ended=!0,i.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},_.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},_.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},_.prototype.setTimeout=function(e,t){var n=this;function o(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),a()}),e),o(t)}function a(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",a),n.removeListener("error",a),n.removeListener("response",a),n.removeListener("close",a),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",o),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){_.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(_.prototype,e,{get:function(){return this._currentRequest[e]}})})),_.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},_.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,h))o.on(i,x[i]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,c=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a<c.length){var n=c[a++];o.finished||o.write(n.data,n.encoding,e)}else s._ended&&o.end()}()}},_.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,o=e.headers.location;if(!o||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(F(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new b;var i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],C(/^content-/i,this._options.headers));var c,p,u=C(/^host$/i,this._options.headers),f=j(this._currentUrl),h=u||f.host,x=/^\w+:/.test(o)?this._currentUrl:r.format(Object.assign(f,{host:h})),v=(c=o,p=x,m?new s(c,p):j(r.resolve(p,c)));if(d("redirecting to",v.href),this._isRedirect=!0,T(v,this._options),(v.protocol!==f.protocol&&"https:"!==v.protocol||v.host!==h&&!function(e,t){l(L(e)&&L(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(v.host,h))&&C(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),P(i)){var g={headers:e.headers,statusCode:t},y={url:x,method:a,headers:n};i(this._options,g,y),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=E({http:c,https:p}),e.exports.wrap=E},6882:(e,t,n)=>{var o=n(9779),i=n(3837),a=n(1017),r=n(3685),s=n(5687),c=n(7310).parse,p=n(7147),u=n(2781).Stream,l=n(983),d=n(9118),m=n(4105),f=n(2275);function h(e){if(!(this instanceof h))return new h(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],o.call(this),e=e||{})this[t]=e[t]}e.exports=h,i.inherits(h,o),h.LINE_BREAK="\r\n",h.DEFAULT_CONTENT_TYPE="application/octet-stream",h.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var i=o.prototype.append.bind(this);if("number"==typeof t&&(t=""+t),Array.isArray(t))this._error(new Error("Arrays are not supported."));else{var a=this._multiPartHeader(e,t,n),r=this._multiPartFooter();i(a),i(t),i(r),this._trackLength(a,t,n)}},h.prototype._trackLength=function(e,t,n){var o=0;null!=n.knownLength?o+=+n.knownLength:Buffer.isBuffer(t)?o=t.length:"string"==typeof t&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(e)+h.LINE_BREAK.length,t&&(t.path||t.readable&&Object.prototype.hasOwnProperty.call(t,"httpVersion")||t instanceof u)&&(n.knownLength||this._valuesToMeasure.push(t))},h.prototype._lengthRetriever=function(e,t){Object.prototype.hasOwnProperty.call(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):p.stat(e.path,(function(n,o){var i;n?t(n):(i=o.size-(e.start?e.start:0),t(null,i))})):Object.prototype.hasOwnProperty.call(e,"httpVersion")?t(null,+e.headers["content-length"]):Object.prototype.hasOwnProperty.call(e,"httpModule")?(e.on("response",(function(n){e.pause(),t(null,+n.headers["content-length"])})),e.resume()):t("Unknown stream")},h.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var o,i=this._getContentDisposition(t,n),a=this._getContentType(t,n),r="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(a||[])};for(var c in"object"==typeof n.header&&f(s,n.header),s)if(Object.prototype.hasOwnProperty.call(s,c)){if(null==(o=s[c]))continue;Array.isArray(o)||(o=[o]),o.length&&(r+=c+": "+o.join("; ")+h.LINE_BREAK)}return"--"+this.getBoundary()+h.LINE_BREAK+r+h.LINE_BREAK},h.prototype._getContentDisposition=function(e,t){var n,o;return"string"==typeof t.filepath?n=a.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=a.basename(t.filename||e.name||e.path):e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=a.basename(e.client._httpMessage.path||"")),n&&(o='filename="'+n+'"'),o},h.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=l.lookup(e.name)),!n&&e.path&&(n=l.lookup(e.path)),!n&&e.readable&&Object.prototype.hasOwnProperty.call(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=l.lookup(t.filepath||t.filename)),n||"object"!=typeof e||(n=h.DEFAULT_CONTENT_TYPE),n},h.prototype._multiPartFooter=function(){return function(e){var t=h.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},h.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+h.LINE_BREAK},h.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t.toLowerCase()]=e[t]);return n},h.prototype.setBoundary=function(e){this._boundary=e},h.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},h.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,o=this._streams.length;n<o;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(h.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},h.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},h.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},h.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},h.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?d.parallel(this._valuesToMeasure,this._lengthRetriever,(function(n,o){n?e(n):(o.forEach((function(e){t+=e})),e(null,t))})):process.nextTick(e.bind(this,null,t))},h.prototype.submit=function(e,t){var n,o,i={method:"post"};return"string"==typeof e?(e=c(e),o=f({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(o=f(e,i)).port||(o.port="https:"==o.protocol?443:80),o.headers=this.getHeaders(e.headers),n="https:"==o.protocol?s.request(o):r.request(o),this.getLength(function(e,o){if(e&&"Unknown stream"!==e)this._error(e);else if(o&&n.setHeader("Content-Length",o),this.pipe(n),t){var i,a=function(e,o){return n.removeListener("error",a),n.removeListener("response",i),t.call(this,e,o)};i=a.bind(this,null),n.on("error",a),n.on("response",i)}}.bind(this)),n},h.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},h.prototype.toString=function(){return"[object FormData]"},m(h,"FormData")},2275:e=>{e.exports=function(e,t){return Object.keys(t).forEach((function(n){e[n]=e[n]||t[n]})),e}},5302:(e,t,n)=>{"use strict";const o=n(77),i=n(1017),a=n(1381).mkdirsSync,r=n(318).utimesMillisSync,s=n(2733);function c(e,t,n,a){if(!a.filter||a.filter(t,n))return function(e,t,n,a){const r=(a.dereference?o.statSync:o.lstatSync)(t);return r.isDirectory()?function(e,t,n,i,a){if(!t)return function(e,t,n,i){return o.mkdirSync(n),u(t,n,i),o.chmodSync(n,e.mode)}(e,n,i,a);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${i}' with directory '${n}'.`);return u(n,i,a)}(r,e,t,n,a):r.isFile()||r.isCharacterDevice()||r.isBlockDevice()?function(e,t,n,i,a){return t?function(e,t,n,i){if(i.overwrite)return o.unlinkSync(n),p(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,i,a):p(e,n,i,a)}(r,e,t,n,a):r.isSymbolicLink()?function(e,t,n,a){let r=o.readlinkSync(t);if(a.dereference&&(r=i.resolve(process.cwd(),r)),e){let e;try{e=o.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return o.symlinkSync(r,n);throw e}if(a.dereference&&(e=i.resolve(process.cwd(),e)),s.isSrcSubdir(r,e))throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${e}'.`);if(o.statSync(n).isDirectory()&&s.isSrcSubdir(e,r))throw new Error(`Cannot overwrite '${e}' with '${r}'.`);return function(e,t){return o.unlinkSync(t),o.symlinkSync(e,t)}(r,n)}return o.symlinkSync(r,n)}(e,t,n,a):void 0}(e,t,n,a)}function p(e,t,i,a){return"function"==typeof o.copyFileSync?(o.copyFileSync(t,i),o.chmodSync(i,e.mode),a.preserveTimestamps?r(i,e.atime,e.mtime):void 0):function(e,t,i,a){const r=n(7065)(65536),s=o.openSync(t,"r"),c=o.openSync(i,"w",e.mode);let p=0;for(;p<e.size;){const e=o.readSync(s,r,0,65536,p);o.writeSync(c,r,0,e),p+=e}a.preserveTimestamps&&o.futimesSync(c,e.atime,e.mtime),o.closeSync(s),o.closeSync(c)}(e,t,i,a)}function u(e,t,n){o.readdirSync(e).forEach((o=>function(e,t,n,o){const a=i.join(t,e),r=i.join(n,e),{destStat:p}=s.checkPathsSync(a,r,"copy");return c(p,a,r,o)}(o,e,t,n)))}e.exports=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:p}=s.checkPathsSync(e,t,"copy");return s.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const s=i.dirname(n);return o.existsSync(s)||a(s),c(e,t,n,r)}(p,e,t,n)}},8690:(e,t,n)=>{"use strict";e.exports={copySync:n(5302)}},7189:(e,t,n)=>{"use strict";const o=n(77),i=n(1017),a=n(1381).mkdirs,r=n(9257).pathExists,s=n(318).utimesMillis,c=n(2733);function p(e,t,n,o,s){const c=i.dirname(n);r(c,((i,r)=>i?s(i):r?l(e,t,n,o,s):void a(c,(i=>i?s(i):l(e,t,n,o,s)))))}function u(e,t,n,o,i,a){Promise.resolve(i.filter(n,o)).then((r=>r?e(t,n,o,i,a):a()),(e=>a(e)))}function l(e,t,n,o,i){return o.filter?u(d,e,t,n,o,i):d(e,t,n,o,i)}function d(e,t,n,a,r){(a.dereference?o.stat:o.lstat)(t,((s,p)=>s?r(s):p.isDirectory()?function(e,t,n,i,a,r){return t?t&&!t.isDirectory()?r(new Error(`Cannot overwrite non-directory '${i}' with directory '${n}'.`)):h(n,i,a,r):function(e,t,n,i,a){o.mkdir(n,(r=>{if(r)return a(r);h(t,n,i,(t=>t?a(t):o.chmod(n,e.mode,a)))}))}(e,n,i,a,r)}(p,e,t,n,a,r):p.isFile()||p.isCharacterDevice()||p.isBlockDevice()?function(e,t,n,i,a,r){return t?function(e,t,n,i,a){if(!i.overwrite)return i.errorOnExist?a(new Error(`'${n}' already exists`)):a();o.unlink(n,(o=>o?a(o):m(e,t,n,i,a)))}(e,n,i,a,r):m(e,n,i,a,r)}(p,e,t,n,a,r):p.isSymbolicLink()?function(e,t,n,a,r){o.readlink(t,((t,s)=>t?r(t):(a.dereference&&(s=i.resolve(process.cwd(),s)),e?void o.readlink(n,((t,p)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?o.symlink(s,n,r):r(t):(a.dereference&&(p=i.resolve(process.cwd(),p)),c.isSrcSubdir(s,p)?r(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${p}'.`)):e.isDirectory()&&c.isSrcSubdir(p,s)?r(new Error(`Cannot overwrite '${p}' with '${s}'.`)):function(e,t,n){o.unlink(t,(i=>i?n(i):o.symlink(e,t,n)))}(s,n,r)))):o.symlink(s,n,r))))}(e,t,n,a,r):void 0))}function m(e,t,n,i,a){return"function"==typeof o.copyFile?o.copyFile(t,n,(t=>t?a(t):f(e,n,i,a))):function(e,t,n,i,a){const r=o.createReadStream(t);r.on("error",(e=>a(e))).once("open",(()=>{const t=o.createWriteStream(n,{mode:e.mode});t.on("error",(e=>a(e))).on("open",(()=>r.pipe(t))).once("close",(()=>f(e,n,i,a)))}))}(e,t,n,i,a)}function f(e,t,n,i){o.chmod(t,e.mode,(o=>o?i(o):n.preserveTimestamps?s(t,e.atime,e.mtime,i):i()))}function h(e,t,n,i){o.readdir(e,((o,a)=>o?i(o):x(a,e,t,n,i)))}function x(e,t,n,o,a){const r=e.pop();return r?function(e,t,n,o,a,r){const s=i.join(n,t),p=i.join(o,t);c.checkPaths(s,p,"copy",((t,i)=>{if(t)return r(t);const{destStat:c}=i;l(c,s,p,a,(t=>t?r(t):x(e,n,o,a,r)))}))}(e,r,t,n,o,a):a()}e.exports=function(e,t,n,o){"function"!=typeof n||o?"function"==typeof n&&(n={filter:n}):(o=n,n={}),o=o||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),c.checkPaths(e,t,"copy",((i,a)=>{if(i)return o(i);const{srcStat:r,destStat:s}=a;c.checkParentPaths(e,r,t,"copy",(i=>i?o(i):n.filter?u(p,s,e,t,n,o):p(s,e,t,n,o)))}))}},6464:(e,t,n)=>{"use strict";const o=n(8981).E;e.exports={copy:o(n(7189))}},5590:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(77),a=n(1017),r=n(1381),s=n(4542),c=o((function(e,t){t=t||function(){},i.readdir(e,((n,o)=>{if(n)return r.mkdirs(e,t);o=o.map((t=>a.join(e,t))),function e(){const n=o.pop();if(!n)return t();s.remove(n,(n=>{if(n)return t(n);e()}))}()}))}));function p(e){let t;try{t=i.readdirSync(e)}catch(t){return r.mkdirsSync(e)}t.forEach((t=>{t=a.join(e,t),s.removeSync(t)}))}e.exports={emptyDirSync:p,emptydirSync:p,emptyDir:c,emptydir:c}},6530:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(1017),a=n(77),r=n(1381),s=n(9257).pathExists;e.exports={createFile:o((function(e,t){function n(){a.writeFile(e,"",(e=>{if(e)return t(e);t()}))}a.stat(e,((o,a)=>{if(!o&&a.isFile())return t();const c=i.dirname(e);s(c,((e,o)=>e?t(e):o?n():void r.mkdirs(c,(e=>{if(e)return t(e);n()}))))}))})),createFileSync:function(e){let t;try{t=a.statSync(e)}catch(e){}if(t&&t.isFile())return;const n=i.dirname(e);a.existsSync(n)||r.mkdirsSync(n),a.writeFileSync(e,"")}}},1720:(e,t,n)=>{"use strict";const o=n(6530),i=n(4147),a=n(3635);e.exports={createFile:o.createFile,createFileSync:o.createFileSync,ensureFile:o.createFile,ensureFileSync:o.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:a.createSymlink,createSymlinkSync:a.createSymlinkSync,ensureSymlink:a.createSymlink,ensureSymlinkSync:a.createSymlinkSync}},4147:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(1017),a=n(77),r=n(1381),s=n(9257).pathExists;e.exports={createLink:o((function(e,t,n){function o(e,t){a.link(e,t,(e=>{if(e)return n(e);n(null)}))}s(t,((c,p)=>c?n(c):p?n(null):void a.lstat(e,(a=>{if(a)return a.message=a.message.replace("lstat","ensureLink"),n(a);const c=i.dirname(t);s(c,((i,a)=>i?n(i):a?o(e,t):void r.mkdirs(c,(i=>{if(i)return n(i);o(e,t)}))))}))))})),createLinkSync:function(e,t){if(a.existsSync(t))return;try{a.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return a.existsSync(n)||r.mkdirsSync(n),a.linkSync(e,t)}}},6072:(e,t,n)=>{"use strict";const o=n(1017),i=n(77),a=n(9257).pathExists;e.exports={symlinkPaths:function(e,t,n){if(o.isAbsolute(e))return i.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=o.dirname(t),s=o.join(r,e);return a(s,((t,a)=>t?n(t):a?n(null,{toCwd:s,toDst:e}):i.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:o.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(o.isAbsolute(e)){if(n=i.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const a=o.dirname(t),r=o.join(a,e);if(n=i.existsSync(r),n)return{toCwd:r,toDst:e};if(n=i.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:o.relative(a,e)}}}}},9259:(e,t,n)=>{"use strict";const o=n(77);e.exports={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);o.lstat(e,((e,o)=>{if(e)return n(null,"file");t=o&&o.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=o.lstatSync(e)}catch(e){return"file"}return n&&n.isDirectory()?"dir":"file"}}},3635:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(1017),a=n(77),r=n(1381),s=r.mkdirs,c=r.mkdirsSync,p=n(6072),u=p.symlinkPaths,l=p.symlinkPathsSync,d=n(9259),m=d.symlinkType,f=d.symlinkTypeSync,h=n(9257).pathExists;e.exports={createSymlink:o((function(e,t,n,o){o="function"==typeof n?n:o,n="function"!=typeof n&&n,h(t,((r,c)=>r?o(r):c?o(null):void u(e,t,((r,c)=>{if(r)return o(r);e=c.toDst,m(c.toCwd,n,((n,r)=>{if(n)return o(n);const c=i.dirname(t);h(c,((n,i)=>n?o(n):i?a.symlink(e,t,r,o):void s(c,(n=>{if(n)return o(n);a.symlink(e,t,r,o)}))))}))}))))})),createSymlinkSync:function(e,t,n){if(a.existsSync(t))return;const o=l(e,t);e=o.toDst,n=f(o.toCwd,n);const r=i.dirname(t);return a.existsSync(r)||c(r),a.symlinkSync(e,t,n)}}},7749:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(77),a=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof i[e]));Object.keys(i).forEach((e=>{"promises"!==e&&(t[e]=i[e])})),a.forEach((e=>{t[e]=o(i[e])})),t.exists=function(e,t){return"function"==typeof t?i.exists(e,t):new Promise((t=>i.exists(e,t)))},t.read=function(e,t,n,o,a,r){return"function"==typeof r?i.read(e,t,n,o,a,r):new Promise(((r,s)=>{i.read(e,t,n,o,a,((e,t,n)=>{if(e)return s(e);r({bytesRead:t,buffer:n})}))}))},t.write=function(e,t,...n){return"function"==typeof n[n.length-1]?i.write(e,t,...n):new Promise(((o,a)=>{i.write(e,t,...n,((e,t,n)=>{if(e)return a(e);o({bytesWritten:t,buffer:n})}))}))},"function"==typeof i.realpath.native&&(t.realpath.native=o(i.realpath.native))},5674:(e,t,n)=>{"use strict";e.exports=Object.assign({},n(7749),n(8690),n(6464),n(5590),n(1720),n(6573),n(1381),n(4026),n(530),n(1315),n(9257),n(4542));const o=n(7147);Object.getOwnPropertyDescriptor(o,"promises")&&Object.defineProperty(e.exports,"promises",{get:()=>o.promises})},6573:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(7183);i.outputJson=o(n(3508)),i.outputJsonSync=n(9578),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},7183:(e,t,n)=>{"use strict";const o=n(8981).E,i=n(6813);e.exports={readJson:o(i.readFile),readJsonSync:i.readFileSync,writeJson:o(i.writeFile),writeJsonSync:i.writeFileSync}},9578:(e,t,n)=>{"use strict";const o=n(77),i=n(1017),a=n(1381),r=n(7183);e.exports=function(e,t,n){const s=i.dirname(e);o.existsSync(s)||a.mkdirsSync(s),r.writeJsonSync(e,t,n)}},3508:(e,t,n)=>{"use strict";const o=n(1017),i=n(1381),a=n(9257).pathExists,r=n(7183);e.exports=function(e,t,n,s){"function"==typeof n&&(s=n,n={});const c=o.dirname(e);a(c,((o,a)=>o?s(o):a?r.writeJson(e,t,n,s):void i.mkdirs(c,(o=>{if(o)return s(o);r.writeJson(e,t,n,s)}))))}},1381:(e,t,n)=>{"use strict";const o=(0,n(8981).E)(n(4887)),i=n(1452);e.exports={mkdirs:o,mkdirsSync:i,mkdirp:o,mkdirpSync:i,ensureDir:o,ensureDirSync:i}},1452:(e,t,n)=>{"use strict";const o=n(77),i=n(1017),a=n(2660).invalidWin32Path,r=parseInt("0777",8);e.exports=function e(t,n,s){n&&"object"==typeof n||(n={mode:n});let c=n.mode;const p=n.fs||o;if("win32"===process.platform&&a(t)){const e=new Error(t+" c