UNPKG

recaptcha-lib

Version:

Google reCaptcha backend and frontend integration library

2 lines 215 kB
/*! For license information please see index.js.LICENSE.txt */ !function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports.$=a():e.$=a()}(this,(()=>(()=>{var e={118:(e,a,i)=>{e.exports={parallel:i(162),serial:i(357),serialOrdered:i(87)}},651:e=>{function a(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}e.exports=function(e){Object.keys(e.jobs).forEach(a.bind(e)),e.jobs={}}},912:(e,a,i)=>{var n=i(265);e.exports=function(e){var a=!1;return n((function(){a=!0})),function(i,s){a?e(i,s):n((function(){e(i,s)}))}}},265:e=>{e.exports=function(e){var a="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;a?a(e):setTimeout(e,0)}},594:(e,a,i)=>{var n=i(912),s=i(651);e.exports=function(e,a,i,o){var t=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[t]=function(e,a,i,s){return 2==e.length?e(i,n(s)):e(i,a,n(s))}(a,t,e[t],(function(e,a){t in i.jobs&&(delete i.jobs[t],e?s(i):i.results[t]=a,o(e,i.results))}))}},528:e=>{e.exports=function(e,a){var i=!Array.isArray(e),n={index:0,keyedList:i||a?Object.keys(e):null,jobs:{},results:i?{}:[],size:i?Object.keys(e).length:e.length};return a&&n.keyedList.sort(i?a:function(i,n){return a(e[i],e[n])}),n}},353:(e,a,i)=>{var n=i(651),s=i(912);e.exports=function(e){Object.keys(this.jobs).length&&(this.index=this.size,n(this),s(e)(null,this.results))}},162:(e,a,i)=>{var n=i(594),s=i(528),o=i(353);e.exports=function(e,a,i){for(var t=s(e);t.index<(t.keyedList||e).length;)n(e,a,t,(function(e,a){e?i(e,a):0!==Object.keys(t.jobs).length||i(null,t.results)})),t.index++;return o.bind(t,i)}},357:(e,a,i)=>{var n=i(87);e.exports=function(e,a,i){return n(e,a,null,i)}},87:(e,a,i)=>{var n=i(594),s=i(528),o=i(353);function t(e,a){return e<a?-1:e>a?1:0}e.exports=function(e,a,i,t){var r=s(e,i);return n(e,a,r,(function i(s,o){s?t(s,o):(r.index++,r.index<(r.keyedList||e).length?n(e,a,r,i):t(null,r.results))})),o.bind(r,t)},e.exports.ascending=t,e.exports.descending=function(e,a){return-1*t(e,a)}},779:(e,a,i)=>{var n=i(837),s=i(781).Stream,o=i(463);function t(){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=t,n.inherits(t,s),t.create=function(e){var a=new this;for(var i in e=e||{})a[i]=e[i];return a},t.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},t.prototype.append=function(e){if(t.isStreamLike(e)){if(!(e instanceof o)){var a=o.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=a}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},t.prototype.pipe=function(e,a){return s.prototype.pipe.call(this,e,a),this.resume(),e},t.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}}},t.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){t.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},t.prototype._pipeNext=function(e){if(this._currentStream=e,t.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var a=e;this.write(a),this._getNext()},t.prototype._handleErrors=function(e){var a=this;e.on("error",(function(e){a._emitError(e)}))},t.prototype.write=function(e){this.emit("data",e)},t.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},t.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")},t.prototype.end=function(){this._reset(),this.emit("end")},t.prototype.destroy=function(){this._reset(),this.emit("close")},t.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},t.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},t.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(a){a.dataSize&&(e.dataSize+=a.dataSize)})),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},t.prototype._emitError=function(e){this._reset(),this.emit("error",e)}},227:(e,a,i)=>{a.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const i="color: "+this.color;a.splice(1,0,i,"color: inherit");let n=0,s=0;a[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),a.splice(s,0,i)},a.save=function(e){try{e?a.storage.setItem("debug",e):a.storage.removeItem("debug")}catch(e){}},a.load=function(){let e;try{e=a.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},a.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},a.storage=function(){try{return localStorage}catch(e){}}(),a.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`."))}})(),a.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"],a.log=console.debug||console.log||(()=>{}),e.exports=i(447)(a);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},447:(e,a,i)=>{e.exports=function(e){function a(e){let i,s,o,t=null;function r(...e){if(!r.enabled)return;const n=r,s=Number(new Date),o=s-(i||s);n.diff=o,n.prev=i,n.curr=s,i=s,e[0]=a.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let t=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((i,s)=>{if("%%"===i)return"%";t++;const o=a.formatters[s];if("function"==typeof o){const a=e[t];i=o.call(n,a),e.splice(t,1),t--}return i})),a.formatArgs.call(n,e),(n.log||a.log).apply(n,e)}return r.namespace=e,r.useColors=a.useColors(),r.color=a.selectColor(e),r.extend=n,r.destroy=a.destroy,Object.defineProperty(r,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==t?t:(s!==a.namespaces&&(s=a.namespaces,o=a.enabled(e)),o),set:e=>{t=e}}),"function"==typeof a.init&&a.init(r),r}function n(e,i){const n=a(this.namespace+(void 0===i?":":i)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return a.debug=a,a.default=a,a.coerce=function(e){return e instanceof Error?e.stack||e.message:e},a.disable=function(){const e=[...a.names.map(s),...a.skips.map(s).map((e=>"-"+e))].join(",");return a.enable(""),e},a.enable=function(e){let i;a.save(e),a.namespaces=e,a.names=[],a.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(i=0;i<s;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?a.skips.push(new RegExp("^"+e.slice(1)+"$")):a.names.push(new RegExp("^"+e+"$")))},a.enabled=function(e){if("*"===e[e.length-1])return!0;let i,n;for(i=0,n=a.skips.length;i<n;i++)if(a.skips[i].test(e))return!1;for(i=0,n=a.names.length;i<n;i++)if(a.names[i].test(e))return!0;return!1},a.humanize=i(824),a.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((i=>{a[i]=e[i]})),a.names=[],a.skips=[],a.formatters={},a.selectColor=function(e){let i=0;for(let a=0;a<e.length;a++)i=(i<<5)-i+e.charCodeAt(a),i|=0;return a.colors[Math.abs(i)%a.colors.length]},a.enable(a.load()),a}},158:(e,a,i)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=i(227):e.exports=i(39)},39:(e,a,i)=>{const n=i(224),s=i(837);a.init=function(e){e.inspectOpts={};const i=Object.keys(a.inspectOpts);for(let n=0;n<i.length;n++)e.inspectOpts[i[n]]=a.inspectOpts[i[n]]},a.log=function(...e){return process.stderr.write(s.format(...e)+"\n")},a.formatArgs=function(i){const{namespace:n,useColors:s}=this;if(s){const a=this.color,s="[3"+(a<8?a:"8;5;"+a),o=` ${s};1m${n} `;i[0]=o+i[0].split("\n").join("\n"+o),i.push(s+"m+"+e.exports.humanize(this.diff)+"")}else i[0]=(a.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+i[0]},a.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},a.load=function(){return process.env.DEBUG},a.useColors=function(){return"colors"in a.inspectOpts?Boolean(a.inspectOpts.colors):n.isatty(process.stderr.fd)},a.destroy=s.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),a.colors=[6,2,3,4,5,1];try{const e=i(130);e&&(e.stderr||e).level>=2&&(a.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){}a.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,a)=>{const i=a.substring(6).toLowerCase().replace(/_([a-z])/g,((e,a)=>a.toUpperCase()));let n=process.env[a];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[i]=n,e}),{}),e.exports=i(447)(a);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)}},463:(e,a,i)=>{var n=i(781).Stream,s=i(837);function o(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}e.exports=o,s.inherits(o,n),o.create=function(e,a){var i=new this;for(var n in a=a||{})i[n]=a[n];i.source=e;var s=e.emit;return e.emit=function(){return i._handleEmit(arguments),s.apply(e,arguments)},e.on("error",(function(){})),i.pauseStream&&e.pause(),i},Object.defineProperty(o.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),o.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},o.prototype.resume=function(){this._released||this.release(),this.source.resume()},o.prototype.pause=function(){this.source.pause()},o.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},o.prototype.pipe=function(){var e=n.prototype.pipe.apply(this,arguments);return this.resume(),e},o.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))},o.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))}}},261:(e,a,i)=>{var n;e.exports=function(){if(!n){try{n=i(158)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},938:(e,a,i)=>{var n=i(310),s=n.URL,o=i(685),t=i(687),r=i(781).Writable,c=i(491),p=i(261),l=["abort","aborted","connect","error","socket","timeout"],u=Object.create(null);l.forEach((function(e){u[e]=function(a,i,n){this._redirectable.emit(e,a,i,n)}}));var m=k("ERR_INVALID_URL","Invalid URL",TypeError),d=k("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),x=k("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),f=k("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=k("ERR_STREAM_WRITE_AFTER_END","write after end");function h(e,a){r.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],a&&this.on("response",a);var i=this;this._onNativeResponse=function(e){i._processResponse(e)},this._performRequest()}function b(e){var a={maxRedirects:21,maxBodyLength:10485760},i={};return Object.keys(e).forEach((function(o){var t=o+":",r=i[t]=e[o],l=a[o]=Object.create(r);Object.defineProperties(l,{request:{value:function(e,o,r){if(_(e)){var l;try{l=y(new s(e))}catch(a){l=n.parse(e)}if(!_(l.protocol))throw new m({input:e});e=l}else s&&e instanceof s?e=y(e):(r=o,o=e,e={protocol:t});return E(o)&&(r=o,o=null),(o=Object.assign({maxRedirects:a.maxRedirects,maxBodyLength:a.maxBodyLength},e,o)).nativeProtocols=i,_(o.host)||_(o.hostname)||(o.hostname="::1"),c.equal(o.protocol,t,"protocol mismatch"),p("options",o),new h(o,r)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,a,i){var n=l.request(e,a,i);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),a}function g(){}function y(e){var a={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(a.port=Number(e.port)),a}function w(e,a){var i;for(var n in a)e.test(n)&&(i=a[n],delete a[n]);return null==i?void 0:String(i).trim()}function k(e,a,i){function n(i){Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=e,this.message=this.cause?a+": "+this.cause.message:a}return n.prototype=new(i||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function j(e){for(var a of l)e.removeListener(a,u[a]);e.on("error",g),e.abort()}function _(e){return"string"==typeof e||e instanceof String}function E(e){return"function"==typeof e}h.prototype=Object.create(r.prototype),h.prototype.abort=function(){j(this._currentRequest),this.emit("abort")},h.prototype.write=function(e,a,i){if(this._ending)throw new v;if(!(_(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;E(a)&&(i=a,a=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:a}),this._currentRequest.write(e,a,i)):(this.emit("error",new f),this.abort()):i&&i()},h.prototype.end=function(e,a,i){if(E(e)?(i=e,e=a=null):E(a)&&(i=a,a=null),e){var n=this,s=this._currentRequest;this.write(e,a,(function(){n._ended=!0,s.end(null,null,i)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,i)},h.prototype.setHeader=function(e,a){this._options.headers[e]=a,this._currentRequest.setHeader(e,a)},h.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},h.prototype.setTimeout=function(e,a){var i=this;function n(a){a.setTimeout(e),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function s(a){i._timeout&&clearTimeout(i._timeout),i._timeout=setTimeout((function(){i.emit("timeout"),o()}),e),n(a)}function o(){i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i.removeListener("abort",o),i.removeListener("error",o),i.removeListener("response",o),a&&i.removeListener("timeout",a),i.socket||i._currentRequest.removeListener("socket",s)}return a&&this.on("timeout",a),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){h.prototype[e]=function(a,i){return this._currentRequest[e](a,i)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(h.prototype,e,{get:function(){return this._currentRequest[e]}})})),h.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 a=e.path.indexOf("?");a<0?e.pathname=e.path:(e.pathname=e.path.substring(0,a),e.search=e.path.substring(a))}},h.prototype._performRequest=function(){var e=this._options.protocol,a=this._options.nativeProtocols[e];if(a){if(this._options.agents){var i=e.slice(0,-1);this._options.agent=this._options.agents[i]}var s=this._currentRequest=a.request(this._options,this._onNativeResponse);for(var o of(s._redirectable=this,l))s.on(o,u[o]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var t=0,r=this,c=this._requestBodyBuffers;!function e(a){if(s===r._currentRequest)if(a)r.emit("error",a);else if(t<c.length){var i=c[t++];s.finished||s.write(i.data,i.encoding,e)}else r._ended&&s.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},h.prototype._processResponse=function(e){var a=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:a});var i=e.headers.location;if(!i||!1===this._options.followRedirects||a<300||a>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(j(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new x);else{var s,o=this._options.beforeRedirect;o&&(s=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var t=this._options.method;((301===a||302===a)&&"POST"===this._options.method||303===a&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],w(/^content-/i,this._options.headers));var r,l=w(/^host$/i,this._options.headers),u=n.parse(this._currentUrl),m=l||u.host,f=/^\w+:/.test(i)?this._currentUrl:n.format(Object.assign(u,{host:m}));try{r=n.resolve(f,i)}catch(e){return void this.emit("error",new d({cause:e}))}p("redirecting to",r),this._isRedirect=!0;var v=n.parse(r);if(Object.assign(this._options,v),(v.protocol!==u.protocol&&"https:"!==v.protocol||v.host!==m&&!function(e,a){c(_(e)&&_(a));var i=e.length-a.length-1;return i>0&&"."===e[i]&&e.endsWith(a)}(v.host,m))&&w(/^(?:authorization|cookie)$/i,this._options.headers),E(o)){var h={headers:e.headers,statusCode:a},b={url:f,method:t,headers:s};try{o(this._options,h,b)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new d({cause:e}))}}},e.exports=b({http:o,https:t}),e.exports.wrap=b},882:(e,a,i)=>{var n=i(779),s=i(837),o=i(17),t=i(685),r=i(687),c=i(310).parse,p=i(147),l=i(781).Stream,u=i(983),m=i(118),d=i(275);function x(e){if(!(this instanceof x))return new x(e);for(var a in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],n.call(this),e=e||{})this[a]=e[a]}e.exports=x,s.inherits(x,n),x.LINE_BREAK="\r\n",x.DEFAULT_CONTENT_TYPE="application/octet-stream",x.prototype.append=function(e,a,i){"string"==typeof(i=i||{})&&(i={filename:i});var o=n.prototype.append.bind(this);if("number"==typeof a&&(a=""+a),s.isArray(a))this._error(new Error("Arrays are not supported."));else{var t=this._multiPartHeader(e,a,i),r=this._multiPartFooter();o(t),o(a),o(r),this._trackLength(t,a,i)}},x.prototype._trackLength=function(e,a,i){var n=0;null!=i.knownLength?n+=+i.knownLength:Buffer.isBuffer(a)?n=a.length:"string"==typeof a&&(n=Buffer.byteLength(a)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+x.LINE_BREAK.length,a&&(a.path||a.readable&&a.hasOwnProperty("httpVersion")||a instanceof l)&&(i.knownLength||this._valuesToMeasure.push(a))},x.prototype._lengthRetriever=function(e,a){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?a(null,e.end+1-(e.start?e.start:0)):p.stat(e.path,(function(i,n){var s;i?a(i):(s=n.size-(e.start?e.start:0),a(null,s))})):e.hasOwnProperty("httpVersion")?a(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(i){e.pause(),a(null,+i.headers["content-length"])})),e.resume()):a("Unknown stream")},x.prototype._multiPartHeader=function(e,a,i){if("string"==typeof i.header)return i.header;var n,s=this._getContentDisposition(a,i),o=this._getContentType(a,i),t="",r={"Content-Disposition":["form-data",'name="'+e+'"'].concat(s||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof i.header&&d(r,i.header),r)r.hasOwnProperty(c)&&null!=(n=r[c])&&(Array.isArray(n)||(n=[n]),n.length&&(t+=c+": "+n.join("; ")+x.LINE_BREAK));return"--"+this.getBoundary()+x.LINE_BREAK+t+x.LINE_BREAK},x.prototype._getContentDisposition=function(e,a){var i,n;return"string"==typeof a.filepath?i=o.normalize(a.filepath).replace(/\\/g,"/"):a.filename||e.name||e.path?i=o.basename(a.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(i=o.basename(e.client._httpMessage.path||"")),i&&(n='filename="'+i+'"'),n},x.prototype._getContentType=function(e,a){var i=a.contentType;return!i&&e.name&&(i=u.lookup(e.name)),!i&&e.path&&(i=u.lookup(e.path)),!i&&e.readable&&e.hasOwnProperty("httpVersion")&&(i=e.headers["content-type"]),i||!a.filepath&&!a.filename||(i=u.lookup(a.filepath||a.filename)),i||"object"!=typeof e||(i=x.DEFAULT_CONTENT_TYPE),i},x.prototype._multiPartFooter=function(){return function(e){var a=x.LINE_BREAK;0===this._streams.length&&(a+=this._lastBoundary()),e(a)}.bind(this)},x.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+x.LINE_BREAK},x.prototype.getHeaders=function(e){var a,i={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(a in e)e.hasOwnProperty(a)&&(i[a.toLowerCase()]=e[a]);return i},x.prototype.setBoundary=function(e){this._boundary=e},x.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},x.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),a=this.getBoundary(),i=0,n=this._streams.length;i<n;i++)"function"!=typeof this._streams[i]&&(e=Buffer.isBuffer(this._streams[i])?Buffer.concat([e,this._streams[i]]):Buffer.concat([e,Buffer.from(this._streams[i])]),"string"==typeof this._streams[i]&&this._streams[i].substring(2,a.length+2)===a||(e=Buffer.concat([e,Buffer.from(x.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},x.prototype._generateBoundary=function(){for(var e="--------------------------",a=0;a<24;a++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},x.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},x.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},x.prototype.getLength=function(e){var a=this._overheadLength+this._valueLength;this._streams.length&&(a+=this._lastBoundary().length),this._valuesToMeasure.length?m.parallel(this._valuesToMeasure,this._lengthRetriever,(function(i,n){i?e(i):(n.forEach((function(e){a+=e})),e(null,a))})):process.nextTick(e.bind(this,null,a))},x.prototype.submit=function(e,a){var i,n,s={method:"post"};return"string"==typeof e?(e=c(e),n=d({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},s)):(n=d(e,s)).port||(n.port="https:"==n.protocol?443:80),n.headers=this.getHeaders(e.headers),i="https:"==n.protocol?r.request(n):t.request(n),this.getLength(function(e,n){if(e&&"Unknown stream"!==e)this._error(e);else if(n&&i.setHeader("Content-Length",n),this.pipe(i),a){var s,o=function(e,n){return i.removeListener("error",o),i.removeListener("response",s),a.call(this,e,n)};s=o.bind(this,null),i.on("error",o),i.on("response",s)}}.bind(this)),i},x.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},x.prototype.toString=function(){return"[object FormData]"}},275:e=>{e.exports=function(e,a){return Object.keys(a).forEach((function(i){e[i]=e[i]||a[i]})),e}},560:e=>{"use strict";e.exports=(e,a)=>{a=a||process.argv;const i=e.startsWith("-")?"":1===e.length?"-":"--",n=a.indexOf(i+e),s=a.indexOf("--");return-1!==n&&(-1===s||n<s)}},234:(e,a,i)=>{e.exports=i(765)},983:(e,a,i)=>{"use strict";var n,s,o,t=i(234),r=i(17).extname,c=/^\s*([^;\s]*)(?:;|\s|$)/,p=/^text\//i;function l(e){if(!e||"string"!=typeof e)return!1;var a=c.exec(e),i=a&&t[a[1].toLowerCase()];return i&&i.charset?i.charset:!(!a||!p.test(a[1]))&&"UTF-8"}a.charset=l,a.charsets={lookup:l},a.contentType=function(e){if(!e||"string"!=typeof e)return!1;var i=-1===e.indexOf("/")?a.lookup(e):e;if(!i)return!1;if(-1===i.indexOf("charset")){var n=a.charset(i);n&&(i+="; charset="+n.toLowerCase())}return i},a.extension=function(e){if(!e||"string"!=typeof e)return!1;var i=c.exec(e),n=i&&a.extensions[i[1].toLowerCase()];return!(!n||!n.length)&&n[0]},a.extensions=Object.create(null),a.lookup=function(e){if(!e||"string"!=typeof e)return!1;var i=r("x."+e).toLowerCase().substr(1);return i&&a.types[i]||!1},a.types=Object.create(null),n=a.extensions,s=a.types,o=["nginx","apache",void 0,"iana"],Object.keys(t).forEach((function(e){var a=t[e],i=a.extensions;if(i&&i.length){n[e]=i;for(var r=0;r<i.length;r++){var c=i[r];if(s[c]){var p=o.indexOf(t[s[c]].source),l=o.indexOf(a.source);if("application/octet-stream"!==s[c]&&(p>l||p===l&&"application/"===s[c].substr(0,12)))continue}s[c]=e}}}))},824:e=>{var a=1e3,i=60*a,n=60*i,s=24*n;function o(e,a,i,n){var s=a>=1.5*i;return Math.round(e/i)+" "+n+(s?"s":"")}e.exports=function(e,t){t=t||{};var r,c,p=typeof e;if("string"===p&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var t=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return t*s;case"hours":case"hour":case"hrs":case"hr":case"h":return t*n;case"minutes":case"minute":case"mins":case"min":case"m":return t*i;case"seconds":case"second":case"secs":case"sec":case"s":return t*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}(e);if("number"===p&&isFinite(e))return t.long?(r=e,(c=Math.abs(r))>=s?o(r,c,s,"day"):c>=n?o(r,c,n,"hour"):c>=i?o(r,c,i,"minute"):c>=a?o(r,c,a,"second"):r+" ms"):function(e){var o=Math.abs(e);return o>=s?Math.round(e/s)+"d":o>=n?Math.round(e/n)+"h":o>=i?Math.round(e/i)+"m":o>=a?Math.round(e/a)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},394:(e,a,i)=>{"use strict";var n=i(310).parse,s={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},o=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function t(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}a.getProxyForUrl=function(e){var a="string"==typeof e?n(e):e||{},i=a.protocol,r=a.host,c=a.port;if("string"!=typeof r||!r||"string"!=typeof i)return"";if(i=i.split(":",1)[0],!function(e,a){var i=(t("npm_config_no_proxy")||t("no_proxy")).toLowerCase();return!i||"*"!==i&&i.split(/[,\s]/).every((function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),s=n?n[1]:i,t=n?parseInt(n[2]):0;return!(!t||t===a)||(/^[.*]/.test(s)?("*"===s.charAt(0)&&(s=s.slice(1)),!o.call(e,s)):e!==s)}))}(r=r.replace(/:\d*$/,""),c=parseInt(c)||s[i]||0))return"";var p=t("npm_config_"+i+"_proxy")||t(i+"_proxy")||t("npm_config_proxy")||t("all_proxy");return p&&-1===p.indexOf("://")&&(p=i+"://"+p),p}},130:(e,a,i)=>{"use strict";const n=i(37),s=i(560),o=process.env;let t;function r(e){const a=function(e){if(!1===t)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!e.isTTY&&!0!==t)return 0;const a=t?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in o))||"codeship"===o.CI_NAME?1:a;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:(o.TERM,a)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(a)}s("no-color")||s("no-colors")||s("color=false")?t=!1:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(t=!0),"FORCE_COLOR"in o&&(t=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10)),e.exports={supportsColor:r,stdout:r(process.stdout),stderr:r(process.stderr)}},491:e=>{"use strict";e.exports=require("assert")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},224:e=>{"use strict";e.exports=require("tty")},310:e=>{"use strict";e.exports=require("url")},837:e=>{"use strict";e.exports=require("util")},796:e=>{"use strict";e.exports=require("zlib")},306:(e,a,i)=>{"use strict";const n=i(882),s=i(310),o=i(394),t=i(685),r=i(687),c=i(938),p=i(796),l=i(781),u=i(361);function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=m(n),x=m(s),f=m(t),v=m(r),h=m(c),b=m(p),g=m(l),y=m(u);function w(e,a){return function(){return e.apply(a,arguments)}}const{toString:k}=Object.prototype,{getPrototypeOf:j}=Object,_=(E=Object.create(null),e=>{const a=k.call(e);return E[a]||(E[a]=a.slice(8,-1).toLowerCase())});var E;const C=e=>(e=e.toLowerCase(),a=>_(a)===e),R=e=>a=>typeof a===e,{isArray:O}=Array,S=R("undefined"),z=C("ArrayBuffer"),T=R("string"),F=R("function"),L=R("number"),A=e=>null!==e&&"object"==typeof e,q=e=>{if("object"!==_(e))return!1;const a=j(e);return!(null!==a&&a!==Object.prototype&&null!==Object.getPrototypeOf(a)||Symbol.toStringTag in e||Symbol.iterator in e)},B=C("Date"),U=C("File"),N=C("Blob"),P=C("FileList"),D=C("URLSearchParams");function I(e,a,{allOwnKeys:i=!1}={}){if(null==e)return;let n,s;if("object"!=typeof e&&(e=[e]),O(e))for(n=0,s=e.length;n<s;n++)a.call(null,e[n],n,e);else{const s=i?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let t;for(n=0;n<o;n++)t=s[n],a.call(null,e[t],t,e)}}function M(e,a){a=a.toLowerCase();const i=Object.keys(e);let n,s=i.length;for(;s-- >0;)if(n=i[s],a===n.toLowerCase())return n;return null}const H="undefined"==typeof self?"undefined"==typeof global?void 0:global:self,K=e=>!S(e)&&e!==H,$=(J="undefined"!=typeof Uint8Array&&j(Uint8Array),e=>J&&e instanceof J);var J;const W=C("HTMLFormElement"),V=(({hasOwnProperty:e})=>(a,i)=>e.call(a,i))(Object.prototype),G=C("RegExp"),Y=(e,a)=>{const i=Object.getOwnPropertyDescriptors(e),n={};I(i,((i,s)=>{!1!==a(i,s,e)&&(n[s]=i)})),Object.defineProperties(e,n)},Q={isArray:O,isArrayBuffer:z,isBuffer:function(e){return null!==e&&!S(e)&&null!==e.constructor&&!S(e.constructor)&&F(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const a="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||k.call(e)===a||F(e.toString)&&e.toString()===a)},isArrayBufferView:function(e){let a;return a="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&z(e.buffer),a},isString:T,isNumber:L,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:q,isUndefined:S,isDate:B,isFile:U,isBlob:N,isRegExp:G,isFunction:F,isStream:e=>A(e)&&F(e.pipe),isURLSearchParams:D,isTypedArray:$,isFileList:P,forEach:I,merge:function e(){const{caseless:a}=K(this)&&this||{},i={},n=(n,s)=>{const o=a&&M(i,s)||s;q(i[o])&&q(n)?i[o]=e(i[o],n):q(n)?i[o]=e({},n):O(n)?i[o]=n.slice():i[o]=n};for(let e=0,a=arguments.length;e<a;e++)arguments[e]&&I(arguments[e],n);return i},extend:(e,a,i,{allOwnKeys:n}={})=>(I(a,((a,n)=>{i&&F(a)?e[n]=w(a,i):e[n]=a}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,a,i,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,a,i,n)=>{let s,o,t;const r={};if(a=a||{},null==e)return a;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)t=s[o],n&&!n(t,e,a)||r[t]||(a[t]=e[t],r[t]=!0);e=!1!==i&&j(e)}while(e&&(!i||i(e,a))&&e!==Object.prototype);return a},kindOf:_,kindOfTest:C,endsWith:(e,a,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=a.length;const n=e.indexOf(a,i);return-1!==n&&n===i},toArray:e=>{if(!e)return null;if(O(e))return e;let a=e.length;if(!L(a))return null;const i=new Array(a);for(;a-- >0;)i[a]=e[a];return i},forEachEntry:(e,a)=>{const i=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=i.next())&&!n.done;){const i=n.value;a.call(e,i[0],i[1])}},matchAll:(e,a)=>{let i;const n=[];for(;null!==(i=e.exec(a));)n.push(i);return n},isHTMLForm:W,hasOwnProperty:V,hasOwnProp:V,reduceDescriptors:Y,freezeMethods:e=>{Y(e,((a,i)=>{if(F(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];F(n)&&(a.enumerable=!1,"writable"in a?a.writable=!1:a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},toObjectSet:(e,a)=>{const i={},n=e=>{e.forEach((e=>{i[e]=!0}))};return O(e)?n(e):n(String(e).split(a)),i},toCamelCase:e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function(e,a,i){return a.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(e,a)=>(e=+e,Number.isFinite(e)?e:a),findKey:M,global:H,isContextDefined:K,toJSONObject:e=>{const a=new Array(10),i=(e,n)=>{if(A(e)){if(a.indexOf(e)>=0)return;if(!("toJSON"in e)){a[n]=e;const s=O(e)?[]:{};return I(e,((e,a)=>{const o=i(e,n+1);!S(o)&&(s[a]=o)})),a[n]=void 0,s}}return e};return i(e,0)}};function X(e,a,i,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",a&&(this.code=a),i&&(this.config=i),n&&(this.request=n),s&&(this.response=s)}Q.inherits(X,Error,{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:Q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Z=X.prototype,ee={};function ae(e){return Q.isPlainObject(e)||Q.isArray(e)}function ie(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function ne(e,a,i){return e?e.concat(a).map((function(e,a){return e=ie(e),!i&&a?"["+e+"]":e})).join(i?".":""):a}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ee[e]={value:e}})),Object.defineProperties(X,ee),Object.defineProperty(Z,"isAxiosError",{value:!0}),X.from=(e,a,i,n,s,o)=>{const t=Object.create(Z);return Q.toFlatObject(e,t,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),X.call(t,e.message,a,i,n,s),t.cause=e,t.name=e.name,o&&Object.assign(t,o),t};const se=Q.toFlatObject(Q,{},null,(function(e){return/^is[A-Z]/.test(e)}));function oe(e,a,i){if(!Q.isObject(e))throw new TypeError("target must be an object");a=a||new(d.default||FormData);const n=(i=Q.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,a){return!Q.isUndefined(a[e])}))).metaTokens,s=i.visitor||l,o=i.dots,t=i.indexes,r=(i.Blob||"undefined"!=typeof Blob&&Blob)&&(c=a)&&Q.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator];var c;if(!Q.isFunction(s))throw new TypeError("visitor must be a function");function p(e){if(null===e)return"";if(Q.isDate(e))return e.toISOString();if(!r&&Q.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(e)||Q.isTypedArray(e)?r&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,i,s){let r=e;if(e&&!s&&"object"==typeof e)if(Q.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(Q.isArray(e)&&function(e){return Q.isArray(e)&&!e.some(ae)}(e)||Q.isFileList(e)||Q.endsWith(i,"[]")&&(r=Q.toArray(e)))return i=ie(i),r.forEach((function(e,n){!Q.isUndefined(e)&&null!==e&&a.append(!0===t?ne([i],n,o):null===t?i:i+"[]",p(e))})),!1;return!!ae(e)||(a.append(ne(s,i,o),p(e)),!1)}const u=[],m=Object.assign(se,{defaultVisitor:l,convertValue:p,isVisitable:ae});if(!Q.isObject(e))throw new TypeError("data must be an object");return function e(i,n){if(!Q.isUndefined(i)){if(-1!==u.indexOf(i))throw Error("Circular reference detected in "+n.join("."));u.push(i),Q.forEach(i,(function(i,o){!0===(!(Q.isUndefined(i)||null===i)&&s.call(a,i,Q.isString(o)?o.trim():o,n,m))&&e(i,n?n.concat(o):[o])})),u.pop()}}(e),a}function te(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return a[e]}))}function re(e,a){this._pairs=[],e&&oe(e,this,a)}const ce=re.prototype;function pe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function le(e,a,i){if(!a)return e;const n=i&&i.encode||pe,s=i&&i.serialize;let o;if(o=s?s(a,i):Q.isURLSearchParams(a)?a.toString():new re(a,i).toString(n),o){const a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}ce.append=function(e,a){this._pairs.push([e,a])},ce.toString=function(e){const a=e?function(a){return e.call(this,a,te)}:te;return this._pairs.map((function(e){return a(e[0])+"="+a(e[1])}),"").join("&")};const ue=class{constructor(){this.handlers=[]}use(e,a,i){return this.handlers.push({fulfilled:e,rejected:a,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Q.forEach(this.handlers,(function(a){null!==a&&e(a)}))}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},de={isNode:!0,classes:{URLSearchParams:x.default.URLSearchParams,FormData:d.default,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};function xe(e){function a(e,i,n,s){let o=e[s++];const t=Number.isFinite(+o),r=s>=e.length;return o=!o&&Q.isArray(n)?n.length:o,r?(Q.hasOwnProp(n,o)?n[o]=[n[o],i]:n[o]=i,!t):(n[o]&&Q.isObject(n[o])||(n[o]=[]),a(e,i,n[o],s)&&Q.isArray(n[o])&&(n[o]=function(e){const a={},i=Object.keys(e);let n;const s=i.length;let o;for(n=0;n<s;n++)o=i[n],a[o]=e[o];return a}(n[o])),!t)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const i={};return Q.forEachEntry(e,((e,n)=>{a(function(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,i,0)})),i}return null}const fe={"Content-Type":void 0},ve={transitional:me,adapter:["xhr","http"],transformRequest:[function(e,a){const i=a.getContentType()||"",n=i.indexOf("application/json")>-1,s=Q.isObject(e);if(s&&Q.isHTMLForm(e)&&(e=new FormData(e)),Q.isFormData(e))return n&&n?JSON.stringify(xe(e)):e;if(Q.isArrayBuffer(e)||Q.isBuffer(e)||Q.isStream(e)||Q.isFile(e)||Q.isBlob(e))return e;if(Q.isArrayBufferView(e))return e.buffer;if(Q.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,a){return oe(e,new de.classes.URLSearchParams,Object.assign({visitor:function(e,a,i,n){return Q.isBuffer(e)?(this.append(a,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},a))}(e,this.formSerializer).toString();if((o=Q.isFileList(e))||i.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return oe(o?{"files[]":e}:e,a&&new a,this.formSerializer)}}return s||n?(a.setContentType("application/json",!1),function(e,a,i){if(Q.isString(e))try{return(0,JSON.parse)(e),Q.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const a=this.transitional||ve.transitional,i=a&&a.forcedJSONParsing,n="json"===this.responseType;if(e&&Q.isString(e)&&(i&&!this.responseType||n)){const i=!(a&&a.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Q.forEach(["delete","get","head"],(function(e){ve.headers[e]={}})),Q.forEach(["post","put","patch"],(function(e){ve.headers[e]=Q.merge(fe)}));const he=ve,be=Q.toObjectSet(["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"]),ge=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function we(e){return!1===e||null==e?e:Q.isArray(e)?e.map(we):String(e)}function ke(e,a,i,n){return Q.isFunction(n)?n.call(this,a,i):Q.isString(a)?Q.isString(n)?-1!==a.indexOf(n):Q.isRegExp(n)?n.test(a):void 0:void 0}class je{constructor(e){e&&this.set(e)}set(e,a,i){const n=this;function s(e,a,i){const s=ye(a);if(!s)throw new Error("header name must be a non-empty string");const o=Q.findKey(n,s);(!o||void 0===n[o]||!0===i||void 0===i&&!1!==n[o])&&(n[o||a]=we(e))}const o=(e,a)=>Q.forEach(e,((e,i)=>s(e,i,a)));return Q.isPlainObject(e)||e instanceof this.constructor?o(e,a):Q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?o((e=>{const a={};let i,n,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),i=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!i||a[i]&&be[i]||("set-cookie"===i?a[i]?a[i].push(n):a[i]=[n]:a[i]=a[i]?a[i]+", "+n:n)})),a})(e),a):null!=e&&s(a,e,i),this}get(e,a){if(e=ye(e)){const i=Q.findKey(this,e);if(i){const e=this[i];if(!a)return e;if(!0===a)return function(e){const a=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(e);)a[n[1]]=n[2];return a}(e);if(Q.isFunction(a))return a.call(this,e,i);if(Q.isRegExp(a))return a.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=ye(e)){const i=Q.findKey(this,e);return!(!i||a&&!ke(0,this[i],i,a))}return!1}delete(e,a){const i=this;let n=!1;function s(e){if(e=ye(e)){const s=Q.findKey(i,e);!s||a&&!ke(0,i[s],s,a)||(delete i[s],n=!0)}}return Q.isArray(e)?e.forEach(s):s(e),n}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(e){const a=this,i={};return Q.forEach(this,((n,s)=>{const o=Q.findKey(i,s);if(o)return a[o]=we(n),void delete a[s];const t=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,a,i)=>a.toUpperCase()+i))}(s):String(s).trim();t!==s&&delete a[s],a[t]=we(n),i[t]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const a=Object.create(null);return Q.forEach(this,((i,n)=>{null!=i&&!1!==i&&(a[n]=e&&Q.isArray(i)?i.join(", "):i)})),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,a])=>e+": "+a)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){const i=new this(e);return a.forEach((e=>i.set(e))),i}static accessor(e){const a=(this[ge]=this[ge]={accessors:{}}).accessors,i=this.prototype;function n(e){const n=ye(e);a[n]||(function(e,a){const i=Q.toCamelCase(" "+a);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+i,{value:function(e,i,s){return this[n].call(this,a,e,i,s)},configurable:!0})}))}(i,e),a[n]=!0)}return Q.isArray(e)?e.forEach(n):n(e),this}}je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),Q.freezeMethods(je.prototype),Q.freezeMethods(je);const _e=je;function Ee(e,a){const i=this||he,n=a||i,s=_e.from(n.headers);let o=n.data;return Q.forEach(e,(function(e){o=e.call(i,o,s.normalize(),a?a.status:void 0)})),s.normalize(),o}function Ce(e){return!(!e||!e.__CANCEL__)}function Re(e,a,i){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,a,i),this.name="CanceledError"}function Oe(e,a,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?a(new X("Request failed with status code "+i.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}function Se(e,a){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(a)?function(e,a){return a?e.replace(/\/+$/,"")+"/"+a.replace(/^\/+/,""):e}(e,a):a}Q.inherits(Re,X,{__CANCEL__:!0});const ze="1.2.1";function Te(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}const Fe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Le(e,a){e=e||10;const i=new Array(e),n=new Array(e);let s,o=0,t=0;return a=void 0!==a?a:1e3,function(r){const c=Date.now(),p=n[t];s||(s=c),i[o]=r,n[o]=c;let l=t,u=0;for(;l!==o;)u+=i[l++],l%=e;if(o=(o+1)%e,o===t&&(t=(t+1)%e),c-s<a)return;const m=p&&c-p;return m?Math.round(1e3*u/m):void 0}}const Ae=Symbol("internals");class qe extends g.default.Transform{constructor(e){super({readableHighWaterMark:(e=Q.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,a)=>!Q.isUndefined(a[e])))).chunkSize});const a=this,i=this[Ae]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Le(i.ticksRate*e.samplesCount,i.timeWindow);this.on("newListener",(e=>{"progress"===e&&(i.isCaptured||(i.isCaptured=!0))}));let s=0;i.updateProgress=function(e,a){let i=0;const n=1e3/a;let s=null;return function(a,o){const t=Date.now();if(a||t-i>n)return s&&(clearTimeout(s),s=null),i=t,e.apply(null,o);s||(s=setTimeout((()=>(s=null,i=Date.now(),e.apply(null,o))),n-(t-i)))}}((function(){const e=i.length,o=i.bytesSeen,t=o-s;if(!t||a.destroyed)return;const r=n(t);s=o,process.nextTick((()=>{a.emit("progress",{loaded:o,total:e,progress:e?o/e:void 0,bytes:t,rate:r||void 0,estimated:r&&e&&o<=e?(e-o)/r:void 0})}))}),i.ticksRate);const o=()=>{i.updateProgress(!0)};this.once("end",o),this.once("error",o)}_read(e){const a=this[Ae];return a.onReadCallback&&a.onReadCallback(),super._read(e)}_transform(e,a,i){const n=this,s=this[Ae],o=s.maxRate,t=this.readableHighWaterMark,r=s.timeWindow,c=o/(1e3/r),p=!1!==s.minChunkSize?Math.max(s.minChunkSize,.01*c):0,l=(e,a)=>{const i=Buffer.byteLength(e);let l,u=null,m=t,d=0;if(o){const e=Date.now();(!s.ts||(d=e-s.ts)>=r)&&(s.ts=e,l=c-s.bytes,s.bytes=l<0?-l:0,d=0),l=c-s.bytes}if(o){if(l<=0)return setTimeout((()=>{a(null,e)}),r-d);l<m&&(m=l)}m&&i>m&&i-m>p&&(u=e.subarray(m),e=e.subarray(0,m)),function(e,a){const i=Buffer.byteLength(e);s.bytesSeen+=i,s.bytes+=i,s.isCaptured&&s.updateProgress(),n.push(e)?process.nextTick(a):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(a)}}(e,u?()=>{process.nextTick(a,null,u)}:a)};l(e,(function e(a,n){if(a)return i(a);n?l(n,e):i(null)}))}setLength(e){return this[Ae].length=+e,this}}const Be=qe,Ue={flush:b.default.constants.Z_SYNC_FLUSH,finishFlush:b.default.constants.Z_SYNC_FLUSH},Ne=Q.isFunction(b.default.createBrotliDecompress),{http:Pe,https:De}=h.default,Ie=/https:?/,Me=de.protocols.map((e=>e+":"));function He(e){e