tt-minigame-ide-cli 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/miniprogram-utils/src/constants/index.d.ts +9 -0
- package/dist/miniprogram-utils/src/data/app.d.ts +1 -0
- package/dist/miniprogram-utils/src/data/project.d.ts +17 -2
- package/dist/miniprogram-utils/src/electron-monitor/common/share.d.ts +126 -0
- package/dist/miniprogram-utils/src/electron-monitor/common/tea-sdk.d.ts +15 -1
- package/dist/miniprogram-utils/src/network/axios.d.ts +2 -1
- package/dist/tt-ide-cli/src/features/audit.d.ts +1 -0
- package/dist/tt-ide-cli/src/features/microgame/cloud-compile.d.ts +10 -1
- package/dist/tt-ide-cli/src/features/microgame/index.d.ts +1 -0
- package/dist/tt-ide-cli/src/features/microgame/meta.d.ts +1 -0
- package/dist/tt-ide-cli/src/features/microgame/unity.d.ts +99 -0
- package/dist/tt-ide-cli/src/features/microgame/utils/package.d.ts +10 -0
- package/dist/tt-ide-cli/src/features/packages.d.ts +2 -5
- package/dist/tt-ide-cli/src/features/preview.d.ts +3 -0
- package/dist/tt-ide-cli/src/types.d.ts +1 -0
- package/dist/tt-ide-cli/src/utils/cookie.d.ts +6 -9
- package/dist/tt-ide-cli/src/utils/logger.d.ts +1 -1
- package/dist/tt-ide-cli/src/utils/util.d.ts +1 -0
- package/package.json +1 -1
- package/dist/tt-ide-cli/src/features/microgame/utils/settings.d.ts +0 -48
package/dist/cli.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("chalk"),require("ora"),require("fs-extra"),require("deep-clone"),require("form-data"),require("unzipper"),require("archiver"),require("easy-table"),require("fast-glob"),require("semver-compare"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("inquirer"));else if("function"==typeof define&&define.amd)define(["chalk","ora","fs-extra","deep-clone","form-data","unzipper","archiver","easy-table","fast-glob","semver-compare","folder-hash","clipboardy","qrcode","qrcode-terminal","inquirer"],t);else{var r="object"==typeof exports?t(require("chalk"),require("ora"),require("fs-extra"),require("deep-clone"),require("form-data"),require("unzipper"),require("archiver"),require("easy-table"),require("fast-glob"),require("semver-compare"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("inquirer")):t(e.chalk,e.ora,e["fs-extra"],e["deep-clone"],e["form-data"],e.unzipper,e.archiver,e["easy-table"],e["fast-glob"],e["semver-compare"],e["folder-hash"],e.clipboardy,e.qrcode,e["qrcode-terminal"],e.inquirer);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,((__WEBPACK_EXTERNAL_MODULE__1606__,__WEBPACK_EXTERNAL_MODULE__8838__,__WEBPACK_EXTERNAL_MODULE__9849__,__WEBPACK_EXTERNAL_MODULE__469__,__WEBPACK_EXTERNAL_MODULE__9258__,__WEBPACK_EXTERNAL_MODULE__2541__,__WEBPACK_EXTERNAL_MODULE__3732__,__WEBPACK_EXTERNAL_MODULE__6883__,__WEBPACK_EXTERNAL_MODULE__9508__,__WEBPACK_EXTERNAL_MODULE__7086__,__WEBPACK_EXTERNAL_MODULE__2896__,__WEBPACK_EXTERNAL_MODULE__1887__,__WEBPACK_EXTERNAL_MODULE__3727__,__WEBPACK_EXTERNAL_MODULE__4563__,__WEBPACK_EXTERNAL_MODULE__6495__)=>(()=>{var __webpack_modules__={2680:(e,t,r)=>{"use strict";var n=r(7286),o=r(9429),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},9429:(e,t,r)=>{"use strict";var n=r(4090),o=r(7286),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);return c&&u&&c(t,"length").configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var p=function(){return s(n,i,arguments)};u?u(e.exports,"apply",{value:p}):e.exports.apply=p},5881:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,a){a=a||{};var s,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\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(i){var a=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===u&&isFinite(e))return a.long?(s=e,(c=Math.abs(s))>=o?i(s,c,o,"day"):c>=n?i(s,c,n,"hour"):c>=r?i(s,c,r,"minute"):c>=t?i(s,c,t,"second"):s+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5130:(e,t,r)=>{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 r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},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(){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+)/))},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=r(7123)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}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.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(5881),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((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},445:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(5130):e.exports=r(8414)},8414:(e,t,r)=>{const n=r(6224),o=r(3837);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(o.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${n} [0m`;r[0]=i+r[0].split("\n").join("\n"+i),r.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[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):n.isatty(process.stderr.fd)},t.destroy=o.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=r(7013);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 r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(7123)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},5393:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(445)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},4633:(e,t,r)=>{var n=r(7310),o=n.URL,i=r(3685),a=r(5687),s=r(2781).Writable,c=r(9491),u=r(5393),l=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);l.forEach((function(e){p[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var f=O("ERR_INVALID_URL","Invalid URL",TypeError),d=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),h=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),_=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),v=O("ERR_STREAM_WRITE_AFTER_END","write after end");function m(e,t){s.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 r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function y(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(i){var a=i+":",s=r[a]=e[i],l=t[i]=Object.create(s);Object.defineProperties(l,{request:{value:function(e,i,s){if(I(e)){var l;try{l=g(new o(e))}catch(t){l=n.parse(e)}if(!I(l.protocol))throw new f({input:e});e=l}else o&&e instanceof o?e=g(e):(s=i,i=e,e={protocol:a});return C(i)&&(s=i,i=null),(i=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,i)).nativeProtocols=r,I(i.host)||I(i.hostname)||(i.hostname="::1"),c.equal(i.protocol,a,"protocol mismatch"),u("options",i),new m(i,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=l.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function E(){}function g(e){var t={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&&(t.port=Number(e.port)),t}function b(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function O(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),n.prototype.constructor=n,n.prototype.name="Error ["+e+"]",n}function A(e){for(var t of l)e.removeListener(t,p[t]);e.on("error",E),e.abort()}function I(e){return"string"==typeof e||e instanceof String}function C(e){return"function"==typeof e}m.prototype=Object.create(s.prototype),m.prototype.abort=function(){A(this._currentRequest),this.emit("abort")},m.prototype.write=function(e,t,r){if(this._ending)throw new v;if(!(I(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;C(t)&&(r=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,r)):(this.emit("error",new _),this.abort()):r&&r()},m.prototype.end=function(e,t,r){if(C(e)?(r=e,e=t=null):C(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},m.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},m.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},m.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){m.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(m.prototype,e,{get:function(){return this._currentRequest[e]}})})),m.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))}},m.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,l))o.on(i,p[i]);if(this._currentUrl=/^\//.test(this._options.path)?n.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 r=c[a++];o.finished||o.write(r.data,r.encoding,e)}else s._ended&&o.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},m.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!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(A(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new h);else{var o,i=this._options.beforeRedirect;i&&(o=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=[],b(/^content-/i,this._options.headers));var s,l=b(/^host$/i,this._options.headers),p=n.parse(this._currentUrl),f=l||p.host,_=/^\w+:/.test(r)?this._currentUrl:n.format(Object.assign(p,{host:f}));try{s=n.resolve(_,r)}catch(e){return void this.emit("error",new d({cause:e}))}u("redirecting to",s),this._isRedirect=!0;var v=n.parse(s);if(Object.assign(this._options,v),(v.protocol!==p.protocol&&"https:"!==v.protocol||v.host!==f&&!function(e,t){c(I(e)&&I(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(v.host,f))&&b(/^(?:authorization|cookie)$/i,this._options.headers),C(i)){var m={headers:e.headers,statusCode:t},y={url:_,method:a,headers:o};try{i(this._options,m,y)}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=y({http:i,https:a}),e.exports.wrap=y},7795:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),a=Math.max(0,n.length-i.length),s=[],c=0;c<a;c++)s.push("$"+c);if(o=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,i.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,i.concat(t.call(arguments)))})),n.prototype){var u=function(){};u.prototype=n.prototype,o.prototype=new u,u.prototype=null}return o}},4090:(e,t,r)=>{"use strict";var n=r(7795);e.exports=Function.prototype.bind||n},7286:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var u=function(){throw new a},l=c?function(){try{return u}catch(e){try{return c(arguments,"callee").get}catch(e){return u}}}():u,p=r(2636)(),f=r(8486)(),d=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),h={},_="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,v={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":p&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&d?d(""[Symbol.iterator]()):n,"%Symbol%":p?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":_,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));v["%Error.prototype%"]=m}var y=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&d&&(r=d(o.prototype))}return v[t]=r,r},E={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=r(4090),b=r(3198),O=g.call(Function.call,Array.prototype.concat),A=g.call(Function.apply,Array.prototype.splice),I=g.call(Function.call,String.prototype.replace),C=g.call(Function.call,String.prototype.slice),S=g.call(Function.call,RegExp.prototype.exec),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,L=function(e,t){var r,n=e;if(b(E,n)&&(n="%"+(r=E[n])[0]+"%"),b(v,n)){var i=v[n];if(i===h&&(i=y(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=C(e,0,1),r=C(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,w,(function(e,t,r,o){n[n.length]=r?I(o,P,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=L("%"+n+"%",t),s=i.name,u=i.value,l=!1,p=i.alias;p&&(n=p[0],A(r,O([0,1],p)));for(var f=1,d=!0;f<r.length;f+=1){var h=r[f],_=C(h,0,1),m=C(h,-1);if(('"'===_||"'"===_||"`"===_||'"'===m||"'"===m||"`"===m)&&_!==m)throw new o("property names with quotes must have matching quotes");if("constructor"!==h&&d||(l=!0),b(v,s="%"+(n+="."+h)+"%"))u=v[s];else if(null!=u){if(!(h in u)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&f+1>=r.length){var y=c(u,h);u=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[h]}else d=b(u,h),u=u[h];d&&!l&&(v[s]=u)}}return u}},8137:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},8486:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},2636:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(6679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},6679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},3198:(e,t,r)=>{"use strict";var n=r(4090);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},8223:function(e,t,r){e.exports=(r(2081),r(6113),function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(34)},function(e,t,r){var n=r(29)("wks"),o=r(33),i=r(2).Symbol,a="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=n},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(12),o=r(17);e.exports=r(4)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(14);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(3),o=r(26),i=r(32),a=Object.defineProperty;t.f=r(4)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(42),o=r(15);e.exports=function(e){return n(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(9),o=r(2).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(12).f,o=r(8),i=r(1)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(29)("keys"),o=r(33);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(11),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(2),o=r(6),i=r(7),a=r(5),s="prototype",c=function(e,t,r){var u,l,p,f=e&c.F,d=e&c.G,h=e&c.S,_=e&c.P,v=e&c.B,m=e&c.W,y=d?o:o[t]||(o[t]={}),E=y[s],g=d?n:h?n[t]:(n[t]||{})[s];for(u in d&&(r=t),r)(l=!f&&g&&void 0!==g[u])&&u in y||(p=l?g[u]:r[u],y[u]=d&&"function"!=typeof g[u]?r[u]:v&&l?i(p,n):m&&g[u]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):_&&"function"==typeof p?i(Function.call,p):p,_&&((y.virtual||(y.virtual={}))[u]=p,e&c.R&&E&&!E[u]&&a(E,u,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){e.exports=r(2).document&&document.documentElement},function(e,t,r){e.exports=!r(4)&&!r(24)((function(){return 7!=Object.defineProperty(r(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){"use strict";var n=r(28),o=r(23),i=r(57),a=r(5),s=r(8),c=r(10),u=r(45),l=r(18),p=r(52),f=r(1)("iterator"),d=!([].keys&&"next"in[].keys()),h="keys",_="values",v=function(){return this};e.exports=function(e,t,r,m,y,E,g){u(r,t,m);var b,O,A,I=function(e){if(!d&&e in P)return P[e];switch(e){case h:case _:return function(){return new r(this,e)}}return function(){return new r(this,e)}},C=t+" Iterator",S=y==_,w=!1,P=e.prototype,L=P[f]||P["@@iterator"]||y&&P[y],T=L||I(y),R=y?S?I("entries"):T:void 0,D="Array"==t&&P.entries||L;if(D&&(A=p(D.call(new e)))!==Object.prototype&&(l(A,C,!0),n||s(A,f)||a(A,f,v)),S&&L&&L.name!==_&&(w=!0,T=function(){return L.call(this)}),n&&!g||!d&&!w&&P[f]||a(P,f,T),c[t]=T,c[C]=v,y)if(b={values:S?T:I(_),keys:E?T:I(h),entries:R},g)for(O in b)O in P||i(P,O,b[O]);else o(o.P+o.F*(d||w),t,b);return b}},function(e,t){e.exports=!0},function(e,t,r){var n=r(2),o="__core-js_shared__",i=n[o]||(n[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){var n,o,i,a=r(7),s=r(41),c=r(25),u=r(16),l=r(2),p=l.process,f=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,_=0,v={},m="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},E=function(e){y.call(e.data)};f&&d||(f=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++_]=function(){s("function"==typeof e?e:Function(e),t)},n(_),_},d=function(e){delete v[e]},"process"==r(11)(p)?n=function(e){p.nextTick(a(y,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=E,n=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",E,!1)):n=m in u("script")?function(e){c.appendChild(u("script"))[m]=function(){c.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,r){var n=r(20),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";function n(e){return(0,s.createHash)("sha256").update(e).digest("hex")}function o(e){switch(c){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(r(35));t.machineIdSync=function(e){var t=o((0,a.execSync)(u[c]).toString());return e?t:n(t)},t.machineId=function(e){return new i.default((function(t,r){return(0,a.exec)(u[c],{},(function(i,a,s){if(i)return r(new Error("Error while obtaining machine id: "+i.stack));var c=o(a.toString());return t(e?c:n(c))}))}))};var a=r(70),s=r(71),c=process.platform,u={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,r){e.exports={default:r(36),__esModule:!0}},function(e,t,r){r(66),r(68),r(69),r(67),e.exports=r(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(13),o=r(31),i=r(62);e.exports=function(e){return function(t,r,a){var s,c=n(t),u=o(c.length),l=i(a,u);if(e&&r!=r){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}}},function(e,t,r){var n=r(7),o=r(44),i=r(43),a=r(3),s=r(31),c=r(64),u={},l={};t=e.exports=function(e,t,r,p,f){var d,h,_,v,m=f?function(){return e}:c(e),y=n(r,p,t?2:1),E=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(d=s(e.length);d>E;E++)if((v=t?y(a(h=e[E])[0],h[1]):y(e[E]))===u||v===l)return v}else for(_=m.call(e);!(h=_.next()).done;)if((v=o(_,y,h.value,t))===u||v===l)return v},t.BREAK=u,t.RETURN=l},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(10),o=r(1)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(3);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){"use strict";var n=r(49),o=r(17),i=r(18),a={};r(5)(a,r(1)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(a,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(1)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},e(i)}catch(e){}return r}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(2),o=r(30).set,i=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,c="process"==r(11)(a);e.exports=function(){var e,t,r,u=function(){var n,o;for(c&&(n=a.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(c)r=function(){a.nextTick(u)};else if(i){var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}else if(s&&s.resolve){var f=s.resolve();r=function(){f.then(u)}}else r=function(){o.call(n,u)};return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){var n=r(3),o=r(50),i=r(22),a=r(19)("IE_PROTO"),s=function(){},c="prototype",u=function(){var e,t=r(16)("iframe"),n=i.length;for(t.style.display="none",r(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u[c][i[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(s[c]=n(e),r=new s,s[c]=null,r[a]=e):r=u(),void 0===t?r:o(r,t)}},function(e,t,r){var n=r(12),o=r(3),i=r(54);e.exports=r(4)?Object.defineProperties:function(e,t){o(e);for(var r,a=i(t),s=a.length,c=0;s>c;)n.f(e,r=a[c++],t[r]);return e}},function(e,t,r){var n=r(55),o=r(17),i=r(13),a=r(32),s=r(8),c=r(26),u=Object.getOwnPropertyDescriptor;t.f=r(4)?u:function(e,t){if(e=i(e),t=a(t,!0),c)try{return u(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(8),o=r(63),i=r(19)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){var n=r(8),o=r(13),i=r(39)(!1),a=r(19)("IE_PROTO");e.exports=function(e,t){var r,s=o(e),c=0,u=[];for(r in s)r!=a&&n(s,r)&&u.push(r);for(;t.length>c;)n(s,r=t[c++])&&(~i(u,r)||u.push(r));return u}},function(e,t,r){var n=r(53),o=r(22);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(5);e.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},function(e,t,r){e.exports=r(5)},function(e,t,r){var n=r(9),o=r(3),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(7)(Function.call,r(51).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return i(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:i}},function(e,t,r){"use strict";var n=r(2),o=r(6),i=r(12),a=r(4),s=r(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];a&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(3),o=r(14),i=r(1)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[i])?t:o(r)}},function(e,t,r){var n=r(20),o=r(15);e.exports=function(e){return function(t,r){var i,a,s=String(o(t)),c=n(r),u=s.length;return c<0||c>=u?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):i:e?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(e,t,r){var n=r(20),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},function(e,t,r){var n=r(15);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(21),o=r(1)("iterator"),i=r(10);e.exports=r(6).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){"use strict";var n=r(37),o=r(47),i=r(10),a=r(13);e.exports=r(27)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){},function(e,t,r){"use strict";var n,o,i,a=r(28),s=r(2),c=r(7),u=r(21),l=r(23),p=r(9),f=(r(3),r(14)),d=r(38),h=r(40),_=(r(58).set,r(60)),v=r(30).set,m=r(48)(),y="Promise",E=s.TypeError,g=s.process,b=s[y],O="process"==u(g=s.process),A=function(){},I=!!function(){try{var e=b.resolve(1),t=(e.constructor={})[r(1)("species")]=function(e){e(A,A)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof t}catch(e){}}(),C=function(e,t){return e===t||e===b&&t===i},S=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},w=function(e){return C(b,e)?new P(e):new o(e)},P=o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw E("Bad Promise constructor");t=e,r=n})),this.resolve=f(t),this.reject=f(r)},L=function(e){try{e()}catch(e){return{error:e}}},T=function(e,t){if(!e._n){e._n=!0;var r=e._c;m((function(){for(var n=e._v,o=1==e._s,i=0,a=function(t){var r,i,a=o?t.ok:t.fail,s=t.resolve,c=t.reject,u=t.domain;try{a?(o||(2==e._h&&j(e),e._h=1),!0===a?r=n:(u&&u.enter(),r=a(n),u&&u.exit()),r===t.promise?c(E("Promise-chain cycle")):(i=S(r))?i.call(r,s,c):s(r)):c(n)}catch(e){c(e)}};r.length>i;)a(r[i++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){v.call(s,(function(){var t,r,n,o=e._v;if(D(e)&&(t=L((function(){O?g.emit("unhandledRejection",o,e):(r=s.onunhandledrejection)?r({promise:e,reason:o}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",o)})),e._h=O||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;)if((t=r[n++]).fail||!D(t.promise))return!1;return!0},j=function(e){v.call(s,(function(){var t;O?g.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})}))},x=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},N=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw E("Promise can't be resolved itself");(t=S(e))?m((function(){var n={_w:r,_d:!1};try{t.call(e,c(N,n,1),c(x,n,1))}catch(e){x.call(n,e)}})):(r._v=e,r._s=1,T(r,!1))}catch(e){x.call({_w:r,_d:!1},e)}}};I||(b=function(e){d(this,b,y,"_h"),f(e),n.call(this);try{e(c(N,this,1),c(x,this,1))}catch(e){x.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(56)(b.prototype,{then:function(e,t){var r=w(_(this,b));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=O?g.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&T(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),P=function(){var e=new n;this.promise=e,this.resolve=c(N,e,1),this.reject=c(x,e,1)}),l(l.G+l.W+l.F*!I,{Promise:b}),r(18)(b,y),r(59)(y),i=r(6)[y],l(l.S+l.F*!I,y,{reject:function(e){var t=w(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!I),y,{resolve:function(e){if(e instanceof b&&C(e.constructor,this))return e;var t=w(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(I&&r(46)((function(e){b.all(e).catch(A)}))),y,{all:function(e){var t=this,r=w(t),n=r.resolve,o=r.reject,i=L((function(){var r=[],i=0,a=1;h(e,!1,(function(e){var s=i++,c=!1;r.push(void 0),a++,t.resolve(e).then((function(e){c||(c=!0,r[s]=e,--a||n(r))}),o)})),--a||n(r)}));return i&&o(i.error),r.promise},race:function(e){var t=this,r=w(t),n=r.reject,o=L((function(){h(e,!1,(function(e){t.resolve(e).then(r.resolve,n)}))}));return o&&n(o.error),r.promise}})},function(e,t,r){"use strict";var n=r(61)(!0);r(27)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){r(65);for(var n=r(2),o=r(5),i=r(10),a=r(1)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var u=s[c],l=n[u],p=l&&l.prototype;p&&!p[a]&&o(p,a,u),i[u]=i.Array}},function(e,t){e.exports=r(2081)},function(e,t){e.exports=r(6113)}]))},9500:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,_=Object.prototype.toString,v=Function.prototype.toString,m=String.prototype.match,y=String.prototype.slice,E=String.prototype.replace,g=String.prototype.toUpperCase,b=String.prototype.toLowerCase,O=RegExp.prototype.test,A=Array.prototype.concat,I=Array.prototype.join,C=Array.prototype.slice,S=Math.floor,w="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,j=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function x(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||O.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var o=String(n),i=y.call(t,o.length+1);return E.call(o,r,"$&_")+"."+E.call(E.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(t,r,"$&_")}var N=r(6374),M=N.custom,U=B(M)?M:null;function k(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return E.call(String(e),/"/g,""")}function V(e){return!("[object Array]"!==q(e)||R&&"object"==typeof e&&R in e)}function G(e){return!("[object RegExp]"!==q(e)||R&&"object"==typeof e&&R in e)}function B(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!L)return!1;try{return L.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var s=r||{};if(Z(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Z(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!Z(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Z(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Z(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return J(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var g=String(t);return _?x(t,g):g}if("bigint"==typeof t){var O=String(t)+"n";return _?x(t,O):O}var S=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=S&&S>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var P,M=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=I.call(Array(e.indent+1)," ")}return{base:r,prev:I.call(Array(t+1),r)}}(s,n);if(void 0===o)o=[];else if(W(o,t)>=0)return"[Circular]";function H(t,r,i){if(r&&(o=C.call(o)).push(r),i){var a={depth:s.depth};return Z(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,n+1,o)}return e(t,s,n+1,o)}if("function"==typeof t&&!G(t)){var z=function(e){if(e.name)return e.name;var t=m.call(v.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Y(t,H);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(ee.length>0?" { "+I.call(ee,", ")+" }":"")}if(B(t)){var te=T?E.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(t);return"object"!=typeof t||T?te:K(te)}if((P=t)&&"object"==typeof P&&("undefined"!=typeof HTMLElement&&P instanceof HTMLElement||"string"==typeof P.nodeName&&"function"==typeof P.getAttribute)){for(var re="<"+b.call(String(t.nodeName)),ne=t.attributes||[],oe=0;oe<ne.length;oe++)re+=" "+ne[oe].name+"="+k(F(ne[oe].value),"double",s);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+"</"+b.call(String(t.nodeName))+">"}if(V(t)){if(0===t.length)return"[]";var ie=Y(t,H);return M&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(ie)?"["+Q(ie,M)+"]":"[ "+I.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==q(e)||R&&"object"==typeof e&&R in e)}(t)){var ae=Y(t,H);return"cause"in Error.prototype||!("cause"in t)||D.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+I.call(ae,", ")+" }":"{ ["+String(t)+"] "+I.call(A.call("[cause]: "+H(t.cause),ae),", ")+" }"}if("object"==typeof t&&c){if(U&&"function"==typeof t[U]&&N)return N(t,{depth:S-n});if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{u.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,r){se.push(H(r,t,!0)+" => "+H(e,t))})),X("Map",i.call(t),se,M)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return l&&l.call(t,(function(e){ce.push(H(e,t))})),X("Set",u.call(t),ce,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return $("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return $("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if(function(e){return!("[object Number]"!==q(e)||R&&"object"==typeof e&&R in e)}(t))return K(H(Number(t)));if(function(e){if(!e||"object"!=typeof e||!w)return!1;try{return w.call(e),!0}catch(e){}return!1}(t))return K(H(w.call(t)));if(function(e){return!("[object Boolean]"!==q(e)||R&&"object"==typeof e&&R in e)}(t))return K(h.call(t));if(function(e){return!("[object String]"!==q(e)||R&&"object"==typeof e&&R in e)}(t))return K(H(String(t)));if(!function(e){return!("[object Date]"!==q(e)||R&&"object"==typeof e&&R in e)}(t)&&!G(t)){var ue=Y(t,H),le=j?j(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",fe=!le&&R&&Object(t)===t&&R in t?y.call(q(t),8,-1):pe?"Object":"",de=(le||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||pe?"["+I.call(A.call([],fe||[],pe||[]),": ")+"] ":"");return 0===ue.length?de+"{}":M?de+"{"+Q(ue,M)+"}":de+"{ "+I.call(ue,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Z(e,t){return H.call(e,t)}function q(e){return _.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function J(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return J(y.call(e,0,t.maxStringLength),t)+n}return k(E.call(E.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",t)}function z(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+g.call(t.toString(16))}function K(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function X(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):I.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+I.call(e,","+r)+"\n"+t.prev}function Y(e,t){var r=V(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Z(e,o)?t(e[o],e):""}var i,a="function"==typeof P?P(e):[];if(T){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)Z(e,c)&&(r&&String(Number(c))===c&&c<e.length||T&&i["$"+c]instanceof Symbol||(O.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof P)for(var u=0;u<a.length;u++)D.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}},6374:(e,t,r)=>{e.exports=r(3837).inspect},5527:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},9126:(e,t,r)=>{"use strict";var n=r(6845),o=r(9166),i=r(5527);e.exports={formats:i,parse:o,stringify:n}},9166:(e,t,r)=>{"use strict";var n=r(2493),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,l=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var p=0;r.depth>0&&null!==(s=a.exec(i))&&p<r.depth;){if(p+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:c(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==u&&(a[u]=o):a={0:o}}o=a}return o}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,f=l.split(t.delimiter,p),d=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?h="utf-8":"utf8=%26%2310003%3B"===f[r]&&(h="iso-8859-1"),d=r,r=f.length);for(r=0;r<f.length;++r)if(r!==d){var _,v,m=f[r],y=m.indexOf("]="),E=-1===y?m.indexOf("="):y+1;-1===E?(_=t.decoder(m,a.decoder,h,"key"),v=t.strictNullHandling?null:""):(_=t.decoder(m.slice(0,E),a.decoder,h,"key"),v=n.maybeMap(c(m.slice(E+1),t),(function(e){return t.decoder(e,a.decoder,h,"value")}))),v&&t.interpretNumericEntities&&"iso-8859-1"===h&&(v=s(v)),m.indexOf("[]=")>-1&&(v=i(v)?[v]:v),o.call(u,_)?u[_]=n.combine(u[_],v):u[_]=v}return u}(e,r):e,p=r.plainObjects?Object.create(null):{},f=Object.keys(l),d=0;d<f.length;++d){var h=f[d],_=u(h,l[h],r,"string"==typeof e);p=n.merge(p,_,r)}return!0===r.allowSparse?p:n.compact(p)}},6845:(e,t,r)=>{"use strict";var n=r(4294),o=r(2493),i=r(5527),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=String.prototype.split,l=Array.prototype.push,p=function(e,t){l.apply(e,c(t)?t:[t])},f=Date.prototype.toISOString,d=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},_={},v=function e(t,r,i,a,s,l,f,d,v,m,y,E,g,b,O,A){for(var I,C=t,S=A,w=0,P=!1;void 0!==(S=S.get(_))&&!P;){var L=S.get(t);if(w+=1,void 0!==L){if(L===w)throw new RangeError("Cyclic object value");P=!0}void 0===S.get(_)&&(w=0)}if("function"==typeof d?C=d(r,C):C instanceof Date?C=y(C):"comma"===i&&c(C)&&(C=o.maybeMap(C,(function(e){return e instanceof Date?y(e):e}))),null===C){if(s)return f&&!b?f(r,h.encoder,O,"key",E):r;C=""}if("string"==typeof(I=C)||"number"==typeof I||"boolean"==typeof I||"symbol"==typeof I||"bigint"==typeof I||o.isBuffer(C)){if(f){var T=b?r:f(r,h.encoder,O,"key",E);if("comma"===i&&b){for(var R=u.call(String(C),","),D="",j=0;j<R.length;++j)D+=(0===j?"":",")+g(f(R[j],h.encoder,O,"value",E));return[g(T)+(a&&c(C)&&1===R.length?"[]":"")+"="+D]}return[g(T)+"="+g(f(C,h.encoder,O,"value",E))]}return[g(r)+"="+g(String(C))]}var x,N=[];if(void 0===C)return N;if("comma"===i&&c(C))x=[{value:C.length>0?C.join(",")||null:void 0}];else if(c(d))x=d;else{var M=Object.keys(C);x=v?M.sort(v):M}for(var U=a&&c(C)&&1===C.length?r+"[]":r,k=0;k<x.length;++k){var F=x[k],V="object"==typeof F&&void 0!==F.value?F.value:C[F];if(!l||null!==V){var G=c(C)?"function"==typeof i?i(U,F):U:U+(m?"."+F:"["+F+"]");A.set(t,w);var B=n();B.set(_,A),p(N,e(V,G,i,a,s,l,f,d,v,m,y,E,g,b,O,B))}}return N};e.exports=function(e,t){var r,o=e,u=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=h.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof u.filter?o=(0,u.filter)("",o):c(u.filter)&&(r=u.filter);var l,f=[];if("object"!=typeof o||null===o)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var d=s[l];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var _="comma"===d&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),u.sort&&r.sort(u.sort);for(var m=n(),y=0;y<r.length;++y){var E=r[y];u.skipNulls&&null===o[E]||p(f,v(o[E],E,d,_,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,m))}var g=f.join(u.delimiter),b=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),g.length>0?b+g:""}},2493:(e,t,r)=>{"use strict";var n=r(5527),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:u}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",u=0;u<s.length;++u){var l=s.charCodeAt(u);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},4294:(e,t,r)=>{"use strict";var n=r(7286),o=r(2680),i=r(9500),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),_=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(c){if(t)return f(t,n)}else if(r)return function(e,t){var r=_(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return p(e,n)}else if(c){if(t)return h(t,n)}else if(r)return function(e,t){return!!_(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),l(e,n,o)):c?(t||(t=new c),d(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=_(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},7013:(e,t,r)=>{"use strict";const n=r(2037),o=r(6224),i=r(8137),{env:a}=process;let s;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const r=s||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in a))||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in a&&(s="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,o.isatty(1))),stderr:c(u(!0,o.isatty(2)))}},1681:(e,t,r)=>{e.exports=r(7955)},7955:(e,t,r)=>{"use strict";r(1808);var n,o=r(4404),i=r(3685),a=r(5687),s=r(2361),c=(r(9491),r(3837));function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||i.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=p(r,n,o),a=0,s=t.requests.length;a<s;++a){var c=t.requests[a];if(c.host===i.host&&c.port===i.port)return t.requests.splice(a,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var r=this;u.prototype.createSocket.call(r,e,(function(n){var i=e.request.getHeader("host"),a=f({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),s=o.connect(0,a);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function p(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function f(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,a=o.length;i<a;++i){var s=o[i];void 0!==n[s]&&(e[s]=n[s])}}return e}t.httpOverHttp=function(e){var t=new u(e);return t.request=i.request,t},t.httpsOverHttp=function(e){var t=new u(e);return t.request=i.request,t.createSocket=l,t.defaultPort=443,t},t.httpOverHttps=function(e){var t=new u(e);return t.request=a.request,t},t.httpsOverHttps=function(e){var t=new u(e);return t.request=a.request,t.createSocket=l,t.defaultPort=443,t},c.inherits(u,s.EventEmitter),u.prototype.addRequest=function(e,t,r,n){var o=this,i=f({request:e},o.options,p(t,r,n));o.sockets.length>=this.maxSockets?o.requests.push(i):o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)}))},u.prototype.createSocket=function(e,t){var r=this,o={};r.sockets.push(o);var i=f({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),n("making CONNECT request");var a=r.request(i);function s(i,s,c){var u;return a.removeAllListeners(),s.removeAllListeners(),200!==i.statusCode?(n("tunneling socket could not be established, statusCode=%d",i.statusCode),s.destroy(),(u=new Error("tunneling socket could not be established, statusCode="+i.statusCode)).code="ECONNRESET",e.request.emit("error",u),void r.removeSocket(o)):c.length>0?(n("got illegal response body from proxy"),s.destroy(),(u=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",u),void r.removeSocket(o)):(n("tunneling connection has established"),r.sockets[r.sockets.indexOf(o)]=s,t(s))}a.useChunkedEncodingByDefault=!1,a.once("response",(function(e){e.upgrade=!0})),a.once("upgrade",(function(e,t,r){process.nextTick((function(){s(e,t,r)}))})),a.once("connect",s),a.once("error",(function(t){a.removeAllListeners(),n("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, cause="+t.message);i.code="ECONNRESET",e.request.emit("error",i),r.removeSocket(o)})),a.end()},u.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},n=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=n},5715:(e,t,r)=>{e.exports=r(7173)},925:(e,t,r)=>{"use strict";var n=r(2691),o=r(261),i=r(3175),a=r(6031),s=r(3685),c=r(5687),u=r(4633).http,l=r(4633).https,p=r(7310),f=r(9796),d=r(48),h=r(4796),_=r(1025),v=/https:?/;function m(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,m(e,t,e.href)}}e.exports=function(e){return new Promise((function(t,r){var y=function(e){t(e)},E=function(e){r(e)},g=e.data,b=e.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+d.version,g&&!n.isStream(g)){if(Buffer.isBuffer(g));else if(n.isArrayBuffer(g))g=Buffer.from(new Uint8Array(g));else{if(!n.isString(g))return E(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));g=Buffer.from(g,"utf-8")}b["Content-Length"]=g.length}var O=void 0;e.auth&&(O=(e.auth.username||"")+":"+(e.auth.password||""));var A=i(e.baseURL,e.url),I=p.parse(A),C=I.protocol||"http:";if(!O&&I.auth){var S=I.auth.split(":");O=(S[0]||"")+":"+(S[1]||"")}O&&delete b.Authorization;var w=v.test(C),P=w?e.httpsAgent:e.httpAgent,L={path:a(I.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:b,agent:P,agents:{http:e.httpAgent,https:e.httpsAgent},auth:O};e.socketPath?L.socketPath=e.socketPath:(L.hostname=I.hostname,L.port=I.port);var T,R=e.proxy;if(!R&&!1!==R){var D=C.slice(0,-1)+"_proxy",j=process.env[D]||process.env[D.toUpperCase()];if(j){var x=p.parse(j),N=process.env.no_proxy||process.env.NO_PROXY,M=!0;if(N&&(M=!N.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||"."===e[0]&&I.hostname.substr(I.hostname.length-e.length)===e||I.hostname===e)}))),M&&(R={host:x.hostname,port:x.port,protocol:x.protocol},x.auth)){var U=x.auth.split(":");R.auth={username:U[0],password:U[1]}}}}R&&(L.headers.host=I.hostname+(I.port?":"+I.port:""),m(L,R,C+"//"+I.hostname+(I.port?":"+I.port:"")+L.path));var k=w&&(!R||v.test(R.protocol));e.transport?T=e.transport:0===e.maxRedirects?T=k?c:s:(e.maxRedirects&&(L.maxRedirects=e.maxRedirects),T=k?l:u),e.maxBodyLength>-1&&(L.maxBodyLength=e.maxBodyLength);var F=T.request(L,(function(t){if(!F.aborted){var r=t,i=t.req||F;if(204!==t.statusCode&&"HEAD"!==i.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(f.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:i};if("stream"===e.responseType)a.data=r,o(y,E,a);else{var s=[],c=0;r.on("data",(function(t){s.push(t),c+=t.length,e.maxContentLength>-1&&c>e.maxContentLength&&(r.destroy(),E(h("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,i)))})),r.on("error",(function(t){F.aborted||E(_(t,e,null,i))})),r.on("end",(function(){var t=Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=n.stripBOM(t))),a.data=t,o(y,E,a)}))}}}));if(F.on("error",(function(t){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||E(_(t,e,null,F))})),e.timeout){var V=parseInt(e.timeout,10);if(isNaN(V))return void E(h("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",F));F.setTimeout(V,(function(){F.abort(),E(h("timeout of "+V+"ms exceeded",e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}e.cancelToken&&e.cancelToken.promise.then((function(e){F.aborted||(F.abort(),E(e))})),n.isStream(g)?g.on("error",(function(t){E(_(t,e,null,F))})).pipe(F):F.end(g)}))}},5719:(e,t,r)=>{"use strict";var n=r(2691),o=r(261),i=r(9025),a=r(6031),s=r(3175),c=r(4077),u=r(3841),l=r(4796);e.exports=function(e){return new Promise((function(t,r){var p=e.data,f=e.headers,d=e.responseType;n.isFormData(p)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(_+":"+v)}var m=s(e.baseURL,e.url);function y(){if(h){var n="getAllResponseHeaders"in h?c(h.getAllResponseHeaders()):null,i={data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h};o(t,r,i),h=null}}if(h.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){r(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var E=(e.withCredentials||u(m))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;E&&(f[e.xsrfHeaderName]=E)}"setRequestHeader"in h&&n.forEach(f,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),d&&"json"!==d&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),r(e),h=null)})),p||(p=null),h.send(p)}))}},7173:(e,t,r)=>{"use strict";var n=r(2691),o=r(4012),i=r(8936),a=r(2872);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var c=s(r(141));c.Axios=i,c.create=function(e){return s(a(c.defaults,e))},c.Cancel=r(9364),c.CancelToken=r(7909),c.isCancel=r(7966),c.all=function(e){return Promise.all(e)},c.spread=r(2455),c.isAxiosError=r(6647),e.exports=c,e.exports.default=c},9364:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},7909:(e,t,r)=>{"use strict";var n=r(9364);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},7966:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},8936:(e,t,r)=>{"use strict";var n=r(2691),o=r(6031),i=r(3980),a=r(2437),s=r(2872),c=r(2613),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var l=[a,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var p=e;r.length;){var f=r.shift(),d=r.shift();try{p=f(p)}catch(e){d(e);break}}try{o=a(p)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},3980:(e,t,r)=>{"use strict";var n=r(2691);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},3175:(e,t,r)=>{"use strict";var n=r(5933),o=r(5645);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},4796:(e,t,r)=>{"use strict";var n=r(1025);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},2437:(e,t,r)=>{"use strict";var n=r(2691),o=r(9148),i=r(7966),a=r(141);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},1025:e=>{"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},2872:(e,t,r)=>{"use strict";var n=r(2691);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function u(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=c(void 0,t[e]))})),n.forEach(i,u),n.forEach(a,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=c(void 0,e[o])):r[o]=c(void 0,t[o])})),n.forEach(s,(function(n){n in t?r[n]=c(e[n],t[n]):n in e&&(r[n]=c(void 0,e[n]))}));var l=o.concat(i).concat(a).concat(s),p=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(p,u),r}},261:(e,t,r)=>{"use strict";var n=r(4796);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},9148:(e,t,r)=>{"use strict";var n=r(2691),o=r(141);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},141:(e,t,r)=>{"use strict";var n=r(2691),o=r(9594),i=r(1025),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?c=r(5719):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(c=r(925)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(0,JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(a)})),e.exports=u},4012:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},6031:(e,t,r)=>{"use strict";var n=r(2691);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},5645:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},9025:(e,t,r)=>{"use strict";var n=r(2691);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},5933:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6647:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},3841:(e,t,r)=>{"use strict";var n=r(2691);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},9594:(e,t,r)=>{"use strict";var n=r(2691);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},4077:(e,t,r)=>{"use strict";var n=r(2691),o=["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"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},2455:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},2613:(e,t,r)=>{"use strict";var n=r(48),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},a=n.version.split(".");function s(e,t){for(var r=t?t.split("."):a,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&s(t);function a(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new Error(a(n," has been removed in "+t));return o&&!i[n]&&(i[n]=!0,console.warn(a(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},2691:(e,t,r)=>{"use strict";var n=r(4012),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:c,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function r(r,n){c(t[n])&&c(r)?t[n]=e(t[n],r):c(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},8783:(e,t,r)=>{const n=r(2361).EventEmitter,o=r(2081).spawn,i=r(1017),a=r(7147);class s{constructor(e,t){this.flags=e,this.required=e.indexOf("<")>=0,this.optional=e.indexOf("[")>=0,this.mandatory=!1,this.negate=-1!==e.indexOf("-no-");const r=e.split(/[ ,|]+/);r.length>1&&!/^[[<]/.test(r[1])&&(this.short=r.shift()),this.long=r.shift(),this.description=t||"",this.defaultValue=void 0}name(){return this.long.replace(/^--/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}}class c extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}class u extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._hidden=!1,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,r){let n=t,o=r;"object"==typeof n&&null!==n&&(o=n,n=null),o=o||{};const i=e.split(/ +/),a=this.createCommand(i.shift());return n&&(a.description(n),a._executableHandler=!0),o.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!o.noHelp&&!o.hidden),a._helpFlags=this._helpFlags,a._helpDescription=this._helpDescription,a._helpShortFlag=this._helpShortFlag,a._helpLongFlag=this._helpLongFlag,a._helpCommandName=this._helpCommandName,a._helpCommandnameAndArgs=this._helpCommandnameAndArgs,a._helpCommandDescription=this._helpCommandDescription,a._exitCallback=this._exitCallback,a._storeOptionsAsProperties=this._storeOptionsAsProperties,a._passCommandToAction=this._passCommandToAction,a._executableFile=o.executableFile||null,this.commands.push(a),a._parseExpectedArgs(i),a.parent=this,n?this:a}createCommand(e){return new u(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");return function e(t){t.forEach((t=>{if(t._executableHandler&&!t._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${t.name()}`);e(t.commands)}))}(e.commands),(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return!1===e?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return void 0===this._hasImplicitHelpCommand&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(e.length)return e.forEach((e=>{const t={required:!1,name:"",variadic:!1};switch(e[0]){case"<":t.required=!0,t.name=e.slice(1,-1);break;case"[":t.name=e.slice(1,-1)}t.name.length>3&&"..."===t.name.slice(-3)&&(t.variadic=!0,t.name=t.name.slice(0,-3)),t.name&&this._args.push(t)})),this._args.forEach(((e,t)=>{if(e.variadic&&t<this._args.length-1)throw new Error(`only the last argument can be variadic '${e.name}'`)})),this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new c(e,t,r)),process.exit(e)}action(e){return this._actionHandler=t=>{const r=this._args.length,n=t.slice(0,r);this._passCommandToAction?n[r]=this:n[r]=this.opts(),t.length>r&&n.push(t.slice(r));const o=e.apply(this,n);let i=this;for(;i.parent;)i=i.parent;i._actionResults.push(o)},this}_optionEx(e,t,r,n,o){const i=new s(t,r),a=i.name(),c=i.attributeName();if(i.mandatory=!!e.mandatory,"function"!=typeof n)if(n instanceof RegExp){const e=n;n=(t,r)=>{const n=e.exec(t);return n?n[0]:r}}else o=n,n=null;if(i.negate||i.optional||i.required||"boolean"==typeof o){if(i.negate){const e=i.long.replace(/^--no-/,"--");o=!this._findOption(e)||this._getOptionValue(c)}void 0!==o&&(this._setOptionValue(c,o),i.defaultValue=o)}return this.options.push(i),this.on("option:"+a,(e=>{null!==e&&n&&(e=n(e,void 0===this._getOptionValue(c)?o:this._getOptionValue(c))),"boolean"==typeof this._getOptionValue(c)||void 0===this._getOptionValue(c)?null==e?this._setOptionValue(c,!i.negate&&(o||!0)):this._setOptionValue(c,e):null!==e&&this._setOptionValue(c,!i.negate&&e)})),this}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}allowUnknownOption(e){return this._allowUnknownOption=void 0===e||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsProperties=void 0===e||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=void 0===e||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let r;switch(t=t||{},void 0===e&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&i.basename(this._scriptPath,i.extname(this._scriptPath)),this._parseCommand([],r),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then((()=>this))}_executeSubCommand(e,t){t=t.slice();let r=!1;const n=[".js",".ts",".mjs"];this._checkForMissingMandatoryOptions();const s=this._scriptPath;let u;try{const e=a.realpathSync(s);u=i.dirname(e)}catch(e){u="."}let l=i.basename(s,i.extname(s))+"-"+e._name;e._executableFile&&(l=e._executableFile);const p=i.join(u,l);let f;a.existsSync(p)?l=p:n.forEach((e=>{a.existsSync(`${p}${e}`)&&(l=`${p}${e}`)})),r=n.includes(i.extname(l)),"win32"!==process.platform?r?(t.unshift(l),t=_(process.execArgv).concat(t),f=o(process.argv[0],t,{stdio:"inherit"})):f=o(l,t,{stdio:"inherit"}):(t.unshift(l),t=_(process.execArgv).concat(t),f=o(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{process.on(e,(()=>{!1===f.killed&&null===f.exitCode&&f.kill(e)}))}));const d=this._exitCallback;d?f.on("close",(()=>{d(new c(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):f.on("close",process.exit.bind(process)),f.on("error",(t=>{if("ENOENT"===t.code){const t=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}if("EACCES"===t.code)throw new Error(`'${l}' not executable`);if(d){const e=new c(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,d(e)}else process.exit(1)})),this.runningCommand=f}_dispatchSubcommand(e,t,r){const n=this._findCommand(e);n||this._helpAndError(),n._executableHandler?this._executeSubCommand(n,t.concat(r)):n._parseCommand(t,r)}_parseCommand(e,t){const r=this.parseOptions(t);if(e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)1===e.length?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)d(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this._helpAndError(),d(this,r.unknown),this._checkForMissingMandatoryOptions(),r.unknown.length>0&&this.unknownOption(r.unknown[0]),this._actionHandler){const r=this.args.slice();this._args.forEach(((e,t)=>{e.required&&null==r[t]?this.missingArgument(e.name):e.variadic&&(r[t]=r.splice(t))})),this._actionHandler(r),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e._getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}parseOptions(e){const t=[],r=[];let n=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}for(;o.length;){const e=o.shift();if("--"===e){n===r&&n.push(e),n.push(...o);break}if(i(e)){const t=this._findOption(e);if(t){if(t.required){const e=o.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;o.length>0&&!i(o[0])&&(e=o.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),r=this._findOption(e.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,e.slice(t+1));continue}}e.length>1&&"-"===e[0]&&(n=r),n.push(e)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let r=0;r<t;r++){const t=this.options[r].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}missingArgument(e){const t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let r;r=t?`error: option '${e.flags}' argument missing, got '${t}'`:`error: option '${e.flags}' argument missing`,console.error(r),this._exit(1,"commander.optionMissingArgument",r)}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;const t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){const e=[this.name()];for(let t=this.parent;t;t=t.parent)e.unshift(t.name());const t=e.join(" "),r=`error: unknown command '${this.args[0]}'. See '${t} ${this._helpLongFlag}'.`;console.error(r),this._exit(1,"commander.unknownCommand",r)}version(e,t,r){if(void 0===e)return this._version;this._version=e;const n=new s(t=t||"-V, --version",r=r||"output the version number");return this._versionOptionName=n.long.substr(2)||"version",this.options.push(n),this.on("option:"+this._versionOptionName,(()=>{process.stdout.write(e+"\n"),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>h(e)));return"[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}prepareCommands(){const e=this.commands.filter((e=>!e._hidden)).map((e=>{const t=e._args.map((e=>h(e))).join(" ");return[e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:""),e._description]}));return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce(((e,t)=>Math.max(e,t[0].length)),0)}largestOptionLength(){const e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce(((e,t)=>Math.max(e,t.flags.length)),0)}largestArgLength(){return this._args.reduce(((e,t)=>Math.max(e,t.name.length)),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){const e=this.padWidth(),t=(process.stdout.columns||80)-e-4;function r(r,n){return l(r,e)+" "+f(n,t,e+2)}const n=this.options.map((e=>{const t=e.description+(e.negate||void 0===e.defaultValue?"":" (default: "+JSON.stringify(e.defaultValue)+")");return r(e.flags,t)})),o=this._helpShortFlag&&!this._findOption(this._helpShortFlag),i=!this._findOption(this._helpLongFlag);if(o||i){let e=this._helpFlags;o?i||(e=this._helpShortFlag):e=this._helpLongFlag,n.push(r(e,this._helpDescription))}return n.join("\n")}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";const e=this.prepareCommands(),t=this.padWidth(),r=(process.stdout.columns||80)-t-4;return["Commands:",e.map((e=>{const n=e[1]?" "+e[1]:"";return(n?l(e[0],t):e[0])+f(n,r,t+2)})).join("\n").replace(/^/gm," "),""].join("\n")}helpInformation(){let e=[];if(this._description){e=[this._description,""];const t=this._argsDescription;if(t&&this._args.length){const r=this.padWidth(),n=(process.stdout.columns||80)-r-5;e.push("Arguments:"),e.push(""),this._args.forEach((o=>{e.push(" "+l(o.name,r)+" "+p(t[o.name],n,r+4))})),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let r="";for(let e=this.parent;e;e=e.parent)r=e.name()+" "+r;const n=["Usage: "+r+t+" "+this.usage(),""];let o=[];const i=this.commandHelp();i&&(o=[i]);const a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return n.concat(e).concat(a).concat(o).join("\n")}outputHelp(e){e||(e=e=>e);const t=e(this.helpInformation());if("string"!=typeof t&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const r=this._helpFlags.split(/[ ,|]+/);return this._helpShortFlag=void 0,r.length>1&&(this._helpShortFlag=r.shift()),this._helpLongFlag=r.shift(),this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}}function l(e,t){const r=Math.max(0,t-e.length);return e+Array(r+1).join(" ")}function p(e,t,r){const n=new RegExp(".{1,"+(t-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g");return(e.match(n)||[]).map(((e,t)=>("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0&&r?Array(r+1).join(" "):"")+e.trimRight()))).join("\n")}function f(e,t,r){return e.match(/[\n]\s+/)||t<40?e:p(e,t,r)}function d(e,t){t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function h(e){const t=e.name+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}function _(e){return e.map((e=>{let t=e;if(0===e.indexOf("--inspect")){let r,n,o="127.0.0.1",i="9229";null!==(n=e.match(/^(--inspect(-brk)?)$/))?r=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(r=n[1],/^\d+$/.test(n[3])?i=n[3]:o=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(r=n[1],o=n[3],i=n[4]),r&&"0"!==i&&(t=`${r}=${o}:${parseInt(i)+1}`)}return t}))}(t=e.exports=new u).program=t,t.Command=u,t.Option=s,t.CommanderError=c},2747:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeError=t.SchemaError=t.CompileError=t.UploadError=t.CompressError=t.PackageSizeError=t.ProjectError=t.HashError=t.MetaError=t.LoginError=t.IDE_ERROR_LEVEL=void 0,t.IDE_ERROR_LEVEL={p0:"p0",p1:"p1",p2:"p2",p3:"p3"};var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Login Error",t}return n(t,e),t}(Error);t.LoginError=o;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Meta Error",t}return n(t,e),t}(Error);t.MetaError=i;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Hash Error",t}return n(t,e),t}(Error);t.HashError=a;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Project Error",t}return n(t,e),t}(Error);t.ProjectError=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="PackageSize Error",t}return n(t,e),t}(Error);t.PackageSizeError=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Compress Error",t}return n(t,e),t}(Error);t.CompressError=u;var l=function(e){function t(t,r){void 0===r&&(r=-1);var n=e.call(this,t)||this;return n.name="Upload Error",n.code=r,n}return n(t,e),t}(Error);t.UploadError=l;var p=function(e){function t(t,r,n){void 0===r&&(r=""),void 0===n&&(n=0);var o=e.call(this,t)||this;return o.name="Compile Error",o.errLink=r,o.code=n,o}return n(t,e),t}(Error);t.CompileError=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Schema Error",t}return n(t,e),t}(Error);t.SchemaError=f;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="QRCode Error",t}return n(t,e),t}(Error);t.QRCodeError=d},2139:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FRONT_PAGE_EVENT=t.IDE_PERFORMANCE_EVENTS=t.IDE_TIMELINE_NAMES=t.IDE_MODULES=t.SLARDAR_EVENT=void 0;var o=r(8039);t.SLARDAR_EVENT=n(n(n({},o.UPDATE_SLARDAR_EVENTS),o.UPDATE_SLARDAR_EVENTS_TECH),{VELA_CLICK_PREVIEW:"VELA_CLICK_PREVIEW",VELA_PREVIEW_FAIL:"VELA_PREVIEW_FAIL",VELA_CLICK_UPLOAD:"VELA_CLICK_UPLOAD",UPLOAD_VERSION_FOCUS:"UPLOAD_VERSION_FOCUS",UPLOAD_VERSION_ERROR:"UPLOAD_VERSION_ERROR",VELA_UPLOAD_FAIL:"VELA_UPLOAD_FAIL",VELA_SHOW_INIT_VIEW_TIME:"VELA_SHOW_INIT_VIEW_TIME",VELA_PREVIEW_TIME:"VELA_PREVIEW_TIME",VELA_UPLOAD_TIME:"VELA_UPLOAD_TIME",VELA_COMPILE_FIRST_END:"VELA_COMPILE_FIRST_END",VELA_COMPILE_TIME:"VELA_COMPILE_TIME",IDE_COMPILE_PERFORMANCE:"IDE_COMPILE_PERFORMANCE",IDE_COMPILE_RESULT:"IDE_COMPILE_RESULT",VELA_SIMULATOR_RENDER_TIME:"VELA_SIMULATOR_RENDER_TIME",VELA_SIMULATOR_FIRST_RENDER_SUCCESS:"VELA_SIMULATOR_FIRST_RENDER_SUCCESS",VELA_AUDIT_SCORE:"VELA_AUDIT_SCORE",MENU_BAR_DEBUG_SETTING_SAVE:"MENU_BAR_DEBUG_SETTING_SAVE",MENU_BAR_DEBUG_SETTING_SAVE_FAIL:"MENU_BAR_DEBUG_SETTING_SAVE_FAIL",MENU_BAR_DEBUG_APPLY_TEST_TMA:"MENU_BAR_DEBUG_APPLY_TEST_TMA",MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL:"MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL",MENU_BAR_DEBUG_APPLY_BOE:"MENU_BAR_DEBUG_APPLY_BOE",MENU_BAR_DEBUG_APPLY_BOE_FAIL:"MENU_BAR_DEBUG_APPLY_BOE_FAIL",MENU_BAR_DEBUG_APPLY_PPE:"MENU_BAR_DEBUG_APPLY_PPE",MENU_BAR_DEBUG_APPLY_PPE_FAIL:"MENU_BAR_DEBUG_APPLY_PPE_FAIL",VELA_POST_MESSAGE_LIST:"VELA_POST_MESSAGE_LIST",VELA_POST_MESSAGE_LIST_FAIL:"VELA_POST_MESSAGE_LIST_FAIL",VELA_AVATAR_LOGOUT:"VELA_AVATAR_LOGOUT",VELA_AVATAR_LOGOUT_FAIL:"VELA_AVATAR_LOGOUT_FAIL",VELA_CLEAR_ALL_SESSION:"VELA_CLEAR_ALL_SESSION",VELA_CLEAR_ALL_SESSION_FAIL:"VELA_CLEAR_ALL_SESSION_FAIL",VELA_CLEAR_DATA_SESSION:"VELA_CLEAR_DATA_SESSION",VELA_CLEAR_DATA_SESSION_FAIL:"VELA_CLEAR_DATA_SESSION_FAIL",VELA_CLEAR_LOGIN_SESSION:"VELA_CLEAR_LOGIN_SESSION",VELA_CLEAR_LOGIN_SESSION_FAIL:"VELA_CLEAR_LOGIN_SESSION_FAIL",VELA_CLEAR_AUTH_SESSION:"VELA_CLEAR_AUTH_SESSION",VELA_CLEAR_AUTH_SESSION_FAIL:"VELA_CLEAR_AUTH_SESSION_FAIL",VELA_ADD_COMPILE_MODE:"VELA_ADD_COMPILE_MODE",VELA_ADD_COMPILE_MODE_FAIL:"VELA_ADD_COMPILE_MODE_FAIL",VELA_COMPILE:"VELA_COMPILE",VELA_COMPILE_FAIL:"VELA_COMPILE_FAIL",VELA_CHANGE_COMPILE_MODE:"VELA_CHANGE_COMPILE_MODE",VELA_CHANGE_COMPILE_MODE_FAIL:"VELA_CHANGE_COMPILE_MODE_FAIL",VELA_SELECT_SDK:"VELA_SELECT_SDK",VELA_SELECT_SDK_FAIL:"VELA_SELECT_SDK_FAIL",VELA_CLICK_CONVERT_TOOL:"VELA_CLICK_CONVERT_TOOL",VELA_CONVERT_EMIT:"VELA_CONVERT_EMIT",VELA_OPEN_PROJECT_FROM_CONVERT_TOOL:"VELA_OPEN_PROJECT_FROM_CONVERT_TOOL",VELA_BUILD_NPM:"VELA_BUILD_NPM",VELA_BUILD_NPM_FAIL:"VELA_BUILD_NPM_FAIL",PACKAGE_SIZE:"PACKAGE_SIZE",UPLOAD_SUCCESS_EVENT:"UPLOAD_SUCCESS_EVENT",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL",IDE_GET_SDK_LIST_FAIL:"IDE_GET_SDK_LIST_FAIL",IDE_REQUEST_START:"IDE_REQUEST_START",IDE_REQUEST_FAIL:"IDE_REQUEST_FAIL",IDE_COLOR_THEME:"IDE_COLOR_THEME",IDE_CODE_WINDOW_ERROR:"IDE_CODE_WINDOW_ERROR",IDE_HELP_DEVELOPER_COMMUNITY:"IDE_HELP_DEVELOPER_COMMUNITY",IDE_MESSAGE_EXPAND_CLICK:"IDE_MESSAGE_EXPAND_CLICK",IDE_MODULE_CLICK:"IDE_MODULE_CLICK",IDE_MODULE_USAGE:"IDE_MODULE_USAGE",IDE_MODULE_LOADTIME:"IDE_MODULE_LOADTIME",IDE_MODULE_PERFORMANCE:"IDE_MODULE_PERFORMANCE",IDE_PERFORMANCE:"IDE_PERFORMANCE",IDE_DEVICE_INFO_DISPLAY:"IDE_DEVICE_INFO_DISPLAY",IDE_DEVICE_INFO_CPU:"IDE_DEVICE_INFO_CPU",IDE_DEVICE_INFO_OS:"IDE_DEVICE_INFO_OS",IDE_SIMULATOR_LOAD_TIME:"IDE_SIMULATOR_LOAD_TIME",IDE_MENU_CLICK:"IDE_MENU_CLICK",IDE_LANGUAGE:"IDE_LANGUAGE",IDE_ROOM_SERVICE_TRACE:"IDE_ROOM_SERVICE_TRACE",IDE_UPDATE_STEP_ERROR:"IDE_UPDATE_STEP_ERROR",IDE_SCENE_START:"IDE_SCENE_START",IDE_SCENE_END:"IDE_SCENE_END",IDE_APPID_SELECT:"IDE_APPID_SELECT",IDE_APPID_CHANGE:"IDE_APPID_CHANGE",IDE_FMP_BREAKDOWN:"IDE_FMP_BREAKDOWN",IDE_JS_LONG_TASK:"IDE_JS_LONG_TASK",IDE_INP_INFO:"IDE_INP_INFO",IDE_LOW_FPS:"IDE_LOW_FPS",IDE_LOW_MEMORY:"IDE_LOW_MEMORY",IDE_FETCH_ADMIN_XCONFIG_TMAR:"IDE_FETCH_ADMIN_XCONFIG_TMAR",IDE_BIG_PACKAGESIZE_CHECK:"IDE_BIG_PACKAGESIZE_CHECK",IDE_WORKBENCH_WILL_RENDER:"IDE_WORKBENCH_WILL_RENDER",IDE_WORKBENCH_RENDERED:"IDE_WORKBENCH_RENDERED",IDE_CODE_WINDOW_NUM:"IDE_CODE_WINDOW_NUM",IDE_NEW_CODE_WINDOW:"IDE_NEW_CODE_WINDOW",IDE_DETAIL_PANEL_OPENED:"IDE_DETAIL_PANEL_OPENED",IDE_DETAIL_PANEL_CLOSED:"IDE_DETAIL_PANEL_CLOSED",IDE_SETTING_PAGE_SHOW:"IDE_SETTING_PAGE_SHOW",IDE_SETTING_PAGE_OPERATION:"IDE_SETTING_PAGE_OPERATION",IDE_SETTING_CHANGE_LITE_MODE:"IDE_SETTING_CHANGE_LITE_MODE:",IDE_MODULE_CLICK_AUTH_REG:"IDE_MODULE_CLICK_AUTH_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_REG:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL:"IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC",IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS:"IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS",IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY:"IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY",IDE_MODULE_AUTH_SCAN_QRCODE:"IDE_MODULE_AUTH_SCAN_QRCODE",IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON:"IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON",IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE",IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",IDE_FRONTPAGE_PM_LIST:"IDE_FRONTPAGE_PM_LIST",CREATE_PROGRAM:"CREATE_PROGRAM",IDE_WXTOTT_ERROR:"IDE_WXTOTT_ERROR",IDE_SCENE_USER_OPERATE:"IDE_SCENE_USER_OPERATE",IDE_TEMPLATE_HOVER:"IDE_TEMPLATE_HOVER",IDE_TEMPLATE_DETAIL:"IDE_TEMPLATE_DETAIL",IDE_TEMPLATE_ERROR:"IDE_TEMPLATE_ERROR",IDE_TEMPLATE_DOWNLOAD:"IDE_TEMPLATE_DOWNLOAD",IDE_QUICK_JS_ERROR:"IDE_QUICK_JS_ERROR",IDE_REMOTE_DEBUG_CONNECTION_QUALITY:"IDE_REMOTE_DEBUG_CONNECTION_QUALITY",IDE_LOCAL_COMPILE_TRACE:"IDE_LOCAL_COMPILE_TRACE",IDE_REMOTE_DEBUG_EXCEPTION:"IDE_REMOTE_DEBUG_EXCEPTION",IDE_MODULE_AUTH_FORCE_LOGOUT:"IDE_MODULE_AUTH_FORCE_LOGOUT",IDE_CANVAS_WEBGL_CONTEXT_ENABLE:"IDE_CANVAS_WEBGL_CONTEXT_ENABLE",IDE_LOGIN_DATA_FORMAT:"IDE_LOGIN_DATA_FORMAT",IDE_ADD_COMPILE_MODE:"IDE_ADD_COMPILE_MODE",IDE_DECODE_QRCODE:"IDE_DECODE_QRCODE",IDE_DECODE_URL:"IDE_DECODE_URL",IDE_MAIN_HELPER_FORK_TIME:"IDE_MAIN_HELPER_FORK_TIME",IDE_MAIN_HELPER_ERROR:"IDE_MAIN_HELPER_ERROR",IDE_INSTALL_PATH:"IDE_INSTALL_PATH",IDE_SWITCH_WORKBENCH_MODE:"IDE_SWITCH_WORKBENCH_MODE",IDE_TOGGLE_REMOTE_VIEW:"IDE_TOGGLE_REMOTE_VIEW",IDE_SIMULATOR_PAUSE_MINIAPP:"IDE_SIMULATOR_PAUSE_MINIAPP",IDE_SIMULATOR_REFRESH_MINIAPP:"IDE_SIMULATOR_REFRESH_MINIAPP",IDE_SIMULATOR_REFRESH:"IDE_SIMULATOR_REFRESH",IDE_SIMULATOR_CLICK_LITE_BANNER:"IDE_SIMULATOR_CLICK_LITE_BANNER",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_LITE_NOTICE_MODAL_SHOW:"IDE_LITE_NOTICE_MODAL_SHOW",IDE_LITE_NOTICE_MODAL_CLICK:"IDE_LITE_NOTICE_MODAL_CLICK",IDE_WB_SCENE_START:"IDE_WB_SCENE_START",IDE_WB_SCENE_END:"IDE_WB_SCENE_END",IDE_GECKO_ERROR:"IDE_GECKO_ERROR",PUCK_COMPILE_ERROR:"PUCK_COMPILE_ERROR",IDE_DEVTOOLS_PANEL_INIT:"IDE_DEVTOOLS_PANEL_INIT",IDE_DEVTOOLS_SENSORS_PANEL_USAGE:"IDE_DEVTOOLS_SENSORS_PANEL_USAGE",IDE_FRONT_PAGE_CLICK_SETTINGS:"IDE_FRONT_PAGE_CLICK_SETTINGS",IDE_AI_OPEN:"IDE_AI_OPEN",IDE_AI_QUESTION:"IDE_AI_QUESTION",IDE_AI_FEEDBACK:"IDE_AI_FEEDBACK",IDE_AI_OPEN_LINK:"IDE_AI_OPEN_LINK",IDE_DETAIL_CONFIG_ITEM_CLICK:"IDE_DETAIL_CONFIG_ITEM_CLICK",IDE_WORKBENCH_VIEW_STATUS:"IDE_WORKBENCH_VIEW_STATUS",IDE_POWER_EVENT:"IDE_POWER_EVENT",IDE_TASK_PERFORMANCE:"IDE_TASK_PERFORMANCE",IDE_EXCEPTION_RECORD:"IDE_EXCEPTION_RECORD"}),t.IDE_MODULES={LOGIN:"LOGIN",MESSAGE:"MESSAGE",SIMULATOR:"SIMULATOR",SIMULATOR_USAGE:"SIMULATOR_USAGE",DEVTOOL:"DEVTOOL",DEVTOOL_USAGE:"DEVTOOL_USAGE",REFRESH:"REFRESH",CLEAR_CACHE:"CLEAR_CACHE",COMPILE_ORDINARY:"COMPILE_ORDINARY",SELF_COMPILE_MODE:"SELF_COMPILE_MODE",COMPILE:"COMPILE",PREVIEW:"PREVIEW",REMOTE_DEBUG:"REMOTE_DEBUG",UPLOAD:"UPLOAD",SIGN_CHECK:"SIGN_CHECK",INTELLIGENCE:"INTELLIGENCE",AI:"AI",SHARE_PROJECT:"SHARE_PROJECT",PROJECT_MANAGE:"PROJECT_MANAGE",PROJECT_DETAIL:"PROJECT_DETAIL",CHECK_THIRD_PART_MINIAPP:"CHECK_THIRD_PART_MINIAPP",NPM_FUNCTION:"NPM_FUNCTION",EDITOR:"EDITOR",WORKBENCH:"WORKBENCH",SETTING:"SETTING",AVATAR:"AVATAR",UPDATE:"UPDATE",EDITOR_SAVE:"EDITOR_SAVE",MAIN_HELPER:"MAIN_HELPER"},t.IDE_TIMELINE_NAMES=n(n({},t.IDE_MODULES),{SIMULATOR_FIRST_LOADING_END:"SIMULATOR_FIRST_LOADING_END",SIMULATOR_LOADING:"SIMULATOR_LOADING",LOCAL_COMPILE:"LOCAL_COMPILE"}),t.IDE_PERFORMANCE_EVENTS={projectmanageCreated:"performance:projectmanageCreated",projectmanageReady:"performance:projectmanageReady",openProject:"performance:openProject",editorReady:"performance:editorReady",workbenchReady:"performance:workbenchReady",simulatorReady:"performance:simulatorReady",simulatorFirstLoadingEnd:"performance:simulatorFirstLoadingEnd",compilePartialEnd:"performance:compilePartialEnd",previewStart:"performance:previewStart",previewCodeReady:"performance:previewCodeReady",uploadStart:"performance:uploadStart",uploadEnd:"performance:uploadEnd",shareStart:"performance:shareStart",shareEnd:"performance:shareEnd",remoteDebugStart:"performance:remoteDebugStart",remoteDebugCodeReady:"performance:remoteDebugCodeReady"},t.FRONT_PAGE_EVENT={VELA_CAPTCHA_REQUEST:"VELA_CAPTCHA_REQUEST",VELA_CAPTCHA_FAIL:"VELA_CAPTCHA_FAIL",VELA_PHONE_CAPTCHA_REQUEST:"VELA_PHONE_CAPTCHA_REQUEST",VELA_PHONE_CAPTCHA_FAIL:"VELA_PHONE_CAPTCHA_FAIL",VELA_PHONE_LOGIN_REQUEST:"VELA_PHONE_LOGIN_REQUEST",VELA_PHONE_LOGIN_FAIL:"VELA_PHONE_LOGIN_FAIL",VELA_MAIL_LOGIN_REQUEST:"VELA_MAIL_LOGIN_REQUEST",VELA_MAIL_LOGIN_FAIL:"VELA_MAIL_LOGIN_FAIL",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_CHECK_EXIST_PROJECT_FAIL:"VELA_CHECK_EXIST_PROJECT_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_CHECK_TEMPLATE_FAIL:"VELA_CHECK_TEMPLATE_FAIL",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FAIL:"VELA_DELETE_PROJECT_FAIL",VELA_IMPORT_PROJECT:"VELA_IMPORT_PROJECT",VELA_IMPORT_PROJECT_FAIL:"VELA_IMPORT_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL:"VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL"}},5833:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompilerPlugin=void 0,(t.CompilerPlugin||(t.CompilerPlugin={})).TYPESCRIPT="typescript"},8039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_SLARDAR_EVENTS_TECH=t.UPDATE_SLARDAR_EVENTS=void 0,t.UPDATE_SLARDAR_EVENTS={IDE_LAUNCH:"IDE_LAUNCH",IDE_UPGRADE_SUGGGEST_POP:"IDE_UPGRADE_SUGGGEST_POP",IDE_UPGRADE_SUGGGEST_POP_CLOSE:"IDE_UPGRADE_SUGGGEST_POP_CLOSE",IDE_UPGRADE_SUGGGEST_POP_NO:"IDE_UPGRADE_SUGGGEST_POP_NO",IDE_UPGRADE_SUGGGEST_POP_YES:"IDE_UPGRADE_SUGGGEST_POP_YES",IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL:"IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL",IDE_UPGRADE_ICON:"IDE_UPGRADE_ICON",IDE_UPGRADE_ICON_CLOSE:"IDE_UPGRADE_ICON_CLOSE",IDE_UPGRADE_ICON_RESTART:"IDE_UPGRADE_ICON_RESTART",IDE_UPGRADE_ICON_VIEWDETAIL:"IDE_UPGRADE_ICON_VIEWDETAIL",IDE_FULLUPGRADE_POP:"IDE_FULLUPGRADE_POP",IDE_FULLUPGRADE_POP_CLOSE:"IDE_FULLUPGRADE_POP_CLOSE",IDE_FULLUPGRADE_POP_NO:"IDE_FULLUPGRADE_POP_NO",IDE_FULLUPGRADE_POP_YESBACK:"IDE_FULLUPGRADE_POP_YESBACK",IDE_FULLUPGRADE_POP_YESONCE:"IDE_FULLUPGRADE_POP_YESONCE",IDE_FULLUPGRADE_POP_VIEWDETAIL:"IDE_FULLUPGRADE_POP_VIEWDETAIL"},t.UPDATE_SLARDAR_EVENTS_TECH={IDE_LOADER_IO_ERROR:"IDE_LOADER_IO_ERROR",IDE_LOADER_INSTALL_RECOVER_ERROR:"IDE_LOADER_INSTALL_RECOVER_ERROR",IDE_LOADER_START_FROM_ENTRY:"IDE_LOADER_START_FROM_ENTRY",IDE_LAUNCH_FAIL:"IDE_LAUNCH_FAIL"}},1061:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppJSON=void 0;var l=s(r(9849)),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__isGame=!1,t}return o(t,e),t.from=function(e){return c(this,void 0,void 0,(function(){var r,n;return u(this,(function(o){switch(o.label){case 0:return[4,l.readJson(e)];case 1:return r=o.sent(),(n=new t(r,e)).__isGame=e.endsWith("game.json"),[2,n]}}))}))},Object.defineProperty(t.prototype,"isGame",{get:function(){return this.__isGame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subPackages",{get:function(){var e=this.__raw,t=e.subPackages,r=e.subpackages;return t||(void 0===r?[]:r)},enumerable:!1,configurable:!0}),t}(r(4169).JSONContainer);t.AppJSON=p},3652:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtJSON=void 0;var l=s(r(9849)),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.from=function(e){return c(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,l.readJson(e)];case 1:return[2,new t(r.sent(),e)]}}))}))},t}(r(4169).JSONContainer);t.ExtJSON=p},4169:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.JSONContainer=void 0;var c=i(r(9849)),u=function(){function e(e,t){this.__raw=e,this.path=t}return Object.defineProperty(e.prototype,"rawJSON",{get:function(){return this.__raw},enumerable:!1,configurable:!0}),e.prototype.getKey=function(e,t){var r;return null!==(r=this.__raw[e])&&void 0!==r?r:t},e.prototype.update=function(e,t,r){return void 0===r&&(r=!1),a(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return this.__raw[e]=t,r?[4,c.writeJson(this.path,this.__raw,{spaces:2})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},e}();t.JSONContainer=u},8559:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return a(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},p=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectConfig=t.PrivateState=t.getOriginAppid=t.isTestAppid=t.getIDEAppTechType=t.setIDEAppTechType=t.PROJECT_TYPE_MAP=t.DEFAULT_PROJECT_CONFIG=t.setEnvFunctionForProject=void 0;var d=s(r(9849)),h=s(r(1017)),_=r(1061),v=r(3652),m=r(4169),y=r(5833),E=r(7992),g=f(r(6503)),b=f(r(7921)),O=f(r(772)),A=f(r(3122)),I=f(r(298)),C=f(r(1395)),S=f(r(8337)),w=f(r(5513)),P=function(){return E.defaultEnv};t.setEnvFunctionForProject=function(e){P=e};var L={MICROAPP:"tt07e3715e98c9aac0",MICROGAME:"tt975be1e608633d4202",get TOYBOX(){return"boe"===P().env.type?"tte05d96e07f3bdfe710":"tt3c174aaaa32e0eb810"}};t.DEFAULT_PROJECT_CONFIG={appid:"testappId",projectname:"默认小程序名",setting:{urlCheck:!0,es6:!0,postcss:!0,minified:!0,newFeature:!0},scripts:{afterOpen:"",beforeCompile:""}},t.PROJECT_TYPE_MAP={microapp:"app",microgame:"game",toybox:"toybox"};var T="";t.setIDEAppTechType=function(e){T=e},t.getIDEAppTechType=function(){return T};var R,D="testappid";function j(e,t){return void 0===t&&(t="app"),e.toLocaleLowerCase()===D?(null==T?void 0:T.includes("microapp"))?L.MICROAPP:(null==T?void 0:T.includes("toybox"))?L.TOYBOX:(null==T?void 0:T.includes("microgame"))?L.MICROGAME:"app"===t?L.MICROAPP:L.MICROGAME:e}t.isTestAppid=function(e){return Boolean(e)&&(e===L.MICROAPP||e===L.MICROGAME||e===L.TOYBOX||e.toLowerCase()===D)},t.getOriginAppid=j,function(e){e.ALWAYS="ALWAYS",e.NORMAL="NORMAL"}(R=t.PrivateState||(t.PrivateState={}));var x=function(e){function r(t){var r=t.rawJson,n=t.filepath,o=t.privateConfigPath,i=t.projectPath,a=t.publicJson,s=t.privateJson,c=e.call(this,r,n)||this;return c.projectPath=i,c.privateConfigPath=o,c.publicJson=a,c.privateJson=s,c._enablePrivateConfig=!1,c}return o(r,e),r.getKeyPath=function(){return r._keyPath||(r._keyPath=r.generateList(r.PRIVATE_CONFIG_KEYS)),r._keyPath},r.getKeyPathList=function(){return r.getKeyPath().map((function(e){return e[0]}))},r.generateList=function(e,t){return void 0===t&&(t=""),(0,g.default)(e,(function(e,n,o){var i,a=t?t+"."+o:o;return"string"==typeof(i=n)&&Object.values(R).includes(i)?e.push([a,n]):e.push.apply(e,p([],l(r.generateList(n,a)),!1)),e}),[])},r.from=function(e){return c(this,void 0,void 0,(function(){var t,n,o,i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return t=h.join(e,"project.config.json"),n=h.join(e,"project.private.config.json"),o=d.readJsonSync(t),[4,(i=new r({rawJson:o,filepath:t,projectPath:e,publicJson:o,privateJson:{},privateConfigPath:n})).detectProjectType()];case 1:if("app"===u.sent()){a={};try{s=d.readJSONSync(n),(0,A.default)(s)&&(0,I.default)(s).length>0&&(a=s)}catch(e){}c=this.getMergedConfig(o,a),i.enablePrivateConfig(c,a)}return[2,i]}}))}))},r.fromJson=function(e,t){return new r({rawJson:e,filepath:h.join(t,"project.config.json"),projectPath:t,publicJson:e,privateJson:{},privateConfigPath:h.join(t,"project.private.config.json")})},r.getMergedConfig=function(e,t){var r,n=!0===(null!==(r=t.disablePrivate)&&void 0!==r?r:e.disablePrivate),o=(0,b.default)(e);return this.getKeyPath().forEach((function(e){if(e[1]===R.ALWAYS||!n){var r=(0,O.default)(t,e[0]);void 0!==r&&(0,w.default)(o,e[0],r)}})),o},r.prototype.update=function(t,n,o){var i;return c(this,void 0,void 0,(function(){var a,s,c,l,p,f,h;return u(this,(function(u){switch(u.label){case 0:return this._enablePrivateConfig&&!0===(null!==(i=this.privateJson.disablePrivate)&&void 0!==i?i:this.publicJson.disablePrivate)?[4,e.prototype.update.call(this,t,n,o)]:[3,2];case 1:return u.sent(),[2];case 2:return a=r.getKeyPathList(),s=(0,S.default)(((f={})[t]=n,f),a),c=(0,I.default)(s).length>0,l=(0,C.default)(((h={})[t]=n,h),a),p=(0,I.default)(l).length>0,(0,w.default)(this.__raw,t,n),c&&(0,w.default)(this.privateJson,t,s[t]),p&&(0,w.default)(this.publicJson,t,l[t]),o?p?[4,d.writeJSON(this.path,this.publicJson,{spaces:2})]:[3,4]:[3,7];case 3:u.sent(),u.label=4;case 4:return c?[4,d.ensureFile(this.privateConfigPath)]:[3,7];case 5:return u.sent(),[4,d.writeJson(this.privateConfigPath,this.privateJson,{spaces:2})];case 6:u.sent(),u.label=7;case 7:return[2]}}))}))},r.prototype.enablePrivateConfig=function(e,t){this.privateJson=t,this.__raw=e,this._enablePrivateConfig=!0},r.prototype.getPublicRawJSON=function(){return this.publicJson},r.prototype.getPrivateRawJSON=function(){return this.privateJson},r.prototype.getAppid=function(){var e="";return this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),j(e)},r.prototype.getRealAppid=function(){return c(this,void 0,void 0,(function(){var e,t,r,n;return u(this,(function(o){switch(o.label){case 0:return e="",this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),t=j,r=[e],T?(n=void 0,[3,3]):[3,1];case 1:return[4,this.detectProjectType()];case 2:n=o.sent(),o.label=3;case 3:return[2,e=t.apply(void 0,r.concat([n]))]}}))}))},r.prototype.getSetting=function(){var e;return null!==(e=this.__raw.setting)&&void 0!==e?e:t.DEFAULT_PROJECT_CONFIG.setting},r.prototype.getProjectName=function(){var e;return null!==(e=this.__raw.projectname)&&void 0!==e?e:""},r.prototype.getScripts=function(){var e;return null!==(e=this.__raw.scripts)&&void 0!==e?e:{afterOpen:"",beforeCompile:""}},r.prototype.getConditionData=function(e){var t,r;return null!==(r=null===(t=this.__raw.condition)||void 0===t?void 0:t[e])&&void 0!==r?r:{current:-1,list:[]}},r.prototype.getAutoCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.autoCompile)},r.prototype.getCompileHotReloadSetting=function(){var e,t=null===(e=this.__raw.setting)||void 0===e?void 0:e.compileHotReLoad,r="native"===this.__raw.douyinProjectType;return t||void 0===t&&r},r.prototype.getNativeCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.nativeCompile)},r.prototype.getLocalPluginsSetting=function(){var e,t;return null!==(t=null===(e=this.__raw.setting)||void 0===e?void 0:e.localPlugins)&&void 0!==t&&t},r.prototype.getAfterOpenScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.afterOpen},r.prototype.getBeforeCompileScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.beforeCompile},r.prototype.getSkipDomainCheck=function(){var e,t,r;return!(null===(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.urlCheck)||void 0===r||r)},r.prototype.getPreviewHotRestartCache=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewHotRestartCache)&&void 0!==r&&r},r.prototype.getMiniprogramRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.miniprogramRoot)&&void 0!==t?t:"./"},r.prototype.getBigPackageSizeSupport=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.bigPackageSizeSupport)&&void 0!==r&&r},r.prototype.detectProjectType=function(e){return c(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return[4,this.getProjectType()];case 1:return t=r.sent(),[2,e?e===t:t]}}))}))},r.prototype.getProjectType=function(){return c(this,void 0,void 0,(function(){var e,r,n,o,i,a,s,c;return u(this,(function(u){switch(u.label){case 0:return(null==T?void 0:T.includes("microapp"))?[2,"app"]:(null==T?void 0:T.includes("microgame"))||(null==T?void 0:T.includes("toybox"))?[2,"game"]:this.__raw.ttProjectType?[2,t.PROJECT_TYPE_MAP[this.__raw.ttProjectType]]:(e=this.getMiniprogramRoot(),r=h.join(this.projectPath,e,"app.json"),n=r.replace("app.json","app.ts"),o=r.replace("app.json","app.js"),[4,Promise.all([d.pathExists(r),d.pathExists(o),d.pathExists(n)])]);case 1:if(i=u.sent(),this.useTypeScript()){if(i[0]&&(i[1]||i[2]))return[2,"app"]}else if(i[0]&&i[1])return[2,"app"];return a=r.replace("app.json","game.json"),s=a.replace("game.json","game.js"),[4,Promise.all([d.pathExists(a),d.pathExists(s)])];case 2:if((c=u.sent())[0]&&c[1])return[2,"game"];throw new Error("[ProjectConfig]Bad Project Type")}}))}))},r.prototype.getAppJSON=function(){return c(this,void 0,void 0,(function(){var e,t;return u(this,(function(r){switch(r.label){case 0:return[4,this.detectProjectType("app")];case 1:return e=r.sent()?"app.json":"game.json",t=h.join(this.projectPath,this.getMiniprogramRoot(),e),[4,_.AppJSON.from(t)];case 2:return[2,r.sent()]}}))}))},r.prototype.getExtJSON=function(){return c(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return e=h.join(this.projectPath,this.getMiniprogramRoot(),"ext.json"),[4,v.ExtJSON.from(e)];case 1:return[2,t.sent()]}}))}))},r.prototype.useTypeScript=function(){var e,t,r;return!!Array.isArray(null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.useCompilerPlugins)&&(null===(r=this.__raw.setting)||void 0===r?void 0:r.useCompilerPlugins.includes(y.CompilerPlugin.TYPESCRIPT))},r.PRIVATE_CONFIG_KEYS={disablePrivate:R.ALWAYS,setting:{urlCheck:R.NORMAL,mockLogin:R.NORMAL,autoPush:R.NORMAL,bigPackageSizeSupport:R.NORMAL,autoCompile:R.NORMAL,compileHotReLoad:R.NORMAL,nativeCompile:R.NORMAL,IDEPreviewHotRestartCache:R.NORMAL},condition:R.NORMAL},r}(m.JSONContainer);t.ProjectConfig=x},4084:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.reportTea=void 0;var o=n(r(5715)).default.create({baseURL:"https://mcs.snssdk.com",timeout:1e4,headers:{"Content-Type":"application/json"}});t.reportTea=function(e,t,r){var n;void 0===r&&(r={});var i=JSON.stringify(r),a={user:{user_unique_id:t.deviceId},header:{app_id:1733,app_version:t.ideVersion,headers:JSON.stringify({app_full_version:t.ideVersion}),os_name:t.osPlatform,os_version:t.osVersion,custom:{cli_name:null!==(n=t.cliName)&&void 0!==n?n:""}},verbose:1},s=Object.assign({},a,{events:[{event:e,params:i}]});o.post("/v1/json",s).catch((function(e){console.error("上报数据出错",e)}))}},4415:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function n(e){return e.endsWith("/")?e:e.concat("/")}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureEndSlash=t.formatSize=t.normalizeSize=void 0,t.normalizeSize=function(e){var t=e.__APP__,o=void 0===t?0:t,i=r(e,["__APP__"]),a={main:{path:"main",size:o},sub:[],total:o};return Object.keys(i).forEach((function(e){var t,r=i[e];null===(t=a.sub)||void 0===t||t.push({path:n(e),size:r}),a.total=a.total+r})),a},t.formatSize=function(e){return e>1048576?(e/1024/1024).toFixed(2)+"MB":e>1024?(e/1024).toFixed(1)+"KB":e+"B"},t.ensureEndSlash=n},7992:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var a=i(r(5715)),s=r(2139),c=r(925),u=new Map;u.set(/https:\/\/microapp.bytedance.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/developer.toutiao.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),u.set(/https:\/\/open-sandbox.douyin.com\/(.*)/,"http://open-sandbox-boe.bytedance.net/$1"),u.set(/https:\/\/developer.open-douyin.com\/(.*)/,"https://dy-open-platform-boe.bytedance.net/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/user\/tp_info)/,"http://developer-boe.toutiao.com/$1"),u.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/.*)/,"http://developer-boe.toutiao.com/$1");var l={env:{type:"online",channel:""},proxy:{host:null,port:null}};t.defaultEnv=l;var p=function(){return l},f={reportRequestError:function(){},reportCustomEvent:function(){}},d=[function(e){var t,r,i;if(null===(i=e.headers)||void 0===i?void 0:i.online)return e;var a=p().env,s="boe"===a.type,c=a.channel;if(!s)return e;try{for(var l=n(u),f=l.next();!f.done;f=l.next()){var d=o(f.value,2),h=d[0],_=d[1];if(e.url&&h.test(e.url)){e.url=e.url.replace(h,_);break}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return c&&e.headers&&(e.headers["X-TT-ENV"]=c),e},function(e){var t;if(null===(t=e.headers)||void 0===t?void 0:t.online)return e;var r=p().env,n="ppe"===r.type,o=r.channel;return n&&e&&e.headers&&(e.headers["X-USE-PPE"]=1),n&&e.headers&&o&&(e.headers["X-TT-ENV"]=o),e}],h=a.default.create({adapter:c,timeout:6e4});t.AxiosInstance=h,h.interceptors.request.use((function(e){var t,n;null==f||f.reportCustomEvent(s.SLARDAR_EVENT.IDE_REQUEST_START,void 0,{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:""});var o=p().proxy;return o.host?(null===(n=e.url)||void 0===n?void 0:n.startsWith("https://"))?(e.httpsAgent=r(1681).httpsOverHttp({proxy:{host:o.host,port:o.port},rejectUnauthorized:!1}),e.proxy=!1):e.proxy={host:o.host,port:o.port?+o.port:80}:(null==o?void 0:o.host)&&o.port||(e.proxy=!1),d.forEach((function(t){return t(e)})),e}),(function(e){return null==f||f.reportRequestError({url:null==e?void 0:e.url,statusMessage:String(e),caller:"interceptors.request.error"}),Promise.reject(e)})),h.interceptors.response.use((function(e){var t,r,n,o,i,a,s,c,u,l,p,d,h;return null===e.config.validateStatus||e.status>=200&&e.status<300||null==f||f.reportRequestError({url:null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(n=null==e?void 0:e.request)||void 0===n?void 0:n.url,ttLogId:String(null!==(a=null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.headers)||void 0===i?void 0:i["x-tt-logid"])&&void 0!==a?a:null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s["x-tt-logid"]),statusCode:null==e?void 0:e.status,statusMessage:null==e?void 0:e.statusText,caller:"interceptors.response"}),process.env.isIDE&&console.info("[request] ",null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.url,"x-tt-logid",null!==(h=null!==(p=null===(l=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.headers)||void 0===l?void 0:l["x-tt-logid"])&&void 0!==p?p:null===(d=e.headers)||void 0===d?void 0:d["x-tt-logid"])&&void 0!==h?h:""),e}),(function(e){var t,r,n,o,i,a,s,c,u,l,p,d,h,_,v;return null==f||f.reportRequestError({url:null!==(i=null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(o=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.config)||void 0===o?void 0:o.url)&&void 0!==i?i:null===(a=null==e?void 0:e.request)||void 0===a?void 0:a.url,statusCode:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.status,statusMessage:String(e),ttLogId:null!==(h=null!==(l=null===(u=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.headers)||void 0===u?void 0:u["x-tt-logid"])&&void 0!==l?l:null===(d=null===(p=null==e?void 0:e.response)||void 0===p?void 0:p.headers)||void 0===d?void 0:d["x-tt-logid"])&&void 0!==h?h:null===(v=null===(_=null==e?void 0:e.request)||void 0===_?void 0:_.headers)||void 0===v?void 0:v["x-tt-logid"],caller:"interceptors.response.error"}),Promise.reject(e)})),h.interceptors.request.use((function(e){return e.headers&&(e.headers.Referer="developer.toutiao.com"),e})),t.setEnvFunction=function(e){p=e},t.setSlardarInstance=function(e){f=e},t.setJestMock=function(e){Object.entries(e).forEach((function(e){var t=o(e,2),r=t[0],n=t[1];h[r]=n}))}},9251:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAppConfig=t.getToken=void 0;var c,u=a(r(9849)),l=s(r(1017)),p=r(4263),f=s(r(8366)),d=l.default.join((0,p.getCliDefaultStoragePath)(),"appConfig.json");function h(){var e;try{var t=u.readJsonSync(d);e=(0,p.isObject)(t)?t:{}}catch(t){e={}}return e}t.getToken=function(e){var t;return c||(c=h()),null===(t=c[e])||void 0===t?void 0:t.token},t.setAppConfig=function(e){e.appid?(0,p.isObject)(e.config)?(u.ensureFileSync(d),(c=h())[e.appid]=n(n({},(0,p.isObject)(c[e.appid])?c[e.appid]:{}),e.config),u.writeJSONSync(d,c)):f.default.error("Config must be an object."):f.default.error("Appid is required to set app config.")}},9345:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.audit=t.getAuditHostsList=void 0;var s=r(7992),c=a(r(9258)),u=r(1728);function l(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,c,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,u.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),r=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/v1/app/"+t+"/code_manager/versions",r)];case 3:return n=i.sent(),o=n.data||{},a=o.error,c=o.message,l=o.data,a?[2,{success:!1,msg:c||"Get host failed,please check if your appid is valid",data:l}]:[2,{success:!0,msg:"",data:l}];case 4:return[2,{success:!1,msg:i.sent().message,data:null}];case 5:return[2]}}))}))}function p(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,c,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,u.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),r=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.get("https://microapp.bytedance.com/platform_api/app/publish/v2/"+t+"/audit/host",r)];case 3:return n=i.sent(),o=n.data||{},a=o.error,c=o.message,l=o.data,a?[2,{success:!1,msg:c||"Get host failed,please check if your appid is valid",hostList:{},preHost:[]}]:l.hostList||l.preHost?[2,{success:!0,hostList:l.hostList,preHost:l.preHost}]:[2,{success:!1,msg:"You do not have permission to audit app",hostList:{},preHost:[]}];case 4:return[2,{success:!1,msg:i.sent().message,hostList:{},preHost:[]}];case 5:return[2]}}))}))}function f(e,t){return o(this,void 0,void 0,(function(){var r,o,a,l,p,f,d;return i(this,(function(i){switch(i.label){case 0:for(a in r="https://microapp.bytedance.com/api/v2/app/"+t+"/audit",o=new c.default,e)o.append(a,e[a]);return d={},p=[{}],[4,(0,u.getLogInfoHeaders)(t)];case 1:d.headers=n.apply(void 0,[n.apply(void 0,p.concat([i.sent()])),o.getHeaders()]),l=d,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,s.AxiosInstance.put(r,o,l)];case 3:if((f=i.sent()).data&&0===f.data.error)return[2,void 0];throw new Error(f.data.message);case 4:throw i.sent();case 5:return[2]}}))}))}t.getAuditHostsList=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o;return i(this,(function(i){switch(i.label){case 0:return[4,p({appid:e.appid})];case 1:if(t=i.sent(),r=t.success,n=t.msg,o=t.hostList,r)return[2,Object.keys(o)];throw new Error(n)}}))}))},t.audit=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,s;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,r=e.host,n=e.autoPublish,[4,l({appid:t})];case 1:if(o=i.sent(),a=o.success,s=o.msg,!a)throw new Error(s);return[4,f({auto_publish:n?1:0,host_chosen:r.toString(),notifyContent:"",test_report:"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"},t)];case 2:return i.sent(),[2]}}))}))}},9808:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cliAuth=void 0;var a=i(r(1606)),s=i(r(6495)),c=i(r(8366)),u=r(4263),l=r(4113);function p(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.mobile?[2,"mobile"]:e.email?[2,"email"]:[4,s.default.prompt([{name:"action",type:"list",message:"Please choose login type:",choices:[{name:"Mobile",value:"mobile"},{name:"Email",value:"email"},{name:"Cancel",value:!1}]}])];case 1:return[2,t.sent().action]}}))}))}t.cliAuth=function(e){return n(this,void 0,void 0,(function(){var t,r,n,i;return o(this,(function(o){switch(o.label){case 0:return[4,p(e)];case 1:return(t=o.sent())?((0,u.clearConsole)(a.default.bold.green(("mobile"===t?"📱":" 📧")+" Sign in with "+t)),[4,s.default.prompt([{name:"inputRet",type:"input",message:"The "+("mobile"===t?"mobile number":"email")+":"}])]):[2];case 2:return r=o.sent().inputRet,"mobile"!==t?[3,6]:[4,(0,l.sendVerificationCodeToPhone)({phoneNumber:r})];case 3:return o.sent(),c.default.info("🎉 Send verification code success"),[4,s.default.prompt([{name:"code",type:"input",message:"The verification code:"}])];case 4:return n=o.sent().code,[4,(0,l.loginByPhone)({phoneNumber:r,code:n})];case 5:return o.sent(),[3,9];case 6:return[4,s.default.prompt([{name:"pwd",type:"password",message:"The password:"}])];case 7:return i=o.sent().pwd,[4,(0,l.loginByEmail)({email:r,password:i})];case 8:o.sent(),o.label=9;case 9:return c.default.info("🎉 Login success"),[2]}}))}))}},2893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.setConfig=void 0;var s=r(7992),c=r(8559),u=a(r(469)),l=i(r(9849)),p=i(r(1017)),f=r(7310),d=a(r(8366)),h=r(4263),_=(0,h.getCliDefaultStoragePath)(),v=p.join(_,"config.json"),m={proxy:null,tempFilePath:null,storagePath:_,url:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/microapp/make_schema",compileProgress:"https://microapp.bytedance.com/api/v1/app/${appid}/compile_progress",preview:"https://developer.toutiao.com/api/v2/app/${appid}/preview",upload:"https://developer.toutiao.com/api/v2/app/${appid}/testing",check:"https://developer.toutiao.com/api/developer/ide/v1/microapp/query_check_progress",emailLogin:"https://developer.toutiao.com/passport/web/email/login/",mobileLogin:"https://developer.toutiao.com/passport/web/sms_login/",sendLoginCode:"https://developer.toutiao.com/passport/web/send_code/",getUserInfo:"https://microapp.bytedance.com/platform_api/v1/app/microappadmincomm/getUserInfo"},interactGameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/v1/compile_progress",preview:"https://developer.toutiao.com/api/developer/ide/v1/preview",upload:"https://developer.toutiao.com/api/developer/ide/v1/testing"},microgameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/microgame/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/compile_progress?appid=",preview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/preview?appid=",upload:"https://developer.toutiao.com/api/developer/ide/microgame/v1/testing?appid=",versionInfo:"https://developer.toutiao.com/api/developer/ide/microgame/v1/versions?appid="},env:{type:"online",channel:""},allowReportEvent:!0},y=(0,u.default)(m);if((0,h.isCli)()&&(l.existsSync(v)?((y=l.readJSONSync(v)).url.emailLogin=m.url.emailLogin,y.url.mobileLogin=m.url.mobileLogin,y.url.sendLoginCode=m.url.sendLoginCode,y.url.getUserInfo=m.url.getUserInfo):(l.ensureFileSync(v),l.writeJsonSync(v,m))),!(0,h.isIDE)()){var E=function(){var e=y.proxy,t=e?new f.URL(e):null;return{env:y.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,s.setEnvFunction)(E),(0,c.setEnvFunctionForProject)(E)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)y=(0,u.default)(m),d.default.info("setConfig "+JSON.stringify(m,null,2));else{for(var r in e)"object"==typeof e[r]?y[r]=Object.assign(y[r],(0,u.default)(e[r])):y[r]=(0,u.default)(e[r]);d.default.info("setConfig "+JSON.stringify(e))}(0,h.isCli)()&&l.writeJsonSync(v,y)},t.getConfig=function(){return Object.assign({},y)}},2173:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProject=void 0;var u=r(7992),l=i(r(9849)),p=i(r(1017)),f=c(r(2541)),d=r(2696),h=c(r(8366)),_=r(4263);function v(e,t){return a(this,void 0,void 0,(function(){var r=this;return s(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,o){return a(r,void 0,void 0,(function(){var r,i;return s(this,(function(a){switch(a.label){case 0:return r=p.join(t,"template.zip"),i=l.createWriteStream(r),[4,u.AxiosInstance.get(e,{responseType:"stream"})];case 1:return a.sent().data.pipe(i),i.on("finish",(function(){l.createReadStream(r).pipe(f.default.Extract({path:t})).on("close",(function(){l.unlinkSync(r),n()})).on("error",(function(e){l.unlinkSync(r),o(e)}))})).on("error",(function(e){o(e)})),[2]}}))}))}))];case 1:return[2,n.sent()]}}))}))}t.createProject=function(e){return a(this,void 0,void 0,(function(){var t,r,n,o,i,a;return s(this,(function(s){switch(s.label){case 0:return t=e.projectName,r=e.force,n=e.template,(o=e.type)||(o="js"),(i=e.targetDir)||(i=p.resolve(process.cwd(),t||".")),l.existsSync(i)?r?[4,l.remove(i)]:[3,2]:[3,3];case 1:return s.sent(),h.default.info("Remove "+i),[3,3];case 2:throw new Error(i+" Exist");case 3:return l.ensureDirSync(i),"rich"!==n?[3,5]:(a="js"===o?d.TEMPLATE_DOWNLOAD_URL:d.TS_TEMPLATE_DOWNLOAD_URL,h.default.info("⚙️ Installing template. This might take a while...."),[4,v(a,i)]);case 4:return s.sent(),[3,8];case 5:return"empty"!==n?[3,8]:[4,l.copy(p.join((0,_.getPackageRoot)(),"./templates/"+("js"===o?"empty":"empty-ts")),i)];case 6:return s.sent(),[4,(0,_.createProjectConfigFile)(t,i,"ts"===o)];case 7:s.sent(),s.label=8;case 8:return h.default.info("🎉 Successfully created project "+t),[2]}}))}))}},4113:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.checkSession=t.loginByPhone=t.sendVerificationCodeToPhone=t.loginByEmail=void 0;var s=r(2747),c=r(7992),u=a(r(3477)),l=r(1728),p=a(r(8366)),f=r(4263),d=r(2893),h=r(8066),_={aid:1365};function v(e){return o(this,void 0,void 0,(function(){var t,r,o,a,s,l,p;return i(this,(function(i){switch(i.label){case 0:t=e.type,r=e.params,o=(0,d.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,c.AxiosInstance.post("mobile"===t?o.url.mobileLogin:o.url.emailLogin,u.default.stringify(n(n({},_),r)),{headers:{"content-type":"application/x-www-form-urlencoded"}})];case 2:return a=i.sent(),s=a.data,l=a.headers,[2,{success:p="success"===s.message,cookies:l["set-cookie"],msg:p?"":s.data.description||"Login failed, please try again",userId:s.data.user_id_str}];case 3:return[2,{success:!1,msg:i.sent().message,cookies:null,userId:""}];case 4:return[2]}}))}))}function m(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:return t=(0,d.getConfig)(),e?[3,2]:[4,(0,l.getUserCookies)()];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,c.AxiosInstance.get(t.url.getUserInfo,{params:{},headers:{Cookie:e}})];case 3:return r=i.sent().data,n=!r.error,o=void 0,n&&(a=r.data,o={username:a.name||"",avatar:a.avatar||"",developerId:a.developerId||"",mobile:a.mobile||"",email:a.email||"",auditStatus:a.auditStatus||0,uid:a.uId}),[2,{success:n,userData:o,msg:n?"":"Login fail, please try later"}];case 4:return[2,{success:!1,msg:i.sent().message}];case 5:return[2]}}))}))}function y(e){return o(this,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:t=(0,d.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,c.AxiosInstance.get(t.url.sendLoginCode,{params:n(n({},_),{type:24,mobile:e}),headers:{"User-Agent":"bytedanceide"}})];case 2:return r=i.sent().data,[2,{success:o="success"===r.message,msg:o?"":"Get verification code fail, please try later"}];case 3:return[2,{success:!1,msg:i.sent().message}];case 4:return[2]}}))}))}t.loginByEmail=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,c,u,p,d,_,y;return i(this,(function(i){switch(i.label){case 0:return t=e.email,r=e.password,n=e.dontSaveCookie,(0,f.validateEmail)(t),[4,v({type:"email",params:{mix_mode:1,email:(0,f.mixEncode)(t),password:(0,f.mixEncode)(r)}})];case 1:if(o=i.sent(),a=o.success,c=o.msg,u=o.cookies,p=o.userId,!a||!u)throw new s.LoginError(c);return[4,m(u)];case 2:if(d=i.sent(),_=d.success,y=d.msg,!_)throw new s.LoginError(y);return n||(0,l.saveUserCookies)(u,p),h.CliMonitor.updateCommonParams({userId:p}),[2,u]}}))}))},t.sendVerificationCodeToPhone=function(e){return o(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return t=e.phoneNumber,(0,f.validatePhoneNumber)(t),[4,y(t)];case 1:if(!(r=n.sent()).success)throw new s.LoginError(r.msg);return[2]}}))}))},t.loginByPhone=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,a,c,u,p,d,_,y;return i(this,(function(i){switch(i.label){case 0:return t=e.phoneNumber,r=e.code,n=e.dontSaveCookie,(0,f.validatePhoneNumber)(t),(0,f.validateVerificationCode)(r),[4,v({type:"mobile",params:{mobile:t,code:r}})];case 1:if(o=i.sent(),a=o.success,c=o.msg,u=o.cookies,p=o.userId,!a||!u)throw new s.LoginError(c);return[4,m(u)];case 2:if(d=i.sent(),_=d.success,y=d.msg,!_)throw new s.LoginError(y);return n||(0,l.saveUserCookies)(u,p),h.CliMonitor.updateCommonParams({userId:p}),[2,u]}}))}))},t.checkSession=function(){return o(this,void 0,void 0,(function(){var e,t,r,n,o,a;return i(this,(function(i){switch(i.label){case 0:e={isValid:!1,errMsg:null,username:void 0},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,m()];case 2:return t=i.sent(),r=t.success,n=t.msg,o=t.userData,e.isValid=r,e.errMsg=n,e.username=null==o?void 0:o.username,[3,4];case 3:return a=i.sent(),e.errMsg=a.message,[3,4];case 4:return e.isValid?p.default.info("✅ 已登录(Logged in with "+e.username+")"):p.default.info("❌ 未登录(Not logged in, reason: "+e.errMsg+")"),[2,e]}}))}))},t.logout=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return(0,l.removeUserCookies)(),h.CliMonitor.updateCommonParams({userId:""}),p.default.info("✅ Logout success"),[2]}))}))}},3077:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAppVersions=t.fetchMeta=t.isRealToyId=t.getMeta=void 0;var i=r(2747),a=r(7992),s=r(1728),c=r(4263);function u(e){var t=e.appid,r=e.isGame,c=void 0!==r&&r;return n(this,void 0,void 0,(function(){var e,r,n,u;return o(this,(function(o){switch(o.label){case 0:return e=function(e){return"https://developer.toutiao.com/api/apps/v3/meta?appid="+e+"&aid=13&version=current&ttcode=OVCNW/U0UREwv0sHdY9Rm16vBgGrCQIBOWurUCmJ1H6d/2XHLKeOYTYfEJIEeC0AOCwBZAR2j34C4tFN7Nqfq9tHVEpM4OuJM2b8qz0INtUs1qLhKFOtnGa9/Ey0WW86GGocJk074eP72MMhzNmePzaTQzXwn/eqEq4GHwyF2Tg=&aid=1365"}(t),r=(0,s.getLogInfoHeaders)(t),n={},c&&(e="https://developer.toutiao.com/api/developer/ide/v1/version_info",n.app_id=t,n.stage="current"),[4,a.AxiosInstance.get(e,{headers:r,params:n})];case 1:return(u=o.sent().data).error&&0!==u.error||u.code&&0!==u.code?[4,Promise.reject(new i.MetaError(u.data))]:[3,3];case 2:return[2,o.sent()];case 3:return[2,u]}}))}))}t.getMeta=function(e){var t,r;return n(this,void 0,void 0,(function(){var n,i,a,s;return o(this,(function(o){switch(o.label){case 0:return n=e.appid,i=e.isGame,a=void 0!==i&&i,(0,c.validateAppId)(n),[4,u(e)];case 1:return s=o.sent(),a?[2,{version:null===(t=s.data)||void 0===t?void 0:t.current_version}]:[2,{version:null===(r=s.data)||void 0===r?void 0:r.version}]}}))}))},t.isRealToyId=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,u({appid:e})];case 1:return[2,!!(t=r.sent().data)&&16===t.tech_type]}}))}))},t.fetchMeta=u,t.getAppVersions=function(e){return n(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,(0,s.getLogInfoHeaders)(e)];case 1:return t=n.sent(),[4,a.AxiosInstance.get("https://developer.toutiao.com/api/developer/ide/v1/microapp/versions",{headers:t,params:{app_id:e}})];case 2:return(r=n.sent().data).code&&0!==r.code?[4,Promise.reject(new i.MetaError(r.msg))]:[3,4];case 3:return[2,n.sent()];case 4:return[2,r.data];case 5:return n.sent(),[2,{audit_version:"0.0.0"}];case 6:return[2]}}))}))}},5787:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=void 0;var l=r(2747),p=r(7992),f=u(r(9258)),d=a(r(9849)),h=a(r(1017)),_=u(r(7086)),v=r(7312),m=r(9396),y=r(1728),E=u(r(8366)),g=r(5879),b=r(4486),O=r(4263),A=r(2893),I=r(5834),C=r(1017),S=r(9428),w=(0,O.getCliDefaultStoragePath)(),P=h.join(w,"preview.json"),L={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},T={preview:L,debug:L};if((0,O.isCli)())if(d.existsSync(P))try{T=d.readJSONSync(P)}catch(e){}else d.ensureFileSync(P),d.writeJsonSync(P,T);function R(e){var t,r,o,i;return s(this,void 0,void 0,(function(){var a,s,u,h,_,m,E,g,b,O,I,S,w,P,L,T,R,D,j,x,N;return c(this,(function(c){switch(c.label){case 0:return a=e.devAppid,s=e.projectPath,u=e.type,h=e.uploadVersion,_=e.uploadChangeLog,m=e.uploadNeedUploadSourcemap,E=e.localCompileVersion,b=new f.default,[4,(0,v.folderToZipStream)(s,{whiteList:[],useTypeScript:!1},!0)];case 1:return O=c.sent(),I=(0,A.getConfig)(),S=p.AxiosInstance.put,"preview"===u?g=I.microgameUrl.preview+a:(g=I.microgameUrl.upload+a,b.append("version",h),b.append("intro",_),b.append("need_upload_sourcemap",String(!!m))),[4,d.readJson((0,C.join)(s,"game.json"))];case 2:return w=c.sent(),P=null!==(t=w.subPackages)&&void 0!==t?t:w.subpackages,b.append("subpackage",String(Boolean(null==P?void 0:P.length))),b.append("local_compile_version",null!=E?E:"4.0.4-rc.17.ide.2.cli"),b.append("source",O,{filename:"source.zip"}),D=S,j=[g,b],x={},N={},[4,(0,y.getUserCookies)()];case 3:return[4,D.apply(void 0,j.concat([(x.headers=n.apply(void 0,[(N.Cookie=c.sent(),N),b.getHeaders()]),x.maxBodyLength=33554432,x)]))];case 4:if(L=c.sent(),T=L.data,R=L.headers,0===T.error||0===T.code)return[2,{metrics:null!==(r=T.performance_metrics)&&void 0!==r?r:{},logId:null!==(o=null==R?void 0:R["x-tt-logid"])&&void 0!==o?o:""}];throw new l.UploadError(null!==(i=T.message)&&void 0!==i?i:T.msg,T.error)}}))}))}function D(e){return s(this,void 0,void 0,(function(){var t,r,n,o;return c(this,(function(i){switch(i.label){case 0:return n={},o={},[4,(0,y.getUserCookies)()];case 1:return n.headers=(o.Cookie=i.sent(),o),t=n,r=(0,A.getConfig)().microgameUrl.compileProgress+e,[4,p.AxiosInstance.get(r,t).then((function(e){var t,r,n,o=e.data||{},i=o.error,a=o.status,s=o.message;return 1===i?{success:!1,done:!1,error:i,msg:s,errLink:null!==(t=e.data.err_link)&&void 0!==t?t:"",passJson:{}}:{success:!0,done:0===i&&2===a,error:i,msg:"",metrics:null!==(r=e.data.performance_metrics)&&void 0!==r?r:{},errLink:null!==(n=e.data.err_link)&&void 0!==n?n:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,i.sent()]}}))}))}function j(e){return s(this,void 0,void 0,(function(){var t=this;return c(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,u,p,f,d,h;return c(this,(function(c){switch(c.label){case 0:return[4,D(e)];case 1:return t=c.sent(),i=t.success,a=t.msg,s=t.error,u=t.errLink,p=t.metrics,f=t.done,d=t.passJson,i||(clearInterval(o),h=new l.CompileError(a,u,s),n(h)),f&&(clearInterval(o),r({metrics:null!=p?p:{},passJson:d})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function x(e){var t;return s(this,void 0,void 0,(function(){var r,n,o,i,a,s,u,p,f,h,v,y,A,C,w,D,x,N,M,U,k,F,V,G,B,H,Z,q;return c(this,(function(c){switch(c.label){case 0:return r={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},n=e.project,o=e.page,i=e.qrcode,a=e.cache,s=e.uploadOptions,u=e.extraInfoJson,p=e.localCompileVersion,f=e.ideConfig,h=e.debug,v=e.uploadCache,y=e.supportSourcemap,A=e.enableHotRestartCache,C=n.path,[4,(0,S.getProjectHash)(C,!0).catch((function(){return""}))];case 1:return w=c.sent(),D=s?"upload":"preview",x=!1,M=T[N=h?"debug":"preview"]||L,a&&((0,O.isCli)()||(null==f?void 0:f.previewScene)===M.previewScene)&&w&&M.hash===w&&M.shortUrl&&M.expireTime>Date.now()/1e3?(r.shortUrl=M.shortUrl,r.expireTime=M.expireTime,r.originSchema=M.originSchema,r.useCache=!0,E.default.info("项目文件无变动,使用缓存"),x=!0,[3,13]):[3,2];case 2:return(0,g.addNodeToMetrics)(r.metrics,"compileCreate"),[4,(0,m.getAppId)(C)];case 3:return U=c.sent(),[4,(0,m.validateAppId)(U)];case 4:return c.sent(),(0,g.addFieldToMetrics)(r.metrics,"appId",U),k=E.default.loading("正在准备上传..."),v&&w&&M.hash===w&&M.shortUrl&&M.expireTime>Date.now()/1e3?[3,10]:[4,(0,m.verifyPkgSize)(C)];case 5:if(F=c.sent())throw new l.ProjectError(F);return"upload"!==D||(0,O.isIDE)()?[3,7]:[4,(0,I.getMeta)(U)];case 6:if((V=c.sent())&&s&&1===(0,_.default)(V,s.version))throw new l.UploadError(s.version+" is smaller than "+V+"(online version)");c.label=7;case 7:return k.text="正在上传中...",(0,g.addNodeToMetrics)(r.metrics,"IDERequest"),[4,R({devAppid:U,projectPath:C,type:D,uploadChangeLog:null==s?void 0:s.changeLog,uploadVersion:null==s?void 0:s.version,uploadNeedUploadSourcemap:null==s?void 0:s.needUploadSourcemap,extraInfoJson:u,localCompileVersion:p,supportSourcemap:y})];case 8:return G=c.sent(),(0,g.addFieldToMetrics)(r.metrics,"logId",G.logId),k.text="查询编译进度中...",[4,j(U)];case 9:B=c.sent(),r.metrics=(0,g.mergeMetrics)(r.metrics,G.metrics,B.metrics),r.passJson=B.passJson,(0,g.addNodeToMetrics)(r.metrics,"IDEReceiveResponse"),c.label=10;case 10:return null===(null==i?void 0:i.format)?[3,12]:(k.text="生成二维码中...",[4,(0,b.makeSchema)({devAppid:U,extAppid:"",startPage:o.path,query:o.query,scene:o.scene,bdpLog:{launch_from:o.launchFrom,location:o.location},headers:{},ideConfig:f,qrcodeQuery:null==h?void 0:h.query,referrerInfo:o.referrerInfo,hotRestartHash:A&&w?w:"",type:D})]);case 11:H=c.sent(),r.shortUrl=H.shortUrl,r.expireTime=H.expireTime,r.originSchema=H.originSchema,c.label=12;case 12:(0,g.addNodeToMetrics)(r.metrics,"compileClose"),k.stop(),c.label=13;case 13:return"imageFile"!==(null==i?void 0:i.format)?[3,16]:i.output?[4,(0,b.toQRCodeFile)(r.shortUrl,i.output)]:[3,15];case 14:Z=c.sent(),r.qrcodeFilePath=Z,E.default.info("二维码图片已存储到 "+Z),c.label=15;case 15:return[3,19];case 16:return"imageSVG"!==(null==i?void 0:i.format)?[3,19]:x&&M.qrcodeSVG?(r.qrcodeSVG=M.qrcodeSVG,[3,19]):[3,17];case 17:return q=r,[4,(0,b.toQRCodeSVG)(r.shortUrl)];case 18:q.qrcodeSVG=c.sent(),c.label=19;case 19:return function(e,t){T[t]=e,(0,O.isCli)()&&d.writeJsonSync(P,T)}({shortUrl:r.shortUrl,expireTime:r.expireTime,originSchema:r.originSchema,hash:w,previewScene:null!==(t=null==f?void 0:f.previewScene)&&void 0!==t?t:"default",qrcodeSVG:r.qrcodeSVG},N),[2,r]}}))}))}t.preview=function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,x(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return s(this,void 0,void 0,(function(){return c(this,(function(r){switch(r.label){case 0:return[4,x({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"",launchFrom:"",location:""},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=x},3098:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5787),t),o(r(9396),t),o(r(5834),t)},5834:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMeta=void 0;var a=r(2747),s=r(7992),c=r(2893),u=r(1728),l=i(r(7086));t.getMeta=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,p;return o(this,(function(o){switch(o.label){case 0:return t=(0,c.getConfig)().microgameUrl.versionInfo+e,p={},[4,(0,u.getUserCookies)()];case 1:return p.Cookie=o.sent(),r=p,[4,s.AxiosInstance.get(t,{headers:r})];case 2:return(n=o.sent().data).error&&0!==n.error||n.error&&0!==n.code?[4,Promise.reject(new a.MetaError(n.message))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,(i=[n.audit_version,n.gray_version,n.online_version].filter(Boolean).sort(l.default))[i.length-1]]}}))}))}},155:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPathByteSize=t.getDirByteSize=t.getFileByteSize=t.byte2Mb=t.mb2Byte=void 0;var a=i(r(7147)),s=i(r(9508));t.mb2Byte=function(e){return 1024*e*1024},t.byte2Mb=function(e,t){return void 0===t&&(t=4),Number((e/1024/1024).toFixed(t))},t.getFileByteSize=function(e){return a.default.statSync(e).size},t.getDirByteSize=function(e,r,i){return void 0===r&&(r=[]),void 0===i&&(i=[]),n(void 0,void 0,void 0,(function(){var n;return o(this,(function(o){switch(o.label){case 0:return[4,(0,s.default)(i,{cwd:e,ignore:r,absolute:!0,dot:!0})];case 1:return n=o.sent(),[4,Promise.all(n.map((function(e){return(0,t.getFileByteSize)(e)})))];case 2:return[2,o.sent().reduce((function(e,t){return e+t}),0)]}}))}))},t.getPathByteSize=function(e,r,n){return void 0===r&&(r=[]),void 0===n&&(n=["**"]),a.default.statSync(e).isDirectory()?(0,t.getDirByteSize)(e,r,n):(0,t.getFileByteSize)(e)}},9396:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppId=t.getAppId=t.checkAppId=t.checkUCAppId=t.compressZip=t.getDirHash=t.verifyPkgSize=t.PKG_HASH_IGNORE_LIST=t.PKG_SIZE_IGNORE_GLOBS=void 0;var u=c(r(3732)),l=r(2896),p=c(r(9849)),f=c(r(1017)),d=r(2747),h=r(155),_=r(5124),v=r(3077),m=r(9882);t.PKG_SIZE_IGNORE_GLOBS=["**/.*","**/.*/**/*","**/node_modules/**","**/**.js.map"],t.PKG_HASH_IGNORE_LIST=[".*","node_modules"];var y=function(e,t,r){return e+"大小为:"+t+"MB,超过 "+r+"MB。"};t.verifyPkgSize=function(e){return o(void 0,void 0,void 0,(function(){var r,s,c,u,l,d,v,E,g,b,O,A,I,C,S,w,P;return i(this,(function(L){switch(L.label){case 0:return L.trys.push([0,9,,10]),[4,p.default.readJson(f.default.join(e,"game.json"))];case 1:return r=L.sent(),s=r.openDataContext,c=null!==(P=r.subPackages)&&void 0!==P?P:r.subpackages,[4,p.default.readJson(f.default.join(e,"project.config.json"))];case 2:return u=L.sent(),[4,(T=u.appid,o(void 0,void 0,void 0,(function(){var e,t,r,o,a,s;return i(this,(function(i){switch(i.label){case 0:return e={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},[4,(0,_.getIdeSettings)({game_id:T})];case 1:return t=i.sent(),r=null!==(s=null===(a=null===(o=null==t?void 0:t.settings)||void 0===o?void 0:o.compile_config)||void 0===a?void 0:a.limit)&&void 0!==s?s:{},[2,n(n({},e),r)]}}))})))];case 3:return l=L.sent(),d=[],s?[4,(0,h.getPathByteSize)(f.default.join(e,s),t.PKG_SIZE_IGNORE_GLOBS,(0,m.getWhiteList)(!0))]:[3,5];case 4:return E=L.sent(),[3,6];case 5:E=0,L.label=6;case 6:return(v=E)>(0,h.mb2Byte)(l.openData)&&d.push(y("小游戏开放数据域文件",(0,h.byte2Mb)(v),l.openData)),g=!(null==c?void 0:c.length),b=g?l.normalTotal:l.subTotal,[4,(0,h.getPathByteSize)(e,t.PKG_SIZE_IGNORE_GLOBS,(0,m.getWhiteList)(!0))];case 7:return(O=L.sent())>(0,h.mb2Byte)(b)&&d.push(y("小游戏包",(0,h.byte2Mb)(O),b)),g?[2,d.length?d.join("\n")+"\n请调整包大小再进行上传":""]:[4,Promise.all(c.map((function(r){var n=f.default.join(e,r.root);return(0,h.getPathByteSize)(n,t.PKG_SIZE_IGNORE_GLOBS,(0,m.getWhiteList)(!0))})))];case 8:return A=L.sent(),I=A.map((function(e,t){return[c[t],e]})).filter((function(e){var t=a(e,2);return t[0],t[1]>(0,h.mb2Byte)(l.subPkg)})),I.length>0&&d.push(I.map((function(e){return a(e,1)[0].name})).join("、")+" 子包大小为:"+I.map((function(e){var t=a(e,2),r=(t[0],t[1]);return(0,h.byte2Mb)(r)+"MB"})).join("、")+",超过 "+l.subPkg+"MB。"),C=A.reduce((function(e,t){return e+t}),0),(S=O-v-C)>(0,h.mb2Byte)(l.subMain)&&d.push(y("小游戏分包主包",(0,h.byte2Mb)(S),l.subMain)),[2,d.length?d.join("\n")+"\n请调整包大小再进行上传":""];case 9:return[2,(w=L.sent())instanceof Error?w.message:String(w)];case 10:return[2]}var T}))}))},t.getDirHash=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,(0,l.hashElement)(e,{encoding:"hex",folders:{exclude:t.PKG_HASH_IGNORE_LIST}})];case 1:return[2,r.sent().hash]}}))}))},t.compressZip=function(e,r,n){return void 0===n&&(n=[]),new Promise((function(c,l){return o(this,void 0,void 0,(function(){var o,d,h;return i(this,(function(i){switch(i.label){case 0:return o=f.default.resolve(r,f.default.basename(e)+".zip"),d=p.default.createWriteStream(o),h=(0,u.default)("zip",{zlib:{level:9}}),d.on("close",(function(){return c(o)})),h.on("error",(function(e){return console.error("压缩失败:",e),l(e)})),h.pipe(d),h.glob("**/*",{cwd:e,ignore:s(s([],a(t.PKG_SIZE_IGNORE_GLOBS),!1),a(n),!1)},{}),[4,h.finalize()];case 1:return i.sent(),[2]}}))}))}))},t.checkUCAppId=function(e){return/^tt[0-9a-f]{16}(07)$/.test(e)},t.checkAppId=function(e){return/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e)},t.getAppId=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,p.default.readJson(f.default.join(e,"project.config.json"))];case 1:return"testappid"===(t=r.sent()).appid.toLocaleLowerCase()?[2,"tt975be1e608633d4202"]:[2,t.appid]}}))}))},t.validateAppId=function(e){return o(void 0,void 0,void 0,(function(){var r,n;return i(this,(function(o){switch(o.label){case 0:if((0,t.checkUCAppId)(e))throw r="当前小游戏 AppId 为 "+e+",为Unity&UE小游戏 AppId, 不支持该类型小游戏",new d.ProjectError(r);if(!(0,t.checkAppId)(e))throw new d.ProjectError("请使用正确的 AppId");return[4,(0,v.fetchMeta)({appid:e})];case 1:if((n=o.sent().data)&&2!==n.tech_type)throw new d.ProjectError("请使用小游戏的 AppId");return[2]}}))}))}},5124:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getIdeSettings=t.genDefault=t.SETTINGS_URL=void 0;var s=a(r(9126)),c=r(7992);t.SETTINGS_URL="https://is.snssdk.com/service/settings/v3/",t.genDefault=function(e){return n({caller_name:"minigame_ide",channel:"ide_v2",device_platform:"IDE",device_id:e.device_id,device_id_str:e.device_id_str,version_code:e.version_code,user_id:e.user_id},e)},t.getIdeSettings=function(e){return void 0===e&&(e={}),o(void 0,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,c.AxiosInstance.get(t.SETTINGS_URL+"?"+s.default.stringify((0,t.genDefault)(e)))];case 1:if("success"!==(r=n.sent().data).message)throw new Error(r.message);return[2,r.data]}}))}))}},8733:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildNpm=void 0;var fs_extra_1=__webpack_require__(9849),path=__importStar(__webpack_require__(1017));function buildNpm(options){return __awaiter(this,void 0,void 0,(function(){var cwd,_a,projectPath,packNpm;return __generator(this,(function(_b){switch(_b.label){case 0:return cwd=process.cwd(),_a=options.projectPath,projectPath=void 0===_a?cwd:_a,path.isAbsolute(projectPath)||(projectPath=path.resolve(cwd,projectPath)),[4,Promise.all([(0,fs_extra_1.access)(path.resolve(projectPath,"package.json")),(0,fs_extra_1.access)(path.resolve(projectPath,"node_modules"))])];case 1:return _b.sent(),packNpm=eval("require")("@tt-miniprogram/ext-pack").packNpm,[4,new Promise((function(e){packNpm({rootPath:projectPath,isWatch:!1},(function(t,r){e(t?{success:!1,reason:t.message||t.toString()}:{success:!0,reason:r})}))}))];case 2:return[2,_b.sent()]}}))}))}exports.buildNpm=buildNpm},7239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(r(2081)),c=i(r(9849)),u=i(r(1017)),l=r(8066),p=r(2696),f=a(r(8366)),d=r(4263),h=l.CliMonitor.getInstance({cliVersion:"2.0.7",cliName:"tt-minigame-ide-cli"});t.default=function(e,t){var r=e.projectPath,n=e.mode,o=e.type;u.isAbsolute(r)||(r=u.join(process.cwd(),r));var i=!1;try{c.accessSync(r),i=!0}catch(e){f.default.error('The "projectPath" not exist. [path=%s]',r)}var a=(0,d.isMac)()?"open":"start";t&&(a="export BYTEDANCE_IDE_REMOTE_PORT="+t+" && "+a);var _="";i?(f.default.info("Open project. [path=%s]",r),_+="path="+r+"&project-type="+o,"full"!==n&&"lite"!==n||(f.default.info("mode=%s",n),_+="&mode="+n)):f.default.info("Open IDE");var v=a+" "+p.IDE_SCHEMA+"?"+encodeURIComponent(_);return new Promise((function(e,t){s.exec(v,(function(r){r?(f.default.error("Open IDE failed. [err=%o]",r),t(r)):(f.default.info("Open IDE success"),"lite"===n&&h.report(l.CLI_EVENTS.IDE_LITE_MODE_ENTER,{from:"cli"}),e())}))}))}},7312:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},u=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prettyProjectSize=t.folderToZipStream=t.verifySubPackageSize=t.getProjectSize=t.getFolderSize=void 0;var p=r(2747),f=r(4415),d=l(r(3732)),h=l(r(6883)),_=l(r(9508)),v=i(r(1017)),m=r(4263),y=l(r(9849)),E=r(9882);function g(e,t,r,n,o){return void 0===r&&(r={}),a(this,void 0,void 0,(function(){var i,a,l,f,d,h,g,b,O,A;return s(this,(function(s){switch(s.label){case 0:i=r.ignore,a=void 0===i?[]:i,s.label=1;case 1:return s.trys.push([1,6,,7]),[4,y.default.lstat(e)];case 2:if((l=s.sent().isFile())&&!e.endsWith(".js"))throw new Error("subPackage root should be a valid js or a directory");return f=l?v.resolve(e,"../"):e,d=(0,m.isMac)()?f:f.replace(/\\/g,"/"),[4,(0,_.default)(l?e:(0,E.getWhiteList)(n),{cwd:d,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(a.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})];case 3:return h=s.sent(),(null==o?void 0:o.length)>0?(o=o.filter(m.isGameFileValid),[4,(0,_.default)(o,{cwd:d,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(a.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})]):[3,5];case 4:g=(g=s.sent()).filter((function(e){return E.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(d)})),h.push.apply(h,u([],c(g),!1)),s.label=5;case 5:return b=new Map,h.forEach((function(e){b.set(e.path,e)})),O=0,b.forEach((function(e,r){!t&&r.endsWith(".ts")||t&&r.endsWith(".js")&&b.has(r.replace(/\.js$/,".ts"))||(O+=e.stats?e.stats.size:0)})),[2,O];case 6:throw A=s.sent(),new p.ProjectError(A.toString());case 7:return[2]}}))}))}function b(e,t,r,n){return a(this,void 0,void 0,(function(){var o,i,c,u,l,p,d,h,_,m,E=this;return s(this,(function(b){switch(b.label){case 0:return o={main:void 0,sub:[],openData:void 0,total:0},i=0,c=v.join(r,e.getMiniprogramRoot()),u=t.subPackages||t.subpackages||[],l=e.useTypeScript(),p=Array.isArray(t.gameFiles)?t.gameFiles:[],[4,g(c,l,{ignore:u.map((function(e){var t=v.join(c,e.root);return y.default.lstatSync(t).isFile()?t:v.join(t,"**")}))},n,p)];case 1:return d=b.sent(),Array.isArray(u)&&u.length>0?(h=u.reduce((function(e,t){return!t.root||e.includes(t.root)||e.push(t.root),e}),[]),[4,Promise.all(h.map((function(e){return a(E,void 0,void 0,(function(){var t;return s(this,(function(r){switch(r.label){case 0:return[4,g(v.join(c,e),l,{},n)];case 1:return t=r.sent(),[2,{path:(0,f.ensureEndSlash)(e),size:t}]}}))}))})))]):[3,3];case 2:_=b.sent(),i+=_.reduce((function(e,t){return e+t.size}),0),o.sub=_,b.label=3;case 3:return n&&t.openDataContext?[4,g(v.join(c,t.openDataContext),l,{},n)]:[3,5];case 4:m=b.sent(),o.openData={path:(0,f.ensureEndSlash)(t.openDataContext),size:m},i+=m,d-=m,b.label=5;case 5:return o.total=i+d,o.main={path:c,size:d},[2,o]}}))}))}t.getFolderSize=g,t.getProjectSize=b,t.verifySubPackageSize=function(e,t){return a(this,void 0,void 0,(function(){var r,n,o,i,a,c,u,l,d;return s(this,(function(s){switch(s.label){case 0:return[4,e.getAppJSON()];case 1:return r=s.sent(),n=r.isGame,o=e.projectPath,i={mainMax:4194304,subMax:2097152,totalMax:16777216},"preview"===t&&e.getBigPackageSizeSupport()&&(i.mainMax=8388608,i.subMax=4194304,i.totalMax=25165824),n&&(i.mainMax=1/0,i.subMax=1/0,i.totalMax=20971520),a=[],[4,b(e,r.rawJSON,o,n)];case 2:if((c=s.sent()).total>i.totalMax&&a.push("项目源码包大小 "+(0,f.formatSize)(c.total)+",超过 "+(0,f.formatSize)(i.totalMax)+"。"),(c.sub.length>0||c.openData)&&(u=c.main,l=c.sub,d=c.openData,u.size>i.mainMax&&a.push("主包大小为 "+(0,f.formatSize)(u.size)+",超过 "+(0,f.formatSize)(i.mainMax)+"。"),null==l||l.forEach((function(e){e.size>i.subMax&&a.push(e.path+" 子包大小为 "+(0,f.formatSize)(e.size)+", 超过 "+(0,f.formatSize)(i.subMax)+"。")})),(null==d?void 0:d.size)>i.subMax&&a.push("开放数据域大小为 "+(0,f.formatSize)(d.size)+", 超过 "+(0,f.formatSize)(i.subMax)+"。")),a.length>0)throw new p.PackageSizeError(a.join("\n")+"\n可点击【查看解决方案】查看包体积优化方案,修改后重试。");return[2]}}))}))};var O=new Map;t.folderToZipStream=function(e,t,r){var n=t.whiteList,o=void 0===n?[]:n,i=t.useTypeScript;return a(this,void 0,void 0,(function(){var t,n,l,f,h,y=this;return s(this,(function(g){switch(g.label){case 0:return t=function(){return a(y,void 0,void 0,(function(){var t,n,a,l,f,h,y,g,b;return s(this,(function(s){switch(s.label){case 0:return t=(0,d.default)("zip",{highWaterMark:m.HIGH_WATER_MARK,statConcurrency:(0,m.maxConcurrency)()}),n=(0,E.getWhiteList)(r).concat(o),[4,(0,_.default)(n,{cwd:e,stats:!1,dot:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})];case 1:return a=s.sent(),r?[3,6]:[4,(0,m.getProjectConfig)(e)];case 2:return l=s.sent(),f=v.join(e,l.getMiniprogramRoot()),[4,l.getAppJSON()];case 3:return[4,s.sent().getKey("gameFiles")];case 4:return h=null!==(b=s.sent())&&void 0!==b?b:[],Array.isArray(h)&&h.length>0?(h=h.filter(m.isGameFileValid),[4,(0,_.default)(h,{cwd:f,dot:!1,stats:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})]):[3,6];case 5:y=(y=s.sent()).filter((function(e){return E.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})),a.push.apply(a,u([],c(y),!1)),s.label=6;case 6:return(g=new Set(a)).forEach((function(r){i&&r.endsWith(".js")&&g.has(r.replace(/\.js$/,".ts"))||!i&&r.endsWith(".ts")||t.file(v.join(e,r),{name:r})})),t.on("warning",(function(e){if("ENOENT"!==e.code)throw new p.CompressError(e.message);console.warn("archiver with error "+e.message)})).on("error",(function(e){throw new p.CompressError(e.message)})),[4,t.finalize()];case 7:return s.sent(),[2,t]}}))}))},(n=O.get(e))?[4,n]:[3,2];case 1:g.sent(),g.label=2;case 2:l=t(),O.set(e,l),g.label=3;case 3:return g.trys.push([3,5,,6]),[4,l];case 4:return f=g.sent(),O.delete(e),[2,f];case 5:throw h=g.sent(),O.delete(e),h;case 6:return[2]}}))}))},t.prettyProjectSize=function(e){var t=e.total,r=e.main,n=e.sub,o=e.openData,i=[["主包",r.size]];null==n||n.sort((function(e,t){return t.size-e.size})).forEach((function(e){i.push([e.path,e.size])})),o&&i.push(["开放数据文件夹("+o.path+")",o.size]);var a=new h.default;return i.forEach((function(e){a.cell("路径",e[0]),a.cell("体积",(0,f.formatSize)(e[1]),h.default.leftPadder(" ")),a.newRow()})),a.total("体积",{reduce:function(e,r,n,o){return t},printer:function(e,r){return"总体积:"+(0,f.formatSize)(t)}}),a.toString()}},5796:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=t.checkProjectMatchAppid=void 0;var p=r(2747),f=r(7992),d=l(r(9258)),h=a(r(9849)),_=a(r(1017)),v=l(r(7086)),m=r(7312),y=r(5138),E=r(9428),g=r(1728),b=l(r(8366)),O=r(5879),A=r(4486),I=r(4263),C=r(2893),S=r(3077);function w(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var P=(0,I.getCliDefaultStoragePath)(),L=_.join(P,"preview.json"),T={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"};if((0,I.isCli)())if(h.existsSync(L))try{T=h.readJSONSync(L)}catch(e){}else h.ensureFileSync(L),h.writeJsonSync(L,T);function R(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,u,l,h,_,v,y,E,b,O,A,S,P,L,T,R,D,j,x,N,M,U,k,F,V,G,B;return c(this,(function(c){switch(c.label){case 0:return i=e.devAppid,a=e.extAppid,s=e.projectPath,u=e.type,l=e.uploadVersion,h=e.uploadChangeLog,_=e.uploadNeedUploadSourcemap,v=e.uploadNeedCheck,y=e.extraCheckInfoJson,E=e.localCompileVersion,b=e.extraInfoJson,O=e.interactGame,A=e.supportSourcemap,S=e.useTypeScript,L=new d.default,T=i,R="",[4,(0,m.folderToZipStream)(s,{whiteList:O?["**/*"]:_?["**/*.map"]:void 0,useTypeScript:S},!1)];case 1:return D=c.sent(),j=(0,C.getConfig)(),x=f.AxiosInstance.put,O?[3,2]:("preview"===u?(a&&(T=a,R="?devappid="+i),P=w(j.url.preview,T)+R):(P=w(j.url.upload,T),L.append("version",l),L.append("intro",h),L.append("need_upload_sourcemap",String(!!_)),L.append("need_check",String(!!v)),L.append("extra_check_info_json",y)),L.append("source",D,{filename:"source.zip"}),L.append("local_compile_version",null!=E?E:"4.0.0-cli"),b&&L.append("extra_info_json",b),[3,4]);case 2:return x=f.AxiosInstance.post,L.append("app_id",T),L.append("tech_type",16),[4,(0,I.getMD5Stream)(D)];case 3:N=c.sent(),L.append("src_md5",N.__md5),L.append("src",N,{filename:"src.zip"}),"preview"===u?(P=j.interactGameUrl.preview,L.append("extra_json",b)):(P=j.interactGameUrl.upload,L.append("version",l),L.append("intro",h),L.append("extra_json",b)),c.label=4;case 4:return A&&L.append("is_debug","1"),F=x,V=[P,L],B={},G=[{}],[4,(0,g.getLogInfoHeaders)(i)];case 5:return[4,F.apply(void 0,V.concat([(B.headers=n.apply(void 0,[n.apply(void 0,G.concat([c.sent()])),L.getHeaders()]),B.maxBodyLength=33554432,B)]))];case 6:if(M=c.sent(),U=M.data,k=M.headers,0===U.error||0===U.code)return[2,{metrics:null!==(t=U.performance_metrics)&&void 0!==t?t:{},logId:null!==(r=null==k?void 0:k["x-tt-logid"])&&void 0!==r?r:""}];throw new p.UploadError(null!==(o=U.message)&&void 0!==o?o:U.msg,U.error)}}))}))}function D(e,t,r,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return u={},[4,(0,g.getLogInfoHeaders)(e)];case 1:return u.headers=c.sent(),o=u,i=e,a="","",r&&t&&(i=t,a="?devappid="+e),s=n?(0,C.getConfig)().interactGameUrl.compileProgress+"?app_id="+e+"&stage="+(r?"preview":"latest"):w((0,C.getConfig)().url.compileProgress,i)+a,[4,f.AxiosInstance.get(s,o).then((function(e){var t,r,o,i,a,s,c,u,l,p,f=e.data||{},d=f.error,h=f.status,_=f.message;return n&&(d=null===(t=e.data)||void 0===t?void 0:t.code,h=null===(o=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===o?void 0:o.status,_=null!==(s=null===(a=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.msg)&&void 0!==s?s:null===(c=e.data)||void 0===c?void 0:c.msg),1===d||n&&(1===h||0!==d)?{success:!1,done:!1,error:d,msg:_,errLink:null!==(u=e.data.err_link)&&void 0!==u?u:"",passJson:{}}:{success:!0,done:0===d&&2===h,error:d,msg:"",metrics:null!==(l=e.data.performance_metrics)&&void 0!==l?l:{},errLink:null!==(p=e.data.err_link)&&void 0!==p?p:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,c.sent()]}}))}))}function j(e,t,r,n){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var o=this;return c(this,(function(i){switch(i.label){case 0:return[4,new Promise((function(i,a){var u=setInterval((function(){return s(o,void 0,void 0,(function(){var o,s,l,f,d,h,_,v,m;return c(this,(function(c){switch(c.label){case 0:return[4,D(e,t,r,n)];case 1:return o=c.sent(),s=o.success,l=o.msg,f=o.error,d=o.errLink,h=o.metrics,_=o.done,v=o.passJson,s||(clearInterval(u),m=new p.CompileError(l,d,f),a(m)),_&&(clearInterval(u),i({metrics:null!=h?h:{},passJson:v})),[2]}}))}))}),1e3)}))];case 1:return[2,i.sent()]}}))}))}function x(e){return s(this,void 0,void 0,(function(){var t,r,n;return c(this,(function(o){switch(o.label){case 0:return n={},[4,(0,g.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,r=(0,C.getConfig)().url.check+"?app_id="+e,[4,f.AxiosInstance.get(r,t).then((function(e){var t,r,n,o,i=e.data||{},a=i.code,s=i.err_msg;if(0!==a)return{success:!1,done:!1,error:a,msg:s,status:1};var c=null===(r=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status;return{success:!0,done:2===c||3===c,error:a,msg:"",status:c,result:(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.check_list)||[]}})).catch((function(e){return{success:!1,error:-1,msg:e.message,status:1,done:!1}}))];case 2:return[2,o.sent()]}}))}))}function N(e){return s(this,void 0,void 0,(function(){var t=this;return c(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return s(t,void 0,void 0,(function(){var t,i,a,s,u,l,p;return c(this,(function(c){switch(c.label){case 0:return[4,x(e)];case 1:return t=c.sent(),i=t.success,a=t.msg,s=t.done,u=t.status,l=t.result,p=void 0===l?[]:l,i||(clearInterval(o),n({msg:a})),s&&(clearInterval(o),r({status:u,result:p})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function M(e,t){return void 0===t&&(t=e.getAppid()),s(this,void 0,void 0,(function(){var r,n,o;return c(this,(function(i){switch(i.label){case 0:return[4,Promise.all([e.detectProjectType("game"),(0,S.isRealToyId)(t)])];case 1:if(r=u.apply(void 0,[i.sent(),2]),n=r[0],o=r[1],!n&&o)throw new p.ProjectError('当前项目为小程序项目,但是 "'+t+'" 属于小玩法 ID。');if(n&&!o)throw new p.ProjectError('当前项目为小玩法项目,但是 "'+t+'" 属于小程序 ID。');return[2]}}))}))}function U(e,t){var r;return void 0===t&&(t=5e3),s(this,void 0,void 0,(function(){var n,o,i,a,s,u,l,f,d,_,g,C,w,P,D,x,U,k,F,V,G,B,H,Z,q,W,J,z,K,$,X,Q,Y,ee,te;return c(this,(function(c){switch(c.label){case 0:return n={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},o=e.project,i=e.page,a=e.qrcode,s=e.cache,u=e.uploadOptions,l=e.extraInfoJson,f=e.localCompileVersion,d=e.ideConfig,_=e.debug,g=e.uploadCache,C=e.interactGame,w=e.supportSourcemap,P=e.enableHotRestartCache,D=e.penetrateMapJson,x=e.updateStatus,U=e.setCheckResult,k=e.traceVersion,F=o.path,V="",g||s?[4,(0,E.getProjectHash)(F,!1,t)]:[3,2];case 1:V=c.sent(),c.label=2;case 2:return G=u?"upload":"preview",B=!1,s&&((0,I.isCli)()||(null==d?void 0:d.previewScene)===T.previewScene)&&V&&T.hash===V&&T.shortUrl&&T.expireTime>Date.now()/1e3?(n.shortUrl=T.shortUrl,n.expireTime=T.expireTime,n.originSchema=T.originSchema,n.useCache=!0,b.default.info("项目文件无变动,使用缓存"),B=!0,[3,19]):[3,3];case 3:return(0,O.addNodeToMetrics)(n.metrics,"compileCreate"),[4,(0,I.getProjectConfig)(F)];case 4:return[4,(H=c.sent()).getRealAppid()];case 5:return Z=c.sent(),(0,I.validateAppId)(Z),[4,M(H,Z)];case 6:return c.sent(),(0,O.addFieldToMetrics)(n.metrics,"appId",Z),q=null,"preview"!==G?[3,8]:[4,(0,y.detectValidExtApp)(Z,F)];case 7:if((W=c.sent()).invalidReason||(q=W.ext.extAppid),W.invalidReason&&W.invalidReason.reason!==y.INVALID_EXTAPP_REASON.EXT_DISABLED&&W.invalidReason.reason!==y.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new p.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'+W.invalidReason.errMsg);c.label=8;case 8:return J=b.default.loading("正在准备上传..."),g&&V&&T.hash===V&&T.shortUrl&&T.expireTime>Date.now()/1e3?[3,16]:[4,(0,m.verifySubPackageSize)(H,G)];case 9:return c.sent(),"upload"!==G||C||(0,I.isIDE)()?[3,11]:[4,(0,S.getAppVersions)(Z)];case 10:if(z=c.sent().audit_version,u.version||(u.version=(0,I.getNextVersion)(z),b.default.info("\nThe default version is "+u.version+".")),z&&u&&1===(0,v.default)(z,u.version))throw new p.UploadError(u.version+" is smaller than "+z+"(pre order version)");c.label=11;case 11:return K={upload:1,check:1,compile:1},J.text="正在上传中...",null==x||x(K),(0,O.addNodeToMetrics)(n.metrics,"IDERequest"),[4,R({devAppid:Z,extAppid:q,projectPath:F,type:G,uploadChangeLog:null==u?void 0:u.changeLog,uploadVersion:null==u?void 0:u.version,uploadNeedUploadSourcemap:null==u?void 0:u.needUploadSourcemap,uploadNeedCheck:null==u?void 0:u.needUploadCheck,extraCheckInfoJson:null==u?void 0:u.extraCheckInfoJson,extraInfoJson:l,localCompileVersion:f,interactGame:C,supportSourcemap:w,useTypeScript:H.useTypeScript()})];case 12:return $=c.sent(),K.upload=2,null==x||x(K),(0,O.addFieldToMetrics)(n.metrics,"logId",$.logId),(null==u?void 0:u.needUploadCheck)?(J.text="查询预检进度中...",[4,N(Z)]):[3,14];case 13:X=c.sent(),K.check=X.status,null==x||x(K),null==U||U(X),c.label=14;case 14:return J.text="查询编译进度中...",[4,j(Z,q,"preview"===G,!!C)];case 15:Q=c.sent(),K.compile=2,null==x||x(K),n.metrics=(0,O.mergeMetrics)(n.metrics,$.metrics,Q.metrics),n.passJson=Q.passJson,(0,O.addNodeToMetrics)(n.metrics,"IDEReceiveResponse"),c.label=16;case 16:return null===(null==a?void 0:a.format)?[3,18]:(J.text="生成二维码中...",[4,(0,A.makeSchema)({devAppid:Z,extAppid:q,startPage:i.path,query:i.query,scene:i.scene,bdpLog:{launch_from:i.launchFrom,location:i.location},headers:{},ideConfig:d,qrcodeQuery:null==_?void 0:_.query,referrerInfo:i.referrerInfo,hotRestartHash:P&&V?V:"",type:G,penetrateMapJson:D,traceVersion:k,isInteractGame:!!C})]);case 17:Y=c.sent(),n.shortUrl=Y.shortUrl,n.expireTime=Y.expireTime,n.originSchema=Y.originSchema,c.label=18;case 18:(0,O.addNodeToMetrics)(n.metrics,"compileClose"),J.stop(),c.label=19;case 19:return"imageFile"!==(null==a?void 0:a.format)?[3,22]:a.output?[4,(0,A.toQRCodeFile)(n.shortUrl,a.output)]:[3,21];case 20:ee=c.sent(),n.qrcodeFilePath=ee,b.default.info("二维码图片已存储到 "+ee),c.label=21;case 21:return[3,25];case 22:return"imageSVG"!==(null==a?void 0:a.format)?[3,25]:B&&T.qrcodeSVG?(n.qrcodeSVG=T.qrcodeSVG,[3,25]):[3,23];case 23:return te=n,[4,(0,A.toQRCodeSVG)(n.shortUrl)];case 24:te.qrcodeSVG=c.sent(),c.label=25;case 25:return function(e){T=e,(0,I.isCli)()&&h.writeJsonSync(L,T)}({shortUrl:n.shortUrl,expireTime:n.expireTime,originSchema:n.originSchema,hash:V,previewScene:null!==(r=null==d?void 0:d.previewScene)&&void 0!==r?r:"default",qrcodeSVG:n.qrcodeSVG}),[2,n]}}))}))}t.checkProjectMatchAppid=M,t.preview=function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,U(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return s(this,void 0,void 0,(function(){return c(this,(function(r){switch(r.label){case 0:return[4,U({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"990001",launchFrom:"scan",location:"qr_code"},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,needUploadCheck:!!e.needUploadCheck,extraCheckInfoJson:JSON.stringify({})},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,interactGame:e.interactGame,penetrateMapJson:e.penetrateMapJson})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=U},5138:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectValidExtApp=t.INVALID_EXTAPP_REASON=void 0;var a,s=r(8559),c=r(7992),u=r(1728),l=i(r(8366)),p=r(2747);!function(e){e[e.INVALID_APPID_META=0]="INVALID_APPID_META",e[e.INVALID_EXTAPPID=1]="INVALID_EXTAPPID",e[e.EXT_DISABLED=2]="EXT_DISABLED",e[e.INVALID_EXT_JSON=3]="INVALID_EXT_JSON",e[e.INVALID_AUTH=4]="INVALID_AUTH",e[e.NULL=5]="NULL"}(a=t.INVALID_EXTAPP_REASON||(t.INVALID_EXTAPP_REASON={}));var f=function(){function e(){this._thirdPartyMetaMap={}}return e.prototype.getThirdPartyMeta=function(e){var t,r,i,a;return n(this,void 0,void 0,(function(){var n,s,f,d,h,_;return o(this,(function(o){switch(o.label){case 0:return this._thirdPartyMetaMap[e]?[2,this._thirdPartyMetaMap[e]]:(n={isThirdPartyApp:!1,thirdPartyName:""},[4,(0,u.getLogInfoHeaders)(e)]);case 1:s=o.sent(),f="https://microapp.bytedance.com/api/v1/app/"+e+"/meta",d={headers:s},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,c.AxiosInstance.get(f,d)];case 3:return h=o.sent().data,this._thirdPartyMetaMap[e]={isThirdPartyApp:h.data.is_thirdparty_dev,thirdPartyName:h.data.thirdparty.name},[3,5];case 4:if(_=o.sent(),401===(null===(t=_.response)||void 0===t?void 0:t.status))throw new p.LoginError(null!==(a=null===(i=null===(r=_.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.message)&&void 0!==a?a:"尚未登录");return l.default.error("getThirdPartyMeta",_),[2,n];case 5:return[2,this._thirdPartyMetaMap[e]]}}))}))},e.prototype.checkExtAppIdAuth=function(e,t){var r,i,a,s;return n(this,void 0,void 0,(function(){var n,f,d,h;return o(this,(function(o){switch(o.label){case 0:return n="https://microapp.bytedance.com/api/thirdparty/validate_ext_appid?dev_appid="+e+"&ext_appid="+t,[4,(0,u.getLogInfoHeaders)(e)];case 1:f=o.sent(),d={headers:f},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,c.AxiosInstance.get(n,d)];case 3:return[2,0===o.sent().data.error];case 4:if(h=o.sent(),401===(null===(r=h.response)||void 0===r?void 0:r.status))throw new p.LoginError(null!==(s=null===(a=null===(i=h.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.message)&&void 0!==s?s:"尚未登录");return l.default.error("checkExtAppIdAuth",h),[2,!1];case 5:return[2]}}))}))},e.prototype.getExtData=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,s.ProjectConfig.from(e)];case 1:return[4,t.sent().getExtJSON()];case 2:return[2,t.sent().rawJSON];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},e.prototype.detectValidExtApp=function(e,t){return n(this,void 0,void 0,(function(){var r,n,i,s,c;return o(this,(function(o){switch(o.label){case 0:return r={invalidReason:null,ext:null,thirdPartyName:null},[4,this.getExtData(t)];case 1:return(n=o.sent())?n.extEnable?n.extAppid?[4,this.getThirdPartyMeta(e)]:(r.invalidReason={reason:a.INVALID_EXTAPPID,errMsg:"ext.json 中 extAppid 异常"},[2,r]):(r.invalidReason={reason:a.EXT_DISABLED,errMsg:"ext.json 中 extEnable 为 false"},[2,r]):(r.invalidReason={reason:a.INVALID_EXT_JSON,errMsg:"请检查项目根目录 ext.json 是否存在或者格式是否正确"},[2,r]);case 2:return i=o.sent(),s=i.isThirdPartyApp,c=i.thirdPartyName,s?[4,this.checkExtAppIdAuth(e,n.extAppid)]:(r.invalidReason={reason:a.INVALID_APPID_META,errMsg:"当前 appid 获取不到第三方平台信息,请检查当前 appId 是否可以合法预览并且正常关联第三方平台"},[2,r]);case 3:return o.sent()?(r.ext=n,r.thirdPartyName=c,[2,r]):(r.invalidReason={reason:a.INVALID_AUTH,errMsg:"当前 AppID 没有资质开发对应的第三方小程序,请检查 project.config.json 中的 “appid” 字段以及 ext.json 中的 “extAppid” 字段是否填写正确"},[2,r])}}))}))},e.Instance=new e,e}();t.detectValidExtApp=f.Instance.detectValidExtApp.bind(f.Instance)},8956:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=t.microgame=t.folderToZipStream=t.setAppConfig=t.makeSchema=t.INVALID_EXTAPP_REASON=t.checkProjectMatchAppid=t.verifySubPackageSize=t.getProjectSize=t.detectValidExtApp=t.getConfig=t.setCookieFn=t.projectToQRCode=t.upload=t.preview=t.buildNpm=t.getAuditHostsList=t.audit=t.checkSession=t.sendVerificationCodeToPhone=t.logout=t.loginByPhone=t.loginByEmail=t.create=t.setConfig=t.open=void 0;var l=r(9345);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return l.audit}}),Object.defineProperty(t,"getAuditHostsList",{enumerable:!0,get:function(){return l.getAuditHostsList}});var p=r(2893);Object.defineProperty(t,"getConfig",{enumerable:!0,get:function(){return p.getConfig}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return p.setConfig}});var f=r(2173);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return f.createProject}});var d=r(4113);Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return d.checkSession}}),Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return d.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return d.loginByPhone}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return d.logout}}),Object.defineProperty(t,"sendVerificationCodeToPhone",{enumerable:!0,get:function(){return d.sendVerificationCodeToPhone}});var h=r(8733),_=u(r(7239)),v=r(7312);Object.defineProperty(t,"getProjectSize",{enumerable:!0,get:function(){return v.getProjectSize}}),Object.defineProperty(t,"verifySubPackageSize",{enumerable:!0,get:function(){return v.verifySubPackageSize}});var m=r(5796);Object.defineProperty(t,"checkProjectMatchAppid",{enumerable:!0,get:function(){return m.checkProjectMatchAppid}}),Object.defineProperty(t,"preview",{enumerable:!0,get:function(){return m.preview}}),Object.defineProperty(t,"projectToQRCode",{enumerable:!0,get:function(){return m.projectToQRCode}});var y=r(5138);Object.defineProperty(t,"detectValidExtApp",{enumerable:!0,get:function(){return y.detectValidExtApp}}),Object.defineProperty(t,"INVALID_EXTAPP_REASON",{enumerable:!0,get:function(){return y.INVALID_EXTAPP_REASON}});var E=r(1728);Object.defineProperty(t,"setCookieFn",{enumerable:!0,get:function(){return E.setCookieFn}});var g=r(4486);Object.defineProperty(t,"makeSchema",{enumerable:!0,get:function(){return g.makeSchema}});var b=r(8066),O=r(9251);Object.defineProperty(t,"setAppConfig",{enumerable:!0,get:function(){return O.setAppConfig}}),t.open=function(e){return s(this,void 0,void 0,(function(){var t,r;return c(this,(function(n){switch(n.label){case 0:return t=e.project,r=e.remotePort,[4,(0,_.default)({projectPath:t.path,mode:t.mode,type:"microapp"},r)];case 1:return[2,n.sent()]}}))}))},t.buildNpm=function(e){return s(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:return t=e.project,[4,(0,h.buildNpm)({projectPath:t.path})];case 1:return[2,r.sent()]}}))}))},t.upload=function(e){var t,r;return s(this,void 0,void 0,(function(){var n;return c(this,(function(o){switch(o.label){case 0:return C.reportCommandCall("upload"),[4,(0,m.upload)(e)];case 1:return n=o.sent(),C.report(b.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(t=n.metrics)||void 0===t?void 0:t.appId)||"",logid:(null===(r=n.metrics)||void 0===r?void 0:r.logId)||""}),[2,n]}}))}))},i(r(3077),t);var A=r(7312);Object.defineProperty(t,"folderToZipStream",{enumerable:!0,get:function(){return A.folderToZipStream}}),i(r(5879),t),t.microgame=a(r(3098));var I=r(9428);Object.defineProperty(t,"getProjectHash",{enumerable:!0,get:function(){return I.getProjectHash}}),Object.defineProperty(t,"setProjectHashFn",{enumerable:!0,get:function(){return I.setProjectHashFn}});var C=b.CliMonitor.getInstance({cliVersion:"2.0.7",cliName:"tt-minigame-ide-cli"});C.report(b.CLI_EVENTS.IDE_CLI_LAUNCH)},7145:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CliMonitor=void 0;var i=r(4084),a=o(r(2037)),s=r(8223),c=r(2893),u=r(4122),l=r(4263),p=r(1728),f="";function d(){if(!f)try{f=(0,s.machineIdSync)(!0)}catch(e){console.error(e)}return f}var h=function(){function e(e){this._didReportLaunch=!1;var t=e.cliVersion,r=e.cliName;"true"!==process.env.isIDE?(this._commonParams={ideVersion:t,deviceId:d(),osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:r},this._commonData={userId:(0,p.getUserId)(),username:""}):(this._commonParams={ideVersion:t,deviceId:"",osPlatform:a.default.platform(),osVersion:a.default.release(),cliName:r},this._commonData={userId:"",username:""})}return e.updateCommonParams=function(e){this._instance._commonData=Object.assign(this._instance._commonData,e)},e.getInstance=function(t){return this._instance||(this._instance=new e(t)),this._instance},e.prototype.shouldReport=function(e){return!(!1===(0,c.getConfig)().allowReportEvent||"true"===process.env.isIDE||e===u.CLI_EVENTS.IDE_CLI_LAUNCH&&this._didReportLaunch||"no"===process.env.ALLOW_REPORT_EVENT)},e.prototype.report=function(e,t){void 0===t&&(t={}),this.shouldReport(e)&&(e===u.CLI_EVENTS.IDE_CLI_LAUNCH&&(this._didReportLaunch=!0,t.scene=(0,l.isCli)()?"cli":"require"),(0,i.reportTea)(e,this._commonParams,n(n({},t),this._commonData)))},e.prototype.reportCommandCall=function(e){this.report("IDE_CLI_COMMAND_CALL",{command_name:e})},e}();t.CliMonitor=h},4122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=void 0,t.CLI_EVENTS={IDE_CLI_LAUNCH:"IDE_CLI_LAUNCH",IDE_CLI_COMMAND_CALL:"IDE_CLI_COMMAND_CALL",IDE_CLI_PREVIEW_SUCCESS:"IDE_CLI_PREVIEW_SUCCESS",IDE_CLI_PREVIEW_FAIL:"IDE_CLI_PREVIEW_FAIL",IDE_CLI_UPLOAD_SUCCESS:"IDE_CLI_UPLOAD_SUCCESS",IDE_CLI_UPLOAD_FAIL:"IDE_CLI_UPLOAD_FAIL",IDE_CLI_ERROR:"IDE_CLI_ERROR",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER"}},8066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=t.CliMonitor=void 0;var n=r(7145);Object.defineProperty(t,"CliMonitor",{enumerable:!0,get:function(){return n.CliMonitor}});var o=r(4122);Object.defineProperty(t,"CLI_EVENTS",{enumerable:!0,get:function(){return o.CLI_EVENTS}})},2696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TS_TEMPLATE_DOWNLOAD_URL=t.TEMPLATE_DOWNLOAD_URL=t.IDE_SCHEMA=void 0,t.IDE_SCHEMA="bytedanceide:",t.TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip",t.TS_TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip"},1728:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLogInfoHeaders=t.setCookieFn=t.removeUserCookies=t.saveUserCookies=t.getUserId=t.getUserCookies=void 0;var c=i(r(9849)),u=i(r(1017)),l=r(2893),p=r(4263),f=r(9251),d="",h="";function _(){var e=(0,l.getConfig)();return u.join(e.storagePath,".cookies")}t.getUserCookies=function(){return a(void 0,void 0,void 0,(function(){var e,t;return s(this,(function(r){if(d)return[2,d];try{return[2,d=null!==(t=null===(e=c.readFileSync(_(),"utf-8").split("\n")[0])||void 0===e?void 0:e.trim())&&void 0!==t?t:""]}catch(e){throw d="",new Error("检测到本地无 Cookie,请重新登录")}return[2]}))}))},t.getUserId=function(){var e,t;if(h)return h;try{h=null!==(t=null===(e=c.readFileSync(_(),"utf-8").split("\n")[1])||void 0===e?void 0:e.trim())&&void 0!==t?t:""}catch(e){h=""}return h},t.saveUserCookies=function(e,t){if(h=t,e&&!(e.length<1)){var r=_();c.ensureFileSync(r);var n=(d=e.map((function(e){return e.split(";")[0]})).join(";"))+"\n"+t;c.writeFileSync(u.join(r),n)}},t.removeUserCookies=function(){d="",h="";try{c.removeSync(_())}catch(e){if("ENOENT"===e.code)return;throw e}},t.setCookieFn=function(e){t.getUserCookies=e},t.getLogInfoHeaders=function(e){return a(void 0,void 0,void 0,(function(){var r,n,o;return s(this,(function(i){switch(i.label){case 0:if((0,p.isIDE)()||!(r=(0,f.getToken)(e)))return[3,5];if(!r)return[3,5];n=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,t.getUserCookies)()];case 2:return n=i.sent(),[3,4];case 3:return i.sent(),n="",[3,4];case 4:return[2,{"x-cli-token":r,"x-cli-appid":e,Cookie:n}];case 5:return o={},[4,(0,t.getUserCookies)()];case 6:return[2,(o.Cookie=i.sent(),o)]}}))}))}},9428:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=void 0;var i=r(2896),a=r(2747),s=r(4263),c=r(9882);t.getProjectHash=function(e,t,r){return n(void 0,void 0,void 0,(function(){var r,n;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=(0,s.isMac)()?(0,c.getWhiteList)(t):(0,c.getWhiteList)(t).map((function(e){return"*".concat(e.slice(3))})),[4,(0,i.hashElement)(".",e,{encoding:"hex",folders:{exclude:[".*","node_modules"]},files:{include:r,matchBasename:!1,matchPath:!0}})];case 1:return[2,o.sent().hash];case 2:throw n=o.sent(),new a.HashError("获取工程文件夹 hash 失败:"+n.toString());case 3:return[2]}}))}))},t.setProjectHashFn=function(e){return n(this,void 0,void 0,(function(){var r=this;return o(this,(function(i){return t.getProjectHash=function(t,i,a){return void 0===a&&(a=5e3),n(r,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r){var n=setTimeout((function(){console.info("[hash project timeout]"),r("")}),a);e(t,i,a).then((function(e){clearTimeout(n),r(e)})).catch((function(){clearTimeout(n),r("")}))}))];case 1:return[2,r.sent()]}}))}))},[2]}))}))}},8366:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(1606)),s=i(r(8838)),c=r(3837),u=r(4263),l=function(){function e(){}return e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.loading=function(e){return{color:"green",text:e,stop:function(){}}},e.prototype.stopLoading=function(){},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l),f=null,d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.info(a.default.green(c.format.apply(null,e)))},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn(a.default.yellow(c.format.apply(null,e)))},t.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error(a.default.red(c.format.apply(null,e)))},t.prototype.loading=function(e){return f=(0,s.default)({text:e,interval:80}).start()},t.prototype.stopLoading=function(){f&&(f.stop(),f=null)},t}(l),h=(0,u.isCli)()?new d:new p;t.default=h},5879:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=t.mergeMetrics=t.addFieldToMetrics=t.addNodeToMetrics=void 0,t.addNodeToMetrics=function(e,t){e.nodes||(e.nodes=[]),e.nodes.push({node:t,timestamp:Date.now()})},t.addFieldToMetrics=function(e,t,r){"nodes"!==t&&void 0!==r&&(e[t]=r)},t.mergeMetrics=function(){for(var e,t,a,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];var u={nodes:[]};try{for(var l=n(s.filter(Boolean)),p=l.next();!p.done;p=l.next()){var f=p.value,d=f.nodes,h=r(f,["nodes"]);for(var _ in(a=u.nodes).push.apply(a,i([],o(null!=d?d:[]),!1)),h)void 0!==h[_]&&null!==h[_]&&(u[_]=h[_])}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return u};var a=function(){function e(){this.nodes=[],this.tags={}}return e.prototype.addNode=function(e,t){return void 0===t&&(t=Date.now()),this.nodes.push({node:e,timestamp:t}),this},e.prototype.updateField=function(e,t){return void 0!==t?this.tags[e]=t:delete this.tags[e],this},e.prototype.merge=function(){for(var e,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];try{for(var a=n(o.filter(Boolean)),s=a.next();!s.done;s=a.next()){var c=s.value,u=c.nodes,l=r(c,["nodes"]);for(var p in this.nodes=this.nodes.concat(u),l)void 0!==l[p]&&(this.tags[p]=l[p])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return this},e.prototype.settle=function(e){void 0===e&&(e=!1);var t=Object.assign({},this.tags);return t.nodes=this.nodes,e&&this.clear(),t},e.prototype.clear=function(){return this.nodes=[],this.tags={},this},e}();t.Metrics=a},4486:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateTerminalQrCode=t.toQRCodeFile=t.toQRCodeSVG=t.makeSchema=void 0;var l=r(2747),p=r(7992),f=u(r(1887)),d=u(r(1017)),h=u(r(3727)),_=a(r(4563)),v=r(2893),m=r(1728),y=u(r(8366)),E=r(4263);t.makeSchema=function(e){var t=this;return new Promise((function(r,o){return s(t,void 0,void 0,(function(){var t,i,a,s,u,f,d,h,_,y,g,b,O,A,I,C,S,w,P,L,T,R,D,j,x,N,M,U,k;return c(this,(function(c){switch(c.label){case 0:return t=e.devAppid,i=e.extAppid,a=e.startPage,s=e.query,u=e.scene,f=e.bdpLog,d=e.qrcodeQuery,h=e.headers,_=e.ideConfig,y=e.isInteractGame,g=e.referrerInfo,b=e.hotRestartHash,O=e.type,A=e.penetrateMapJson,I=e.traceVersion,C=(0,v.getConfig)().url.makeSchema,S={},i&&(S={devappid:t}),[4,(0,m.getLogInfoHeaders)(t)];case 1:w=c.sent(),P=a?a+"?"+s:"",L={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(j=null==_?void 0:_.inspectPlatform)&&void 0!==j?j:"all",ide_version:null==_?void 0:_.ideVersion,ide_os:null==_?void 0:_.ideOS,ide_device_id:null==_?void 0:_.ideDid,ide_user_id:null==_?void 0:_.ideUid,iOS_debug_version:+(null==_?void 0:_.iOSDebugVersion),connect_type:null==_?void 0:_.connectType,local_debug:String(null==_?void 0:_.localDebug),dycloud_config:{call_container:null!==(N=null===(x=null==_?void 0:_.dycloudConfig)||void 0===x?void 0:x.callContainer)&&void 0!==N?N:null,websocket:null!==(U=null===(M=null==_?void 0:_.dycloudConfig)||void 0===M?void 0:M.websocket)&&void 0!==U?U:null},extra_info:null!==(k=null==_?void 0:_.extraInfo)&&void 0!==k?k:{}},(null==_?void 0:_.isSandbox)&&Object.assign(L,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),T={start_page:encodeURIComponent(P),query:null!=s?s:"",scene:""+u,bdp_log:JSON.stringify(f),penetrate_map_json:JSON.stringify(null!=A?A:n({referer_info:g,ide_inspect_version:6,trace_version:I,ide_live_debug:"live"===(null==_?void 0:_.previewScene),ide_config:L},b&&{hot_restart_version:b}))},d&&Object.assign(T,d),y&&(C=(0,v.getConfig)().interactGameUrl.makeSchema),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,p.AxiosInstance.post(C,n(n({app_id:i||t,stage:"upload"===O?"latest":"preview"},S),{schema_params:T}),{headers:Object.assign(w,h)})];case 3:return R=c.sent(),(0,E.isIDE)()&&console.info("makeSchema result",R),0===R.data.code?((0,E.isIDE)()&&console.info("makeSchema",R.data.data),r({originSchema:y?R.data.data.schema_v2:R.data.data.origin_schema,shortUrl:R.data.data.short_url,expireTime:+R.data.data.expire_time})):o(new l.SchemaError(R.data.msg)),[3,5];case 4:return D=c.sent(),o(new l.SchemaError(D.toString())),[3,5];case 5:return[2]}}))}))}))},t.toQRCodeSVG=function(e){return s(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:return r.trys.push([0,1,,3]),[2,h.default.toString(e,{type:"svg",margin:0,color:{light:"#00000000"}})];case 1:return t=r.sent(),[4,Promise.reject(new l.QRCodeError(t.toString()))];case 2:return[2,r.sent()];case 3:return[2]}}))}))},t.toQRCodeFile=function(e,t){return s(this,void 0,void 0,(function(){var r;return c(this,(function(n){switch(n.label){case 0:d.default.isAbsolute(t)||(t=d.default.resolve(process.cwd(),t)),n.label=1;case 1:return n.trys.push([1,3,,5]),[4,h.default.toFile(t,e,{color:{light:"#0000"}})];case 2:return n.sent(),[2,t];case 3:return r=n.sent(),[4,Promise.reject(new l.QRCodeError(r.toString()))];case 4:return[2,n.sent()];case 5:return[2]}}))}))},t.generateTerminalQrCode=function(e,t){_.generate(e,{small:t.small});var r="";t.copy&&(f.default.writeSync(e),r="(已拷贝到剪贴板)"),t.small&&y.default.warn("small QR Code may not work in some environments"),y.default.info("二维码信息:"+e+" "+r)}},4263:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=t.isGameFileValid=t.getNextVersion=t.getMD5Stream=t.getAppJson=t.getProjectConfig=t.getAppid=t.getCliDefaultStoragePath=t.clearConsole=t.mixEncode=t.validateAppId=t.validateEmail=t.validateVerificationCode=t.validatePhoneNumber=t.getPackageRoot=t.createProjectConfigFile=t.cleanArgs=t.maxConcurrency=t.isIDE=t.isMiniGameCli=t.isCli=t.isMac=t.HIGH_WATER_MARK=void 0;var u=r(2747),l=r(8559),p=c(r(6113)),f=i(r(9849)),d=i(r(2037)),h=i(r(1017)),_=i(r(4521)),v=r(2781);function m(){return"true"===process.env.isMiniGameCli}t.HIGH_WATER_MARK=33554432,t.isMac=function(){return"darwin"===process.platform},t.isCli=function(){return"true"===process.env.isCli},t.isMiniGameCli=m,t.isIDE=function(){return"true"===process.env.isIDE};var y=1;function E(e){if(!/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e))throw new u.ProjectError('AppId "'+e+'" is not valid')}t.maxConcurrency=function(){return y||(y=d.cpus().length),y},t.cleanArgs=function(e){return e.options.reduce((function(t,r){var n=r.long.replace(/^--/,"").replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}));return"function"!=typeof e[n]&&void 0!==e[n]&&(t[n]=e[n]),t}),{})},t.createProjectConfigFile=function(e,t,r){return void 0===r&&(r=!1),a(this,void 0,void 0,(function(){var n,o;return s(this,(function(i){switch(i.label){case 0:return n='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n "useCompilerPlugins": ['+(r?'"typescript"':"")+']\n },\n "miniprogramRoot": "./",\n "appid": "testappId",\n "projectname": "'+e+'"\n }',o=h.resolve(t,"project.config.json"),[4,f.writeFile(o,n)];case 1:return[2,i.sent()]}}))}))},t.getPackageRoot=function(){return h.join(__dirname,"..")},t.validatePhoneNumber=function(e){if(!/^1[3-9]\d{9}$/.test(e))throw new u.LoginError('PhoneNumber "'+e+'" is invalid')},t.validateVerificationCode=function(e){if(!/^\d{4}$/.test(e))throw new u.LoginError('VerificationCode "'+e+'" is invalid')},t.validateEmail=function(e){if(!/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/.test(e))throw new u.LoginError('Email "'+e+'" is invalid')},t.validateAppId=E,t.mixEncode=function(e){for(var t=e.toString(),r=[],n=0,o=t.length;n<o;n++)r.push(t.charCodeAt(n));return r.map((function(e){return(5^e).toString(16)})).join("")},t.clearConsole=function(e){if(process.stdout.isTTY){var t="\n".repeat(process.stdout.rows);console.log(t),_.cursorTo(process.stdout,0,0),_.clearScreenDown(process.stdout),e&&console.log(e)}},t.getCliDefaultStoragePath=function(){var e=m()?".tmg-cli/":".tma-cli/";return h.join(d.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return E(t),t},t.getProjectConfig=function(e){return a(this,void 0,void 0,(function(){var t;return s(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,4]),[4,l.ProjectConfig.from(e)];case 1:case 3:return[2,r.sent()];case 2:return t=r.sent(),[4,Promise.reject(new u.ProjectError('Parsing "project.config.json" with error. '+t.toString()))];case 4:return[2]}}))}))},t.getAppJson=function(e,t,r){return a(this,void 0,void 0,(function(){var n,o,i,a;return s(this,(function(s){switch(s.label){case 0:n=(r?"game":"app")+".json",s.label=1;case 1:return s.trys.push([1,3,,5]),o=e.getMiniprogramRoot(),i=h.join(t,o,n),[4,f.readJSON(i)];case 2:return[2,s.sent()];case 3:return a=s.sent(),[4,Promise.reject(new u.ProjectError('Parsing "'+n+'" file with error. '+a.toString()))];case 4:return[2,s.sent()];case 5:return[2]}}))}))},t.getMD5Stream=function(e){return a(this,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=p.default.createHash("md5"),i=new v.Transform({writableHighWaterMark:t.HIGH_WATER_MARK,readableHighWaterMark:t.HIGH_WATER_MARK,transform:function(e,t,r){o.update(e),r(null,e)}});i.__md5="",e.pipe(i),e.on("end",(function(){i.__md5=o.digest("hex"),r(i)})).on("error",(function(e){n(new u.CompressError("MD5 calculation failed "+e.message))}))}))];case 1:return[2,r.sent()]}}))}))},t.getNextVersion=function(e){try{var t=e.match(/\d+/g);return t[2]=(parseInt(t[2])+1).toString(),t.join(".")}catch(e){return"0.0.1"}},t.isGameFileValid=function(e){return!(".."===e||/\.\.(\\|\/)/.test(e)||/(\\|\/)\.\./.test(e))},t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},9882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWhiteList=t.ALLOWED_MICROGAME_EXTS_REG=void 0;var n=r(4263),o=Object.freeze(["**/*.json","**/*.js","**/*.png","**/*.jpg","**/*.jpeg","**/*.gif","**/*.svg","**/*.cer","**/*.mp3","**/*.aac","**/*.m4a","**/*.mp4","**/*.wav","**/*.flac","**/*.ape","**/*.ogg","**/*.wma","**/*.midi","**/*.ogv","**/*.webm","**/*.mkv","**/*.ttc","**/*.ttf","**/*.woff","**/*.otf","**/*.obj","**/*.dae","**/*.fbx","**/*.mtl","**/*.stl","**/*.3ds","**/*.pvr","**/*.plist","**/*.fnt","**/*.gz","**/*.ccz","**/*.bmp","**/*.atlas","**/*.swf","**/*.ani","**/*.part","**/*.proto","**/*.bin","**/*.sk","**/*.mipmaps","**/*.txt","**/*.zip","**/*.tt","**/*.map","**/*.silk","**/*.dbbin","**/*.dbmv","**/*.etc","**/*.lmat","**/*.lm","**/*.ls","**/*.lh","**/*.lani","**/*.lav","**/*.lsani","**/*.ltc","**/*.xml","**/*.pkm","**/*.scene","**/*.csv","**/*.prefab","**/*.mesh","**/*.wasm","**/*.wasm.br"]);t.ALLOWED_MICROGAME_EXTS_REG=new RegExp("\\.("+o.map((function(e){return e.match(/\.([^.]+)$/)[1]})).join("|")+")$");var i=Object.freeze(["**/*.js","**/*.json","**/*.sjs","**/*.ts","**/*.ttml","**/*.ttss","**/*.wxml","**/*.wxs","**/*.wxss","**/*.sk","**/*.md","**/*.aac","**/*.bmp","**/*.br","**/*.cer","**/*.eot","**/*.gif","**/*.jpeg","**/*.jpg","**/*.m4a","**/*.mp3","**/*.mp4","**/*.ogg","**/*.otf","**/*.png","**/*.silk","**/*.svg","**/*.ttf","**/*.wasm","**/*.wav","**/*.webp","**/*.woff","**/*.wxs","**/*.wasm.br","**/*.heic"]);t.getWhiteList=function(e){return void 0===e&&(e=!1),(0,n.isCli)()?(0,n.isMiniGameCli)()?o:i:e?o:i}},4354:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(8783)),s=i(r(8366)),c=r(2893),u=r(4263),l=r(8956),p=r(9808),f=i(r(1017)),d=r(4486),h=r(8733),_=i(r(9849)),v=r(8066),m=i(r(7239)),y=v.CliMonitor.getInstance({cliVersion:"2.0.7",cliName:"tt-minigame-ide-cli"});a.default.version("2.0.7","-V, --version","Output the current version"),a.default.command("open <project-path>").option("--mode <mode>","lite | full").description("Open target project by path").action((function(e,t){y.reportCommandCall(t.name());var r=(0,u.cleanArgs)(t).mode;(0,m.default)({projectPath:e,mode:r,type:"microgame"})})),a.default.command("login").description("Login to the developer platform").option("-m, --mobile","Login by mobile").option("-e, --email","Login by email").option("-p, --proxy <proxy>","Login with proxy").action((function(e){y.reportCommandCall(e.name());var t=(0,u.cleanArgs)(e);void 0!==t.proxy&&(0,c.setConfig)({proxy:t.proxy}),(0,p.cliAuth)(t)})),a.default.command("login-e [email] [password]").description("Login to the developer platform by E-mail").option("-p, --proxy <proxy>","Login with proxy").action((function(e,t,r){y.reportCommandCall(r.name());var n=(0,u.cleanArgs)(r);void 0!==n.proxy&&(0,c.setConfig)({proxy:n.proxy}),(0,l.loginByEmail)({email:e,password:t})})),a.default.command("logout").description("Logout and clear the session.").action((function(e){y.reportCommandCall(e.name()),(0,l.logout)()})),a.default.command("preview [entry]").description("Preview project by remote").option("-f, --force","Preview project without local cache(deprecated)").option("--disable-cache","Preview project without local cache").option("-s, --small","Use small QR Code, it may fail in some environments").option("-u, --copy","Copy remote url to clipboard").option("-p, --proxy <proxy>","Preview with proxy").option("-o, --output <path>","QRCode image output path").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r,n,i,a,p,h,_,m;return o(this,(function(o){switch(o.label){case 0:y.reportCommandCall(t.name()),void 0!==(r=(0,u.cleanArgs)(t)).proxy&&(0,c.setConfig)({proxy:r.proxy}),e?f.default.isAbsolute(e)||(e=f.default.join(process.cwd(),e)):e=process.cwd(),n=!0,(r.force||r.disableCache)&&(n=!1),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.microgame.preview({project:{path:e},page:{path:r.miniappPath,query:r.miniappQuery,scene:r.miniappScene,launchFrom:r.miniappLaunchFrom,location:r.miniappLocation},qrcode:{format:r.output?"imageFile":"terminal",output:r.output,options:{small:r.small}},localCompileVersion:"4.0.4-rc.17.ide.2",cache:n,copyToClipboard:r.copy})];case 2:return(i=o.sent()).useCache||y.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_SUCCESS,{appid:(null===(p=i.metrics)||void 0===p?void 0:p.appId)||"",logid:(null===(h=i.metrics)||void 0===h?void 0:h.logId)||""}),(0,d.generateTerminalQrCode)(i.shortUrl,{copy:r.copy,small:r.small}),[3,4];case 3:return a=o.sent(),s.default.stopLoading(),s.default.error(null!==(_=a.stack)&&void 0!==_?_:a),y.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:a.name,message:null!==(m=a.message)&&void 0!==m?m:a}),[3,4];case 4:return[2]}}))}))})),a.default.command("upload [entry]").description("Upload project to the developer platform").requiredOption("-v, --app-version <version>","App version (eg: [major].[minor].[patch])").requiredOption("-c, --app-changelog <log>","Changelog for this version").option("-p, --proxy <proxy>","Update request proxy").option("-u, --copy","Copy remote url to clipboard").option("-s, --small","Use small QR Code, it may fail in some environments").option("-o, --output <path>","QRCode image output path").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r,n,i,a,p,h,_;return o(this,(function(o){switch(o.label){case 0:y.reportCommandCall(t.name()),void 0!==(r=(0,u.cleanArgs)(t)).proxy&&(0,c.setConfig)({proxy:r.proxy}),e?f.default.isAbsolute(e)||(e=f.default.join(process.cwd(),e)):e=process.cwd(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.microgame.upload({project:{path:e},qrcode:{format:r.output?"imageFile":"terminal",output:r.output,options:{small:r.small}},localCompileVersion:"4.0.4-rc.17.ide.2",copyToClipboard:r.copy,changeLog:r.appChangelog,version:r.appVersion})];case 2:return n=o.sent(),y.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(a=n.metrics)||void 0===a?void 0:a.appId)||"",logid:(null===(p=n.metrics)||void 0===p?void 0:p.logId)||""}),(0,d.generateTerminalQrCode)(n.shortUrl,{copy:r.copy,small:r.small}),s.default.info("🎉 Upload success"),[3,4];case 3:return i=o.sent(),s.default.stopLoading(),s.default.error(null!==(h=i.stack)&&void 0!==h?h:i),y.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_FAIL,{type:i.name,message:null!==(_=i.message)&&void 0!==_?_:i}),[3,4];case 4:return[2]}}))}))})),a.default.command("build-npm [projectPath]").description("build npm packages in node_modules").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return y.reportCommandCall(t.name()),[4,(0,h.buildNpm)({projectPath:e})];case 1:return(r=n.sent()).success?s.default.info("🎉 Build success"):s.default.error("Build failed.[message=%s]",r.reason),[2]}}))}))})),a.default.command("version [entry]").description("Get latest released version of project").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r,n,i,a,c;return o(this,(function(o){switch(o.label){case 0:return y.reportCommandCall(t.name()),e?f.default.isAbsolute(e)||(e=f.default.join(process.cwd(),e)):e=process.cwd(),r=f.default.join(e,"project.config.json"),[4,_.default.pathExists(r)];case 1:return o.sent()?[4,_.default.readFile(r,"utf-8")]:(s.default.error("Invalid project: project.config.json file not found"),[2]);case 2:return n=o.sent(),i=JSON.parse(n),(a=i.ttappid||i.appid)?[4,(0,l.getMeta)({appid:a})]:(s.default.error('Require parameter "appid".'),[2]);case 3:return c=o.sent(),s.default.info(c.version),[2]}}))}))})),a.default.command("set-config").description("Set tt-minigame-ide-cli config").option("-p, --proxy <proxy>","Set global proxy").option("--default","Use default").option("-r, --allow-report-event <allowReportEvent>","allow report event when using, yes or no").action((function(e){y.reportCommandCall(e.name());var t=(0,u.cleanArgs)(e),r={};if(void 0!==t.proxy&&(r.proxy=t.proxy),void 0!==t.allowReportEvent){if("yes"!==t.allowReportEvent&&"no"!==t.allowReportEvent)return void s.default.error('allowReportEvent can only be "yes" or "no"');r.allowReportEvent="yes"===t.allowReportEvent}(0,c.setConfig)(r,t.default)})),a.default.parse(process.argv),process.on("unhandledRejection",(function(e){var t;s.default.stopLoading(),s.default.error(null!==(t=e.stack)&&void 0!==t?t:e),y.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"unhandledRejection",message:e.toString()})})),process.on("uncaughtException",(function(e){var t;s.default.stopLoading(),s.default.error(null!==(t=e.stack)&&void 0!==t?t:e),y.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"uncaughtException",message:e.toString()})}))},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},3477:e=>{"use strict";e.exports=require("querystring")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3732:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3732__},1606:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1606__},1887:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1887__},469:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__469__},6883:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6883__},9508:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9508__},2896:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2896__},9258:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9258__},9849:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9849__},6495:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6495__},8838:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__8838__},3727:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3727__},4563:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4563__},7086:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__7086__},2541:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2541__},4649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(8804);const o=function(e,t){for(var r=e.length;r--;)if((0,n.Z)(e[r][0],t))return r;return-1};var i=Array.prototype.splice;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=o(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))},a.prototype.get=function(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};const s=a},8896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"Map")},3703:(e,t,r)=>{"use strict";r.d(t,{Z:()=>f});const n=(0,r(5546).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=n?n(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)},a.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};const s=a;var c=r(4649),u=r(8896);const l=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function p(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(u.Z||c.Z),string:new s}},p.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},p.prototype.get=function(e){return l(this,e).get(e)},p.prototype.has=function(e){return l(this,e).has(e)},p.prototype.set=function(e,t){var r=l(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};const f=p},6218:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(4649);var o=r(8896),i=r(3703);function a(e){var t=this.__data__=new n.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new n.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var r=this.__data__;if(r instanceof n.Z){var a=r.__data__;if(!o.Z||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i.Z(a)}return r.set(e,t),this.size=r.size,this};const s=a},187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Symbol},8282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Uint8Array},848:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(4248),o=r(7885),i=r(4975),a=r(6401),s=r(8127),c=Object.prototype.hasOwnProperty;const u=function(e,t){var r=(0,o.Z)(e),u=!r&&(0,n.Z)(e),l=!r&&!u&&(0,i.Z)(e),p=!r&&!u&&!l&&(0,s.Z)(e),f=r||u||l||p,d=f?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],h=d.length;for(var _ in e)!t&&!c.call(e,_)||f&&("length"==_||l&&("offset"==_||"parent"==_)||p&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||(0,a.Z)(_,h))||d.push(_);return d}},5598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},5810:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6299:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(905),o=r(8804),i=Object.prototype.hasOwnProperty;const a=function(e,t,r){var a=e[t];i.call(e,t)&&(0,o.Z)(a,r)&&(void 0!==r||t in e)||(0,n.Z)(e,t,r)}},905:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5088);const o=function(e,t,r){"__proto__"==t&&n.Z?(0,n.Z)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},7024:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(6218);var o=r(6299),i=r(2436),a=r(298);var s=r(7477);var c=r(3221),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=u&&"object"==typeof module&&module&&!module.nodeType&&module,p=l&&l.exports===u?c.Z.Buffer:void 0,f=p?p.allocUnsafe:void 0;var d=r(6808);var h=r(8390);var _=r(7245),v=r(9878),m=r(8649),y=Object.prototype.hasOwnProperty;var E=r(8282);const g=function(e){var t=new e.constructor(e.byteLength);return new E.Z(t).set(new E.Z(e)),t};var b=/\w*$/;var O=r(187),A=O.Z?O.Z.prototype:void 0,I=A?A.valueOf:void 0;const C=function(e,t,r){var n,o,i,a=e.constructor;switch(t){case"[object ArrayBuffer]":return g(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return function(e,t){var r=t?g(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var r=t?g(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,b.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=e,I?Object(I.call(n)):{}}};var S=r(3122),w=Object.create;const P=function(){function e(){}return function(t){if(!(0,S.default)(t))return{};if(w)return w(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var L=r(9552),T=r(5441);var R=r(7885),D=r(4975),j=r(3391);var x=r(3225),N=r(7755),M=N.Z&&N.Z.isMap;const U=M?(0,x.Z)(M):function(e){return(0,j.Z)(e)&&"[object Map]"==(0,m.Z)(e)};var k=N.Z&&N.Z.isSet;const F=k?(0,x.Z)(k):function(e){return(0,j.Z)(e)&&"[object Set]"==(0,m.Z)(e)};var V="[object Arguments]",G="[object Function]",B="[object Object]",H={};H[V]=H["[object Array]"]=H["[object ArrayBuffer]"]=H["[object DataView]"]=H["[object Boolean]"]=H["[object Date]"]=H["[object Float32Array]"]=H["[object Float64Array]"]=H["[object Int8Array]"]=H["[object Int16Array]"]=H["[object Int32Array]"]=H["[object Map]"]=H["[object Number]"]=H[B]=H["[object RegExp]"]=H["[object Set]"]=H["[object String]"]=H["[object Symbol]"]=H["[object Uint8Array]"]=H["[object Uint8ClampedArray]"]=H["[object Uint16Array]"]=H["[object Uint32Array]"]=!0,H["[object Error]"]=H[G]=H["[object WeakMap]"]=!1;const Z=function e(t,r,c,u,l,p){var E,g=1&r,b=2&r,O=4&r;if(c&&(E=l?c(t,u,l,p):c(t)),void 0!==E)return E;if(!(0,S.default)(t))return t;var A=(0,R.Z)(t);if(A){if(E=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&y.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!g)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(t,E)}else{var I=(0,m.Z)(t),w=I==G||"[object GeneratorFunction]"==I;if((0,D.Z)(t))return function(e,t){if(t)return e.slice();var r=e.length,n=f?f(r):new e.constructor(r);return e.copy(n),n}(t,g);if(I==B||I==V||w&&!l){if(E=b||w?{}:function(e){return"function"!=typeof e.constructor||(0,T.Z)(e)?{}:P((0,L.Z)(e))}(t),!g)return b?function(e,t){return(0,i.Z)(e,(0,h.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,s.Z)(t),e)}(E,t)):function(e,t){return(0,i.Z)(e,(0,d.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,a.default)(t),e)}(E,t))}else{if(!H[I])return l?t:{};E=C(t,I,g)}}p||(p=new n.Z);var j=p.get(t);if(j)return j;p.set(t,E),F(t)?t.forEach((function(n){E.add(e(n,r,c,n,t,p))})):U(t)&&t.forEach((function(n,o){E.set(o,e(n,r,c,o,t,p))}));var x=O?b?v.Z:_.Z:b?s.Z:a.default,N=A?void 0:x(t);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(N||t,(function(n,i){N&&(n=t[i=n]),(0,o.Z)(E,i,e(n,r,c,i,t,p))})),E}},9523:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7653),o=r(7969);const i=function(e,t){for(var r=0,i=(t=(0,n.Z)(t,e)).length;null!=e&&r<i;)e=e[(0,o.Z)(t[r++])];return r&&r==i?e:void 0}},2938:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5810),o=r(7885);const i=function(e,t,r){var i=t(e);return(0,o.Z)(e)?i:(0,n.Z)(i,r(e))}},9001:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(187),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n.Z?n.Z.toStringTag:void 0;var c=Object.prototype.toString;var u=n.Z?n.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}(e):function(e){return c.call(e)}(e)}},4187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(6299),o=r(7653),i=r(6401),a=r(3122),s=r(7969);const c=function(e,t,r,c){if(!(0,a.default)(e))return e;for(var u=-1,l=(t=(0,o.Z)(t,e)).length,p=l-1,f=e;null!=f&&++u<l;){var d=(0,s.Z)(t[u]),h=r;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(u!=p){var _=f[d];void 0===(h=c?c(_,d,f):void 0)&&(h=(0,a.default)(_)?_:(0,i.Z)(t[u+1])?[]:{})}(0,n.Z)(f,d,h),f=f[d]}return e}},3225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return function(t){return e(t)}}},7653:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(7885),o=r(3502),i=r(3703);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(a.Cache||i.Z),r}a.Cache=i.Z;var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g;const u=(l=a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(s,(function(e,r,n,o){t.push(n?o.replace(c,"$1"):r||e)})),t}),(function(e){return 500===p.size&&p.clear(),e})),p=l.cache,l);var l,p,f=r(187),d=r(5598),h=r(2758),_=f.Z?f.Z.prototype:void 0,v=_?_.toString:void 0;const m=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return(0,d.Z)(t,e)+"";if((0,h.Z)(t))return v?v.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},y=function(e){return null==e?"":m(e)},E=function(e,t){return(0,n.Z)(e)?e:(0,o.Z)(e,t)?[e]:u(y(e))}},2436:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(6299),o=r(905);const i=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=i?i(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),a?(0,o.Z)(r,u,l):(0,n.Z)(r,u,l)}return r}},5088:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5546);const o=function(){try{var e=(0,n.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},1380:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(5810),o=r(187),i=r(4248),a=r(7885),s=o.Z?o.Z.isConcatSpreadable:void 0;const c=function(e){return(0,a.Z)(e)||(0,i.Z)(e)||!!(s&&e&&e[s])},u=function e(t,r,o,i,a){var s=-1,u=t.length;for(o||(o=c),a||(a=[]);++s<u;){var l=t[s];r>0&&o(l)?r>1?e(l,r-1,o,i,a):(0,n.Z)(a,l):i||(a[a.length]=l)}return a},l=function(e){return null!=e&&e.length?u(e,1):[]};var p=Math.max;var f=r(5088),d=r(9930);const h=f.Z?function(e,t){return(0,f.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:d.Z;var _=Date.now;const v=(m=h,y=0,E=0,function(){var e=_(),t=16-(e-E);if(E=e,t>0){if(++y>=800)return arguments[0]}else y=0;return m.apply(void 0,arguments)});var m,y,E;const g=function(e){return v(function(e,t,r){return t=p(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=p(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,void 0,l),e+"")}},2168:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2938),o=r(6808),i=r(298);const a=function(e){return(0,n.Z)(e,i.default,o.Z)}},9878:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2938),o=r(8390),i=r(7477);const a=function(e){return(0,n.Z)(e,i.Z,o.Z)}},5546:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(2427);const o=r(3221).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=r(3122),c=r(6682),u=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,f=l.toString,d=p.hasOwnProperty,h=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _=function(e){return!(!(0,s.default)(e)||(t=e,a&&a in t))&&((0,n.Z)(e)?h:u).test((0,c.Z)(e));var t},v=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return _(r)?r:void 0}},9552:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(6048).Z)(Object.getPrototypeOf,Object)},6808:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const a=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}(i(e),(function(t){return o.call(e,t)})))}:n.Z},8390:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(5810),o=r(9552),i=r(6808),a=r(813);const s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,n.Z)(t,(0,i.Z)(e)),e=(0,o.Z)(e);return t}:a.Z},8649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>A});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"DataView");var a=r(8896);const s=(0,n.Z)(o.Z,"Promise"),c=(0,n.Z)(o.Z,"Set"),u=(0,n.Z)(o.Z,"WeakMap");var l=r(9001),p=r(6682),f="[object Map]",d="[object Promise]",h="[object Set]",_="[object WeakMap]",v="[object DataView]",m=(0,p.Z)(i),y=(0,p.Z)(a.Z),E=(0,p.Z)(s),g=(0,p.Z)(c),b=(0,p.Z)(u),O=l.Z;(i&&O(new i(new ArrayBuffer(1)))!=v||a.Z&&O(new a.Z)!=f||s&&O(s.resolve())!=d||c&&O(new c)!=h||u&&O(new u)!=_)&&(O=function(e){var t=(0,l.Z)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,p.Z)(r):"";if(n)switch(n){case m:return v;case y:return f;case E:return d;case g:return h;case b:return _}return t});const A=O},6401:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(7885),o=r(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(e,t){if((0,n.Z)(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!(0,o.Z)(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},5441:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},7755:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o&&n.Z.process;const s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}()},6048:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return function(r){return e(t(r))}}},3221:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=n.Z||o||Function("return this")()},7969:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(2758);const o=function(e){if("string"==typeof e||(0,n.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Function.prototype.toString;const o=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7921:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(7024);const o=function(e){return(0,n.Z)(e,5)}},8804:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return e===t||e!=e&&t!=t}},772:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(9523);const o=function(e,t,r){var o=null==e?void 0:(0,n.Z)(e,t);return void 0===o?r:o}},3488:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});const n=function(e,t){return null!=e&&t in Object(e)};var o=r(7653),i=r(4248),a=r(7885),s=r(6401),c=r(1164),u=r(7969);const l=function(e,t){return null!=e&&function(e,t,r){for(var n=-1,l=(t=(0,o.Z)(t,e)).length,p=!1;++n<l;){var f=(0,u.Z)(t[n]);if(!(p=null!=e&&r(e,f)))break;e=e[f]}return p||++n!=l?p:!!(l=null==e?0:e.length)&&(0,c.Z)(l)&&(0,s.Z)(f,l)&&((0,a.Z)(e)||(0,i.Z)(e))}(e,t,n)}},9930:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return e}},4248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(9001),o=r(3391);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,n.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,c=a.propertyIsEnumerable;const u=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!c.call(e,"callee")}},7885:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=Array.isArray},3282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(2427),o=r(1164);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,n.Z)(e)}},4975:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?n.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},2427:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3122);const i=function(e){if(!(0,o.default)(e))return!1;var t=(0,n.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3391);const i=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,n.Z)(e)}},8127:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(9001),o=r(1164),i=r(3391),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(3225),c=r(7755),u=c.Z&&c.Z.isTypedArray;const l=u?(0,s.Z)(u):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,n.Z)(e)]}},298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(848),o=r(5441);const i=(0,r(6048).Z)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;var s=r(3282);const c=function(e){return(0,s.Z)(e)?(0,n.Z)(e):function(e){if(!(0,o.Z)(e))return i(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}},7477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(848),o=r(3122),i=r(5441);var a=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,o.default)(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=(0,i.Z)(e),r=[];for(var n in e)("constructor"!=n||!t&&a.call(e,n))&&r.push(n);return r};var c=r(3282);const u=function(e){return(0,c.Z)(e)?(0,n.Z)(e,!0):s(e)}},1395:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(5598),o=r(7024),i=r(7653);var a=r(9523);const s=function(e,t){return t.length<2?e:(0,a.Z)(e,function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(t,0,-1))};var c=r(7969);const u=function(e,t){return t=(0,i.Z)(t,e),null==(e=s(e,t))||delete e[(0,c.Z)((r=t,n=null==r?0:r.length,n?r[n-1]:void 0))];var r,n};var l=r(2436),p=r(9001),f=r(9552),d=r(3391),h=Function.prototype,_=Object.prototype,v=h.toString,m=_.hasOwnProperty,y=v.call(Object);const E=function(e){return function(e){if(!(0,d.Z)(e)||"[object Object]"!=(0,p.Z)(e))return!1;var t=(0,f.Z)(e);if(null===t)return!0;var r=m.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&v.call(r)==y}(e)?void 0:e};var g=r(1380),b=r(9878);const O=(0,g.Z)((function(e,t){var r={};if(null==e)return r;var a=!1;t=(0,n.Z)(t,(function(t){return t=(0,i.Z)(t,e),a||(a=t.length>1),t})),(0,l.Z)(e,(0,b.Z)(e),r),a&&(r=(0,o.Z)(r,7,E));for(var s=t.length;s--;)u(r,t[s]);return r}))},8337:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(9523),o=r(4187),i=r(7653);var a=r(3488);const s=function(e,t){return function(e,t,r){for(var a=-1,s=t.length,c={};++a<s;){var u=t[a],l=(0,n.Z)(e,u);r(l,u)&&(0,o.Z)(c,(0,i.Z)(u,e),l)}return c}(e,t,(function(t,r){return(0,a.Z)(e,r)}))},c=(0,r(1380).Z)((function(e,t){return null==e?{}:s(e,t)}))},6503:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>z});const n=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r},o=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};var i=r(298);var a=r(3282);const s=(c=function(e,t){return e&&o(e,t,i.default)},function(e,t){if(null==e)return e;if(!(0,a.Z)(e))return c(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e});var c,u=r(6218),l=r(3703);function p(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new l.Z;++t<r;)this.add(e[t])}p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},p.prototype.has=function(e){return this.__data__.has(e)};const f=p,d=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},h=function(e,t,r,n,o,i){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var p=-1,h=!0,_=2&r?new f:void 0;for(i.set(e,t),i.set(t,e);++p<s;){var v=e[p],m=t[p];if(n)var y=a?n(m,v,p,t,e,i):n(v,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(_){if(!d(t,(function(e,t){if(a=t,!_.has(a)&&(v===e||o(v,e,r,n,i)))return _.push(t);var a}))){h=!1;break}}else if(v!==m&&!o(v,m,r,n,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var _=r(187),v=r(8282),m=r(8804);const y=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},E=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r};var g=_.Z?_.Z.prototype:void 0,b=g?g.valueOf:void 0;var O=r(7245),A=Object.prototype.hasOwnProperty;var I=r(8649),C=r(7885),S=r(4975),w=r(8127),P="[object Arguments]",L="[object Array]",T="[object Object]",R=Object.prototype.hasOwnProperty;const D=function(e,t,r,n,o,i){var a=(0,C.Z)(e),s=(0,C.Z)(t),c=a?L:(0,I.Z)(e),l=s?L:(0,I.Z)(t),p=(c=c==P?T:c)==T,f=(l=l==P?T:l)==T,d=c==l;if(d&&(0,S.Z)(e)){if(!(0,S.Z)(t))return!1;a=!0,p=!1}if(d&&!p)return i||(i=new u.Z),a||(0,w.Z)(e)?h(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new v.Z(e),new v.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,m.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=y;case"[object Set]":var c=1&n;if(s||(s=E),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=h(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,c,r,n,o,i);if(!(1&r)){var _=p&&R.call(e,"__wrapped__"),g=f&&R.call(t,"__wrapped__");if(_||g){var D=_?e.value():e,j=g?t.value():t;return i||(i=new u.Z),o(D,j,r,n,i)}}return!!d&&(i||(i=new u.Z),function(e,t,r,n,o,i){var a=1&r,s=(0,O.Z)(e),c=s.length;if(c!=(0,O.Z)(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:A.call(t,l)))return!1}var p=i.get(e),f=i.get(t);if(p&&f)return p==t&&f==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<c;){var _=e[l=s[u]],v=t[l];if(n)var m=a?n(v,_,l,t,e,i):n(_,v,l,e,t,i);if(!(void 0===m?_===v||o(_,v,r,n,i):m)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var y=e.constructor,E=t.constructor;y==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof E&&E instanceof E||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,r,n,o,i))};var j=r(3391);const x=function e(t,r,n,o,i){return t===r||(null==t||null==r||!(0,j.Z)(t)&&!(0,j.Z)(r)?t!=t&&r!=r:D(t,r,n,o,e,i))};var N=r(3122);const M=function(e){return e==e&&!(0,N.default)(e)},U=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},k=function(e){var t=function(e){for(var t=(0,i.default)(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,M(o)]}return t}(e);return 1==t.length&&t[0][2]?U(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=r[o])[0],l=e[c],p=s[1];if(a&&s[2]){if(void 0===l&&!(c in e))return!1}else{var f=new u.Z;if(n)var d=n(l,p,c,e,t,f);if(!(void 0===d?x(p,l,3,n,f):d))return!1}}return!0}(r,e,t)}};var F=r(772),V=r(3488),G=r(3502),B=r(7969);var H=r(9930);var Z=r(9523);const q=function(e){return(0,G.Z)(e)?(t=(0,B.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,Z.Z)(t,e)}}(e);var t},W=function(e){return"function"==typeof e?e:null==e?H.Z:"object"==typeof e?(0,C.Z)(e)?(t=e[0],r=e[1],(0,G.Z)(t)&&M(r)?U((0,B.Z)(t),r):function(e){var n=(0,F.default)(e,t);return void 0===n&&n===r?(0,V.Z)(e,t):x(r,n,3)}):k(e):q(e);var t,r},J=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},z=function(e,t,r){var o=(0,C.Z)(e)?n:J,i=arguments.length<3;return o(e,W(t),r,i,s)}},5513:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(4187);const o=function(e,t,r){return null==e?e:(0,n.Z)(e,t,r)}},813:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return[]}},48:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(4354);return __webpack_exports__})()));
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("chalk"),require("ora"),require("fs-extra"),require("form-data"),require("deep-clone"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"),require("inquirer"));else if("function"==typeof define&&define.amd)define(["chalk","ora","fs-extra","form-data","deep-clone","semver-compare","archiver","easy-table","fast-glob","folder-hash","clipboardy","qrcode","qrcode-terminal","unzipper","inquirer"],t);else{var r="object"==typeof exports?t(require("chalk"),require("ora"),require("fs-extra"),require("form-data"),require("deep-clone"),require("semver-compare"),require("archiver"),require("easy-table"),require("fast-glob"),require("folder-hash"),require("clipboardy"),require("qrcode"),require("qrcode-terminal"),require("unzipper"),require("inquirer")):t(e.chalk,e.ora,e["fs-extra"],e["form-data"],e["deep-clone"],e["semver-compare"],e.archiver,e["easy-table"],e["fast-glob"],e["folder-hash"],e.clipboardy,e.qrcode,e["qrcode-terminal"],e.unzipper,e.inquirer);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,((__WEBPACK_EXTERNAL_MODULE__1606__,__WEBPACK_EXTERNAL_MODULE__8838__,__WEBPACK_EXTERNAL_MODULE__9849__,__WEBPACK_EXTERNAL_MODULE__9258__,__WEBPACK_EXTERNAL_MODULE__469__,__WEBPACK_EXTERNAL_MODULE__7086__,__WEBPACK_EXTERNAL_MODULE__3732__,__WEBPACK_EXTERNAL_MODULE__6883__,__WEBPACK_EXTERNAL_MODULE__9508__,__WEBPACK_EXTERNAL_MODULE__2896__,__WEBPACK_EXTERNAL_MODULE__1887__,__WEBPACK_EXTERNAL_MODULE__3727__,__WEBPACK_EXTERNAL_MODULE__4563__,__WEBPACK_EXTERNAL_MODULE__2541__,__WEBPACK_EXTERNAL_MODULE__6495__)=>(()=>{var __webpack_modules__={5881:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\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(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=o?i(a,c,o,"day"):c>=n?i(a,c,n,"hour"):c>=r?i(a,c,r,"minute"):c>=t?i(a,c,t,"second"):a+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5130:(e,t,r)=>{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 r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},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(){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+)/))},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=r(7123)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}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.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(5881),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((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},445:(e,t,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(5130):e.exports=r(8414)},8414:(e,t,r)=>{const n=r(6224),o=r(3837);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function(...e){return process.stderr.write(o.format(...e)+"\n")},t.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${n} [0m`;r[0]=i+r[0].split("\n").join("\n"+i),r.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+n+" "+r[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):n.isatty(process.stderr.fd)},t.destroy=o.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=r(7013);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 r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(7123)(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},8137:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},8223:function(e,t,r){e.exports=(r(2081),r(6113),function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(34)},function(e,t,r){var n=r(29)("wks"),o=r(33),i=r(2).Symbol,s="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=n},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(12),o=r(17);e.exports=r(4)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(14);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(3),o=r(26),i=r(32),s=Object.defineProperty;t.f=r(4)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(42),o=r(15);e.exports=function(e){return n(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(9),o=r(2).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(12).f,o=r(8),i=r(1)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){var n=r(29)("keys"),o=r(33);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(11),o=r(1)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(2),o=r(6),i=r(7),s=r(5),a="prototype",c=function(e,t,r){var u,l,p,d=e&c.F,f=e&c.G,h=e&c.S,_=e&c.P,v=e&c.B,m=e&c.W,E=f?o:o[t]||(o[t]={}),g=E[a],y=f?n:h?n[t]:(n[t]||{})[a];for(u in f&&(r=t),r)(l=!d&&y&&void 0!==y[u])&&u in E||(p=l?y[u]:r[u],E[u]=f&&"function"!=typeof y[u]?r[u]:v&&l?i(p,n):m&&y[u]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[a]=e[a],t}(p):_&&"function"==typeof p?i(Function.call,p):p,_&&((E.virtual||(E.virtual={}))[u]=p,e&c.R&&g&&!g[u]&&s(g,u,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){e.exports=r(2).document&&document.documentElement},function(e,t,r){e.exports=!r(4)&&!r(24)((function(){return 7!=Object.defineProperty(r(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){"use strict";var n=r(28),o=r(23),i=r(57),s=r(5),a=r(8),c=r(10),u=r(45),l=r(18),p=r(52),d=r(1)("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",_="values",v=function(){return this};e.exports=function(e,t,r,m,E,g,y){u(r,t,m);var b,O,A,w=function(e){if(!f&&e in P)return P[e];switch(e){case h:case _:return function(){return new r(this,e)}}return function(){return new r(this,e)}},C=t+" Iterator",I=E==_,S=!1,P=e.prototype,L=P[d]||P["@@iterator"]||E&&P[E],T=L||w(E),R=E?I?w("entries"):T:void 0,D="Array"==t&&P.entries||L;if(D&&(A=p(D.call(new e)))!==Object.prototype&&(l(A,C,!0),n||a(A,d)||s(A,d,v)),I&&L&&L.name!==_&&(S=!0,T=function(){return L.call(this)}),n&&!y||!f&&!S&&P[d]||s(P,d,T),c[t]=T,c[C]=v,E)if(b={values:I?T:w(_),keys:g?T:w(h),entries:R},y)for(O in b)O in P||i(P,O,b[O]);else o(o.P+o.F*(f||S),t,b);return b}},function(e,t){e.exports=!0},function(e,t,r){var n=r(2),o="__core-js_shared__",i=n[o]||(n[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){var n,o,i,s=r(7),a=r(41),c=r(25),u=r(16),l=r(2),p=l.process,d=l.setImmediate,f=l.clearImmediate,h=l.MessageChannel,_=0,v={},m="onreadystatechange",E=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){E.call(e.data)};d&&f||(d=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++_]=function(){a("function"==typeof e?e:Function(e),t)},n(_),_},f=function(e){delete v[e]},"process"==r(11)(p)?n=function(e){p.nextTick(s(E,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,n=s(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(n=function(e){l.postMessage(e+"","*")},l.addEventListener("message",g,!1)):n=m in u("script")?function(e){c.appendChild(u("script"))[m]=function(){c.removeChild(this),E.call(e)}}:function(e){setTimeout(s(E,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,r){var n=r(20),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";function n(e){return(0,a.createHash)("sha256").update(e).digest("hex")}function o(e){switch(c){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){return e&&e.__esModule?e:{default:e}}(r(35));t.machineIdSync=function(e){var t=o((0,s.execSync)(u[c]).toString());return e?t:n(t)},t.machineId=function(e){return new i.default((function(t,r){return(0,s.exec)(u[c],{},(function(i,s,a){if(i)return r(new Error("Error while obtaining machine id: "+i.stack));var c=o(s.toString());return t(e?c:n(c))}))}))};var s=r(70),a=r(71),c=process.platform,u={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,r){e.exports={default:r(36),__esModule:!0}},function(e,t,r){r(66),r(68),r(69),r(67),e.exports=r(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(13),o=r(31),i=r(62);e.exports=function(e){return function(t,r,s){var a,c=n(t),u=o(c.length),l=i(s,u);if(e&&r!=r){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===r)return e||l||0;return!e&&-1}}},function(e,t,r){var n=r(7),o=r(44),i=r(43),s=r(3),a=r(31),c=r(64),u={},l={};t=e.exports=function(e,t,r,p,d){var f,h,_,v,m=d?function(){return e}:c(e),E=n(r,p,t?2:1),g=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(f=a(e.length);f>g;g++)if((v=t?E(s(h=e[g])[0],h[1]):E(e[g]))===u||v===l)return v}else for(_=m.call(e);!(h=_.next()).done;)if((v=o(_,E,h.value,t))===u||v===l)return v},t.BREAK=u,t.RETURN=l},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(10),o=r(1)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(3);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){"use strict";var n=r(49),o=r(17),i=r(18),s={};r(5)(s,r(1)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(s,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(1)("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var i=[7],s=i[n]();s.next=function(){return{done:r=!0}},i[n]=function(){return s},e(i)}catch(e){}return r}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(2),o=r(30).set,i=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,c="process"==r(11)(s);e.exports=function(){var e,t,r,u=function(){var n,o;for(c&&(n=s.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(c)r=function(){s.nextTick(u)};else if(i){var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}else if(a&&a.resolve){var d=a.resolve();r=function(){d.then(u)}}else r=function(){o.call(n,u)};return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,r()),t=o}}},function(e,t,r){var n=r(3),o=r(50),i=r(22),s=r(19)("IE_PROTO"),a=function(){},c="prototype",u=function(){var e,t=r(16)("iframe"),n=i.length;for(t.style.display="none",r(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u[c][i[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(a[c]=n(e),r=new a,a[c]=null,r[s]=e):r=u(),void 0===t?r:o(r,t)}},function(e,t,r){var n=r(12),o=r(3),i=r(54);e.exports=r(4)?Object.defineProperties:function(e,t){o(e);for(var r,s=i(t),a=s.length,c=0;a>c;)n.f(e,r=s[c++],t[r]);return e}},function(e,t,r){var n=r(55),o=r(17),i=r(13),s=r(32),a=r(8),c=r(26),u=Object.getOwnPropertyDescriptor;t.f=r(4)?u:function(e,t){if(e=i(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(a(e,t))return o(!n.f.call(e,t),e[t])}},function(e,t,r){var n=r(8),o=r(63),i=r(19)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,r){var n=r(8),o=r(13),i=r(39)(!1),s=r(19)("IE_PROTO");e.exports=function(e,t){var r,a=o(e),c=0,u=[];for(r in a)r!=s&&n(a,r)&&u.push(r);for(;t.length>c;)n(a,r=t[c++])&&(~i(u,r)||u.push(r));return u}},function(e,t,r){var n=r(53),o=r(22);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,r){var n=r(5);e.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},function(e,t,r){e.exports=r(5)},function(e,t,r){var n=r(9),o=r(3),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=r(7)(Function.call,r(51).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return i(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:i}},function(e,t,r){"use strict";var n=r(2),o=r(6),i=r(12),s=r(4),a=r(1)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];s&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(3),o=r(14),i=r(1)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||null==(r=n(s)[i])?t:o(r)}},function(e,t,r){var n=r(20),o=r(15);e.exports=function(e){return function(t,r){var i,s,a=String(o(t)),c=n(r),u=a.length;return c<0||c>=u?e?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):i:e?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}}},function(e,t,r){var n=r(20),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},function(e,t,r){var n=r(15);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(21),o=r(1)("iterator"),i=r(10);e.exports=r(6).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){"use strict";var n=r(37),o=r(47),i=r(10),s=r(13);e.exports=r(27)(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){},function(e,t,r){"use strict";var n,o,i,s=r(28),a=r(2),c=r(7),u=r(21),l=r(23),p=r(9),d=(r(3),r(14)),f=r(38),h=r(40),_=(r(58).set,r(60)),v=r(30).set,m=r(48)(),E="Promise",g=a.TypeError,y=a.process,b=a[E],O="process"==u(y=a.process),A=function(){},w=!!function(){try{var e=b.resolve(1),t=(e.constructor={})[r(1)("species")]=function(e){e(A,A)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(A)instanceof t}catch(e){}}(),C=function(e,t){return e===t||e===b&&t===i},I=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},S=function(e){return C(b,e)?new P(e):new o(e)},P=o=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw g("Bad Promise constructor");t=e,r=n})),this.resolve=d(t),this.reject=d(r)},L=function(e){try{e()}catch(e){return{error:e}}},T=function(e,t){if(!e._n){e._n=!0;var r=e._c;m((function(){for(var n=e._v,o=1==e._s,i=0,s=function(t){var r,i,s=o?t.ok:t.fail,a=t.resolve,c=t.reject,u=t.domain;try{s?(o||(2==e._h&&x(e),e._h=1),!0===s?r=n:(u&&u.enter(),r=s(n),u&&u.exit()),r===t.promise?c(g("Promise-chain cycle")):(i=I(r))?i.call(r,a,c):a(r)):c(n)}catch(e){c(e)}};r.length>i;)s(r[i++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){v.call(a,(function(){var t,r,n,o=e._v;if(D(e)&&(t=L((function(){O?y.emit("unhandledRejection",o,e):(r=a.onunhandledrejection)?r({promise:e,reason:o}):(n=a.console)&&n.error&&n.error("Unhandled promise rejection",o)})),e._h=O||D(e)?2:1),e._a=void 0,t)throw t.error}))},D=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;)if((t=r[n++]).fail||!D(t.promise))return!1;return!0},x=function(e){v.call(a,(function(){var t;O?y.emit("rejectionHandled",e):(t=a.onrejectionhandled)&&t({promise:e,reason:e._v})}))},j=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},N=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw g("Promise can't be resolved itself");(t=I(e))?m((function(){var n={_w:r,_d:!1};try{t.call(e,c(N,n,1),c(j,n,1))}catch(e){j.call(n,e)}})):(r._v=e,r._s=1,T(r,!1))}catch(e){j.call({_w:r,_d:!1},e)}}};w||(b=function(e){f(this,b,E,"_h"),d(e),n.call(this);try{e(c(N,this,1),c(j,this,1))}catch(e){j.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(56)(b.prototype,{then:function(e,t){var r=S(_(this,b));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=O?y.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&T(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),P=function(){var e=new n;this.promise=e,this.resolve=c(N,e,1),this.reject=c(j,e,1)}),l(l.G+l.W+l.F*!w,{Promise:b}),r(18)(b,E),r(59)(E),i=r(6)[E],l(l.S+l.F*!w,E,{reject:function(e){var t=S(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(s||!w),E,{resolve:function(e){if(e instanceof b&&C(e.constructor,this))return e;var t=S(this);return(0,t.resolve)(e),t.promise}}),l(l.S+l.F*!(w&&r(46)((function(e){b.all(e).catch(A)}))),E,{all:function(e){var t=this,r=S(t),n=r.resolve,o=r.reject,i=L((function(){var r=[],i=0,s=1;h(e,!1,(function(e){var a=i++,c=!1;r.push(void 0),s++,t.resolve(e).then((function(e){c||(c=!0,r[a]=e,--s||n(r))}),o)})),--s||n(r)}));return i&&o(i.error),r.promise},race:function(e){var t=this,r=S(t),n=r.reject,o=L((function(){h(e,!1,(function(e){t.resolve(e).then(r.resolve,n)}))}));return o&&n(o.error),r.promise}})},function(e,t,r){"use strict";var n=r(61)(!0);r(27)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){r(65);for(var n=r(2),o=r(5),i=r(10),s=r(1)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var u=a[c],l=n[u],p=l&&l.prototype;p&&!p[s]&&o(p,s,u),i[u]=i.Array}},function(e,t){e.exports=r(2081)},function(e,t){e.exports=r(6113)}]))},3152:(e,t,r)=>{"use strict";var n=r(7310).parse,o={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},i=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function s(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}t.getProxyForUrl=function(e){var t="string"==typeof e?n(e):e||{},r=t.protocol,a=t.host,c=t.port;if("string"!=typeof a||!a||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!function(e,t){var r=(s("npm_config_no_proxy")||s("no_proxy")).toLowerCase();return!r||"*"!==r&&r.split(/[,\s]/).every((function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),o=n?n[1]:r,s=n?parseInt(n[2]):0;return!(!s||s===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!i.call(e,o)):e!==o)}))}(a=a.replace(/:\d*$/,""),c=parseInt(c)||o[r]||0))return"";var u=s("npm_config_"+r+"_proxy")||s(r+"_proxy")||s("npm_config_proxy")||s("all_proxy");return u&&-1===u.indexOf("://")&&(u=r+"://"+u),u}},7013:(e,t,r)=>{"use strict";const n=r(2037),o=r(6224),i=r(8137),{env:s}=process;let a;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u(e,t){if(0===a)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===a)return 0;const r=a||0;if("dumb"===s.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in s))||"codeship"===s.CI_NAME?1:r;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:r}i("no-color")||i("no-colors")||i("color=false")||i("color=never")?a=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(a=1),"FORCE_COLOR"in s&&(a="true"===s.FORCE_COLOR?1:"false"===s.FORCE_COLOR?0:0===s.FORCE_COLOR.length?1:Math.min(parseInt(s.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(u(e,e&&e.isTTY))},stdout:c(u(!0,o.isatty(1))),stderr:c(u(!0,o.isatty(2)))}},1681:(e,t,r)=>{e.exports=r(7955)},7955:(e,t,r)=>{"use strict";r(1808);var n,o=r(4404),i=r(3685),s=r(5687),a=r(2361),c=(r(9491),r(3837));function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||i.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=p(r,n,o),s=0,a=t.requests.length;s<a;++s){var c=t.requests[s];if(c.host===i.host&&c.port===i.port)return t.requests.splice(s,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var r=this;u.prototype.createSocket.call(r,e,(function(n){var i=e.request.getHeader("host"),s=d({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),a=o.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a,t(a)}))}function p(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function d(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,s=o.length;i<s;++i){var a=o[i];void 0!==n[a]&&(e[a]=n[a])}}return e}t.httpOverHttp=function(e){var t=new u(e);return t.request=i.request,t},t.httpsOverHttp=function(e){var t=new u(e);return t.request=i.request,t.createSocket=l,t.defaultPort=443,t},t.httpOverHttps=function(e){var t=new u(e);return t.request=s.request,t},t.httpsOverHttps=function(e){var t=new u(e);return t.request=s.request,t.createSocket=l,t.defaultPort=443,t},c.inherits(u,a.EventEmitter),u.prototype.addRequest=function(e,t,r,n){var o=this,i=d({request:e},o.options,p(t,r,n));o.sockets.length>=this.maxSockets?o.requests.push(i):o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)}))},u.prototype.createSocket=function(e,t){var r=this,o={};r.sockets.push(o);var i=d({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),n("making CONNECT request");var s=r.request(i);function a(i,a,c){var u;return s.removeAllListeners(),a.removeAllListeners(),200!==i.statusCode?(n("tunneling socket could not be established, statusCode=%d",i.statusCode),a.destroy(),(u=new Error("tunneling socket could not be established, statusCode="+i.statusCode)).code="ECONNRESET",e.request.emit("error",u),void r.removeSocket(o)):c.length>0?(n("got illegal response body from proxy"),a.destroy(),(u=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",u),void r.removeSocket(o)):(n("tunneling connection has established"),r.sockets[r.sockets.indexOf(o)]=a,t(a))}s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,r){process.nextTick((function(){a(e,t,r)}))})),s.once("connect",a),s.once("error",(function(t){s.removeAllListeners(),n("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, cause="+t.message);i.code="ECONNRESET",e.request.emit("error",i),r.removeSocket(o)})),s.end()},u.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},n=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=n},9698:(e,t,r)=>{var n;e.exports=function(){if(!n){try{n=r(445)("follow-redirects")}catch(e){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},4940:(e,t,r)=>{var n=r(7310),o=n.URL,i=r(3685),s=r(5687),a=r(2781).Writable,c=r(9491),u=r(9698),l=!1;try{c(new o)}catch(e){l="ERR_INVALID_URL"===e.code}var p=["auth","host","hostname","href","path","pathname","port","protocol","query","search"],d=["abort","aborted","connect","error","socket","timeout"],f=Object.create(null);d.forEach((function(e){f[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var h=S("ERR_INVALID_URL","Invalid URL",TypeError),_=S("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),v=S("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_),m=S("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),E=S("ERR_STREAM_WRITE_AFTER_END","write after end"),g=a.prototype.destroy||O;function y(e,t){a.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 r=this;this._onNativeResponse=function(e){try{r._processResponse(e)}catch(e){r.emit("error",e instanceof _?e:new _({cause:e}))}},this._performRequest()}function b(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",s=r[i]=e[n],a=t[n]=Object.create(s);Object.defineProperties(a,{request:{value:function(e,n,s){return o&&e instanceof o?e=C(e):L(e)?e=C(A(e)):(s=n,n=w(e),e={protocol:i}),T(n)&&(s=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,L(n.host)||L(n.hostname)||(n.hostname="::1"),c.equal(n.protocol,i,"protocol mismatch"),u("options",n),new y(n,s)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=a.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function O(){}function A(e){var t;if(l)t=new o(e);else if(!L((t=w(n.parse(e))).protocol))throw new h({input:e});return t}function w(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new h({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new h({input:e.href||e});return e}function C(e,t){var r=t||{};for(var n of p)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),""!==r.port&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function I(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function S(e,t,r){function n(r){Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function P(e,t){for(var r of d)e.removeListener(r,f[r]);e.on("error",O),e.destroy(t)}function L(e){return"string"==typeof e||e instanceof String}function T(e){return"function"==typeof e}y.prototype=Object.create(a.prototype),y.prototype.abort=function(){P(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},y.prototype.destroy=function(e){return P(this._currentRequest,e),g.call(this,e),this},y.prototype.write=function(e,t,r){if(this._ending)throw new E;if(!(L(e)||"object"==typeof(n=e)&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");var n;T(t)&&(r=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,r)):(this.emit("error",new m),this.abort()):r&&r()},y.prototype.end=function(e,t,r){if(T(e)?(r=e,e=t=null):T(t)&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},y.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},y.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},y.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),i()}),e),n(t)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){y.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(y.prototype,e,{get:function(){return this._currentRequest[e]}})})),y.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))}},y.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 r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,d))o.on(i,f[i]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var s=0,a=this,c=this._requestBodyBuffers;!function e(t){if(o===a._currentRequest)if(t)a.emit("error",t);else if(s<c.length){var r=c[s++];o.finished||o.write(r.data,r.encoding,e)}else a._ended&&o.end()}()}},y.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r,i=e.headers.location;if(!i||!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(P(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new v;var s=this._options.beforeRedirect;s&&(r=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=[],I(/^content-/i,this._options.headers));var p,d,f=I(/^host$/i,this._options.headers),h=A(this._currentUrl),_=f||h.host,m=/^\w+:/.test(i)?this._currentUrl:n.format(Object.assign(h,{host:_})),E=(p=i,d=m,l?new o(p,d):A(n.resolve(d,p)));if(u("redirecting to",E.href),this._isRedirect=!0,C(E,this._options),(E.protocol!==h.protocol&&"https:"!==E.protocol||E.host!==_&&!function(e,t){c(L(e)&&L(t));var r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(E.host,_))&&I(/^(?:authorization|cookie)$/i,this._options.headers),T(s)){var g={headers:e.headers,statusCode:t},y={url:m,method:a,headers:r};s(this._options,g,y),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=b({http:i,https:s}),e.exports.wrap=b},8783:(e,t,r)=>{const n=r(2361).EventEmitter,o=r(2081).spawn,i=r(1017),s=r(7147);class a{constructor(e,t){this.flags=e,this.required=e.indexOf("<")>=0,this.optional=e.indexOf("[")>=0,this.mandatory=!1,this.negate=-1!==e.indexOf("-no-");const r=e.split(/[ ,|]+/);r.length>1&&!/^[[<]/.test(r[1])&&(this.short=r.shift()),this.long=r.shift(),this.description=t||"",this.defaultValue=void 0}name(){return this.long.replace(/^--/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}}class c extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}class u extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._args=[],this.rawArgs=null,this._scriptPath=null,this._name=e||"",this._optionValues={},this._storeOptionsAsProperties=!0,this._passCommandToAction=!0,this._actionResults=[],this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._hidden=!1,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._hasImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command"}command(e,t,r){let n=t,o=r;"object"==typeof n&&null!==n&&(o=n,n=null),o=o||{};const i=e.split(/ +/),s=this.createCommand(i.shift());return n&&(s.description(n),s._executableHandler=!0),o.isDefault&&(this._defaultCommandName=s._name),s._hidden=!(!o.noHelp&&!o.hidden),s._helpFlags=this._helpFlags,s._helpDescription=this._helpDescription,s._helpShortFlag=this._helpShortFlag,s._helpLongFlag=this._helpLongFlag,s._helpCommandName=this._helpCommandName,s._helpCommandnameAndArgs=this._helpCommandnameAndArgs,s._helpCommandDescription=this._helpCommandDescription,s._exitCallback=this._exitCallback,s._storeOptionsAsProperties=this._storeOptionsAsProperties,s._passCommandToAction=this._passCommandToAction,s._executableFile=o.executableFile||null,this.commands.push(s),s._parseExpectedArgs(i),s.parent=this,n?this:s}createCommand(e){return new u(e)}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name");return function e(t){t.forEach((t=>{if(t._executableHandler&&!t._executableFile)throw new Error(`Must specify executableFile for deeply nested executable: ${t.name()}`);e(t.commands)}))}(e.commands),(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}arguments(e){return this._parseExpectedArgs(e.split(/ +/))}addHelpCommand(e,t){return!1===e?this._hasImplicitHelpCommand=!1:(this._hasImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_lazyHasImplicitHelpCommand(){return void 0===this._hasImplicitHelpCommand&&(this._hasImplicitHelpCommand=this.commands.length&&!this._actionHandler&&!this._findCommand("help")),this._hasImplicitHelpCommand}_parseExpectedArgs(e){if(e.length)return e.forEach((e=>{const t={required:!1,name:"",variadic:!1};switch(e[0]){case"<":t.required=!0,t.name=e.slice(1,-1);break;case"[":t.name=e.slice(1,-1)}t.name.length>3&&"..."===t.name.slice(-3)&&(t.variadic=!0,t.name=t.name.slice(0,-3)),t.name&&this._args.push(t)})),this._args.forEach(((e,t)=>{if(e.variadic&&t<this._args.length-1)throw new Error(`only the last argument can be variadic '${e.name}'`)})),this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new c(e,t,r)),process.exit(e)}action(e){return this._actionHandler=t=>{const r=this._args.length,n=t.slice(0,r);this._passCommandToAction?n[r]=this:n[r]=this.opts(),t.length>r&&n.push(t.slice(r));const o=e.apply(this,n);let i=this;for(;i.parent;)i=i.parent;i._actionResults.push(o)},this}_optionEx(e,t,r,n,o){const i=new a(t,r),s=i.name(),c=i.attributeName();if(i.mandatory=!!e.mandatory,"function"!=typeof n)if(n instanceof RegExp){const e=n;n=(t,r)=>{const n=e.exec(t);return n?n[0]:r}}else o=n,n=null;if(i.negate||i.optional||i.required||"boolean"==typeof o){if(i.negate){const e=i.long.replace(/^--no-/,"--");o=!this._findOption(e)||this._getOptionValue(c)}void 0!==o&&(this._setOptionValue(c,o),i.defaultValue=o)}return this.options.push(i),this.on("option:"+s,(e=>{null!==e&&n&&(e=n(e,void 0===this._getOptionValue(c)?o:this._getOptionValue(c))),"boolean"==typeof this._getOptionValue(c)||void 0===this._getOptionValue(c)?null==e?this._setOptionValue(c,!i.negate&&(o||!0)):this._setOptionValue(c,e):null!==e&&this._setOptionValue(c,!i.negate&&e)})),this}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}allowUnknownOption(e){return this._allowUnknownOption=void 0===e||e,this}storeOptionsAsProperties(e){if(this._storeOptionsAsProperties=void 0===e||e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}passCommandToAction(e){return this._passCommandToAction=void 0===e||e,this}_setOptionValue(e,t){this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t}_getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}parse(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let r;switch(t=t||{},void 0===e&&(e=process.argv,process.versions&&process.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":process.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._scriptPath&&process.mainModule&&(this._scriptPath=process.mainModule.filename),this._name=this._name||this._scriptPath&&i.basename(this._scriptPath,i.extname(this._scriptPath)),this._parseCommand([],r),this}parseAsync(e,t){return this.parse(e,t),Promise.all(this._actionResults).then((()=>this))}_executeSubCommand(e,t){t=t.slice();let r=!1;const n=[".js",".ts",".mjs"];this._checkForMissingMandatoryOptions();const a=this._scriptPath;let u;try{const e=s.realpathSync(a);u=i.dirname(e)}catch(e){u="."}let l=i.basename(a,i.extname(a))+"-"+e._name;e._executableFile&&(l=e._executableFile);const p=i.join(u,l);let d;s.existsSync(p)?l=p:n.forEach((e=>{s.existsSync(`${p}${e}`)&&(l=`${p}${e}`)})),r=n.includes(i.extname(l)),"win32"!==process.platform?r?(t.unshift(l),t=_(process.execArgv).concat(t),d=o(process.argv[0],t,{stdio:"inherit"})):d=o(l,t,{stdio:"inherit"}):(t.unshift(l),t=_(process.execArgv).concat(t),d=o(process.execPath,t,{stdio:"inherit"})),["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{process.on(e,(()=>{!1===d.killed&&null===d.exitCode&&d.kill(e)}))}));const f=this._exitCallback;f?d.on("close",(()=>{f(new c(process.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):d.on("close",process.exit.bind(process)),d.on("error",(t=>{if("ENOENT"===t.code){const t=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(t)}if("EACCES"===t.code)throw new Error(`'${l}' not executable`);if(f){const e=new c(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,f(e)}else process.exit(1)})),this.runningCommand=d}_dispatchSubcommand(e,t,r){const n=this._findCommand(e);n||this._helpAndError(),n._executableHandler?this._executeSubCommand(n,t.concat(r)):n._parseCommand(t,r)}_parseCommand(e,t){const r=this.parseOptions(t);if(e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))this._dispatchSubcommand(e[0],e.slice(1),t);else if(this._lazyHasImplicitHelpCommand()&&e[0]===this._helpCommandName)1===e.length?this.help():this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);else if(this._defaultCommandName)f(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);else if(!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this._helpAndError(),f(this,r.unknown),this._checkForMissingMandatoryOptions(),r.unknown.length>0&&this.unknownOption(r.unknown[0]),this._actionHandler){const r=this.args.slice();this._args.forEach(((e,t)=>{e.required&&null==r[t]?this.missingArgument(e.name):e.variadic&&(r[t]=r.splice(t))})),this._actionHandler(r),this.emit("command:"+this.name(),e,t)}else e.length?this._findCommand("*")?this._dispatchSubcommand("*",e,t):this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length&&this.unknownCommand():this.commands.length&&this._helpAndError()}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e._getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}parseOptions(e){const t=[],r=[];let n=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}for(;o.length;){const e=o.shift();if("--"===e){n===r&&n.push(e),n.push(...o);break}if(i(e)){const t=this._findOption(e);if(t){if(t.required){const e=o.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;o.length>0&&!i(o[0])&&(e=o.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),r=this._findOption(e.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,e.slice(t+1));continue}}e.length>1&&"-"===e[0]&&(n=r),n.push(e)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let r=0;r<t;r++){const t=this.options[r].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}missingArgument(e){const t=`error: missing required argument '${e}'`;console.error(t),this._exit(1,"commander.missingArgument",t)}optionMissingArgument(e,t){let r;r=t?`error: option '${e.flags}' argument missing, got '${t}'`:`error: option '${e.flags}' argument missing`,console.error(r),this._exit(1,"commander.optionMissingArgument",r)}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;console.error(t),this._exit(1,"commander.missingMandatoryOptionValue",t)}unknownOption(e){if(this._allowUnknownOption)return;const t=`error: unknown option '${e}'`;console.error(t),this._exit(1,"commander.unknownOption",t)}unknownCommand(){const e=[this.name()];for(let t=this.parent;t;t=t.parent)e.unshift(t.name());const t=e.join(" "),r=`error: unknown command '${this.args[0]}'. See '${t} ${this._helpLongFlag}'.`;console.error(r),this._exit(1,"commander.unknownCommand",r)}version(e,t,r){if(void 0===e)return this._version;this._version=e;const n=new a(t=t||"-V, --version",r=r||"output the version number");return this._versionOptionName=n.long.substr(2)||"version",this.options.push(n),this.on("option:"+this._versionOptionName,(()=>{process.stdout.write(e+"\n"),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,this._argsDescription=t,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>h(e)));return"[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}prepareCommands(){const e=this.commands.filter((e=>!e._hidden)).map((e=>{const t=e._args.map((e=>h(e))).join(" ");return[e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:""),e._description]}));return this._lazyHasImplicitHelpCommand()&&e.push([this._helpCommandnameAndArgs,this._helpCommandDescription]),e}largestCommandLength(){return this.prepareCommands().reduce(((e,t)=>Math.max(e,t[0].length)),0)}largestOptionLength(){const e=[].slice.call(this.options);return e.push({flags:this._helpFlags}),e.reduce(((e,t)=>Math.max(e,t.flags.length)),0)}largestArgLength(){return this._args.reduce(((e,t)=>Math.max(e,t.name.length)),0)}padWidth(){let e=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>e&&(e=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>e&&(e=this.largestCommandLength()),e}optionHelp(){const e=this.padWidth(),t=(process.stdout.columns||80)-e-4;function r(r,n){return l(r,e)+" "+d(n,t,e+2)}const n=this.options.map((e=>{const t=e.description+(e.negate||void 0===e.defaultValue?"":" (default: "+JSON.stringify(e.defaultValue)+")");return r(e.flags,t)})),o=this._helpShortFlag&&!this._findOption(this._helpShortFlag),i=!this._findOption(this._helpLongFlag);if(o||i){let e=this._helpFlags;o?i||(e=this._helpShortFlag):e=this._helpLongFlag,n.push(r(e,this._helpDescription))}return n.join("\n")}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";const e=this.prepareCommands(),t=this.padWidth(),r=(process.stdout.columns||80)-t-4;return["Commands:",e.map((e=>{const n=e[1]?" "+e[1]:"";return(n?l(e[0],t):e[0])+d(n,r,t+2)})).join("\n").replace(/^/gm," "),""].join("\n")}helpInformation(){let e=[];if(this._description){e=[this._description,""];const t=this._argsDescription;if(t&&this._args.length){const r=this.padWidth(),n=(process.stdout.columns||80)-r-5;e.push("Arguments:"),e.push(""),this._args.forEach((o=>{e.push(" "+l(o.name,r)+" "+p(t[o.name],n,r+4))})),e.push("")}}let t=this._name;this._aliases[0]&&(t=t+"|"+this._aliases[0]);let r="";for(let e=this.parent;e;e=e.parent)r=e.name()+" "+r;const n=["Usage: "+r+t+" "+this.usage(),""];let o=[];const i=this.commandHelp();i&&(o=[i]);const s=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return n.concat(e).concat(s).concat(o).join("\n")}outputHelp(e){e||(e=e=>e);const t=e(this.helpInformation());if("string"!=typeof t&&!Buffer.isBuffer(t))throw new Error("outputHelp callback must return a string or a Buffer");process.stdout.write(t),this.emit(this._helpLongFlag)}helpOption(e,t){this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const r=this._helpFlags.split(/[ ,|]+/);return this._helpShortFlag=void 0,r.length>1&&(this._helpShortFlag=r.shift()),this._helpLongFlag=r.shift(),this}help(e){this.outputHelp(e),this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp(),this._exit(1,"commander.help","(outputHelp)")}}function l(e,t){const r=Math.max(0,t-e.length);return e+Array(r+1).join(" ")}function p(e,t,r){const n=new RegExp(".{1,"+(t-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g");return(e.match(n)||[]).map(((e,t)=>("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0&&r?Array(r+1).join(" "):"")+e.trimRight()))).join("\n")}function d(e,t,r){return e.match(/[\n]\s+/)||t<40?e:p(e,t,r)}function f(e,t){t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function h(e){const t=e.name+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}function _(e){return e.map((e=>{let t=e;if(0===e.indexOf("--inspect")){let r,n,o="127.0.0.1",i="9229";null!==(n=e.match(/^(--inspect(-brk)?)$/))?r=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(r=n[1],/^\d+$/.test(n[3])?i=n[3]:o=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(r=n[1],o=n[3],i=n[4]),r&&"0"!==i&&(t=`${r}=${o}:${parseInt(i)+1}`)}return t}))}(t=e.exports=new u).program=t,t.Command=u,t.Option=a,t.CommanderError=c},2747:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodeError=t.SchemaError=t.CompileError=t.UploadError=t.CompressError=t.PackageSizeError=t.ProjectError=t.HashError=t.MetaError=t.LoginError=t.IDE_ERROR_LEVEL=void 0,t.IDE_ERROR_LEVEL={p0:"p0",p1:"p1",p2:"p2",p3:"p3"};var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Login Error",t}return n(t,e),t}(Error);t.LoginError=o;var i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Meta Error",t}return n(t,e),t}(Error);t.MetaError=i;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Hash Error",t}return n(t,e),t}(Error);t.HashError=s;var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Project Error",t}return n(t,e),t}(Error);t.ProjectError=a;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="PackageSize Error",t}return n(t,e),t}(Error);t.PackageSizeError=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Compress Error",t}return n(t,e),t}(Error);t.CompressError=u;var l=function(e){function t(t,r){void 0===r&&(r=-1);var n=e.call(this,t)||this;return n.name="Upload Error",n.code=r,n}return n(t,e),t}(Error);t.UploadError=l;var p=function(e){function t(t,r,n){void 0===r&&(r=""),void 0===n&&(n=0);var o=e.call(this,t)||this;return o.name="Compile Error",o.errLink=r,o.code=n,o}return n(t,e),t}(Error);t.CompileError=p;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="Schema Error",t}return n(t,e),t}(Error);t.SchemaError=d;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="QRCode Error",t}return n(t,e),t}(Error);t.QRCodeError=f},2139:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.FRONT_PAGE_EVENT=t.IDE_PERFORMANCE_EVENTS=t.IDE_TIMELINE_NAMES=t.IDE_MODULES=t.SLARDAR_EVENT=void 0;var o=r(8039);t.SLARDAR_EVENT=n(n(n({},o.UPDATE_SLARDAR_EVENTS),o.UPDATE_SLARDAR_EVENTS_TECH),{VELA_CLICK_PREVIEW:"VELA_CLICK_PREVIEW",VELA_PREVIEW_FAIL:"VELA_PREVIEW_FAIL",VELA_CLICK_UPLOAD:"VELA_CLICK_UPLOAD",UPLOAD_VERSION_FOCUS:"UPLOAD_VERSION_FOCUS",UPLOAD_VERSION_ERROR:"UPLOAD_VERSION_ERROR",VELA_UPLOAD_FAIL:"VELA_UPLOAD_FAIL",VELA_SHOW_INIT_VIEW_TIME:"VELA_SHOW_INIT_VIEW_TIME",VELA_PREVIEW_TIME:"VELA_PREVIEW_TIME",VELA_UPLOAD_TIME:"VELA_UPLOAD_TIME",VELA_COMPILE_FIRST_END:"VELA_COMPILE_FIRST_END",VELA_COMPILE_TIME:"VELA_COMPILE_TIME",IDE_COMPILE_PERFORMANCE:"IDE_COMPILE_PERFORMANCE",IDE_COMPILE_RESULT:"IDE_COMPILE_RESULT",VELA_SIMULATOR_RENDER_TIME:"VELA_SIMULATOR_RENDER_TIME",VELA_SIMULATOR_FIRST_RENDER_SUCCESS:"VELA_SIMULATOR_FIRST_RENDER_SUCCESS",VELA_AUDIT_SCORE:"VELA_AUDIT_SCORE",MENU_BAR_DEBUG_SETTING_SAVE:"MENU_BAR_DEBUG_SETTING_SAVE",MENU_BAR_DEBUG_SETTING_SAVE_FAIL:"MENU_BAR_DEBUG_SETTING_SAVE_FAIL",MENU_BAR_DEBUG_APPLY_TEST_TMA:"MENU_BAR_DEBUG_APPLY_TEST_TMA",MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL:"MENU_BAR_DEBUG_APPLY_TEST_TMA_FAIL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL",MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_PAGE_FRAME_DEVTOOL_FAIL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL",MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL:"MENU_BAR_DEBUG_OPEN_SIMULATOR_DEVTOOL_FAIL",MENU_BAR_DEBUG_APPLY_BOE:"MENU_BAR_DEBUG_APPLY_BOE",MENU_BAR_DEBUG_APPLY_BOE_FAIL:"MENU_BAR_DEBUG_APPLY_BOE_FAIL",MENU_BAR_DEBUG_APPLY_PPE:"MENU_BAR_DEBUG_APPLY_PPE",MENU_BAR_DEBUG_APPLY_PPE_FAIL:"MENU_BAR_DEBUG_APPLY_PPE_FAIL",VELA_POST_MESSAGE_LIST:"VELA_POST_MESSAGE_LIST",VELA_POST_MESSAGE_LIST_FAIL:"VELA_POST_MESSAGE_LIST_FAIL",VELA_AVATAR_LOGOUT:"VELA_AVATAR_LOGOUT",VELA_AVATAR_LOGOUT_FAIL:"VELA_AVATAR_LOGOUT_FAIL",VELA_CLEAR_ALL_SESSION:"VELA_CLEAR_ALL_SESSION",VELA_CLEAR_ALL_SESSION_FAIL:"VELA_CLEAR_ALL_SESSION_FAIL",VELA_CLEAR_DATA_SESSION:"VELA_CLEAR_DATA_SESSION",VELA_CLEAR_DATA_SESSION_FAIL:"VELA_CLEAR_DATA_SESSION_FAIL",VELA_CLEAR_LOGIN_SESSION:"VELA_CLEAR_LOGIN_SESSION",VELA_CLEAR_LOGIN_SESSION_FAIL:"VELA_CLEAR_LOGIN_SESSION_FAIL",VELA_CLEAR_AUTH_SESSION:"VELA_CLEAR_AUTH_SESSION",VELA_CLEAR_AUTH_SESSION_FAIL:"VELA_CLEAR_AUTH_SESSION_FAIL",VELA_ADD_COMPILE_MODE:"VELA_ADD_COMPILE_MODE",VELA_ADD_COMPILE_MODE_FAIL:"VELA_ADD_COMPILE_MODE_FAIL",VELA_COMPILE:"VELA_COMPILE",VELA_COMPILE_FAIL:"VELA_COMPILE_FAIL",VELA_CHANGE_COMPILE_MODE:"VELA_CHANGE_COMPILE_MODE",VELA_CHANGE_COMPILE_MODE_FAIL:"VELA_CHANGE_COMPILE_MODE_FAIL",VELA_SELECT_SDK:"VELA_SELECT_SDK",VELA_SELECT_SDK_FAIL:"VELA_SELECT_SDK_FAIL",VELA_CLICK_CONVERT_TOOL:"VELA_CLICK_CONVERT_TOOL",VELA_CONVERT_EMIT:"VELA_CONVERT_EMIT",VELA_OPEN_PROJECT_FROM_CONVERT_TOOL:"VELA_OPEN_PROJECT_FROM_CONVERT_TOOL",VELA_BUILD_NPM:"VELA_BUILD_NPM",VELA_BUILD_NPM_FAIL:"VELA_BUILD_NPM_FAIL",PACKAGE_SIZE:"PACKAGE_SIZE",UPLOAD_SUCCESS_EVENT:"UPLOAD_SUCCESS_EVENT",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CONFIRM",SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL:"SIMULATOR_SHARE_DEBUG_COMPILATION_MODE_CHANGE_CANCEL",IDE_GET_SDK_LIST_FAIL:"IDE_GET_SDK_LIST_FAIL",IDE_REQUEST_START:"IDE_REQUEST_START",IDE_REQUEST_FAIL:"IDE_REQUEST_FAIL",IDE_COLOR_THEME:"IDE_COLOR_THEME",IDE_CODE_WINDOW_ERROR:"IDE_CODE_WINDOW_ERROR",IDE_HELP_DEVELOPER_COMMUNITY:"IDE_HELP_DEVELOPER_COMMUNITY",IDE_MESSAGE_EXPAND_CLICK:"IDE_MESSAGE_EXPAND_CLICK",IDE_MODULE_CLICK:"IDE_MODULE_CLICK",IDE_MODULE_USAGE:"IDE_MODULE_USAGE",IDE_MODULE_LOADTIME:"IDE_MODULE_LOADTIME",IDE_MODULE_PERFORMANCE:"IDE_MODULE_PERFORMANCE",IDE_PERFORMANCE:"IDE_PERFORMANCE",IDE_DEVICE_INFO_DISPLAY:"IDE_DEVICE_INFO_DISPLAY",IDE_DEVICE_INFO_CPU:"IDE_DEVICE_INFO_CPU",IDE_DEVICE_INFO_OS:"IDE_DEVICE_INFO_OS",IDE_SIMULATOR_LOAD_TIME:"IDE_SIMULATOR_LOAD_TIME",IDE_MENU_CLICK:"IDE_MENU_CLICK",IDE_LANGUAGE:"IDE_LANGUAGE",IDE_ROOM_SERVICE_TRACE:"IDE_ROOM_SERVICE_TRACE",IDE_UPDATE_STEP_ERROR:"IDE_UPDATE_STEP_ERROR",IDE_SCENE_START:"IDE_SCENE_START",IDE_SCENE_END:"IDE_SCENE_END",IDE_APPID_SELECT:"IDE_APPID_SELECT",IDE_APPID_CHANGE:"IDE_APPID_CHANGE",IDE_FMP_BREAKDOWN:"IDE_FMP_BREAKDOWN",IDE_JS_LONG_TASK:"IDE_JS_LONG_TASK",IDE_INP_INFO:"IDE_INP_INFO",IDE_LOW_FPS:"IDE_LOW_FPS",IDE_LOW_MEMORY:"IDE_LOW_MEMORY",IDE_FETCH_ADMIN_XCONFIG_TMAR:"IDE_FETCH_ADMIN_XCONFIG_TMAR",IDE_BIG_PACKAGESIZE_CHECK:"IDE_BIG_PACKAGESIZE_CHECK",IDE_WORKBENCH_WILL_RENDER:"IDE_WORKBENCH_WILL_RENDER",IDE_WORKBENCH_RENDERED:"IDE_WORKBENCH_RENDERED",IDE_CODE_WINDOW_NUM:"IDE_CODE_WINDOW_NUM",IDE_NEW_CODE_WINDOW:"IDE_NEW_CODE_WINDOW",IDE_DETAIL_PANEL_OPENED:"IDE_DETAIL_PANEL_OPENED",IDE_DETAIL_PANEL_CLOSED:"IDE_DETAIL_PANEL_CLOSED",IDE_SETTING_PAGE_SHOW:"IDE_SETTING_PAGE_SHOW",IDE_SETTING_PAGE_OPERATION:"IDE_SETTING_PAGE_OPERATION",IDE_SETTING_CHANGE_LITE_MODE:"IDE_SETTING_CHANGE_LITE_MODE:",IDE_MODULE_CLICK_AUTH_REG:"IDE_MODULE_CLICK_AUTH_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_REG:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REG",IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL:"IDE_MODULE_CLICK_AUTH_UNREGPOP_CANCEL",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGIN",IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC:"IDE_MODULE_CLICK_AUTH_UNREGPOP_LOGSUCC",IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS:"IDE_MODULE_CLICK_AUTH_UNREGPOP_FORGETPASS",IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY:"IDE_MODULE_CLICK_AUTH_UNREGPOP_GETVERY",IDE_MODULE_AUTH_SCAN_QRCODE:"IDE_MODULE_AUTH_SCAN_QRCODE",IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON:"IDE_MODULE_CLICK_AUTH_LOGIN_BUTTON",IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_REFQRCODE",IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE:"IDE_MODULE_CLICK_AUTH_UNREGPOP_DUEQRCODE",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",IDE_FRONTPAGE_PM_LIST:"IDE_FRONTPAGE_PM_LIST",CREATE_PROGRAM:"CREATE_PROGRAM",IDE_WXTOTT_ERROR:"IDE_WXTOTT_ERROR",IDE_SCENE_USER_OPERATE:"IDE_SCENE_USER_OPERATE",IDE_TEMPLATE_HOVER:"IDE_TEMPLATE_HOVER",IDE_TEMPLATE_DETAIL:"IDE_TEMPLATE_DETAIL",IDE_TEMPLATE_ERROR:"IDE_TEMPLATE_ERROR",IDE_TEMPLATE_DOWNLOAD:"IDE_TEMPLATE_DOWNLOAD",IDE_QUICK_JS_ERROR:"IDE_QUICK_JS_ERROR",IDE_REMOTE_DEBUG_CONNECTION_QUALITY:"IDE_REMOTE_DEBUG_CONNECTION_QUALITY",IDE_LOCAL_COMPILE_TRACE:"IDE_LOCAL_COMPILE_TRACE",IDE_REMOTE_DEBUG_EXCEPTION:"IDE_REMOTE_DEBUG_EXCEPTION",IDE_MODULE_AUTH_FORCE_LOGOUT:"IDE_MODULE_AUTH_FORCE_LOGOUT",IDE_CANVAS_WEBGL_CONTEXT_ENABLE:"IDE_CANVAS_WEBGL_CONTEXT_ENABLE",IDE_LOGIN_DATA_FORMAT:"IDE_LOGIN_DATA_FORMAT",IDE_IS_ENCRYPTION_AVAILABLE:"IDE_IS_ENCRYPTION_AVAILABLE",IDE_ADD_COMPILE_MODE:"IDE_ADD_COMPILE_MODE",IDE_DECODE_QRCODE:"IDE_DECODE_QRCODE",IDE_DECODE_URL:"IDE_DECODE_URL",IDE_MAIN_HELPER_FORK_TIME:"IDE_MAIN_HELPER_FORK_TIME",IDE_MAIN_HELPER_ERROR:"IDE_MAIN_HELPER_ERROR",IDE_INSTALL_PATH:"IDE_INSTALL_PATH",IDE_SWITCH_WORKBENCH_MODE:"IDE_SWITCH_WORKBENCH_MODE",IDE_TOGGLE_REMOTE_VIEW:"IDE_TOGGLE_REMOTE_VIEW",IDE_SIMULATOR_PAUSE_MINIAPP:"IDE_SIMULATOR_PAUSE_MINIAPP",IDE_SIMULATOR_REFRESH_MINIAPP:"IDE_SIMULATOR_REFRESH_MINIAPP",IDE_SIMULATOR_REFRESH:"IDE_SIMULATOR_REFRESH",IDE_SIMULATOR_CLICK_LITE_BANNER:"IDE_SIMULATOR_CLICK_LITE_BANNER",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER",IDE_LITE_NOTICE_MODAL_SHOW:"IDE_LITE_NOTICE_MODAL_SHOW",IDE_LITE_NOTICE_MODAL_CLICK:"IDE_LITE_NOTICE_MODAL_CLICK",IDE_WB_SCENE_START:"IDE_WB_SCENE_START",IDE_WB_SCENE_END:"IDE_WB_SCENE_END",IDE_GECKO_ERROR:"IDE_GECKO_ERROR",PUCK_COMPILE_ERROR:"PUCK_COMPILE_ERROR",IDE_DEVTOOLS_PANEL_INIT:"IDE_DEVTOOLS_PANEL_INIT",IDE_DEVTOOLS_SENSORS_PANEL_USAGE:"IDE_DEVTOOLS_SENSORS_PANEL_USAGE",IDE_FRONT_PAGE_CLICK_SETTINGS:"IDE_FRONT_PAGE_CLICK_SETTINGS",IDE_AI_OPEN:"IDE_AI_OPEN",IDE_AI_QUESTION:"IDE_AI_QUESTION",IDE_AI_FEEDBACK:"IDE_AI_FEEDBACK",IDE_AI_OPEN_LINK:"IDE_AI_OPEN_LINK",IDE_DETAIL_CONFIG_ITEM_CLICK:"IDE_DETAIL_CONFIG_ITEM_CLICK",IDE_WORKBENCH_VIEW_STATUS:"IDE_WORKBENCH_VIEW_STATUS",IDE_POWER_EVENT:"IDE_POWER_EVENT",IDE_TASK_PERFORMANCE:"IDE_TASK_PERFORMANCE",IDE_EXCEPTION_RECORD:"IDE_EXCEPTION_RECORD",IDE_PROXY_ERROR_TRACE:"IDE_PROXY_ERROR_TRACE",IDE_EDITOR_RESOLVE_SNIPPET:"IDE_EDITOR_RESOLVE_SNIPPET",IDE_EDITOR_SNIPPET_CREATION:"IDE_EDITOR_SNIPPET_CREATION",IDE_EDITOR_REFERENCE:"IDE_EDITOR_REFERENCE",IDE_EDITOR_COMPLETION_SHOW:"IDE_EDITOR_COMPLETION_SHOW",IDE_MAIN_HELPER_FORK:"IDE_MAIN_HELPER_FORK",IDE_MAIN_HELPER_SPAWN:"IDE_MAIN_HELPER_SPAWN",IDE_MAIN_HELPER_READY:"IDE_MAIN_HELPER_READY"}),t.IDE_MODULES={LOGIN:"LOGIN",MESSAGE:"MESSAGE",SIMULATOR:"SIMULATOR",SIMULATOR_USAGE:"SIMULATOR_USAGE",DEVTOOL:"DEVTOOL",DEVTOOL_USAGE:"DEVTOOL_USAGE",REFRESH:"REFRESH",CLEAR_CACHE:"CLEAR_CACHE",COMPILE_ORDINARY:"COMPILE_ORDINARY",SELF_COMPILE_MODE:"SELF_COMPILE_MODE",COMPILE:"COMPILE",PREVIEW:"PREVIEW",REMOTE_DEBUG:"REMOTE_DEBUG",UPLOAD:"UPLOAD",SIGN_CHECK:"SIGN_CHECK",INTELLIGENCE:"INTELLIGENCE",AI:"AI",SHARE_PROJECT:"SHARE_PROJECT",PROJECT_MANAGE:"PROJECT_MANAGE",PROJECT_DETAIL:"PROJECT_DETAIL",CHECK_THIRD_PART_MINIAPP:"CHECK_THIRD_PART_MINIAPP",NPM_FUNCTION:"NPM_FUNCTION",EDITOR:"EDITOR",WORKBENCH:"WORKBENCH",SETTING:"SETTING",AVATAR:"AVATAR",UPDATE:"UPDATE",EDITOR_SAVE:"EDITOR_SAVE",MAIN_HELPER:"MAIN_HELPER"},t.IDE_TIMELINE_NAMES=n(n({},t.IDE_MODULES),{SIMULATOR_FIRST_LOADING_END:"SIMULATOR_FIRST_LOADING_END",SIMULATOR_LOADING:"SIMULATOR_LOADING",LOCAL_COMPILE:"LOCAL_COMPILE"}),t.IDE_PERFORMANCE_EVENTS={projectmanageCreated:"performance:projectmanageCreated",projectmanageReady:"performance:projectmanageReady",openProject:"performance:openProject",editorReady:"performance:editorReady",workbenchReady:"performance:workbenchReady",simulatorReady:"performance:simulatorReady",simulatorFirstLoadingEnd:"performance:simulatorFirstLoadingEnd",compilePartialEnd:"performance:compilePartialEnd",previewStart:"performance:previewStart",previewCodeReady:"performance:previewCodeReady",uploadStart:"performance:uploadStart",uploadEnd:"performance:uploadEnd",shareStart:"performance:shareStart",shareEnd:"performance:shareEnd",remoteDebugStart:"performance:remoteDebugStart",remoteDebugCodeReady:"performance:remoteDebugCodeReady"},t.FRONT_PAGE_EVENT={VELA_CAPTCHA_REQUEST:"VELA_CAPTCHA_REQUEST",VELA_CAPTCHA_FAIL:"VELA_CAPTCHA_FAIL",VELA_PHONE_CAPTCHA_REQUEST:"VELA_PHONE_CAPTCHA_REQUEST",VELA_PHONE_CAPTCHA_FAIL:"VELA_PHONE_CAPTCHA_FAIL",VELA_PHONE_LOGIN_REQUEST:"VELA_PHONE_LOGIN_REQUEST",VELA_PHONE_LOGIN_FAIL:"VELA_PHONE_LOGIN_FAIL",VELA_MAIL_LOGIN_REQUEST:"VELA_MAIL_LOGIN_REQUEST",VELA_MAIL_LOGIN_FAIL:"VELA_MAIL_LOGIN_FAIL",VELA_CHECK_EXIST_PROJECT:"VELA_CHECK_EXIST_PROJECT",VELA_CHECK_EXIST_PROJECT_FAIL:"VELA_CHECK_EXIST_PROJECT_FAIL",VELA_CHECK_TEMPLATE:"VELA_CHECK_TEMPLATE",VELA_CHECK_TEMPLATE_FAIL:"VELA_CHECK_TEMPLATE_FAIL",VELA_DELETE_PROJECT:"VELA_DELETE_PROJECT",VELA_DELETE_PROJECT_FAIL:"VELA_DELETE_PROJECT_FAIL",VELA_IMPORT_PROJECT:"VELA_IMPORT_PROJECT",VELA_IMPORT_PROJECT_FAIL:"VELA_IMPORT_PROJECT_FAIL",VELA_REQUEST_TEMPLATE_LIST:"VELA_REQUEST_TEMPLATE_LIST",VELA_REQUEST_TEMPLATE_LIST_FAIL:"VELA_REQUEST_TEMPLATE_LIST_FAIL",VELA_NEW_PROJECT:"VELA_NEW_PROJECT",VELA_NEW_PROJECT_FAIL:"VELA_NEW_PROJECT_FAIL",VELA_SCHEMA_DOWNLOAD_MINICODE:"VELA_SCHEMA_DOWNLOAD_MINICODE",VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL:"VELA_SCHEMA_DOWNLOAD_MINICODE_FAIL"}},5833:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompilerPlugin=void 0,(t.CompilerPlugin||(t.CompilerPlugin={})).TYPESCRIPT="typescript"},8039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_SLARDAR_EVENTS_TECH=t.UPDATE_SLARDAR_EVENTS=void 0,t.UPDATE_SLARDAR_EVENTS={IDE_LAUNCH:"IDE_LAUNCH",IDE_UPGRADE_SUGGGEST_POP:"IDE_UPGRADE_SUGGGEST_POP",IDE_UPGRADE_SUGGGEST_POP_CLOSE:"IDE_UPGRADE_SUGGGEST_POP_CLOSE",IDE_UPGRADE_SUGGGEST_POP_NO:"IDE_UPGRADE_SUGGGEST_POP_NO",IDE_UPGRADE_SUGGGEST_POP_YES:"IDE_UPGRADE_SUGGGEST_POP_YES",IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL:"IDE_UPGRADE_SUGGGEST_POP_VIEWDETAIL",IDE_UPGRADE_ICON:"IDE_UPGRADE_ICON",IDE_UPGRADE_ICON_CLOSE:"IDE_UPGRADE_ICON_CLOSE",IDE_UPGRADE_ICON_RESTART:"IDE_UPGRADE_ICON_RESTART",IDE_UPGRADE_ICON_VIEWDETAIL:"IDE_UPGRADE_ICON_VIEWDETAIL",IDE_FULLUPGRADE_POP:"IDE_FULLUPGRADE_POP",IDE_FULLUPGRADE_POP_CLOSE:"IDE_FULLUPGRADE_POP_CLOSE",IDE_FULLUPGRADE_POP_NO:"IDE_FULLUPGRADE_POP_NO",IDE_FULLUPGRADE_POP_YESBACK:"IDE_FULLUPGRADE_POP_YESBACK",IDE_FULLUPGRADE_POP_YESONCE:"IDE_FULLUPGRADE_POP_YESONCE",IDE_FULLUPGRADE_POP_VIEWDETAIL:"IDE_FULLUPGRADE_POP_VIEWDETAIL"},t.UPDATE_SLARDAR_EVENTS_TECH={IDE_LOADER_IO_ERROR:"IDE_LOADER_IO_ERROR",IDE_LOADER_INSTALL_RECOVER_ERROR:"IDE_LOADER_INSTALL_RECOVER_ERROR",IDE_LOADER_START_FROM_ENTRY:"IDE_LOADER_START_FROM_ENTRY",IDE_LAUNCH_FAIL:"IDE_LAUNCH_FAIL"}},1061:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return s(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppJSON=void 0;var l=a(r(9849)),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.__isGame=!1,t}return o(t,e),t.from=function(e){return c(this,void 0,void 0,(function(){var r,n;return u(this,(function(o){switch(o.label){case 0:return[4,l.readJson(e)];case 1:return r=o.sent(),(n=new t(r,e)).__isGame=e.endsWith("game.json"),[2,n]}}))}))},Object.defineProperty(t.prototype,"isGame",{get:function(){return this.__isGame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subPackages",{get:function(){var e=this.__raw,t=e.subPackages,r=e.subpackages;return t||(void 0===r?[]:r)},enumerable:!1,configurable:!0}),t}(r(4169).JSONContainer);t.AppJSON=p},3652:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return s(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExtJSON=void 0;var l=a(r(9849)),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.from=function(e){return c(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,l.readJson(e)];case 1:return[2,new t(r.sent(),e)]}}))}))},t}(r(4169).JSONContainer);t.ExtJSON=p},4169:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.JSONContainer=void 0;var c=i(r(9849)),u=function(){function e(e,t){this.__raw=e,this.path=t}return Object.defineProperty(e.prototype,"rawJSON",{get:function(){return this.__raw},enumerable:!1,configurable:!0}),e.prototype.getKey=function(e,t){var r;return null!==(r=this.__raw[e])&&void 0!==r?r:t},e.prototype.update=function(e,t,r){return void 0===r&&(r=!1),s(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return this.__raw[e]=t,r?[4,c.writeJson(this.path,this.__raw,{spaces:2})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},e}();t.JSONContainer=u},8559:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return s(t,e),t},c=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},p=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectConfig=t.PrivateState=t.getOriginAppid=t.isTestAppid=t.getIDEAppTechType=t.setIDEAppTechType=t.PROJECT_TYPE_MAP=t.DEFAULT_PROJECT_CONFIG=t.setEnvFunctionForProject=void 0;var f=a(r(9849)),h=a(r(1017)),_=r(1061),v=r(3652),m=r(4169),E=r(5833),g=r(7992),y=d(r(6503)),b=d(r(7921)),O=d(r(772)),A=d(r(3122)),w=d(r(298)),C=d(r(1395)),I=d(r(8337)),S=d(r(5513)),P=function(){return g.defaultEnv};t.setEnvFunctionForProject=function(e){P=e};var L={MICROAPP:"tt07e3715e98c9aac0",MICROGAME:"tt975be1e608633d4202",get TOYBOX(){return"boe"===P().env.type?"tte05d96e07f3bdfe710":"tt3c174aaaa32e0eb810"}};t.DEFAULT_PROJECT_CONFIG={appid:"testappId",projectname:"默认小程序名",setting:{urlCheck:!0,es6:!0,postcss:!0,minified:!0,newFeature:!0},scripts:{afterOpen:"",beforeCompile:""}},t.PROJECT_TYPE_MAP={microapp:"app",microgame:"game",toybox:"toybox"};var T="";t.setIDEAppTechType=function(e){T=e},t.getIDEAppTechType=function(){return T};var R,D="testappid";function x(e,t){return void 0===t&&(t="app"),e.toLocaleLowerCase()===D?(null==T?void 0:T.includes("microapp"))?L.MICROAPP:(null==T?void 0:T.includes("toybox"))?L.TOYBOX:(null==T?void 0:T.includes("microgame"))?L.MICROGAME:"app"===t?L.MICROAPP:L.MICROGAME:e}t.isTestAppid=function(e){return Boolean(e)&&(e===L.MICROAPP||e===L.MICROGAME||e===L.TOYBOX||e.toLowerCase()===D)},t.getOriginAppid=x,function(e){e.ALWAYS="ALWAYS",e.NORMAL="NORMAL"}(R=t.PrivateState||(t.PrivateState={}));var j=function(e){function r(t){var r=t.rawJson,n=t.filepath,o=t.privateConfigPath,i=t.projectPath,s=t.publicJson,a=t.privateJson,c=e.call(this,r,n)||this;return c.projectPath=i,c.privateConfigPath=o,c.publicJson=s,c.privateJson=a,c._enablePrivateConfig=!1,c}return o(r,e),r.getKeyPath=function(){return r._keyPath||(r._keyPath=r.generateList(r.PRIVATE_CONFIG_KEYS)),r._keyPath},r.getKeyPathList=function(){return r.getKeyPath().map((function(e){return e[0]}))},r.generateList=function(e,t){return void 0===t&&(t=""),(0,y.default)(e,(function(e,n,o){var i,s=t?t+"."+o:o;return"string"==typeof(i=n)&&Object.values(R).includes(i)?e.push([s,n]):e.push.apply(e,p([],l(r.generateList(n,s)),!1)),e}),[])},r.from=function(e){return c(this,void 0,void 0,(function(){var t,n,o,i,s,a,c;return u(this,(function(u){switch(u.label){case 0:return t=h.join(e,"project.config.json"),n=h.join(e,"project.private.config.json"),o=f.readJsonSync(t),[4,(i=new r({rawJson:o,filepath:t,projectPath:e,publicJson:o,privateJson:{},privateConfigPath:n})).detectProjectType()];case 1:if("app"===u.sent()){s={};try{a=f.readJSONSync(n),(0,A.default)(a)&&(0,w.default)(a).length>0&&(s=a)}catch(e){}c=this.getMergedConfig(o,s),i.enablePrivateConfig(c,s)}return[2,i]}}))}))},r.fromJson=function(e,t){return new r({rawJson:e,filepath:h.join(t,"project.config.json"),projectPath:t,publicJson:e,privateJson:{},privateConfigPath:h.join(t,"project.private.config.json")})},r.getMergedConfig=function(e,t){var r,n=!0===(null!==(r=t.disablePrivate)&&void 0!==r?r:e.disablePrivate),o=(0,b.default)(e);return this.getKeyPath().forEach((function(e){if(e[1]===R.ALWAYS||!n){var r=(0,O.default)(t,e[0]);void 0!==r&&(0,S.default)(o,e[0],r)}})),o},r.prototype.update=function(t,n,o){var i;return c(this,void 0,void 0,(function(){var s,a,c,l,p,d,h;return u(this,(function(u){switch(u.label){case 0:return this._enablePrivateConfig&&!0===(null!==(i=this.privateJson.disablePrivate)&&void 0!==i?i:this.publicJson.disablePrivate)?[4,e.prototype.update.call(this,t,n,o)]:[3,2];case 1:return u.sent(),[2];case 2:return s=r.getKeyPathList(),a=(0,I.default)(((d={})[t]=n,d),s),c=(0,w.default)(a).length>0,l=(0,C.default)(((h={})[t]=n,h),s),p=(0,w.default)(l).length>0,(0,S.default)(this.__raw,t,n),c&&(0,S.default)(this.privateJson,t,a[t]),p&&(0,S.default)(this.publicJson,t,l[t]),o?p?[4,f.writeJSON(this.path,this.publicJson,{spaces:2})]:[3,4]:[3,7];case 3:u.sent(),u.label=4;case 4:return c?[4,f.ensureFile(this.privateConfigPath)]:[3,7];case 5:return u.sent(),[4,f.writeJson(this.privateConfigPath,this.privateJson,{spaces:2})];case 6:u.sent(),u.label=7;case 7:return[2]}}))}))},r.prototype.enablePrivateConfig=function(e,t){this.privateJson=t,this.__raw=e,this._enablePrivateConfig=!0},r.prototype.getPublicRawJSON=function(){return this.publicJson},r.prototype.getPrivateRawJSON=function(){return this.privateJson},r.prototype.getAppid=function(){var e="";return this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),x(e)},r.prototype.getRealAppid=function(){return c(this,void 0,void 0,(function(){var e,t,r,n;return u(this,(function(o){switch(o.label){case 0:return e="",this.__raw.appid&&(e=this.__raw.appid),this.__raw.ttappid&&(e=this.__raw.ttappid),t=x,r=[e],T?(n=void 0,[3,3]):[3,1];case 1:return[4,this.detectProjectType()];case 2:n=o.sent(),o.label=3;case 3:return[2,e=t.apply(void 0,r.concat([n]))]}}))}))},r.prototype.getSetting=function(){var e;return null!==(e=this.__raw.setting)&&void 0!==e?e:t.DEFAULT_PROJECT_CONFIG.setting},r.prototype.getProjectName=function(){var e;return null!==(e=this.__raw.projectname)&&void 0!==e?e:""},r.prototype.getScripts=function(){var e;return null!==(e=this.__raw.scripts)&&void 0!==e?e:{afterOpen:"",beforeCompile:""}},r.prototype.getConditionData=function(e){var t,r;return null!==(r=null===(t=this.__raw.condition)||void 0===t?void 0:t[e])&&void 0!==r?r:{current:-1,list:[]}},r.prototype.getAutoCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.autoCompile)},r.prototype.getCompileHotReloadSetting=function(){var e,t=null===(e=this.__raw.setting)||void 0===e?void 0:e.compileHotReLoad,r="native"===this.__raw.douyinProjectType;return t||void 0===t&&r},r.prototype.getNativeCompileSetting=function(){var e;return!1!==(null===(e=this.__raw.setting)||void 0===e?void 0:e.nativeCompile)},r.prototype.getLocalPluginsSetting=function(){var e,t;return null!==(t=null===(e=this.__raw.setting)||void 0===e?void 0:e.localPlugins)&&void 0!==t&&t},r.prototype.getAfterOpenScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.afterOpen},r.prototype.getBeforeCompileScript=function(){var e,t;return null===(t=null===(e=this.__raw)||void 0===e?void 0:e.scripts)||void 0===t?void 0:t.beforeCompile},r.prototype.getSkipDomainCheck=function(){var e,t,r;return!(null===(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.urlCheck)||void 0===r||r)},r.prototype.getPreviewHotRestartCache=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.IDEPreviewHotRestartCache)&&void 0!==r&&r},r.prototype.getMiniprogramRoot=function(){var e,t;return null!==(t=null===(e=this.__raw)||void 0===e?void 0:e.miniprogramRoot)&&void 0!==t?t:"./"},r.prototype.getBigPackageSizeSupport=function(){var e,t,r;return null!==(r=null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.bigPackageSizeSupport)&&void 0!==r&&r},r.prototype.detectProjectType=function(e){return c(this,void 0,void 0,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return[4,this.getProjectType()];case 1:return t=r.sent(),[2,e?e===t:t]}}))}))},r.prototype.getProjectType=function(){return c(this,void 0,void 0,(function(){var e,r,n,o,i,s,a,c;return u(this,(function(u){switch(u.label){case 0:return(null==T?void 0:T.includes("microapp"))?[2,"app"]:(null==T?void 0:T.includes("unity"))||(null==T?void 0:T.includes("microgame"))||(null==T?void 0:T.includes("toybox"))?[2,"game"]:this.__raw.ttProjectType?[2,t.PROJECT_TYPE_MAP[this.__raw.ttProjectType]]:(e=this.getMiniprogramRoot(),r=h.join(this.projectPath,e,"app.json"),n=r.replace("app.json","app.ts"),o=r.replace("app.json","app.js"),[4,Promise.all([f.pathExists(r),f.pathExists(o),f.pathExists(n)])]);case 1:if(i=u.sent(),this.useTypeScript()){if(i[0]&&(i[1]||i[2]))return[2,"app"]}else if(i[0]&&i[1])return[2,"app"];return s=r.replace("app.json","game.json"),a=s.replace("game.json","game.js"),[4,Promise.all([f.pathExists(s),f.pathExists(a)])];case 2:if((c=u.sent())[0]&&c[1])return[2,"game"];throw new Error("[ProjectConfig]Bad Project Type")}}))}))},r.prototype.getAppJSON=function(){return c(this,void 0,void 0,(function(){var e,t;return u(this,(function(r){switch(r.label){case 0:return[4,this.detectProjectType("app")];case 1:return e=r.sent()?"app.json":"game.json",t=h.join(this.projectPath,this.getMiniprogramRoot(),e),[4,_.AppJSON.from(t)];case 2:return[2,r.sent()]}}))}))},r.prototype.getExtJSON=function(){return c(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return e=h.join(this.projectPath,this.getMiniprogramRoot(),"ext.json"),[4,v.ExtJSON.from(e)];case 1:return[2,t.sent()]}}))}))},r.prototype.useTypeScript=function(){var e,t,r;return!!Array.isArray(null===(t=null===(e=this.__raw)||void 0===e?void 0:e.setting)||void 0===t?void 0:t.useCompilerPlugins)&&(null===(r=this.__raw.setting)||void 0===r?void 0:r.useCompilerPlugins.includes(E.CompilerPlugin.TYPESCRIPT))},r.PRIVATE_CONFIG_KEYS={disablePrivate:R.ALWAYS,setting:{urlCheck:R.NORMAL,mockLogin:R.NORMAL,autoPush:R.NORMAL,bigPackageSizeSupport:R.NORMAL,autoCompile:R.NORMAL,compileHotReLoad:R.NORMAL,nativeCompile:R.NORMAL,IDEPreviewHotRestartCache:R.NORMAL},condition:R.NORMAL},r}(m.JSONContainer);t.ProjectConfig=j},6912:function(e,t,r){"use strict";var n,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPerfConfigSettings=t.skipReport=t.startTime=t.PROCESS_TYPE=t.compareCacheTriggerCount=t.getModuleUseCache=t.setModuleUseCache=t.timelineMap=t.moduleEventCacheMap=t.getPathname=t.getHref=t.commonParams2Context=t.BID=t.getSystemMemory=t.getCPUModel=void 0;var s=i(r(2037)),a="";function c(){try{return a||(a=s.default.cpus()[0].model)}catch(e){return a="none"}}t.getCPUModel=c;var u="";function l(){try{return u||(u=Math.round(s.default.totalmem()/1024/1024/1024).toString())}catch(e){return u="none"}}function p(e,r,n){t.moduleEventCacheMap[e][r]=n}function d(e,r){var n=t.moduleEventCacheMap[e];return n[r]||(n[r]={count:0,triggerNum:0}),n[r]}t.getSystemMemory=l,t.BID="electron_12345",t.commonParams2Context=function(e,t,r,n){var o,i,s,a,u,p,d,f,h,_,v,m,E,g;return{user_id:String(null!==(o=null==e?void 0:e.userId)&&void 0!==o?o:""),name:null!==(i=null==e?void 0:e.username)&&void 0!==i?i:"",device_id:null==e?void 0:e.deviceId,ide_version:null==e?void 0:e.ideVersion,os_version:null==e?void 0:e.osVersion,os_platform:null==e?void 0:e.osPlatform,dev_app_id:null!=t?t:"",ext_app_id:null!=n?n:"",tech_type:null!=r?r:"",ide_version_number:null!==(a=null===(s=null==e?void 0:e.ideVersionNumber)||void 0===s?void 0:s.toString())&&void 0!==a?a:"",ide_env:null!==(u=null==e?void 0:e.env)&&void 0!==u?u:"",branch:null!==(p=null==e?void 0:e.branch)&&void 0!==p?p:"",build_id:null!==(d=null==e?void 0:e.buildId)&&void 0!==d?d:"",buildId:null!==(f=null==e?void 0:e.buildId)&&void 0!==f?f:"",arch:null===process||void 0===process?void 0:process.arch,ide_version_int:null!==(h=null==e?void 0:e.ideVersionNumber)&&void 0!==h?h:0,is_sandbox:null!==(_=e.isSandbox)&&void 0!==_?_:"0",frameworkType:null!==(v=null==e?void 0:e.frameworkType)&&void 0!==v?v:"",workbench_mode:null!==(m=e.workbenchMode)&&void 0!==m?m:"",e2e_scene:null!==(g=null===(E=null===process||void 0===process?void 0:process.env)||void 0===E?void 0:E.IDE_E2E_SCENE)&&void 0!==g?g:"",cpu_model:c(),system_memory:l()}},t.getHref=function(){try{return window.location.href}catch(e){return""}},t.getPathname=function(){try{return window.location.pathname.split("/dist")[1]}catch(e){return""}},t.moduleEventCacheMap={click:{},call:{}},t.timelineMap=new Map,t.setModuleUseCache=p,t.getModuleUseCache=d,t.compareCacheTriggerCount=function(e,t,r,n,i){var s;if(void 0===i&&(i=Date.now()),1===r)return!0;var a=d(e,t),c=a.startTime,u=void 0===c?0:c,l=a.triggerNum,f=Number(l)+1;if(f<r)return p(e,t,o(o({},a),{triggerNum:f,startTime:null!==(s=a.startTime)&&void 0!==s?s:i})),!1;var h=n&&i-u>n;return p(e,t,o(o({},a),{startTime:h?i:void 0,triggerNum:h?1:0})),!h},t.PROCESS_TYPE={main:"main",renderer:"renderer"},t.startTime=Date.now(),t.skipReport="development"===(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.NODE_ENV),t.defaultPerfConfigSettings={disabled:!0,fps:{below:20,belowCount:3,maxReporterCount:10},interval:{duration:100,blockFactor:5,reportThreshold:6,longTaskDuration:2e3,longTaskDurationMain:800,maxReporterCount:10},memory:{freePercent:10,free:2097152,duration:1e4,maxReporterCount:10,winUsePowershell:!1},disabledHref:[],disabledMain:!1,ideUsageCollectInterval:3e5,disabledJsonWorker:!1}},4084:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.reportTeaImmediately=t.clearTeaEvents=t.reportTea=t.makeEvent=t.registerDevLogger=void 0;var c=a(r(4088)),u=r(6912),l=c.default.create({baseURL:"https://mcs.snssdk.com",timeout:1e4,headers:{"Content-Type":"application/json"}}),p=console.info;function d(e,t,r){return void 0===r&&(r=Date.now()),{event:e,params:JSON.stringify(t),time:Math.floor(r/1e3)}}t.registerDevLogger=function(e){p=e},t.makeEvent=d;var f,h,_=function(){function e(e,t,r){var n=this;void 0===t&&(t=1e3),void 0===r&&(r=50),this._events=[],this.reporterAll=function(){0!==n._events.length&&(n.reporter(s([],i(n._events),!1)),n.clear())},this.add=function(e,t,r){if(n._events.push(d(e,t,r)),n._events.length>=n.cacheLimit)return n.reporterAll();n.timerId||(n.timerId=setTimeout((function(){n.timerId=void 0,n.reporterAll()}),n.cacheDurationLimit))},this.clear=function(){n._events=[]},this.reporter=e,this.cacheDurationLimit=t,this.cacheLimit=r}return Object.defineProperty(e.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),e}();function v(e){var t;return!h&&(null==e?void 0:e.deviceId)&&(h={user:{user_unique_id:e.deviceId},header:{app_id:1733,app_version:e.ideVersion,headers:JSON.stringify({app_full_version:e.ideVersion}),os_name:e.osPlatform,os_version:e.osVersion,custom:{cli_name:null!==(t=e.cliName)&&void 0!==t?t:""}},verbose:1}),h}t.reportTea=function(e,t,r,i){var s=this;void 0===r&&(r={}),f||(f=new _((function(e){return n(s,void 0,void 0,(function(){var r,n,i;return o(this,(function(o){switch(o.label){case 0:if(r=Object.assign({},v(t),{events:e}),u.skipReport)return null==p||p("[skip report tea]events "+(null===(i=r.events)||void 0===i?void 0:i.length)+": ",r.events),[2];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.post("/v1/json",r)];case 2:return o.sent(),[3,4];case 3:throw n=o.sent(),console.error("上报数据出错",n),Error("Tea report error, "+((null==n?void 0:n.message)||String(n)));case 4:return[2]}}))}))}))),f.add(e,r,i)},t.clearTeaEvents=function(){null==f||f.reporterAll()},t.reportTeaImmediately=function(e,t){var r,n=t.map((function(e){return d(e.event,e.params)})),o=Object.assign({},v(e),{events:n});u.skipReport?null==p||p("[skip report tea immediately]events "+(null===(r=o.events)||void 0===r?void 0:r.length)+": ",o.events):l.post("/v1/json",o).catch((function(e){console.error("上报数据出错",e)}))}},4415:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function n(e){return e.endsWith("/")?e:e.concat("/")}Object.defineProperty(t,"__esModule",{value:!0}),t.ensureEndSlash=t.formatSize=t.normalizeSize=void 0,t.normalizeSize=function(e){var t=e.__APP__,o=void 0===t?0:t,i=r(e,["__APP__"]),s={main:{path:"main",size:o},sub:[],total:o};return Object.keys(i).forEach((function(e){var t,r=i[e];null===(t=s.sub)||void 0===t||t.push({path:n(e),size:r}),s.total=s.total+r})),s},t.formatSize=function(e){return e>1048576?(e/1024/1024).toFixed(2)+"MB":e>1024?(e/1024).toFixed(1)+"KB":e+"B"},t.ensureEndSlash=n},7992:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setBoeMap=t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var s=i(r(4088)),a=r(2139),c=new Map;c.set(/https:\/\/microapp.bytedance.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),c.set(/https:\/\/developer.toutiao.com\/api\/apps\/v3\/meta(.*)/,"http://developer.toutiao.com.boe-gateway.byted.org/api/apps/v3/meta$1"),c.set(/https:\/\/developer.toutiao.com\/(.*)/,"http://developer-boe.toutiao.com.boe-gateway.byted.org/$1"),c.set(/https:\/\/open-sandbox.douyin.com\/(.*)/,"http://open-sandbox-boe.bytedance.net/$1"),c.set(/https:\/\/developer.open-douyin.com\/(.*)/,"https://dy-open-platform-boe.bytedance.net/$1"),c.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/user\/tp_info)/,"http://developer-boe.toutiao.com/$1"),c.set(/https:\/\/ma.zijieapi.com\/(api\/apps\/.*)/,"http://developer-boe.toutiao.com/$1"),c.set(/https:\/\/starkgame.zijieapi.com\/(.*)/,"http://starkpublish.bytedance.net/$1");var u=["https://ma.zijieapi.com/api/apps/xconfig_meta"];t.setBoeMap=function(e,t){c.set(e,t)};var l={env:{type:"online",channel:""},proxy:{host:null,port:null}};t.defaultEnv=l;var p=function(){return l},d={reportRequestError:function(){},reportCustomEvent:function(){}},f=[function(e){var t,r,i;if(null===(i=e.headers)||void 0===i?void 0:i.online)return e;var s=p().env,a="boe"===s.type,l=s.channel;if(!a)return e;try{for(var d=n(c),f=d.next();!f.done;f=d.next()){var h=o(f.value,2),_=h[0],v=h[1];if(e.url&&_.test(e.url)&&!u.includes(e.url)){e.url=e.url.replace(_,v);break}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}return l&&e.headers&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=l),e},function(e){var t;if(null===(t=e.headers)||void 0===t?void 0:t.online)return e;var r=p().env,n="ppe"===r.type,o=r.channel;return n&&e&&e.headers&&(e.headers["X-USE-PPE"]=1),n&&e.headers&&o&&!e.headers["ignore-channel"]&&(e.headers["X-TT-ENV"]=o),e}],h=s.default.create({adapter:"http",timeout:6e4});t.AxiosInstance=h,h.interceptors.request.use((function(e){var t,n;null==d||d.reportCustomEvent(a.SLARDAR_EVENT.IDE_REQUEST_START,void 0,{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:""});var o=p().proxy;return o.host?(null===(n=e.url)||void 0===n?void 0:n.startsWith("https://"))?(e.httpsAgent=r(1681).httpsOverHttp({proxy:{host:o.host,port:o.port},rejectUnauthorized:!1}),e.proxy=!1):e.proxy={host:o.host,port:o.port?+o.port:80}:(null==o?void 0:o.host)&&o.port||(e.proxy=!1),f.forEach((function(t){return t(e)})),e}),(function(e){return null==d||d.reportRequestError({url:null==e?void 0:e.url,statusMessage:String(e),caller:"interceptors.request.error"}),Promise.reject(e)})),h.interceptors.response.use((function(e){var t,r,n,o,i,s,a,c,u,l,p,f,h;return null===e.config.validateStatus||e.status>=200&&e.status<300||null==d||d.reportRequestError({url:null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(n=null==e?void 0:e.request)||void 0===n?void 0:n.url,ttLogId:String(null!==(s=null===(i=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.headers)||void 0===i?void 0:i["x-tt-logid"])&&void 0!==s?s:null===(a=null==e?void 0:e.headers)||void 0===a?void 0:a["x-tt-logid"]),statusCode:null==e?void 0:e.status,statusMessage:null==e?void 0:e.statusText,caller:"interceptors.response"}),process.env.isIDE&&console.info("[request] ",null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.url,"x-tt-logid",null!==(h=null!==(p=null===(l=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.headers)||void 0===l?void 0:l["x-tt-logid"])&&void 0!==p?p:null===(f=e.headers)||void 0===f?void 0:f["x-tt-logid"])&&void 0!==h?h:""),e}),(function(e){var t,r,n,o,i,s,a,c,u,l,f,h,_,v,m;return console.info("[error request proxy]",p().proxy),null==d||d.reportRequestError({url:null!==(i=null!==(r=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:null===(o=null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.config)||void 0===o?void 0:o.url)&&void 0!==i?i:null===(s=null==e?void 0:e.request)||void 0===s?void 0:s.url,statusCode:null===(a=null==e?void 0:e.response)||void 0===a?void 0:a.status,statusMessage:String(e),ttLogId:null!==(_=null!==(l=null===(u=null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.headers)||void 0===u?void 0:u["x-tt-logid"])&&void 0!==l?l:null===(h=null===(f=null==e?void 0:e.response)||void 0===f?void 0:f.headers)||void 0===h?void 0:h["x-tt-logid"])&&void 0!==_?_:null===(m=null===(v=null==e?void 0:e.request)||void 0===v?void 0:v.headers)||void 0===m?void 0:m["x-tt-logid"],caller:"interceptors.response.error"}),Promise.reject(e)})),h.interceptors.request.use((function(e){return e.headers&&!e.headers.ignoreReferer&&(e.headers.Referer="developer.toutiao.com"),e})),t.setEnvFunction=function(e){p=e},t.setSlardarInstance=function(e){d=e},t.setJestMock=function(e){Object.entries(e).forEach((function(e){var t=o(e,2),r=t[0],n=t[1];h[r]=n}))}},9251:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAppConfig=t.getToken=void 0;var c,u=s(r(9849)),l=a(r(1017)),p=r(4263),d=a(r(8366)),f=l.default.join((0,p.getCliDefaultStoragePath)(),"appConfig.json");function h(){var e;try{var t=u.readJsonSync(f);e=(0,p.isObject)(t)?t:{}}catch(t){e={}}return e}t.getToken=function(e){var t;return c||(c=h()),null===(t=c[e])||void 0===t?void 0:t.token},t.setAppConfig=function(e){e.appid?(0,p.isObject)(e.config)?(u.ensureFileSync(f),(c=h())[e.appid]=n(n({},(0,p.isObject)(c[e.appid])?c[e.appid]:{}),e.config),u.writeJSONSync(f,c)):d.default.error("Config must be an object."):d.default.error("Appid is required to set app config.")}},9345:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.audit=t.getAuditHostsList=void 0;var a=r(7992),c=s(r(9258)),u=r(1728),l=r(5796);function p(e){return o(this,void 0,void 0,(function(){var t,r,n,o,s,c,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,u.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),r=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,a.AxiosInstance.get("https://microapp.bytedance.com/platform_api/v1/app/"+t+"/code_manager/versions",r)];case 3:return n=i.sent(),o=n.data||{},s=o.error,c=o.message,l=o.data,s?[2,{success:!1,msg:c||"Get host failed,please check if your appid is valid",data:l}]:[2,{success:!0,msg:"",data:l}];case 4:return[2,{success:!1,msg:i.sent().message,data:null}];case 5:return[2]}}))}))}function d(e){return o(this,void 0,void 0,(function(){var t,r,n,o,s,c,l,p;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,p={},[4,(0,u.getLogInfoHeaders)(t)];case 1:p.headers=i.sent(),r=p,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,a.AxiosInstance.get("https://microapp.bytedance.com/platform_api/app/publish/v2/"+t+"/audit/host",r)];case 3:return n=i.sent(),o=n.data||{},s=o.error,c=o.message,l=o.data,s?[2,{success:!1,msg:c||"Get host failed,please check if your appid is valid",hostList:{},preHost:[]}]:l.hostList||l.preHost?[2,{success:!0,hostList:l.hostList,preHost:l.preHost}]:[2,{success:!1,msg:"You do not have permission to audit app",hostList:{},preHost:[]}];case 4:return[2,{success:!1,msg:i.sent().message,hostList:{},preHost:[]}];case 5:return[2]}}))}))}function f(e,t){return o(this,void 0,void 0,(function(){var r,o,s,l,p,d,f;return i(this,(function(i){switch(i.label){case 0:for(s in r="https://microapp.bytedance.com/api/v2/app/"+t+"/audit",o=new c.default,e)o.append(s,e[s]);return f={},p=[{}],[4,(0,u.getLogInfoHeaders)(t)];case 1:f.headers=n.apply(void 0,[n.apply(void 0,p.concat([i.sent()])),o.getHeaders()]),l=f,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,a.AxiosInstance.put(r,o,l)];case 3:if((d=i.sent()).data&&0===d.data.error)return[2,void 0];throw new Error(d.data.message);case 4:throw i.sent();case 5:return[2]}}))}))}t.getAuditHostsList=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o;return i(this,(function(i){switch(i.label){case 0:return[4,d({appid:e.appid})];case 1:if(t=i.sent(),r=t.success,n=t.msg,o=t.hostList,r)return[2,Object.keys(o)];throw new Error(n)}}))}))},t.audit=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,s,a,c;return i(this,(function(i){switch(i.label){case 0:return t=e.appid,r=e.host,n=e.autoPublish,o=e.channel,[4,p({appid:t})];case 1:return s=i.sent(),a=s.success,c=s.msg,[4,(0,l.checkChannel)(t,o)];case 2:if(i.sent(),!a)throw new Error(c);return[4,f({auto_publish:n?1:0,host_chosen:r.toString(),notifyContent:"",test_report:"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1",versionTag:JSON.stringify({Tag:o})},t)];case 3:return i.sent(),[2]}}))}))}},9808:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cliAuth=void 0;var s=i(r(1606)),a=i(r(6495)),c=i(r(8366)),u=r(4263),l=r(4113);function p(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.mobile?[2,"mobile"]:e.email?[2,"email"]:[4,a.default.prompt([{name:"action",type:"list",message:"Please choose login type:",choices:[{name:"Mobile",value:"mobile"},{name:"Email",value:"email"},{name:"Cancel",value:!1}]}])];case 1:return[2,t.sent().action]}}))}))}t.cliAuth=function(e){return n(this,void 0,void 0,(function(){var t,r,n,i;return o(this,(function(o){switch(o.label){case 0:return[4,p(e)];case 1:return(t=o.sent())?((0,u.clearConsole)(s.default.bold.green(("mobile"===t?"📱":" 📧")+" Sign in with "+t)),[4,a.default.prompt([{name:"inputRet",type:"input",message:"The "+("mobile"===t?"mobile number":"email")+":"}])]):[2];case 2:return r=o.sent().inputRet,"mobile"!==t?[3,6]:[4,(0,l.sendVerificationCodeToPhone)({phoneNumber:r})];case 3:return o.sent(),c.default.info("🎉 Send verification code success"),[4,a.default.prompt([{name:"code",type:"input",message:"The verification code:"}])];case 4:return n=o.sent().code,[4,(0,l.loginByPhone)({phoneNumber:r,code:n})];case 5:return o.sent(),[3,9];case 6:return[4,a.default.prompt([{name:"pwd",type:"password",message:"The password:"}])];case 7:return i=o.sent().pwd,[4,(0,l.loginByEmail)({email:r,password:i})];case 8:o.sent(),o.label=9;case 9:return c.default.info("🎉 Login success"),[2]}}))}))}},2893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.setConfig=void 0;var a=r(7992),c=r(8559),u=s(r(469)),l=i(r(9849)),p=i(r(1017)),d=r(7310),f=s(r(8366)),h=r(4263),_=(0,h.getCliDefaultStoragePath)(),v=p.join(_,"config.json"),m={proxy:null,tempFilePath:null,storagePath:_,url:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/microapp/make_schema",compileProgress:"https://microapp.bytedance.com/api/v1/app/${appid}/compile_progress",preview:"https://developer.toutiao.com/api/v2/app/${appid}/preview",upload:"https://developer.toutiao.com/api/v2/app/${appid}/testing",check:"https://developer.toutiao.com/api/developer/ide/v1/microapp/query_check_progress",emailLogin:"https://developer.toutiao.com/passport/web/email/login/",mobileLogin:"https://developer.toutiao.com/passport/web/sms_login/",sendLoginCode:"https://developer.toutiao.com/passport/web/send_code/",getUserInfo:"https://microapp.bytedance.com/platform_api/v1/app/microappadmincomm/getUserInfo"},interactGameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/v1/compile_progress",preview:"https://developer.toutiao.com/api/developer/ide/v1/preview",upload:"https://developer.toutiao.com/api/developer/ide/v1/testing"},microgameUrl:{makeSchema:"https://developer.toutiao.com/api/developer/ide/microgame/v1/make_schema",compileProgress:"https://developer.toutiao.com/api/developer/ide/microgame/v1/compile_progress?appid=",preview:"https://developer.toutiao.com/api/developer/ide/microgame/v1/preview?appid=",upload:"https://developer.toutiao.com/api/developer/ide/microgame/v1/testing?appid=",versionInfo:"https://developer.toutiao.com/api/developer/ide/microgame/v1/versions?appid=",sizeLimit:"https://developer.toutiao.com/api/developer/ide/microgame/v1/get_package_size_limit?appid="},env:{type:"online",channel:""},allowReportEvent:!0},E=(0,u.default)(m);if((0,h.isCli)()&&(l.existsSync(v)?((E=l.readJSONSync(v)).url.emailLogin=m.url.emailLogin,E.url.mobileLogin=m.url.mobileLogin,E.url.sendLoginCode=m.url.sendLoginCode,E.url.getUserInfo=m.url.getUserInfo):(l.ensureFileSync(v),l.writeJsonSync(v,m))),!(0,h.isIDE)()){var g=function(){var e=E.proxy,t=e?new d.URL(e):null;return{env:E.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,a.setEnvFunction)(g),(0,c.setEnvFunctionForProject)(g)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)E=(0,u.default)(m),f.default.info("setConfig "+JSON.stringify(m,null,2));else{for(var r in e)"object"==typeof e[r]?E[r]=Object.assign(E[r],(0,u.default)(e[r])):E[r]=(0,u.default)(e[r]);f.default.info("setConfig "+JSON.stringify(e))}(0,h.isCli)()&&l.writeJsonSync(v,E)},t.getConfig=function(){return Object.assign({},E)}},2173:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createProject=void 0;var u=r(7992),l=i(r(9849)),p=i(r(1017)),d=c(r(2541)),f=r(2696),h=c(r(8366)),_=r(4263);function v(e,t){return s(this,void 0,void 0,(function(){var r=this;return a(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n,o){return s(r,void 0,void 0,(function(){var r,i;return a(this,(function(s){switch(s.label){case 0:return r=p.join(t,"template.zip"),i=l.createWriteStream(r),[4,u.AxiosInstance.get(e,{responseType:"stream"})];case 1:return s.sent().data.pipe(i),i.on("finish",(function(){l.createReadStream(r).pipe(d.default.Extract({path:t})).on("close",(function(){l.unlinkSync(r),n()})).on("error",(function(e){l.unlinkSync(r),o(e)}))})).on("error",(function(e){o(e)})),[2]}}))}))}))];case 1:return[2,n.sent()]}}))}))}t.createProject=function(e){return s(this,void 0,void 0,(function(){var t,r,n,o,i,s;return a(this,(function(a){switch(a.label){case 0:return t=e.projectName,r=e.force,n=e.template,(o=e.type)||(o="js"),(i=e.targetDir)||(i=p.resolve(process.cwd(),t||".")),l.existsSync(i)?r?[4,l.remove(i)]:[3,2]:[3,3];case 1:return a.sent(),h.default.info("Remove "+i),[3,3];case 2:throw new Error(i+" Exist");case 3:return l.ensureDirSync(i),"rich"!==n?[3,5]:(s="js"===o?f.TEMPLATE_DOWNLOAD_URL:f.TS_TEMPLATE_DOWNLOAD_URL,h.default.info("⚙️ Installing template. This might take a while...."),[4,v(s,i)]);case 4:return a.sent(),[3,8];case 5:return"empty"!==n?[3,8]:[4,l.copy(p.join((0,_.getPackageRoot)(),"./templates/"+("js"===o?"empty":"empty-ts")),i)];case 6:return a.sent(),[4,(0,_.createProjectConfigFile)(t,i,"ts"===o)];case 7:a.sent(),a.label=8;case 8:return h.default.info("🎉 Successfully created project "+t),[2]}}))}))}},4113:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.logout=t.checkSession=t.loginByPhone=t.sendVerificationCodeToPhone=t.loginByEmail=void 0;var a=r(2747),c=r(7992),u=s(r(3477)),l=r(1728),p=s(r(8366)),d=r(4263),f=r(2893),h=r(8066),_={aid:1365};function v(e){return o(this,void 0,void 0,(function(){var t,r,o,s,a,l,p;return i(this,(function(i){switch(i.label){case 0:t=e.type,r=e.params,o=(0,f.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,c.AxiosInstance.post("mobile"===t?o.url.mobileLogin:o.url.emailLogin,u.default.stringify(n(n({},_),r)),{headers:{"content-type":"application/x-www-form-urlencoded","ignore-channel":!0}})];case 2:return s=i.sent(),a=s.data,l=s.headers,[2,{success:p="success"===a.message,cookies:l["set-cookie"],msg:p?"":a.data.description||"Login failed, please try again",userId:a.data.user_id_str}];case 3:return[2,{success:!1,msg:i.sent().message,cookies:null,userId:""}];case 4:return[2]}}))}))}function m(e){return o(this,void 0,void 0,(function(){var t,r,n,o,s;return i(this,(function(i){switch(i.label){case 0:return t=(0,f.getConfig)(),e?[3,2]:[4,(0,l.getUserCookies)()];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,c.AxiosInstance.get(t.url.getUserInfo,{params:{},headers:{Cookie:e}})];case 3:return r=i.sent().data,n=!r.error,o=void 0,n&&(s=r.data,o={username:s.name||"",avatar:s.avatar||"",developerId:s.developerId||"",mobile:s.mobile||"",email:s.email||"",auditStatus:s.auditStatus||0,uid:s.uId}),[2,{success:n,userData:o,msg:n?"":"Login fail, please try later"}];case 4:return[2,{success:!1,msg:i.sent().message}];case 5:return[2]}}))}))}function E(e){return o(this,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:t=(0,f.getConfig)(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,c.AxiosInstance.get(t.url.sendLoginCode,{params:n(n({},_),{type:24,mobile:e}),headers:{"User-Agent":"bytedanceide"}})];case 2:return r=i.sent().data,[2,{success:o="success"===r.message,msg:o?"":"Get verification code fail, please try later"}];case 3:return[2,{success:!1,msg:i.sent().message}];case 4:return[2]}}))}))}t.loginByEmail=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,s,c,u,p,f,_,E;return i(this,(function(i){switch(i.label){case 0:return t=e.email,r=e.password,n=e.dontSaveCookie,(0,d.validateEmail)(t),[4,v({type:"email",params:{mix_mode:1,email:(0,d.mixEncode)(t),password:(0,d.mixEncode)(r)}})];case 1:if(o=i.sent(),s=o.success,c=o.msg,u=o.cookies,p=o.userId,!s||!u)throw new a.LoginError(c);return[4,m(u)];case 2:if(f=i.sent(),_=f.success,E=f.msg,!_)throw new a.LoginError(E);return n||(0,l.saveUserCookies)(u,p),h.CliMonitor.updateCommonParams({userId:p}),[2,u]}}))}))},t.sendVerificationCodeToPhone=function(e){return o(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return t=e.phoneNumber,(0,d.validatePhoneNumber)(t),[4,E(t)];case 1:if(!(r=n.sent()).success)throw new a.LoginError(r.msg);return[2]}}))}))},t.loginByPhone=function(e){return o(this,void 0,void 0,(function(){var t,r,n,o,s,c,u,p,f,_,E;return i(this,(function(i){switch(i.label){case 0:return t=e.phoneNumber,r=e.code,n=e.dontSaveCookie,(0,d.validatePhoneNumber)(t),(0,d.validateVerificationCode)(r),[4,v({type:"mobile",params:{mobile:t,code:r}})];case 1:if(o=i.sent(),s=o.success,c=o.msg,u=o.cookies,p=o.userId,!s||!u)throw new a.LoginError(c);return[4,m(u)];case 2:if(f=i.sent(),_=f.success,E=f.msg,!_)throw new a.LoginError(E);return n||(0,l.saveUserCookies)(u,p),h.CliMonitor.updateCommonParams({userId:p}),[2,u]}}))}))},t.checkSession=function(){return o(this,void 0,void 0,(function(){var e,t,r,n,o,s;return i(this,(function(i){switch(i.label){case 0:e={isValid:!1,errMsg:null,username:void 0},i.label=1;case 1:return i.trys.push([1,3,,4]),[4,m()];case 2:return t=i.sent(),r=t.success,n=t.msg,o=t.userData,e.isValid=r,e.errMsg=n,e.username=null==o?void 0:o.username,[3,4];case 3:return s=i.sent(),e.errMsg=s.message,[3,4];case 4:return e.isValid?p.default.info("✅ 已登录(Logged in with "+e.username+")"):p.default.info("❌ 未登录(Not logged in, reason: "+e.errMsg+")"),[2,e]}}))}))},t.logout=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){return(0,l.removeUserCookies)(),h.CliMonitor.updateCommonParams({userId:""}),p.default.info("✅ Logout success"),[2]}))}))}},3077:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAppVersions=t.fetchMeta=t.isRealToyId=t.getMeta=void 0;var i=r(2747),s=r(7992),a=r(1728),c=r(4263);function u(e){var t=e.appid,r=e.isGame,c=void 0!==r&&r;return n(this,void 0,void 0,(function(){var e,r,n,u;return o(this,(function(o){switch(o.label){case 0:return e=function(e){return"https://developer.toutiao.com/api/apps/v3/meta?appid="+e+"&aid=13&version=current&ttcode=OVCNW/U0UREwv0sHdY9Rm16vBgGrCQIBOWurUCmJ1H6d/2XHLKeOYTYfEJIEeC0AOCwBZAR2j34C4tFN7Nqfq9tHVEpM4OuJM2b8qz0INtUs1qLhKFOtnGa9/Ey0WW86GGocJk074eP72MMhzNmePzaTQzXwn/eqEq4GHwyF2Tg=&aid=1365"}(t),[4,(0,a.getLogInfoHeaders)(t)];case 1:return r=o.sent(),n={},c&&(e="https://developer.toutiao.com/api/developer/ide/v1/version_info",n.app_id=t,n.stage="current"),[4,s.AxiosInstance.get(e,{headers:r,params:n})];case 2:return(u=o.sent().data).error&&0!==u.error||u.code&&0!==u.code?[4,Promise.reject(new i.MetaError(u.data))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,u]}}))}))}t.getMeta=function(e){var t,r;return n(this,void 0,void 0,(function(){var n,i,s,a;return o(this,(function(o){switch(o.label){case 0:return n=e.appid,i=e.isGame,s=void 0!==i&&i,(0,c.validateAppId)(n),[4,u(e)];case 1:return a=o.sent(),s?[2,{version:null===(t=a.data)||void 0===t?void 0:t.current_version}]:[2,{version:null===(r=a.data)||void 0===r?void 0:r.version}]}}))}))},t.isRealToyId=function(e){return n(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return[4,u({appid:e})];case 1:return[2,!!(t=r.sent().data)&&16===t.tech_type]}}))}))},t.fetchMeta=u,t.getAppVersions=function(e){return n(this,void 0,void 0,(function(){var t,r;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,(0,a.getLogInfoHeaders)(e)];case 1:return t=n.sent(),[4,s.AxiosInstance.get("https://developer.toutiao.com/api/developer/ide/v1/microapp/versions",{headers:t,params:{app_id:e}})];case 2:return(r=n.sent().data).code&&0!==r.code?[4,Promise.reject(new i.MetaError(r.msg))]:[3,4];case 3:return[2,n.sent()];case 4:return[2,r.data];case 5:return n.sent(),[2,{audit_version:"0.0.0"}];case 6:return[2]}}))}))}},5787:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},u=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=void 0;var d=r(2747),f=r(7992),h=p(r(9258)),_=s(r(9849)),v=s(r(1017)),m=p(r(7086)),E=r(7312),g=r(9396),y=r(1728),b=p(r(8366)),O=r(5879),A=r(4486),w=r(4263),C=r(2893),I=r(5834),S=r(1017),P=r(9428),L=p(r(9508)),T=(0,w.getCliDefaultStoragePath)(),R=v.join(T,"preview.json"),D={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},x={preview:D,debug:D};if((0,w.isCli)())if(_.existsSync(R))try{x=_.readJSONSync(R)}catch(e){}else _.ensureFileSync(R),_.writeJsonSync(R,x);function j(e){var t,r,o,i;return a(this,void 0,void 0,(function(){var s,a,u,l,p,v,m,b,O,A,w,I,P,L,T,R,D,x,j,N,M,U,k,F;return c(this,(function(c){switch(c.label){case 0:return s=e.devAppid,a=e.projectPath,u=e.type,l=e.uploadVersion,p=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,m=e.localCompileVersion,b=e.extraCheckInfoJson,A=new h.default,[4,(0,g.getSizeLimitConfig)(s)];case 1:return w=c.sent(),I=1024*w.subTotal*1024,[4,(0,E.folderToZipStream)(a,{whiteList:[],useTypeScript:!1},!0,I)];case 2:return P=c.sent(),L=(0,C.getConfig)(),T=f.AxiosInstance.put,"preview"===u?O=L.microgameUrl.preview+s:(O=L.microgameUrl.upload+s,A.append("version",l),A.append("intro",p),A.append("need_upload_sourcemap",String(!!v)),A.append("extra_check_info_json",b)),[4,_.readJson((0,S.join)(a,"game.json"))];case 3:return R=c.sent(),D=null!==(t=R.subPackages)&&void 0!==t?t:R.subpackages,A.append("subpackage",String(Boolean(null==D?void 0:D.length))),A.append("local_compile_version",null!=m?m:"4.0.4-rc.17.ide.2.cli"),A.append("source",P,{filename:"source.zip"}),M=T,U=[O,A],k={},F={},[4,(0,y.getUserCookies)()];case 4:return[4,M.apply(void 0,U.concat([(k.headers=n.apply(void 0,[(F.Cookie=c.sent(),F),A.getHeaders()]),k.maxBodyLength=I,k)]))];case 5:if(x=c.sent(),j=x.data,N=x.headers,0===j.error||0===j.code)return[2,{metrics:null!==(r=j.performance_metrics)&&void 0!==r?r:{},logId:null!==(o=null==N?void 0:N["x-tt-logid"])&&void 0!==o?o:""}];throw new d.UploadError(null!==(i=j.message)&&void 0!==i?i:j.msg,j.error)}}))}))}function N(e){return a(this,void 0,void 0,(function(){var t,r,n,o;return c(this,(function(i){switch(i.label){case 0:return n={},o={},[4,(0,y.getUserCookies)()];case 1:return n.headers=(o.Cookie=i.sent(),o),t=n,r=(0,C.getConfig)().microgameUrl.compileProgress+e,[4,f.AxiosInstance.get(r,t).then((function(e){var t,r,n,o=e.data||{},i=o.error,s=o.status,a=o.message;return 1===i?{success:!1,done:!1,error:i,msg:a,errLink:null!==(t=e.data.err_link)&&void 0!==t?t:"",passJson:{}}:{success:!0,done:0===i&&2===s,error:i,msg:"",metrics:null!==(r=e.data.performance_metrics)&&void 0!==r?r:{},errLink:null!==(n=e.data.err_link)&&void 0!==n?n:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,i.sent()]}}))}))}function M(e){return a(this,void 0,void 0,(function(){var t=this;return c(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return a(t,void 0,void 0,(function(){var t,i,s,a,u,l,p,f,h;return c(this,(function(c){switch(c.label){case 0:return[4,N(e)];case 1:return t=c.sent(),i=t.success,s=t.msg,a=t.error,u=t.errLink,l=t.metrics,p=t.done,f=t.passJson,i||(clearInterval(o),h=new d.CompileError(s,u,a),n(h)),p&&(clearInterval(o),r({metrics:null!=l?l:{},passJson:f})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function U(e,t){return a(this,void 0,void 0,(function(){var r,n,o,i,s,a,l,p,d;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),r=["**/*.js"],[4,(0,L.default)(r,{cwd:t,onlyFiles:!0,ignore:["**/node_modules/**"]})];case 1:n=c.sent(),o=[],i=function(r){var n=v.join(t,r);try{_.readFileSync(n,"utf-8").split("\n").forEach((function(t,n){t.includes(e)&&o.push(r+":"+(n+1))}))}catch(e){console.error("[precheck/code search] 文件读取错误",e)}};try{for(s=u(n),a=s.next();!a.done;a=s.next())l=a.value,i(l)}catch(e){p={error:e}}finally{try{a&&!a.done&&(d=s.return)&&d.call(s)}finally{if(p)throw p.error}}return[2,o];case 2:return c.sent(),[2,[]];case 3:return[2]}}))}))}function k(e){var t,r,o,i,s,p,_=e.appid,v=e.extraCheckInfoJson,m=e.zipStream,E=e.updateStatus,g=e.setCheckResult,b=e.projectPath,O=e.isNewPlatform;return a(this,void 0,void 0,(function(){var e,a,A,w,C,I,S,P,L,T,R,D,x,j,N,M,k,F,V,G,B,H,Z,q,W;return c(this,(function(c){switch(c.label){case 0:if(e=new h.default,v)return[3,11];if(!b)return[3,9];a=[["side_bar","navigateToScene"],["add_short_cut","addShortcut"],["subscribe_message","requestSubscribeMessage"],["aweme_pay","openAwemeCustomerService"],["normal_pay","requestGamePayment"],["interstitial_ad","createInterstitialAd"],["reward_video_ad","createRewardedVideoAd"]],A={code_use:{}},c.label=1;case 1:c.trys.push([1,6,7,8]),w=u(a),C=w.next(),c.label=2;case 2:return C.done?[3,5]:(I=l(C.value,2),S=I[0],[4,U(I[1],b)]);case 3:P=c.sent(),A.code_use[S]={use:P.length>0,path:P},c.label=4;case 4:return C=w.next(),[3,2];case 5:return[3,8];case 6:return L=c.sent(),F={error:L},[3,8];case 7:try{C&&!C.done&&(V=w.return)&&V.call(w)}finally{if(F)throw F.error}return[7];case 8:return e.append("extra_check_info_json",JSON.stringify(A)),[3,10];case 9:return[2,!1];case 10:return[3,12];case 11:e.append("extra_check_info_json",v),c.label=12;case 12:return m&&e.append("source",m,{filename:"source.zip"}),D=(R=f.AxiosInstance).request,G={url:"https://developer.toutiao.com/api/developer/ide/microgame/v1/check",method:"put",data:e,params:{appid:_}},B={},[4,(0,y.getUserCookies)()];case 13:return[4,D.apply(R,[(G.headers=n.apply(void 0,[(B.Cookie=c.sent(),B),e.getHeaders()]),G)])];case 14:if(4===(T=c.sent().data).status){console.error("预检审核失败,失败原因");try{for(x=u(null!==(t=T.data.check_list)&&void 0!==t?t:[]),j=x.next();!j.done;j=x.next())4===(null==(k=j.value)?void 0:k.status)&&console.error("error: ",null==k?void 0:k.message),3===(null==k?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){H={error:e}}finally{try{j&&!j.done&&(Z=x.return)&&Z.call(x)}finally{if(H)throw H.error}}return null==O||O(null!==(r=null==T?void 0:T.is_game_migrate)&&void 0!==r&&r),null==E||E({upload:1,check:T.data.check_list?T.status:2,compile:1}),null==g||g({status:T.data.check_list?T.status:2,result:null!==(o=T.data.check_list)&&void 0!==o?o:[]}),[2,!1]}if(3===T.status)try{for(N=u(null!==(i=T.data.check_list)&&void 0!==i?i:[]),M=N.next();!M.done;M=N.next())3===(null==(k=M.value)?void 0:k.status)&&console.info("warning: ",null==k?void 0:k.message)}catch(e){q={error:e}}finally{try{M&&!M.done&&(W=N.return)&&W.call(N)}finally{if(q)throw q.error}}else if(0===T.status)throw new d.UploadError(T.message);return null==O||O(null!==(s=null==T?void 0:T.is_game_migrate)&&void 0!==s&&s),null==E||E({upload:1,check:T.data.check_list?T.status:2,compile:1}),null==g||g({status:T.data.check_list?T.status:2,result:null!==(p=T.data.check_list)&&void 0!==p?p:[]}),[2,!0]}}))}))}function F(e){var t,r,n;return a(this,void 0,void 0,(function(){var o,i,s,a,u,l,p,f,h,v,E,y,C,S,L,T,N,U,F,V,G,B,H,Z,q,W,z,J,K,$,X;return c(this,(function(c){switch(c.label){case 0:return o={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},i=e.project,s=e.page,a=e.qrcode,u=e.cache,l=e.uploadOptions,p=e.extraInfoJson,f=e.localCompileVersion,h=e.ideConfig,v=e.debug,E=e.uploadCache,y=e.supportSourcemap,C=e.enableHotRestartCache,S=e.setCheckResult,L=e.updateStatus,T=e.isNewPlatform,N=i.path,[4,(0,P.getProjectHash)(N,!0).catch((function(){return""}))];case 1:return U=c.sent(),F=l?"upload":"preview",V=!1,B=x[G=v?"debug":"preview"]||D,u&&((0,w.isCli)()||(null==h?void 0:h.previewScene)===B.previewScene)&&U&&B.hash===U&&B.shortUrl&&B.expireTime>Date.now()/1e3?(o.shortUrl=B.shortUrl,o.expireTime=B.expireTime,o.originSchema=B.originSchema,o.useCache=!0,b.default.info("项目文件无变动,使用缓存"),V=!0,[3,15]):[3,2];case 2:return(0,O.addNodeToMetrics)(o.metrics,"compileCreate"),[4,(0,g.getAppId)(N)];case 3:return H=c.sent(),[4,(0,g.validateAppId)(H)];case 4:return c.sent(),(0,O.addFieldToMetrics)(o.metrics,"appId",H),Z=b.default.loading("正在准备上传..."),E&&U&&B.hash===U&&B.shortUrl&&B.expireTime>Date.now()/1e3?[3,12]:[4,(0,g.verifyPkgSize)(N)];case 5:if(q=c.sent())throw new d.ProjectError(q);return"upload"!==F||(0,w.isIDE)()?[3,7]:[4,(0,I.getMeta)(H)];case 6:if((W=c.sent())&&l&&1===(0,m.default)(W,l.version))throw new d.UploadError(l.version+" is smaller than "+W+"(online version)");c.label=7;case 7:return"upload"!==F?[3,9]:[4,k({appid:H,extraCheckInfoJson:null!==(t=null==l?void 0:l.extraCheckInfoJson)&&void 0!==t?t:"",updateStatus:L,setCheckResult:S,projectPath:N,isNewPlatform:T})];case 8:if(!c.sent()){if((0,w.isCli)())throw new d.UploadError("审核预检失败");return[2]}c.label=9;case 9:return Z.text="正在上传中...",(0,O.addNodeToMetrics)(o.metrics,"IDERequest"),[4,j({devAppid:H,projectPath:N,type:F,uploadChangeLog:null==l?void 0:l.changeLog,uploadVersion:null==l?void 0:l.version,uploadNeedUploadSourcemap:null==l?void 0:l.needUploadSourcemap,extraCheckInfoJson:null!==(r=null==l?void 0:l.extraCheckInfoJson)&&void 0!==r?r:"",extraInfoJson:p,localCompileVersion:f,supportSourcemap:y})];case 10:return z=c.sent(),(0,O.addFieldToMetrics)(o.metrics,"logId",z.logId),Z.text="查询编译进度中...",[4,M(H)];case 11:J=c.sent(),o.metrics=(0,O.mergeMetrics)(o.metrics,z.metrics,J.metrics),o.passJson=J.passJson,(0,O.addNodeToMetrics)(o.metrics,"IDEReceiveResponse"),c.label=12;case 12:return null===(null==a?void 0:a.format)?[3,14]:(Z.text="生成二维码中...",[4,(0,A.makeSchema)({devAppid:H,extAppid:"",startPage:s.path,query:s.query,scene:s.scene,bdpLog:{launch_from:s.launchFrom,location:s.location},headers:{},ideConfig:h,qrcodeQuery:null==v?void 0:v.query,referrerInfo:s.referrerInfo,hotRestartHash:C&&U?U:"",type:F})]);case 13:K=c.sent(),o.shortUrl=K.shortUrl,o.expireTime=K.expireTime,o.originSchema=K.originSchema,c.label=14;case 14:(0,O.addNodeToMetrics)(o.metrics,"compileClose"),Z.stop(),c.label=15;case 15:return"imageFile"!==(null==a?void 0:a.format)?[3,18]:a.output?[4,(0,A.toQRCodeFile)(o.shortUrl,a.output)]:[3,17];case 16:$=c.sent(),o.qrcodeFilePath=$,b.default.info("二维码图片已存储到 "+$),c.label=17;case 17:return[3,21];case 18:return"imageSVG"!==(null==a?void 0:a.format)?[3,21]:V&&B.qrcodeSVG?(o.qrcodeSVG=B.qrcodeSVG,[3,21]):[3,19];case 19:return X=o,[4,(0,A.toQRCodeSVG)(o.shortUrl)];case 20:X.qrcodeSVG=c.sent(),c.label=21;case 21:return function(e,t){x[t]=e,(0,w.isCli)()&&_.writeJsonSync(R,x)}({shortUrl:o.shortUrl,expireTime:o.expireTime,originSchema:o.originSchema,hash:U,previewScene:null!==(n=null==h?void 0:h.previewScene)&&void 0!==n?n:"default",qrcodeSVG:o.qrcodeSVG},G),[2,o]}}))}))}t.preview=function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,F(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t,r;return a(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,F({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"",launchFrom:"",location:""},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,extraCheckInfoJson:null!==(r=e.extraCheckInfoJson)&&void 0!==r?r:""},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,setCheckResult:null==e?void 0:e.setCheckResult,updateStatus:null==e?void 0:e.updateStatus,isNewPlatform:null==e?void 0:e.isNewPlatform})];case 1:return[2,n.sent()]}}))}))},t.projectToQRCode=F},3098:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5787),t),o(r(9396),t),o(r(5834),t),o(r(7838),t)},5834:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getMicroappInfo=t.getMeta=void 0;var s=r(2747),a=r(7992),c=r(2893),u=r(1728),l=i(r(7086));t.getMeta=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,p;return o(this,(function(o){switch(o.label){case 0:return t=(0,c.getConfig)().microgameUrl.versionInfo+e,p={},[4,(0,u.getUserCookies)()];case 1:return p.Cookie=o.sent(),r=p,[4,a.AxiosInstance.get(t,{headers:r})];case 2:return(n=o.sent().data).error&&0!==n.error||n.error&&0!==n.code?[4,Promise.reject(new s.MetaError(n.message))]:[3,4];case 3:return[2,o.sent()];case 4:return[2,(i=[n.audit_version,n.gray_version,n.online_version].filter(Boolean).sort(l.default))[i.length-1]]}}))}))},t.getMicroappInfo=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,s,c,l;return o(this,(function(o){switch(o.label){case 0:return n={},[4,(0,u.getUserCookies)()];case 1:return n.Cookie=o.sent(),t=n,[4,(0,a.AxiosInstance)({url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e},headers:t,timeout:2e4})];case 2:return r=o.sent(),[2,null!==(l=null===(c=null===(s=null===(i=r.data)||void 0===i?void 0:i.data)||void 0===s?void 0:s.appInfo)||void 0===c?void 0:c.techType)&&void 0!==l?l:null]}}))}))}},7838:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unityCli=void 0;var a=r(7992),c=s(r(9258)),u=r(1728),l=s(r(9849)),p=s(r(1017)),d=r(5834),f=s(r(7086)),h=["0","1","2","3","4","5"],_={0:"队列中",1:"任务已被占用,待执行",2:"构建IL2CPP动态库中",3:"IL2CPP动态库构建完成",4:"从TOS下载文件",5:"打包WebGL",6:"Apk分包",7:"上传文件到TOS",8:"修改sc-config meta配置",9:"发布版本到抖音开放平台",99:"环境准备完成,等待执行",100:"发布成功","-1":"发布失败","-2":"IL2CPP动态库构建失败","-4":"TOS文件下载失败","-5":"打包WebGL失败","-6":"Apk分包","-7":"上传文件到TOS失败","-8":"修改sc-config meta配置失败","-9":"发布版本到抖音开放平台失败","-99":"环境准备失败","-100":"发布超时",uploadError:"",uploadFailed:"发布失败",defaultText:"任务准备中"},v=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o;return i(this,(function(i){switch(i.label){case 0:return[4,l.default.readJSON(p.default.join(e,"project.config.json"))];case 1:if(!(t=i.sent()).unity)throw new Error("project.config.json 中没有 unity 字段");return[2,n({appid:null!==(r=null==t?void 0:t.appid)&&void 0!==r?r:""},null!==(o=null==t?void 0:t.unity)&&void 0!==o?o:{})]}}))}))},m=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,l.default.readJSON(p.default.join(e,"game.json"))];case 1:return[2,t.sent()]}}))}))},E=function(e){var t=e.type,r=e.appid,n=e.uid;return o(void 0,void 0,void 0,(function(){var e,o,s,c,u;return i(this,(function(i){switch(i.label){case 0:e=3,i.label=1;case 1:if(!(e>0))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,a.AxiosInstance.get("https://starkgame.zijieapi.com/api/stark_publish/get_version",{params:{uid:n,appid:r,version_type:t}})];case 3:return o=i.sent(),[2,null!==(u=null===(c=null===(s=o.data)||void 0===s?void 0:s.result)||void 0===c?void 0:c[t])&&void 0!==u?u:{ctime:"",version:""}];case 4:return i.sent(),e--,[3,5];case 5:return[3,1];case 6:return[2,{ctime:"",version:""}]}}))}))},g=function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o;return i(this,(function(i){switch(i.label){case 0:return(e=(0,u.getUserId)())||r?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,E({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 2:return[2,i.sent()]}}))}))},y=function(e){var t=e.projectPath,r=e.version,s=e.publishDesc,p=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,d,f,_,E,g,y,b,O,w,C;return i(this,(function(i){switch(i.label){case 0:return(e=(0,u.getUserId)())||p?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return o=i.sent(),d=o.appid,f=o.publishType,_=o.unityEngineVersion,[4,m(t)];case 2:return E=i.sent(),[4,A(d)];case 3:if(!i.sent())throw new Error("appid: "+d+"为非unity小游戏");if(!_)throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((g=new c.default).append("uid",null!=p?p:parseInt(e)),g.append("app_id",d),g.append("version",r),g.append("publish_type",f),g.append("unity_engine_version",_),g.append("publish_desc",null!=s?s:""),g.append("orientation","portrait"===E.deviceOrientation?"0":"1"),g.append("menu_btn_style","light"===E.menuButtonStyle?"1":"0"),""+f){case"0":y=l.default.createReadStream(o.build.native.il2cpp),g.append("il2cpp_source_file",y,{filename:"il2cpp_source_file.zip"}),b=l.default.createReadStream(o.build.native.apk),g.append("apk_file",b,{filename:"apk_file.apk"});break;case"1":C=l.default.createReadStream(o.build.webgl),g.append("webgl_file",C,{filename:"webgl_file.zip"}),y=l.default.createReadStream(o.build.native.il2cpp),g.append("il2cpp_source_file",y,{filename:"il2cpp_source_file.zip"}),b=l.default.createReadStream(o.build.native.apk),g.append("apk_file",b,{filename:"apk_file.apk"});break;case"2":case"3":O=l.default.createReadStream(o.build.webgl),g.append("webgl_file",O,{filename:"webgl_file.zip"});break;case"4":w=l.default.createReadStream(o.build.instantGame),g.append("ig_file",w,{filename:"ig_file.json"});break;case"5":w=l.default.createReadStream(o.build.instantGame),g.append("ig_file",w,{filename:"ig_file.json"}),C=l.default.createReadStream(o.build.webgl),g.append("webgl_file",C,{filename:"webgl_file.zip"});break;default:throw new Error("Publish type must be in ["+h.join(",")+"]")}return[4,a.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/submit",method:"post",data:g,headers:n({},g.getHeaders()),timeout:18e5})];case 4:return[2,i.sent().data]}}))}))},b=function(e){var t=e.projectPath,r=e.version,n=e.updateStatus,s=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,c,l,p,d;return i(this,(function(f){switch(f.label){case 0:return(e=(0,u.getUserId)())||s?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return c=f.sent(),l=c.appid,p=function(){return a.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/query",method:"post",data:JSON.stringify({uid:""+(null!=s?s:e),app_id:l,version:r}),headers:{"Content-Type":"application/json"}})},d=function(){return new Promise((function(e){var t=setInterval((function(){return o(void 0,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return[4,p()];case 1:return r=o.sent(),null==n||n(r.data.result.status),100===r.data.result.status?(clearInterval(t),e(!0)):0===r.data.result.status||(""+r.data.result.status).startsWith("-")&&(clearInterval(t),e(!1),console.info("发布失败")),[2]}}))}))}),1e3)}))},[4,d()];case 2:return f.sent(),[2]}}))}))},O=function(e){var t=e.projectPath,r=e.version,n=e.publishDesc,s=e.updateStatus,a=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,c,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,y({projectPath:t,version:r,publishDesc:n,ideUid:a})];case 1:return 0!==(null==(e=i.sent())?void 0:e.code)?(_.uploadError=null!==(c=e.message)&&void 0!==c?c:"",s("uploadError"),[2]):[3,3];case 2:return o=i.sent(),_.uploadError=null!==(u=o.message)&&void 0!==u?u:"发布失败",s("uploadError"),[2];case 3:return[4,b({projectPath:t,version:r,updateStatus:s,ideUid:a})];case 4:return i.sent(),[2]}}))}))},A=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,(0,d.getMicroappInfo)(e)];case 1:return 7===(t=r.sent())?[2,!0]:null===t?[2,null]:[2,!1]}}))}))},w=function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,s,a,c,u,l,p,d,f;return i(this,(function(i){switch(i.label){case 0:if(!e)throw new Error("unityConfig is empty");switch(t=e.publishType,r=e.build,""+t){case"0":return[3,1];case"1":return[3,4];case"2":case"3":return[3,8];case"4":return[3,10];case"5":return[3,12]}return[3,15];case 1:return I(null!==(o=null===(n=null==r?void 0:r.native)||void 0===n?void 0:n.apk)&&void 0!==o?o:""),[4,C(null===(s=null==r?void 0:r.native)||void 0===s?void 0:s.il2cpp,"il2cpp产物文件不存在")];case 2:return i.sent(),[4,C(null===(a=null==r?void 0:r.native)||void 0===a?void 0:a.apk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return I(null!==(u=null===(c=null==r?void 0:r.native)||void 0===c?void 0:c.apk)&&void 0!==u?u:""),[4,C(null===(l=null==r?void 0:r.native)||void 0===l?void 0:l.il2cpp,"il2cpp产物文件不存在")];case 5:return i.sent(),[4,C(null===(p=null==r?void 0:r.native)||void 0===p?void 0:p.apk,"apk产物文件不存在")];case 6:case 13:return i.sent(),[4,C(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 8:return[4,C(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 10:return S(null!==(d=null==r?void 0:r.instantGame)&&void 0!==d?d:""),[4,C(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 12:return S(null!==(f=null==r?void 0:r.instantGame)&&void 0!==f?f:""),[4,C(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 15:throw new Error("Publish type must be in ["+h.join(",")+"]");case 16:return[2]}}))}))},C=function(e,t){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,l.default.pathExists(null!=e?e:"")];case 1:if(!r.sent())throw new Error(null!=t?t:"文件不存在");return[2,!0]}}))}))},I=function(e){if(".apk"!==p.default.extname(e))throw new Error("请上传apk文件")},S=function(e){if(".json"!==p.default.extname(e))throw new Error("请上传json文件")},P=function(e,t){return-1===(0,f.default)(e,t)};t.unityCli={getVersions:function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,s,a,c;return i(this,(function(i){switch(i.label){case 0:return(e=(0,u.getUserId)())||r?[4,v(t)]:(console.info("请先登录"),[2]);case 1:n=i.sent(),o=n.appid,s={},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,E({uid:null!=r?r:parseInt(e),appid:o,type:"current"})];case 3:return a=i.sent(),Object.assign(s,{current:a}),[3,5];case 4:return i.sent(),[3,5];case 5:return i.trys.push([5,7,,8]),[4,E({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 6:return c=i.sent(),Object.assign(s,{latest:c}),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,s]}}))}))},getLatestVersion:g,preview:function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,s,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),(e=(0,u.getUserId)())||r?[4,v(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,a.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/make_qrcode",method:"post",data:JSON.stringify({uid:null!=r?r:parseInt(e),appid:o,version_type:"latest"}),headers:{"content-type":"application/json"},responseType:"arraybuffer"})];case 2:return s=i.sent(),[2,"data:image/png;base64,"+Buffer.from(s.data).toString("base64")];case 3:return c=i.sent(),console.info("【Error】:",c),[2,null];case 4:return[2]}}))}))},upload:y,queryProgress:b,uploadAndQueryProgress:O,validateFiles:w,validateAppId:A,validateVersion:P,PROGRESS:_,isUnity:function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,v(e)];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},unityUpload:function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,s,a,c,u;return i(this,(function(i){switch(i.label){case 0:return t=e.projectPath,r=e.version,n=e.publishType,o=e.deviceOrientation,n?[4,l.default.readJSON(p.default.join(t,"project.config.json"))]:[3,3];case 1:return(null==(s=i.sent())?void 0:s.unity)?(s.unity.publishType=n,[4,l.default.writeJSON(p.default.join(t,"project.config.json"),s)]):[3,3];case 2:i.sent(),i.label=3;case 3:return o?[4,l.default.readJSON(p.default.join(t,"game.json"))]:[3,6];case 4:return(null==(a=i.sent())?void 0:a.deviceOrientation)?(a.deviceOrientation=o,[4,l.default.writeJSON(p.default.join(t,"game.json"),a)]):[3,6];case 5:i.sent(),i.label=6;case 6:return[4,v(t)];case 7:return c=i.sent(),[4,w(c)];case 8:return i.sent(),[4,A(c.appid)];case 9:if(!i.sent())throw new Error("appid: "+c.appid+"为非unity小游戏");return[4,g({projectPath:t})];case 10:if(u=i.sent(),!P(u.version,r))throw new Error("版本号必须大于最新版本号"+u.version);return[4,O(e)];case 11:return i.sent(),[2]}}))}))}}},155:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPathByteSize=t.getDirByteSize=t.getFileByteSize=t.byte2Mb=t.mb2Byte=void 0;var s=i(r(7147)),a=i(r(9508));t.mb2Byte=function(e){return 1024*e*1024},t.byte2Mb=function(e,t){return void 0===t&&(t=4),Number((e/1024/1024).toFixed(t))},t.getFileByteSize=function(e){return s.default.statSync(e).size},t.getDirByteSize=function(e,r,i){return void 0===r&&(r=[]),void 0===i&&(i=[]),n(void 0,void 0,void 0,(function(){var n;return o(this,(function(o){switch(o.label){case 0:return[4,(0,a.default)(i,{cwd:e,ignore:r,absolute:!0,dot:!0})];case 1:return n=o.sent(),[4,Promise.all(n.map((function(e){return(0,t.getFileByteSize)(e)})))];case 2:return[2,o.sent().reduce((function(e,t){return e+t}),0)]}}))}))},t.getPathByteSize=function(e,r,n){return void 0===r&&(r=[]),void 0===n&&(n=["**"]),s.default.statSync(e).isDirectory()?(0,t.getDirByteSize)(e,r,n):(0,t.getFileByteSize)(e)}},9396:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validateAppId=t.getAppId=t.checkAppId=t.checkUCAppId=t.compressZip=t.getDirHash=t.verifyPkgSize=t.getSizeLimitConfig=t.PKG_HASH_IGNORE_LIST=t.PKG_SIZE_IGNORE_GLOBS=void 0;var u=c(r(3732)),l=r(2896),p=c(r(9849)),d=c(r(1017)),f=r(2747),h=r(155),_=r(3077),v=r(9882),m=r(7992),E=r(1728),g=r(2893);t.PKG_SIZE_IGNORE_GLOBS=["**/.*","**/.*/**/*","**/node_modules/**","**/**.js.map"],t.PKG_HASH_IGNORE_LIST=[".*","node_modules"],t.getSizeLimitConfig=function(e){return o(void 0,void 0,void 0,(function(){var t,r,o,s,a,c,u;return i(this,(function(i){switch(i.label){case 0:return t={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},s=(o=m.AxiosInstance).get,a=[""+(0,g.getConfig)().microgameUrl.sizeLimit+e],c={},u={},[4,(0,E.getUserCookies)()];case 1:return[4,s.apply(o,a.concat([(c.headers=(u.Cookie=i.sent(),u),c)]))];case 2:if(0!==(r=i.sent().data).err_no)throw new Error(null==r?void 0:r.err_msg);return[2,n(n({},t),r.limit)]}}))}))};var y=function(e,t,r){return e+"大小为:"+t+"MB,超过 "+r+"MB。"};t.verifyPkgSize=function(e){return o(void 0,void 0,void 0,(function(){var r,n,o,a,c,u,l,f,_,m,E,g,b,O,A,w,C;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),[4,p.default.readJson(d.default.join(e,"game.json"))];case 1:return r=i.sent(),n=r.openDataContext,o=null!==(C=r.subPackages)&&void 0!==C?C:r.subpackages,[4,(0,t.getAppId)(e)];case 2:return a=i.sent(),[4,(0,t.getSizeLimitConfig)(a)];case 3:return c=i.sent(),u=[],n?[4,(0,h.getPathByteSize)(d.default.join(e,n),t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))]:[3,5];case 4:return f=i.sent(),[3,6];case 5:f=0,i.label=6;case 6:return(l=f)>(0,h.mb2Byte)(c.openData)&&u.push(y("小游戏开放数据域文件",(0,h.byte2Mb)(l),c.openData)),_=!(null==o?void 0:o.length),m=_?c.normalTotal:c.subTotal,[4,(0,h.getPathByteSize)(e,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))];case 7:return(E=i.sent())>(0,h.mb2Byte)(m)&&u.push(y("小游戏包",(0,h.byte2Mb)(E),m)),_?[2,u.length?u.join("\n")+"\n请调整包大小再进行上传":""]:[4,Promise.all(o.map((function(r){var n=d.default.join(e,r.root);return(0,h.getPathByteSize)(n,t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))})))];case 8:return g=i.sent(),b=g.map((function(e,t){return[o[t],e]})).filter((function(e){var t=s(e,2);return t[0],t[1]>(0,h.mb2Byte)(c.subPkg)})),b.length>0&&u.push(b.map((function(e){return s(e,1)[0].name})).join("、")+" 子包大小为:"+b.map((function(e){var t=s(e,2),r=(t[0],t[1]);return(0,h.byte2Mb)(r)+"MB"})).join("、")+",超过 "+c.subPkg+"MB。"),O=g.reduce((function(e,t){return e+t}),0),(A=E-l-O)>(0,h.mb2Byte)(c.subMain)&&u.push(y("小游戏分包主包",(0,h.byte2Mb)(A),c.subMain)),[2,u.length?u.join("\n")+"\n请调整包大小再进行上传":""];case 9:return[2,(w=i.sent())instanceof Error?w.message:String(w)];case 10:return[2]}}))}))},t.getDirHash=function(e){return o(void 0,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,(0,l.hashElement)(e,{encoding:"hex",folders:{exclude:t.PKG_HASH_IGNORE_LIST}})];case 1:return[2,r.sent().hash]}}))}))},t.compressZip=function(e,r,n){return void 0===n&&(n=[]),new Promise((function(c,l){return o(this,void 0,void 0,(function(){var o,f,h;return i(this,(function(i){switch(i.label){case 0:return o=d.default.resolve(r,d.default.basename(e)+".zip"),f=p.default.createWriteStream(o),h=(0,u.default)("zip",{zlib:{level:9}}),f.on("close",(function(){return c(o)})),h.on("error",(function(e){return console.error("压缩失败:",e),l(e)})),h.pipe(f),h.glob("**/*",{cwd:e,ignore:a(a([],s(t.PKG_SIZE_IGNORE_GLOBS),!1),s(n),!1)},{}),[4,h.finalize()];case 1:return i.sent(),[2]}}))}))}))},t.checkUCAppId=function(e){return/^tt[0-9a-f]{16}(07)$/.test(e)},t.checkAppId=function(e){return/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e)},t.getAppId=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,p.default.readJson(d.default.join(e,"project.config.json"))];case 1:return"testappid"===(t=r.sent()).appid.toLocaleLowerCase()?[2,"tt975be1e608633d4202"]:[2,t.appid]}}))}))},t.validateAppId=function(e){return o(void 0,void 0,void 0,(function(){var r,n;return i(this,(function(o){switch(o.label){case 0:if((0,t.checkUCAppId)(e))throw r="当前小游戏 AppId 为 "+e+",为Unity&UE小游戏 AppId, 不支持该类型小游戏",new f.ProjectError(r);if(!(0,t.checkAppId)(e))throw new f.ProjectError("请使用正确的 AppId");return[4,(0,_.fetchMeta)({appid:e})];case 1:if((n=o.sent().data)&&2!==n.tech_type)throw new f.ProjectError("请使用小游戏的 AppId");return[2]}}))}))}},8733:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t},__awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildNpm=void 0;var fs_extra_1=__webpack_require__(9849),path=__importStar(__webpack_require__(1017));function buildNpm(options){return __awaiter(this,void 0,void 0,(function(){var cwd,_a,projectPath,packNpm;return __generator(this,(function(_b){switch(_b.label){case 0:return cwd=process.cwd(),_a=options.projectPath,projectPath=void 0===_a?cwd:_a,path.isAbsolute(projectPath)||(projectPath=path.resolve(cwd,projectPath)),[4,Promise.all([(0,fs_extra_1.access)(path.resolve(projectPath,"package.json")),(0,fs_extra_1.access)(path.resolve(projectPath,"node_modules"))])];case 1:return _b.sent(),packNpm=eval("require")("@tt-miniprogram/ext-pack").packNpm,[4,new Promise((function(e){packNpm({rootPath:projectPath,isWatch:!1},(function(t,r){e(t?{success:!1,reason:t.message||t.toString()}:{success:!0,reason:r})}))}))];case 2:return[2,_b.sent()]}}))}))}exports.buildNpm=buildNpm},7239:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(2081)),c=i(r(9849)),u=i(r(1017)),l=r(8066),p=r(2696),d=s(r(8366)),f=r(4263),h=l.CliMonitor.getInstance({cliVersion:"2.0.8",cliName:"tt-minigame-ide-cli"});t.default=function(e,t){var r=e.projectPath,n=e.mode,o=e.type;u.isAbsolute(r)||(r=u.join(process.cwd(),r));var i=!1;try{c.accessSync(r),i=!0}catch(e){d.default.error('The "projectPath" not exist. [path=%s]',r)}var s=(0,f.isMac)()?"open":"start";t&&(s="export BYTEDANCE_IDE_REMOTE_PORT="+t+" && "+s);var _="";i?(d.default.info("Open project. [path=%s]",r),_+="path="+r+"&project-type="+o,"full"!==n&&"lite"!==n||(d.default.info("mode=%s",n),_+="&mode="+n)):d.default.info("Open IDE");var v=s+" "+p.IDE_SCHEMA+"?"+encodeURIComponent(_);return new Promise((function(e,t){a.exec(v,(function(r){r?(d.default.error("Open IDE failed. [err=%o]",r),t(r)):(d.default.info("Open IDE success"),"lite"===n&&h.report(l.CLI_EVENTS.IDE_LITE_MODE_ENTER,{from:"cli"}),e())}))}))}},7312:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},u=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prettyProjectSize=t.folderToZipStream=t.verifySubPackageSize=t.getProjectSize=t.getFolderSize=void 0;var p=r(2747),d=r(4415),f=l(r(3732)),h=l(r(6883)),_=l(r(9508)),v=i(r(1017)),m=r(4263),E=l(r(9849)),g=r(9882);function y(e,t,r,n,o){return void 0===r&&(r={}),s(this,void 0,void 0,(function(){var i,s,l,d,f,h,y,b,O,A,w;return a(this,(function(a){switch(a.label){case 0:i=r.ignore,s=void 0===i?[]:i,a.label=1;case 1:return a.trys.push([1,6,,7]),[4,E.default.lstat(e)];case 2:if((l=a.sent().isFile())&&!e.endsWith(".js"))throw new Error("subPackage root should be a valid js or a directory");return d=l?v.resolve(e,"../"):e,f=_.default.convertPathToPattern(d),h=_.default.convertPathToPattern(e),[4,(0,_.default)(l?h:(0,g.getWhiteList)(n),{cwd:f,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(s.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})];case 3:return y=a.sent(),(null==o?void 0:o.length)>0?(o=o.filter(m.isGameFileValid),[4,(0,_.default)(o,{cwd:f,ignore:["**/node_modules/**","**/**.js.map","**/__wxToTT/report/**"].concat(s.map((function(e){return(0,m.isMac)()?e:e.replace(/\\/g,"/")}))),absolute:!0,onlyFiles:!0,stats:!0})]):[3,5];case 4:b=(b=a.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(f)})),y.push.apply(y,u([],c(b),!1)),a.label=5;case 5:return O=new Map,y.forEach((function(e){O.set(e.path,e)})),A=0,O.forEach((function(e,r){!t&&r.endsWith(".ts")||t&&r.endsWith(".js")&&O.has(r.replace(/\.js$/,".ts"))||(A+=e.stats?e.stats.size:0)})),[2,A];case 6:throw w=a.sent(),new p.ProjectError(w.toString());case 7:return[2]}}))}))}function b(e,t){return void 0===t&&(t=!1),s(this,void 0,void 0,(function(){var r,n,o,i,c,u,l,p,f,h,_,g,b=this;return a(this,(function(O){switch(O.label){case 0:return v.isAbsolute(e)||(e=v.join(process.cwd(),e)),[4,(0,m.getProjectConfig)(e)];case 1:return[4,(r=O.sent()).getAppJSON()];case 2:return n=O.sent().rawJSON,o={main:void 0,sub:[],openData:void 0,total:0},i=0,c=v.join(e,r.getMiniprogramRoot()),u=n.subPackages||n.subpackages||[],l=r.useTypeScript(),p=Array.isArray(n.gameFiles)?n.gameFiles:[],[4,y(c,l,{ignore:u.map((function(e){var t=v.join(c,e.root);return E.default.lstatSync(t).isFile()?t:v.join(t,"**")}))},t,p)];case 3:return f=O.sent(),Array.isArray(u)&&u.length>0?(h=u.reduce((function(e,t){return!t.root||e.includes(t.root)||e.push(t.root),e}),[]),[4,Promise.all(h.map((function(e){return s(b,void 0,void 0,(function(){var r;return a(this,(function(n){switch(n.label){case 0:return[4,y(v.join(c,e),l,{},t)];case 1:return r=n.sent(),[2,{path:(0,d.ensureEndSlash)(e),size:r}]}}))}))})))]):[3,5];case 4:_=O.sent(),i+=_.reduce((function(e,t){return e+t.size}),0),o.sub=_,O.label=5;case 5:return t&&n.openDataContext?[4,y(v.join(c,n.openDataContext),l,{},t)]:[3,7];case 6:g=O.sent(),o.openData={path:(0,d.ensureEndSlash)(n.openDataContext),size:g},i+=g,f-=g,O.label=7;case 7:return o.total=i+f,o.main={path:c,size:f},[2,o]}}))}))}t.getFolderSize=y,t.getProjectSize=b,t.verifySubPackageSize=function(e,t){return s(this,void 0,void 0,(function(){var r,n,o,i,s,c,u,l,f,h;return a(this,(function(a){switch(a.label){case 0:return[4,e.getAppJSON()];case 1:r=a.sent(),n=r.isGame,o=e.projectPath,i={mainMax:4194304,subMax:2097152,totalMax:16777216},"preview"===t&&e.getBigPackageSizeSupport()&&(i.mainMax=8388608,i.subMax=4194304,i.totalMax=25165824),n&&(i.mainMax=1/0,i.subMax=1/0,i.totalMax=20971520),s=[],a.label=2;case 2:return a.trys.push([2,4,,7]),[4,b(o,n)];case 3:return c=a.sent(),[3,7];case 4:return u=a.sent(),console.error("获取包体积失败",u),[4,(0,m.sleep)(1e3)];case 5:return a.sent(),[4,b(o,n)];case 6:return c=a.sent(),[3,7];case 7:if(!c)throw Error("获取包体积失败");if(c.total>i.totalMax&&s.push("项目源码包大小 "+(0,d.formatSize)(c.total)+",超过 "+(0,d.formatSize)(i.totalMax)+"。"),(c.sub.length>0||c.openData)&&(l=c.main,f=c.sub,h=c.openData,l.size>i.mainMax&&s.push("主包大小为 "+(0,d.formatSize)(l.size)+",超过 "+(0,d.formatSize)(i.mainMax)+"。"),null==f||f.forEach((function(e){e.size>i.subMax&&s.push(e.path+" 子包大小为 "+(0,d.formatSize)(e.size)+", 超过 "+(0,d.formatSize)(i.subMax)+"。")})),(null==h?void 0:h.size)>i.subMax&&s.push("开放数据域大小为 "+(0,d.formatSize)(h.size)+", 超过 "+(0,d.formatSize)(i.subMax)+"。")),s.length>0)throw new p.PackageSizeError(s.join("\n")+"\n可点击【查看解决方案】查看包体积优化方案,修改后重试。");return[2]}}))}))};var O=new Map;t.folderToZipStream=function(e,t,r,n){var o=t.whiteList,i=void 0===o?[]:o,l=t.useTypeScript;return void 0===n&&(n=m.HIGH_WATER_MARK),s(this,void 0,void 0,(function(){var t,o,d,h,E,y=this;return a(this,(function(b){switch(b.label){case 0:return t=function(){return s(y,void 0,void 0,(function(){var t,o,s,d,h,E,y,b,O;return a(this,(function(a){switch(a.label){case 0:return t=(0,f.default)("zip",{highWaterMark:n,statConcurrency:(0,m.maxConcurrency)()}),o=(0,g.getWhiteList)(r).concat(i),[4,(0,_.default)(o,{cwd:e,stats:!1,dot:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})];case 1:return s=a.sent(),r?[3,6]:[4,(0,m.getProjectConfig)(e)];case 2:return d=a.sent(),h=v.join(e,d.getMiniprogramRoot()),[4,d.getAppJSON()];case 3:return[4,a.sent().getKey("gameFiles")];case 4:return E=null!==(O=a.sent())&&void 0!==O?O:[],Array.isArray(E)&&E.length>0?(E=E.filter(m.isGameFileValid),[4,(0,_.default)(E,{cwd:h,dot:!1,stats:!1,ignore:[".*/**/*","**/node_modules/**","**/__wxToTT/report/**"]})]):[3,6];case 5:y=(y=a.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})),s.push.apply(s,u([],c(y),!1)),a.label=6;case 6:return(b=new Set(s)).forEach((function(r){l&&r.endsWith(".js")&&b.has(r.replace(/\.js$/,".ts"))||!l&&r.endsWith(".ts")||t.file(v.join(e,r),{name:r})})),t.on("warning",(function(e){if("ENOENT"!==e.code)throw new p.CompressError(e.message);console.warn("archiver with error "+e.message)})).on("error",(function(e){throw new p.CompressError(e.message)})),[4,t.finalize()];case 7:return a.sent(),[2,t]}}))}))},(o=O.get(e))?[4,o]:[3,2];case 1:b.sent(),b.label=2;case 2:d=t(),O.set(e,d),b.label=3;case 3:return b.trys.push([3,5,,6]),[4,d];case 4:return h=b.sent(),O.delete(e),[2,h];case 5:throw E=b.sent(),O.delete(e),E;case 6:return[2]}}))}))},t.prettyProjectSize=function(e){var t=e.total,r=e.main,n=e.sub,o=e.openData,i=[["主包",r.size]];null==n||n.sort((function(e,t){return t.size-e.size})).forEach((function(e){i.push([e.path,e.size])})),o&&i.push(["开放数据文件夹("+o.path+")",o.size]);var s=new h.default;return i.forEach((function(e){s.cell("路径",e[0]),s.cell("体积",(0,d.formatSize)(e[1]),h.default.leftPadder(" ")),s.newRow()})),s.total("体积",{reduce:function(e,r,n,o){return t},printer:function(e,r){return"总体积:"+(0,d.formatSize)(t)}}),s.toString()}},5796:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},u=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},l=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.projectToQRCode=t.upload=t.preview=t.checkProjectMatchAppid=t.checkChannel=void 0;var d=r(2747),f=r(7992),h=p(r(9258)),_=s(r(9849)),v=s(r(1017)),m=p(r(7086)),E=r(7312),g=r(5138),y=r(9428),b=r(1728),O=p(r(8366)),A=r(5879),w=r(4486),C=r(4263),I=r(2893),S=r(3077);function P(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var L=(0,C.getCliDefaultStoragePath)(),T=v.join(L,"preview.json"),R={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default",page:{}};if((0,C.isCli)())if(_.existsSync(T))try{R=_.readJSONSync(T)}catch(e){}else _.ensureFileSync(T),_.writeJsonSync(T,R);function D(e){var t,r,o;return a(this,void 0,void 0,(function(){var i,s,a,u,l,p,_,v,m,g,y,O,A,w,S,L,T,R,D,j,N,M,U,k,F,V,G,B,H,Z;return c(this,(function(c){switch(c.label){case 0:return i=e.devAppid,s=e.extAppid,a=e.projectPath,u=e.type,l=e.uploadVersion,p=e.uploadChangeLog,_=e.uploadNeedUploadSourcemap,v=e.uploadNeedCheck,m=e.extraCheckInfoJson,g=e.localCompileVersion,y=e.extraInfoJson,O=e.interactGame,A=e.supportSourcemap,w=e.useTypeScript,S=e.channel,T=new h.default,R=i,D="",O||"upload"!==u?[3,2]:[4,x(i,S)];case 1:c.sent(),c.label=2;case 2:return[4,(0,E.folderToZipStream)(a,{whiteList:O?["**/*"]:_?["**/*.map"]:void 0,useTypeScript:w},!1)];case 3:return j=c.sent(),N=(0,I.getConfig)(),M=f.AxiosInstance.put,O?[3,4]:("preview"===u?(s&&(R=s,D="?devappid="+i),L=P(N.url.preview,R)+D):(L=P(N.url.upload,R),T.append("version",l),T.append("intro",p),T.append("need_upload_sourcemap",String(!!_)),T.append("need_check",String(!!v)),T.append("extra_check_info_json",m),S&&T.append("tag",S)),T.append("source",j,{filename:"source.zip"}),T.append("local_compile_version",null!=g?g:"4.0.0-cli"),y&&T.append("extra_info_json",y),[3,6]);case 4:return M=f.AxiosInstance.post,T.append("app_id",R),T.append("tech_type",16),[4,(0,C.getMD5Stream)(j)];case 5:U=c.sent(),T.append("src_md5",U.__md5),T.append("src",U,{filename:"src.zip"}),"preview"===u?(L=N.interactGameUrl.preview,T.append("extra_json",y)):(L=N.interactGameUrl.upload,T.append("version",l),T.append("intro",p),T.append("extra_json",y)),c.label=6;case 6:return A&&T.append("is_debug","1"),G=M,B=[L,T],Z={},H=[{}],[4,(0,b.getLogInfoHeaders)(i)];case 7:return[4,G.apply(void 0,B.concat([(Z.headers=n.apply(void 0,[n.apply(void 0,H.concat([c.sent()])),T.getHeaders()]),Z.maxBodyLength=33554432,Z)]))];case 8:if(k=c.sent(),F=k.data,V=k.headers,0===F.error||0===F.code)return[2,{metrics:null!==(t=F.performance_metrics)&&void 0!==t?t:{},logId:null!==(r=null==V?void 0:V["x-tt-logid"])&&void 0!==r?r:""}];throw new d.UploadError(null!==(o=F.message)&&void 0!==o?o:F.msg,F.error)}}))}))}function x(e,t){return a(this,void 0,void 0,(function(){var r;return c(this,(function(n){switch(n.label){case 0:if(!t)return[2];if(!/^[1-9]\d*$/.test(t))throw new d.UploadError("通道只能是大于0的整数");return[4,j(e)];case 1:if((r=n.sent().limit_num)&&Number(t)>=r)throw new d.UploadError("通道不能大于 "+(r-1));return[4,B(e)];case 2:if(n.sent())throw new d.UploadError("沙盒小程序不支持通道");return[2]}}))}))}function j(e){return a(this,void 0,void 0,(function(){var t,r,n;return c(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),n={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,[4,f.AxiosInstance.get("https://microapp.bytedance.com/api/developer/ide/v1/microapp/get_exist_test_version?app_id="+e,t)];case 2:if(0===(r=o.sent()).data.code)return[2,r.data.data];throw new Error(r.data.msg);case 3:throw o.sent(),new Error("获取通道限制失败");case 4:return[2]}}))}))}function N(e,t,r,n){return void 0===n&&(n=!1),a(this,void 0,void 0,(function(){var o,i,s,a,u;return c(this,(function(c){switch(c.label){case 0:return u={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return u.headers=c.sent(),o=u,i=e,s="","",r&&t&&(i=t,s="?devappid="+e),a=n?(0,I.getConfig)().interactGameUrl.compileProgress+"?app_id="+e+"&stage="+(r?"preview":"latest"):P((0,I.getConfig)().url.compileProgress,i)+s,[4,f.AxiosInstance.get(a,o).then((function(e){var t,r,o,i,s,a,c,u,l,p,d=e.data||{},f=d.error,h=d.status,_=d.message;return n&&(f=null===(t=e.data)||void 0===t?void 0:t.code,h=null===(o=null===(r=e.data)||void 0===r?void 0:r.data)||void 0===o?void 0:o.status,_=null!==(a=null===(s=null===(i=e.data)||void 0===i?void 0:i.data)||void 0===s?void 0:s.msg)&&void 0!==a?a:null===(c=e.data)||void 0===c?void 0:c.msg),1===f||n&&(1===h||0!==f)?{success:!1,done:!1,error:f,msg:_,errLink:null!==(u=e.data.err_link)&&void 0!==u?u:"",passJson:{}}:{success:!0,done:0===f&&2===h,error:f,msg:"",metrics:null!==(l=e.data.performance_metrics)&&void 0!==l?l:{},errLink:null!==(p=e.data.err_link)&&void 0!==p?p:"",passJson:JSON.parse(e.data.pass_json||"{}")}})).catch((function(e){return{success:!1,done:!1,error:-1,msg:e.message,metrics:{},errLink:"",passJson:{}}}))];case 2:return[2,c.sent()]}}))}))}function M(e,t,r,n){return void 0===n&&(n=!1),a(this,void 0,void 0,(function(){var o=this;return c(this,(function(i){switch(i.label){case 0:return[4,new Promise((function(i,s){var u=setInterval((function(){return a(o,void 0,void 0,(function(){var o,a,l,p,f,h,_,v,m;return c(this,(function(c){switch(c.label){case 0:return[4,N(e,t,r,n)];case 1:return o=c.sent(),a=o.success,l=o.msg,p=o.error,f=o.errLink,h=o.metrics,_=o.done,v=o.passJson,a||(clearInterval(u),m=new d.CompileError(l,f,p),s(m)),_&&(clearInterval(u),i({metrics:null!=h?h:{},passJson:v})),[2]}}))}))}),1e3)}))];case 1:return[2,i.sent()]}}))}))}function U(e){return a(this,void 0,void 0,(function(){var t,r,n;return c(this,(function(o){switch(o.label){case 0:return n={},[4,(0,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,r=(0,I.getConfig)().url.check+"?app_id="+e,[4,f.AxiosInstance.get(r,t).then((function(e){var t,r,n,o,i=e.data||{},s=i.code,a=i.err_msg;if(0!==s)return{success:!1,done:!1,error:s,msg:a,status:1};var c=null===(r=null===(t=e.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.status;return{success:!0,done:2===c||3===c,error:s,msg:"",status:c,result:(null===(o=null===(n=e.data)||void 0===n?void 0:n.data)||void 0===o?void 0:o.check_list)||[]}})).catch((function(e){return{success:!1,error:-1,msg:e.message,status:1,done:!1}}))];case 2:return[2,o.sent()]}}))}))}function k(e){return a(this,void 0,void 0,(function(){var t=this;return c(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=setInterval((function(){return a(t,void 0,void 0,(function(){var t,i,s,a,u,l,p;return c(this,(function(c){switch(c.label){case 0:return[4,U(e)];case 1:return t=c.sent(),i=t.success,s=t.msg,a=t.done,u=t.status,l=t.result,p=void 0===l?[]:l,i||(clearInterval(o),n({msg:s})),a&&(clearInterval(o),r({status:u,result:p})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function F(e,t){return void 0===t&&(t=e.getAppid()),a(this,void 0,void 0,(function(){var r,n,o;return c(this,(function(i){switch(i.label){case 0:return[4,Promise.all([e.detectProjectType("game"),(0,S.isRealToyId)(t)])];case 1:if(r=u.apply(void 0,[i.sent(),2]),n=r[0],o=r[1],!n&&o)throw new d.ProjectError('当前项目为小程序项目,但是 "'+t+'" 属于小玩法 ID。');if(n&&!o)throw new d.ProjectError('当前项目为小玩法项目,但是 "'+t+'" 属于小程序 ID。');return[2]}}))}))}function V(e,t){var r,n;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o=o.filter((function(t){return void 0!==e[t]})),i=i.filter((function(e){return void 0!==t[e]})),o.length!==i.length)return!1;try{for(var s=l(o),a=s.next();!a.done;a=s.next()){var c=a.value;if(!i.includes(c)||!V(e[c],t[c]))return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!0}function G(e,t){var r;return void 0===t&&(t=5e3),a(this,void 0,void 0,(function(){var n,o,i,s,a,u,l,p,f,h,v,b,I,P,L,x,j,N,U,G,B,H,Z,q,W,z,J,K,$,X,Q,Y,ee,te,re;return c(this,(function(c){switch(c.label){case 0:return n={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},o=e.project,i=e.page,s=e.qrcode,a=e.cache,u=e.uploadOptions,l=e.extraInfoJson,p=e.localCompileVersion,f=e.ideConfig,h=e.debug,v=e.uploadCache,b=e.interactGame,I=e.supportSourcemap,P=e.enableHotRestartCache,L=e.penetrateMapJson,x=e.updateStatus,j=e.setCheckResult,N=e.traceVersion,U=o.path,G="",v||a?[4,(0,y.getProjectHash)(U,!1,t)]:[3,2];case 1:G=c.sent(),c.label=2;case 2:return B=u?"upload":"preview",H=!1,a&&((0,C.isCli)()||(null==f?void 0:f.previewScene)===R.previewScene)&&G&&R.hash===G&&R.shortUrl&&R.expireTime>Date.now()/1e3&&V(i,R.page)?(n.shortUrl=R.shortUrl,n.expireTime=R.expireTime,n.originSchema=R.originSchema,n.useCache=!0,O.default.info("项目文件无变动,使用缓存"),H=!0,[3,19]):[3,3];case 3:return(0,A.addNodeToMetrics)(n.metrics,"compileCreate"),[4,(0,C.getProjectConfig)(U)];case 4:return[4,(Z=c.sent()).getRealAppid()];case 5:return q=c.sent(),(0,C.validateAppId)(q),[4,F(Z,q)];case 6:return c.sent(),(0,A.addFieldToMetrics)(n.metrics,"appId",q),W=null,"preview"!==B?[3,8]:[4,(0,g.detectValidExtApp)(q,U)];case 7:if((z=c.sent()).invalidReason||(W=z.ext.extAppid),z.invalidReason&&z.invalidReason.reason!==g.INVALID_EXTAPP_REASON.EXT_DISABLED&&z.invalidReason.reason!==g.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new d.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'+z.invalidReason.errMsg);c.label=8;case 8:return J=O.default.loading("正在准备上传..."),v&&G&&R.hash===G&&R.shortUrl&&R.expireTime>Date.now()/1e3?[3,16]:[4,(0,E.verifySubPackageSize)(Z,B)];case 9:return c.sent(),"upload"!==B||b||(0,C.isIDE)()?[3,11]:[4,(0,S.getAppVersions)(q)];case 10:if(K=c.sent().audit_version,u.version||(u.version=(0,C.getNextVersion)(K),O.default.info("\nThe default version is "+u.version+".")),K&&u&&1===(0,m.default)(K,u.version))throw new d.UploadError(u.version+" is smaller than "+K+"(pre order version)");c.label=11;case 11:return $={upload:1,check:1,compile:1},J.text="正在上传中...",null==x||x($),(0,A.addNodeToMetrics)(n.metrics,"IDERequest"),[4,D({devAppid:q,extAppid:W,projectPath:U,type:B,uploadChangeLog:null==u?void 0:u.changeLog,uploadVersion:null==u?void 0:u.version,uploadNeedUploadSourcemap:null==u?void 0:u.needUploadSourcemap,uploadNeedCheck:null==u?void 0:u.needUploadCheck,extraCheckInfoJson:null==u?void 0:u.extraCheckInfoJson,extraInfoJson:l,localCompileVersion:p,interactGame:b,supportSourcemap:I,useTypeScript:Z.useTypeScript(),channel:null==u?void 0:u.channel})];case 12:return X=c.sent(),$.upload=2,null==x||x($),(0,A.addFieldToMetrics)(n.metrics,"logId",X.logId),(null==u?void 0:u.needUploadCheck)?(J.text="查询预检进度中...",[4,k(q)]):[3,14];case 13:Q=c.sent(),$.check=Q.status,null==x||x($),null==j||j(Q),c.label=14;case 14:return J.text="查询编译进度中...",[4,M(q,W,"preview"===B,!!b)];case 15:Y=c.sent(),$.compile=2,null==x||x($),n.metrics=(0,A.mergeMetrics)(n.metrics,X.metrics,Y.metrics),n.passJson=Y.passJson,(0,A.addNodeToMetrics)(n.metrics,"IDEReceiveResponse"),c.label=16;case 16:return null===(null==s?void 0:s.format)?[3,18]:(J.text="生成二维码中...",[4,(0,w.makeSchema)({devAppid:q,extAppid:W,startPage:i.path,query:i.query,scene:i.scene,bdpLog:{launch_from:i.launchFrom,location:i.location},headers:{},ideConfig:f,qrcodeQuery:null==h?void 0:h.query,referrerInfo:i.referrerInfo,hotRestartHash:P&&G?G:"",type:B,penetrateMapJson:L,traceVersion:N,isInteractGame:!!b})]);case 17:ee=c.sent(),n.shortUrl=ee.shortUrl,n.expireTime=ee.expireTime,n.originSchema=ee.originSchema,c.label=18;case 18:(0,A.addNodeToMetrics)(n.metrics,"compileClose"),J.stop(),c.label=19;case 19:return"imageFile"!==(null==s?void 0:s.format)?[3,22]:s.output?[4,(0,w.toQRCodeFile)(n.shortUrl,s.output)]:[3,21];case 20:te=c.sent(),n.qrcodeFilePath=te,O.default.info("二维码图片已存储到 "+te),c.label=21;case 21:return[3,25];case 22:return"imageSVG"!==(null==s?void 0:s.format)?[3,25]:H&&R.qrcodeSVG?(n.qrcodeSVG=R.qrcodeSVG,[3,25]):[3,23];case 23:return re=n,[4,(0,w.toQRCodeSVG)(n.shortUrl)];case 24:re.qrcodeSVG=c.sent(),c.label=25;case 25:return function(e){R=e,(0,C.isCli)()&&_.writeJsonSync(T,R)}({shortUrl:n.shortUrl,expireTime:n.expireTime,originSchema:n.originSchema,hash:G,previewScene:null!==(r=null==f?void 0:f.previewScene)&&void 0!==r?r:"default",qrcodeSVG:n.qrcodeSVG,page:i}),[2,n]}}))}))}function B(e){var t,r,o;return a(this,void 0,void 0,(function(){var i,s,a,u;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),s=f.AxiosInstance,u={url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e}},a=[{}],[4,(0,b.getLogInfoHeaders)(e)];case 1:return[4,s.apply(void 0,[(u.headers=n.apply(void 0,a.concat([c.sent()])),u.timeout=2e4,u)])];case 2:return i=c.sent(),[2,(null===(o=null===(r=null===(t=null==i?void 0:i.data)||void 0===t?void 0:t.data)||void 0===r?void 0:r.appInfo)||void 0===o?void 0:o.isSandboxApp)||!1];case 3:return c.sent(),[2,!1];case 4:return[2]}}))}))}t.checkChannel=x,t.checkProjectMatchAppid=F,t.preview=function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,G(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t;return a(this,void 0,void 0,(function(){return c(this,(function(r){switch(r.label){case 0:return[4,G({project:e.project,qrcode:null!==(t=e.qrcode)&&void 0!==t?t:{format:null,output:"",options:{}},page:{path:"",query:"",scene:"990001",launchFrom:"scan",location:"qr_code"},cache:!1,copyToClipboard:!!e.copyToClipboard,uploadOptions:{version:e.version,changeLog:e.changeLog,needUploadSourcemap:!!e.needUploadSourcemap,needUploadCheck:!!e.needUploadCheck,extraCheckInfoJson:JSON.stringify({}),channel:e.channel},extraInfoJson:e.extraInfoJson,localCompileVersion:e.localCompileVersion,ideConfig:e.ideConfig,interactGame:e.interactGame,penetrateMapJson:e.penetrateMapJson})];case 1:return[2,r.sent()]}}))}))},t.projectToQRCode=G},5138:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.detectValidExtApp=t.INVALID_EXTAPP_REASON=void 0;var s,a=r(8559),c=r(7992),u=r(1728),l=i(r(8366)),p=r(2747);!function(e){e[e.INVALID_APPID_META=0]="INVALID_APPID_META",e[e.INVALID_EXTAPPID=1]="INVALID_EXTAPPID",e[e.EXT_DISABLED=2]="EXT_DISABLED",e[e.INVALID_EXT_JSON=3]="INVALID_EXT_JSON",e[e.INVALID_AUTH=4]="INVALID_AUTH",e[e.NULL=5]="NULL"}(s=t.INVALID_EXTAPP_REASON||(t.INVALID_EXTAPP_REASON={}));var d=function(){function e(){this._thirdPartyMetaMap={}}return e.prototype.getThirdPartyMeta=function(e){var t,r,i,s;return n(this,void 0,void 0,(function(){var n,a,d,f,h,_;return o(this,(function(o){switch(o.label){case 0:return this._thirdPartyMetaMap[e]?[2,this._thirdPartyMetaMap[e]]:(n={isThirdPartyApp:!1,thirdPartyName:""},[4,(0,u.getLogInfoHeaders)(e)]);case 1:a=o.sent(),d="https://microapp.bytedance.com/api/v1/app/"+e+"/meta",f={headers:a},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,c.AxiosInstance.get(d,f)];case 3:return h=o.sent().data,this._thirdPartyMetaMap[e]={isThirdPartyApp:h.data.is_thirdparty_dev,thirdPartyName:h.data.thirdparty.name},[3,5];case 4:if(_=o.sent(),401===(null===(t=_.response)||void 0===t?void 0:t.status))throw new p.LoginError(null!==(s=null===(i=null===(r=_.response)||void 0===r?void 0:r.data)||void 0===i?void 0:i.message)&&void 0!==s?s:"尚未登录");return l.default.error("getThirdPartyMeta",_),[2,n];case 5:return[2,this._thirdPartyMetaMap[e]]}}))}))},e.prototype.checkExtAppIdAuth=function(e,t){var r,i,s,a;return n(this,void 0,void 0,(function(){var n,d,f,h;return o(this,(function(o){switch(o.label){case 0:return n="https://microapp.bytedance.com/api/thirdparty/validate_ext_appid?dev_appid="+e+"&ext_appid="+t,[4,(0,u.getLogInfoHeaders)(e)];case 1:d=o.sent(),f={headers:d},o.label=2;case 2:return o.trys.push([2,4,,5]),[4,c.AxiosInstance.get(n,f)];case 3:return[2,0===o.sent().data.error];case 4:if(h=o.sent(),401===(null===(r=h.response)||void 0===r?void 0:r.status))throw new p.LoginError(null!==(a=null===(s=null===(i=h.response)||void 0===i?void 0:i.data)||void 0===s?void 0:s.message)&&void 0!==a?a:"尚未登录");return l.default.error("checkExtAppIdAuth",h),[2,!1];case 5:return[2]}}))}))},e.prototype.getExtData=function(e){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,a.ProjectConfig.from(e)];case 1:return[4,t.sent().getExtJSON()];case 2:return[2,t.sent().rawJSON];case 3:return t.sent(),[2,null];case 4:return[2]}}))}))},e.prototype.detectValidExtApp=function(e,t){return n(this,void 0,void 0,(function(){var r,n,i,a,c;return o(this,(function(o){switch(o.label){case 0:return r={invalidReason:null,ext:null,thirdPartyName:null},[4,this.getExtData(t)];case 1:return(n=o.sent())?n.extEnable?n.extAppid?[4,this.getThirdPartyMeta(e)]:(r.invalidReason={reason:s.INVALID_EXTAPPID,errMsg:"ext.json 中 extAppid 异常"},[2,r]):(r.invalidReason={reason:s.EXT_DISABLED,errMsg:"ext.json 中 extEnable 为 false"},[2,r]):(r.invalidReason={reason:s.INVALID_EXT_JSON,errMsg:"请检查项目根目录 ext.json 是否存在或者格式是否正确"},[2,r]);case 2:return i=o.sent(),a=i.isThirdPartyApp,c=i.thirdPartyName,a?[4,this.checkExtAppIdAuth(e,n.extAppid)]:(r.invalidReason={reason:s.INVALID_APPID_META,errMsg:"当前 appid 获取不到第三方平台信息,请检查当前 appId 是否可以合法预览并且正常关联第三方平台"},[2,r]);case 3:return o.sent()?(r.ext=n,r.thirdPartyName=c,[2,r]):(r.invalidReason={reason:s.INVALID_AUTH,errMsg:"当前 AppID 没有资质开发对应的第三方小程序,请检查 project.config.json 中的 “appid” 字段以及 ext.json 中的 “extAppid” 字段是否填写正确"},[2,r])}}))}))},e.Instance=new e,e}();t.detectValidExtApp=d.Instance.detectValidExtApp.bind(d.Instance)},8956:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=t.microgame=t.folderToZipStream=t.setAppConfig=t.makeSchema=t.INVALID_EXTAPP_REASON=t.checkProjectMatchAppid=t.verifySubPackageSize=t.getProjectSize=t.detectValidExtApp=t.getConfig=t.setCookieFn=t.projectToQRCode=t.upload=t.preview=t.buildNpm=t.getAuditHostsList=t.audit=t.checkSession=t.sendVerificationCodeToPhone=t.logout=t.loginByPhone=t.loginByEmail=t.create=t.setConfig=t.open=void 0;var l=r(9345);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return l.audit}}),Object.defineProperty(t,"getAuditHostsList",{enumerable:!0,get:function(){return l.getAuditHostsList}});var p=r(2893);Object.defineProperty(t,"getConfig",{enumerable:!0,get:function(){return p.getConfig}}),Object.defineProperty(t,"setConfig",{enumerable:!0,get:function(){return p.setConfig}});var d=r(2173);Object.defineProperty(t,"create",{enumerable:!0,get:function(){return d.createProject}});var f=r(4113);Object.defineProperty(t,"checkSession",{enumerable:!0,get:function(){return f.checkSession}}),Object.defineProperty(t,"loginByEmail",{enumerable:!0,get:function(){return f.loginByEmail}}),Object.defineProperty(t,"loginByPhone",{enumerable:!0,get:function(){return f.loginByPhone}}),Object.defineProperty(t,"logout",{enumerable:!0,get:function(){return f.logout}}),Object.defineProperty(t,"sendVerificationCodeToPhone",{enumerable:!0,get:function(){return f.sendVerificationCodeToPhone}});var h=r(8733),_=u(r(7239)),v=r(7312);Object.defineProperty(t,"getProjectSize",{enumerable:!0,get:function(){return v.getProjectSize}}),Object.defineProperty(t,"verifySubPackageSize",{enumerable:!0,get:function(){return v.verifySubPackageSize}});var m=r(5796);Object.defineProperty(t,"checkProjectMatchAppid",{enumerable:!0,get:function(){return m.checkProjectMatchAppid}}),Object.defineProperty(t,"preview",{enumerable:!0,get:function(){return m.preview}}),Object.defineProperty(t,"projectToQRCode",{enumerable:!0,get:function(){return m.projectToQRCode}});var E=r(5138);Object.defineProperty(t,"detectValidExtApp",{enumerable:!0,get:function(){return E.detectValidExtApp}}),Object.defineProperty(t,"INVALID_EXTAPP_REASON",{enumerable:!0,get:function(){return E.INVALID_EXTAPP_REASON}});var g=r(1728);Object.defineProperty(t,"setCookieFn",{enumerable:!0,get:function(){return g.setCookieFn}});var y=r(4486);Object.defineProperty(t,"makeSchema",{enumerable:!0,get:function(){return y.makeSchema}});var b=r(8066),O=r(9251);Object.defineProperty(t,"setAppConfig",{enumerable:!0,get:function(){return O.setAppConfig}}),t.open=function(e){return a(this,void 0,void 0,(function(){var t,r;return c(this,(function(n){switch(n.label){case 0:return t=e.project,r=e.remotePort,[4,(0,_.default)({projectPath:t.path,mode:t.mode,type:"microapp"},r)];case 1:return[2,n.sent()]}}))}))},t.buildNpm=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:return t=e.project,[4,(0,h.buildNpm)({projectPath:t.path})];case 1:return[2,r.sent()]}}))}))},t.upload=function(e){var t,r;return a(this,void 0,void 0,(function(){var n;return c(this,(function(o){switch(o.label){case 0:return C.reportCommandCall("upload"),[4,(0,m.upload)(e)];case 1:return n=o.sent(),C.report(b.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(t=n.metrics)||void 0===t?void 0:t.appId)||"",logid:(null===(r=n.metrics)||void 0===r?void 0:r.logId)||""}),[2,n]}}))}))},i(r(3077),t);var A=r(7312);Object.defineProperty(t,"folderToZipStream",{enumerable:!0,get:function(){return A.folderToZipStream}}),i(r(5879),t),t.microgame=s(r(3098));var w=r(9428);Object.defineProperty(t,"getProjectHash",{enumerable:!0,get:function(){return w.getProjectHash}}),Object.defineProperty(t,"setProjectHashFn",{enumerable:!0,get:function(){return w.setProjectHashFn}});var C=b.CliMonitor.getInstance({cliVersion:"2.0.8",cliName:"tt-minigame-ide-cli"});C.report(b.CLI_EVENTS.IDE_CLI_LAUNCH)},7145:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CliMonitor=void 0;var i=r(4084),s=o(r(2037)),a=r(8223),c=r(2893),u=r(4122),l=r(4263),p=r(1728),d="";function f(){if(!d)try{d=(0,a.machineIdSync)(!0)}catch(e){console.error(e)}return d}var h=function(){function e(e){this._didReportLaunch=!1;var t=e.cliVersion,r=e.cliName;"true"!==process.env.isIDE?(this._commonParams={ideVersion:t,deviceId:f(),osPlatform:s.default.platform(),osVersion:s.default.release(),cliName:r},this._commonData={userId:(0,p.getUserId)(),username:""}):(this._commonParams={ideVersion:t,deviceId:"",osPlatform:s.default.platform(),osVersion:s.default.release(),cliName:r},this._commonData={userId:"",username:""})}return e.updateCommonParams=function(e){this._instance._commonData=Object.assign(this._instance._commonData,e)},e.getInstance=function(t){return this._instance||(this._instance=new e(t)),this._instance},e.prototype.shouldReport=function(e){return!(!1===(0,c.getConfig)().allowReportEvent||"true"===process.env.isIDE||e===u.CLI_EVENTS.IDE_CLI_LAUNCH&&this._didReportLaunch||"no"===process.env.ALLOW_REPORT_EVENT)},e.prototype.report=function(e,t){void 0===t&&(t={}),this.shouldReport(e)&&(e===u.CLI_EVENTS.IDE_CLI_LAUNCH&&(this._didReportLaunch=!0,t.scene=(0,l.isCli)()?"cli":"require"),(0,i.reportTeaImmediately)(this._commonParams,[{event:e,params:n(n({},t),this._commonData)}]))},e.prototype.reportCommandCall=function(e){this.report("IDE_CLI_COMMAND_CALL",{command_name:e})},e}();t.CliMonitor=h},4122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=void 0,t.CLI_EVENTS={IDE_CLI_LAUNCH:"IDE_CLI_LAUNCH",IDE_CLI_COMMAND_CALL:"IDE_CLI_COMMAND_CALL",IDE_CLI_PREVIEW_SUCCESS:"IDE_CLI_PREVIEW_SUCCESS",IDE_CLI_PREVIEW_FAIL:"IDE_CLI_PREVIEW_FAIL",IDE_CLI_UPLOAD_SUCCESS:"IDE_CLI_UPLOAD_SUCCESS",IDE_CLI_UPLOAD_FAIL:"IDE_CLI_UPLOAD_FAIL",IDE_CLI_ERROR:"IDE_CLI_ERROR",IDE_LITE_MODE_ENTER:"IDE_LITE_MODE_ENTER"}},8066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLI_EVENTS=t.CliMonitor=void 0;var n=r(7145);Object.defineProperty(t,"CliMonitor",{enumerable:!0,get:function(){return n.CliMonitor}});var o=r(4122);Object.defineProperty(t,"CLI_EVENTS",{enumerable:!0,get:function(){return o.CLI_EVENTS}})},2696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TS_TEMPLATE_DOWNLOAD_URL=t.TEMPLATE_DOWNLOAD_URL=t.IDE_SCHEMA=void 0,t.IDE_SCHEMA="bytedanceide:",t.TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master.zip",t.TS_TEMPLATE_DOWNLOAD_URL="https://sf1-cdn-tos.douyinstatic.com/obj/microapp/frontend/ide/template/tma-demo-master-ts.zip"},1728:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.getLogInfoHeaders=t.setCookieFn=t.removeUserCookies=t.saveUserCookies=t.getUserId=t.getUserCookies=void 0;var u=i(r(9849)),l=i(r(1017)),p=r(2893),d=r(4263),f=r(9251),h="",_="";function v(){var e=(0,p.getConfig)();return l.join(e.storagePath,".cookies")}t.getUserCookies=function(){return s(void 0,void 0,void 0,(function(){var e,t;return a(this,(function(r){if(h)return[2,h];try{return[2,h=null!==(t=null===(e=u.readFileSync(v(),"utf-8").split("\n")[0])||void 0===e?void 0:e.trim())&&void 0!==t?t:""]}catch(e){throw h="",new Error("检测到本地无 Cookie,请重新登录")}return[2]}))}))},t.getUserId=function(){var e,t;if(_)return _;try{_=null!==(t=null===(e=u.readFileSync(v(),"utf-8").split("\n")[1])||void 0===e?void 0:e.trim())&&void 0!==t?t:""}catch(e){_=""}return _},t.saveUserCookies=function(e,t){if(_=t,e&&!(e.length<1)){var r=v();u.ensureFileSync(r),h=function(e){void 0===e&&(e=[]);var t=function(e){return void 0===e&&(e=[]),e.map((function(e){var t={name:"",value:""};return e.split("; ").reduce((function(e,t,r){var n=c(t.split("="),2),o=n[0],i=n[1];return 0===r?(e.name=o,e.value=i,e):(e[o]=i,e)}),t),t}))}(e);return function(e,t,r){void 0===t&&(t="sessionid_microapp"),void 0===r&&(r="sessionid_dy_open");var n=function(e,t){return void 0===t&&(t="sessionid_microapp"),e.find((function(e){return e.name===t}))}(e,t);return e.concat([Object.assign({},n,{name:"sessionid"}),Object.assign({},n,{name:r})])}(t)}(e).map((function(e){return e.name+"="+e.value})).join(";");var n=h+"\n"+t;u.writeFileSync(l.join(r),n)}},t.removeUserCookies=function(){h="",_="";try{u.removeSync(v())}catch(e){if("ENOENT"===e.code)return;throw e}},t.setCookieFn=function(e){t.getUserCookies=e},t.getLogInfoHeaders=function(e){return s(void 0,void 0,void 0,(function(){var r,n,o;return a(this,(function(i){switch(i.label){case 0:if((0,d.isIDE)()||!(r=(0,f.getToken)(e)))return[3,5];if(!r)return[3,5];n=void 0,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,(0,t.getUserCookies)()];case 2:return n=i.sent(),[3,4];case 3:return i.sent(),n="",[3,4];case 4:return[2,{"x-cli-token":r,"x-cli-appid":e,Cookie:n}];case 5:return o={},[4,(0,t.getUserCookies)()];case 6:return[2,(o.Cookie=i.sent(),o)]}}))}))}},9428:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setProjectHashFn=t.getProjectHash=void 0;var i=r(2896),s=r(2747),a=r(4263),c=r(9882);t.getProjectHash=function(e,t,r){return n(void 0,void 0,void 0,(function(){var r,n;return o(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=(0,a.isMac)()?(0,c.getWhiteList)(t):(0,c.getWhiteList)(t).map((function(e){return"*".concat(e.slice(3))})),[4,(0,i.hashElement)(".",e,{encoding:"hex",folders:{exclude:[".*","node_modules"]},files:{include:r,matchBasename:!1,matchPath:!0}})];case 1:return[2,o.sent().hash];case 2:throw n=o.sent(),new s.HashError("获取工程文件夹 hash 失败:"+n.toString());case 3:return[2]}}))}))},t.setProjectHashFn=function(e){return n(this,void 0,void 0,(function(){var r=this;return o(this,(function(i){return t.getProjectHash=function(t,i,s){return void 0===s&&(s=5e3),n(r,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r){var n=setTimeout((function(){console.info("[hash project timeout]"),r("")}),s);e(t,i,s).then((function(e){clearTimeout(n),r(e)})).catch((function(){clearTimeout(n),r("")}))}))];case 1:return[2,r.sent()]}}))}))},[2]}))}))}},8366:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(r(1606)),a=i(r(8838)),c=r(3837),u=r(4263),l=function(){function e(){}return e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.loading=function(e){return{color:"green",text:e,stop:function(){}}},e.prototype.stopLoading=function(){},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l),d=null,f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.info(s.default.green(c.format.apply(null,e)))},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.warn(s.default.yellow(c.format.apply(null,e)))},t.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error(s.default.red(c.format.apply(null,e)))},t.prototype.loading=function(e){return d=(0,a.default)({text:e,interval:80}).start()},t.prototype.stopLoading=function(){d&&(d.stop(),d=null)},t}(l),h=(0,u.isCli)()?new f:new p;t.default=h},5879:function(e,t){"use strict";var r=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=t.mergeMetrics=t.addFieldToMetrics=t.addNodeToMetrics=void 0,t.addNodeToMetrics=function(e,t){e.nodes||(e.nodes=[]),e.nodes.push({node:t,timestamp:Date.now()})},t.addFieldToMetrics=function(e,t,r){"nodes"!==t&&void 0!==r&&(e[t]=r)},t.mergeMetrics=function(){for(var e,t,s,a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var u={nodes:[]};try{for(var l=n(a.filter(Boolean)),p=l.next();!p.done;p=l.next()){var d=p.value,f=d.nodes,h=r(d,["nodes"]);for(var _ in(s=u.nodes).push.apply(s,i([],o(null!=f?f:[]),!1)),h)void 0!==h[_]&&null!==h[_]&&(u[_]=h[_])}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}return u};var s=function(){function e(){this.nodes=[],this.tags={}}return e.prototype.addNode=function(e,t){return void 0===t&&(t=Date.now()),this.nodes.push({node:e,timestamp:t}),this},e.prototype.updateField=function(e,t){return void 0!==t?this.tags[e]=t:delete this.tags[e],this},e.prototype.merge=function(){for(var e,t,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];try{for(var s=n(o.filter(Boolean)),a=s.next();!a.done;a=s.next()){var c=a.value,u=c.nodes,l=r(c,["nodes"]);for(var p in this.nodes=this.nodes.concat(u),l)void 0!==l[p]&&(this.tags[p]=l[p])}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this},e.prototype.settle=function(e){void 0===e&&(e=!1);var t=Object.assign({},this.tags);return t.nodes=this.nodes,e&&this.clear(),t},e.prototype.clear=function(){return this.nodes=[],this.tags={},this},e}();t.Metrics=s},4486:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateTerminalQrCode=t.toQRCodeFile=t.toQRCodeSVG=t.makeSchema=void 0;var l=r(2747),p=r(7992),d=u(r(1887)),f=u(r(1017)),h=u(r(3727)),_=s(r(4563)),v=r(2893),m=r(1728),E=u(r(8366)),g=r(4263);t.makeSchema=function(e){var t=this;return new Promise((function(r,o){return a(t,void 0,void 0,(function(){var t,i,s,a,u,d,f,h,_,E,y,b,O,A,w,C,I,S,P,L,T,R,D,x,j,N,M,U,k;return c(this,(function(c){switch(c.label){case 0:return t=e.devAppid,i=e.extAppid,s=e.startPage,a=e.query,u=e.scene,d=e.bdpLog,f=e.qrcodeQuery,h=e.headers,_=e.ideConfig,E=e.isInteractGame,y=e.referrerInfo,b=e.hotRestartHash,O=e.type,A=e.penetrateMapJson,w=e.traceVersion,C=(0,v.getConfig)().url.makeSchema,I={},i&&(I={devappid:t}),[4,(0,m.getLogInfoHeaders)(t)];case 1:S=c.sent(),P=s?s+"?"+a:"",L={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(x=null==_?void 0:_.inspectPlatform)&&void 0!==x?x:"all",ide_version:null==_?void 0:_.ideVersion,ide_os:null==_?void 0:_.ideOS,ide_device_id:null==_?void 0:_.ideDid,ide_user_id:null==_?void 0:_.ideUid,iOS_debug_version:+(null==_?void 0:_.iOSDebugVersion),connect_type:null==_?void 0:_.connectType,local_debug:String(null==_?void 0:_.localDebug),dycloud_config:{call_container:null!==(N=null===(j=null==_?void 0:_.dycloudConfig)||void 0===j?void 0:j.callContainer)&&void 0!==N?N:null,websocket:null!==(U=null===(M=null==_?void 0:_.dycloudConfig)||void 0===M?void 0:M.websocket)&&void 0!==U?U:null},extra_info:null!==(k=null==_?void 0:_.extraInfo)&&void 0!==k?k:{}},(null==_?void 0:_.isSandbox)&&Object.assign(L,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),T={start_page:encodeURIComponent(P),query:null!=a?a:"",scene:""+u,bdp_log:JSON.stringify(d),penetrate_map_json:JSON.stringify(null!=A?A:n({referer_info:y,ide_inspect_version:6,trace_version:w,ide_live_debug:"live"===(null==_?void 0:_.previewScene),ide_config:L},b&&{hot_restart_version:b}))},f&&Object.assign(T,f),E&&(C=(0,v.getConfig)().interactGameUrl.makeSchema),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,p.AxiosInstance.post(C,n(n({app_id:i||t,stage:"upload"===O?"latest":"preview"},I),{schema_params:T}),{headers:Object.assign(S,h)})];case 3:return R=c.sent(),(0,g.isIDE)()&&console.info("makeSchema result",R),0===R.data.code?((0,g.isIDE)()&&console.info("makeSchema",R.data.data),r({originSchema:E?R.data.data.schema_v2:R.data.data.origin_schema,shortUrl:R.data.data.short_url,expireTime:+R.data.data.expire_time})):o(new l.SchemaError(R.data.msg)),[3,5];case 4:return D=c.sent(),o(new l.SchemaError(D.toString())),[3,5];case 5:return[2]}}))}))}))},t.toQRCodeSVG=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:return r.trys.push([0,1,,3]),[2,h.default.toString(e,{type:"svg",margin:0,color:{light:"#00000000"}})];case 1:return t=r.sent(),[4,Promise.reject(new l.QRCodeError(t.toString()))];case 2:return[2,r.sent()];case 3:return[2]}}))}))},t.toQRCodeFile=function(e,t){return a(this,void 0,void 0,(function(){var r;return c(this,(function(n){switch(n.label){case 0:f.default.isAbsolute(t)||(t=f.default.resolve(process.cwd(),t)),n.label=1;case 1:return n.trys.push([1,3,,5]),[4,h.default.toFile(t,e,{color:{light:"#0000"}})];case 2:return n.sent(),[2,t];case 3:return r=n.sent(),[4,Promise.reject(new l.QRCodeError(r.toString()))];case 4:return[2,n.sent()];case 5:return[2]}}))}))},t.generateTerminalQrCode=function(e,t){_.generate(e,{small:t.small});var r="";t.copy&&(d.default.writeSync(e),r="(已拷贝到剪贴板)"),t.small&&E.default.warn("small QR Code may not work in some environments"),E.default.info("二维码信息:"+e+" "+r)}},4263:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=t.isObject=t.isGameFileValid=t.getNextVersion=t.getMD5Stream=t.getAppJson=t.getProjectConfig=t.getAppid=t.getCliDefaultStoragePath=t.clearConsole=t.mixEncode=t.validateAppId=t.validateEmail=t.validateVerificationCode=t.validatePhoneNumber=t.getPackageRoot=t.createProjectConfigFile=t.cleanArgs=t.maxConcurrency=t.isIDE=t.isMiniGameCli=t.isCli=t.isMac=t.HIGH_WATER_MARK=void 0;var u=r(2747),l=r(8559),p=c(r(6113)),d=i(r(9849)),f=i(r(2037)),h=i(r(1017)),_=i(r(4521)),v=r(2781);function m(){return"true"===process.env.isMiniGameCli}t.HIGH_WATER_MARK=33554432,t.isMac=function(){return"darwin"===process.platform},t.isCli=function(){return"true"===process.env.isCli},t.isMiniGameCli=m,t.isIDE=function(){return"true"===process.env.isIDE};var E=1;function g(e){if(!/^tt[0-9a-f]{16}([0-9a-f]{2})?$/.test(e))throw new u.ProjectError('AppId "'+e+'" is not valid')}t.maxConcurrency=function(){return E||(E=f.cpus().length),E},t.cleanArgs=function(e){return e.options.reduce((function(t,r){var n=r.long.replace(/^--/,"").replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}));return"function"!=typeof e[n]&&void 0!==e[n]&&(t[n]=e[n]),t}),{})},t.createProjectConfigFile=function(e,t,r){return void 0===r&&(r=!1),s(this,void 0,void 0,(function(){var n,o;return a(this,(function(i){switch(i.label){case 0:return n='{\n "setting": {\n "urlCheck": true,\n "es6": true,\n "postcss": true,\n "minified": true,\n "newFeature": true,\n "useCompilerPlugins": ['+(r?'"typescript"':"")+']\n },\n "miniprogramRoot": "./",\n "appid": "testappId",\n "projectname": "'+e+'"\n }',o=h.resolve(t,"project.config.json"),[4,d.writeFile(o,n)];case 1:return[2,i.sent()]}}))}))},t.getPackageRoot=function(){return h.join(__dirname,"..")},t.validatePhoneNumber=function(e){if(!/^1[3-9]\d{9}$/.test(e))throw new u.LoginError('PhoneNumber "'+e+'" is invalid')},t.validateVerificationCode=function(e){if(!/^\d{4}$/.test(e))throw new u.LoginError('VerificationCode "'+e+'" is invalid')},t.validateEmail=function(e){if(!/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/.test(e))throw new u.LoginError('Email "'+e+'" is invalid')},t.validateAppId=g,t.mixEncode=function(e){for(var t=e.toString(),r=[],n=0,o=t.length;n<o;n++)r.push(t.charCodeAt(n));return r.map((function(e){return(5^e).toString(16)})).join("")},t.clearConsole=function(e){if(process.stdout.isTTY){var t="\n".repeat(process.stdout.rows);console.log(t),_.cursorTo(process.stdout,0,0),_.clearScreenDown(process.stdout),e&&console.log(e)}},t.getCliDefaultStoragePath=function(){var e=m()?".tmg-cli/":".tma-cli/";return h.join(f.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return g(t),t},t.getProjectConfig=function(e){return s(this,void 0,void 0,(function(){var t;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,4]),[4,l.ProjectConfig.from(e)];case 1:case 3:return[2,r.sent()];case 2:return t=r.sent(),[4,Promise.reject(new u.ProjectError('Parsing "project.config.json" with error. '+t.toString()))];case 4:return[2]}}))}))},t.getAppJson=function(e,t,r){return s(this,void 0,void 0,(function(){var n,o,i,s;return a(this,(function(a){switch(a.label){case 0:n=(r?"game":"app")+".json",a.label=1;case 1:return a.trys.push([1,3,,5]),o=e.getMiniprogramRoot(),i=h.join(t,o,n),[4,d.readJSON(i)];case 2:return[2,a.sent()];case 3:return s=a.sent(),[4,Promise.reject(new u.ProjectError('Parsing "'+n+'" file with error. '+s.toString()))];case 4:return[2,a.sent()];case 5:return[2]}}))}))},t.getMD5Stream=function(e){return s(this,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r,n){var o=p.default.createHash("md5"),i=new v.Transform({writableHighWaterMark:t.HIGH_WATER_MARK,readableHighWaterMark:t.HIGH_WATER_MARK,transform:function(e,t,r){o.update(e),r(null,e)}});i.__md5="",e.pipe(i),e.on("end",(function(){i.__md5=o.digest("hex"),r(i)})).on("error",(function(e){n(new u.CompressError("MD5 calculation failed "+e.message))}))}))];case 1:return[2,r.sent()]}}))}))},t.getNextVersion=function(e){try{var t=e.match(/\d+/g);return t[2]=(parseInt(t[2])+1).toString(),t.join(".")}catch(e){return"0.0.1"}},t.isGameFileValid=function(e){return!(".."===e||/\.\.(\\|\/)/.test(e)||/(\\|\/)\.\./.test(e))},t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)},t.sleep=function(e){return new Promise((function(t){setTimeout((function(){t(null)}),e)}))}},9882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWhiteList=t.ALLOWED_MICROGAME_EXTS_REG=void 0;var n=r(4263),o=Object.freeze(["**/*.json","**/*.js","**/*.png","**/*.jpg","**/*.jpeg","**/*.gif","**/*.svg","**/*.cer","**/*.mp3","**/*.aac","**/*.m4a","**/*.mp4","**/*.wav","**/*.flac","**/*.ape","**/*.ogg","**/*.wma","**/*.midi","**/*.ogv","**/*.webm","**/*.mkv","**/*.ttc","**/*.ttf","**/*.woff","**/*.otf","**/*.obj","**/*.dae","**/*.fbx","**/*.mtl","**/*.stl","**/*.3ds","**/*.pvr","**/*.plist","**/*.fnt","**/*.gz","**/*.ccz","**/*.bmp","**/*.atlas","**/*.swf","**/*.ani","**/*.part","**/*.proto","**/*.bin","**/*.sk","**/*.mipmaps","**/*.txt","**/*.zip","**/*.tt","**/*.map","**/*.silk","**/*.dbbin","**/*.dbmv","**/*.etc","**/*.lmat","**/*.lm","**/*.ls","**/*.lh","**/*.lani","**/*.lav","**/*.lsani","**/*.ltc","**/*.xml","**/*.pkm","**/*.scene","**/*.csv","**/*.prefab","**/*.mesh","**/*.wasm","**/*.wasm.br"]);t.ALLOWED_MICROGAME_EXTS_REG=new RegExp("\\.("+o.map((function(e){return e.match(/\.([^.]+)$/)[1]})).join("|")+")$");var i=Object.freeze(["**/*.js","**/*.json","**/*.sjs","**/*.ts","**/*.ttml","**/*.ttss","**/*.wxml","**/*.wxs","**/*.wxss","**/*.sk","**/*.md","**/*.aac","**/*.bmp","**/*.br","**/*.cer","**/*.eot","**/*.gif","**/*.jpeg","**/*.jpg","**/*.m4a","**/*.mp3","**/*.mp4","**/*.ogg","**/*.otf","**/*.png","**/*.silk","**/*.svg","**/*.ttf","**/*.wasm","**/*.wav","**/*.webp","**/*.woff","**/*.wxs","**/*.wasm.br","**/*.heic"]);t.getWhiteList=function(e){return void 0===e&&(e=!1),(0,n.isCli)()?(0,n.isMiniGameCli)()?o:i:e?o:i}},4354:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(r(8783)),a=i(r(8366)),c=r(2893),u=r(4263),l=r(8956),p=r(9808),d=i(r(1017)),f=r(4486),h=r(8733),_=i(r(9849)),v=r(8066),m=i(r(7239)),E=v.CliMonitor.getInstance({cliVersion:"2.0.8",cliName:"tt-minigame-ide-cli"});s.default.version("2.0.8","-V, --version","Output the current version"),s.default.command("open <project-path>").option("--mode <mode>","lite | full").description("Open target project by path").action((function(e,t){E.reportCommandCall(t.name());var r=(0,u.cleanArgs)(t).mode;(0,m.default)({projectPath:e,mode:r,type:"microgame"})})),s.default.command("login").description("Login to the developer platform").option("-m, --mobile","Login by mobile").option("-e, --email","Login by email").option("-p, --proxy <proxy>","Login with proxy").action((function(e){E.reportCommandCall(e.name());var t=(0,u.cleanArgs)(e);void 0!==t.proxy&&(0,c.setConfig)({proxy:t.proxy}),(0,p.cliAuth)(t)})),s.default.command("login-e [email] [password]").description("Login to the developer platform by E-mail").option("-p, --proxy <proxy>","Login with proxy").action((function(e,t,r){E.reportCommandCall(r.name());var n=(0,u.cleanArgs)(r);void 0!==n.proxy&&(0,c.setConfig)({proxy:n.proxy}),(0,l.loginByEmail)({email:e,password:t})})),s.default.command("logout").description("Logout and clear the session.").action((function(e){E.reportCommandCall(e.name()),(0,l.logout)()})),s.default.command("preview [entry]").description("Preview project by remote").option("-f, --force","Preview project without local cache(deprecated)").option("--disable-cache","Preview project without local cache").option("-s, --small","Use small QR Code, it may fail in some environments").option("-u, --copy","Copy remote url to clipboard").option("-p, --proxy <proxy>","Preview with proxy").option("-o, --output <path>","QRCode image output path").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r,n,i,s,p,h,_,m;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),void 0!==(r=(0,u.cleanArgs)(t)).proxy&&(0,c.setConfig)({proxy:r.proxy}),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:if(o.sent())return console.error("cli工具暂不支持获取unity测试二维码"),[2];n=!0,(r.force||r.disableCache)&&(n=!1),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,l.microgame.preview({project:{path:e},page:{path:r.miniappPath,query:r.miniappQuery,scene:r.miniappScene,launchFrom:r.miniappLaunchFrom,location:r.miniappLocation},qrcode:{format:r.output?"imageFile":"terminal",output:r.output,options:{small:r.small}},localCompileVersion:"4.0.4-rc.17.ide.2",cache:n,copyToClipboard:r.copy})];case 3:return(i=o.sent()).useCache||E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_SUCCESS,{appid:(null===(p=i.metrics)||void 0===p?void 0:p.appId)||"",logid:(null===(h=i.metrics)||void 0===h?void 0:h.logId)||""}),(0,f.generateTerminalQrCode)(i.shortUrl,{copy:r.copy,small:r.small}),[3,5];case 4:return s=o.sent(),a.default.stopLoading(),a.default.error(null!==(_=s.stack)&&void 0!==_?_:s),E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:s.name,message:null!==(m=s.message)&&void 0!==m?m:s}),[3,5];case 5:return[2]}}))}))})),s.default.command("upload [entry]").description("Upload project to the developer platform").requiredOption("-v, --app-version <version>","App version (eg: [major].[minor].[patch])").requiredOption("-c, --app-changelog <log>","Changelog for this version").option("-p, --proxy <proxy>","Update request proxy").option("-u, --copy","Copy remote url to clipboard").option("-s, --small","Use small QR Code, it may fail in some environments").option("-o, --output <path>","QRCode image output path").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r,n,i,s,p,h,_,m;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),void 0!==(r=(0,u.cleanArgs)(t)).proxy&&(0,c.setConfig)({proxy:r.proxy}),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:return o.sent()?(n=a.default.loading("正在准备上传..."),[4,l.microgame.unityCli.unityUpload({projectPath:e,version:r.appVersion,publishDesc:r.appChangelog,updateStatus:function(e){n.text=l.microgame.unityCli.PROGRESS[e]}})]):[3,3];case 2:return o.sent(),n.stop(),a.default.info("🎉 Upload success"),[2];case 3:return o.trys.push([3,5,,6]),[4,l.microgame.upload({project:{path:e},qrcode:{format:r.output?"imageFile":"terminal",output:r.output,options:{small:r.small}},localCompileVersion:"4.0.4-rc.17.ide.2",copyToClipboard:r.copy,changeLog:r.appChangelog,version:r.appVersion})];case 4:return i=o.sent(),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_SUCCESS,{appid:(null===(p=i.metrics)||void 0===p?void 0:p.appId)||"",logid:(null===(h=i.metrics)||void 0===h?void 0:h.logId)||""}),(0,f.generateTerminalQrCode)(i.shortUrl,{copy:r.copy,small:r.small}),a.default.info("🎉 Upload success"),[3,6];case 5:return s=o.sent(),a.default.stopLoading(),a.default.error(null!==(_=s.stack)&&void 0!==_?_:s),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_FAIL,{type:s.name,message:null!==(m=s.message)&&void 0!==m?m:s}),[3,6];case 6:return[2]}}))}))})),s.default.command("build-npm [projectPath]").description("build npm packages in node_modules").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return E.reportCommandCall(t.name()),[4,(0,h.buildNpm)({projectPath:e})];case 1:return(r=n.sent()).success?a.default.info("🎉 Build success"):a.default.error("Build failed.[message=%s]",r.reason),[2]}}))}))})),s.default.command("version [entry]").description("Get latest released version of project").action((function(e,t){return n(void 0,void 0,void 0,(function(){var r,n,i,s,c,u;return o(this,(function(o){switch(o.label){case 0:return E.reportCommandCall(t.name()),e?d.default.isAbsolute(e)||(e=d.default.join(process.cwd(),e)):e=process.cwd(),r=d.default.join(e,"project.config.json"),[4,_.default.pathExists(r)];case 1:return o.sent()?[4,l.microgame.unityCli.isUnity(e)]:(a.default.error("Invalid project: project.config.json file not found"),[2]);case 2:return o.sent()?[4,l.microgame.unityCli.getVersions({projectPath:e})]:[3,4];case 3:return n=o.sent(),console.info("当前最新测试版本:",n.latest.version||"无"),console.info("当前最新线上版本:",n.current.version||"无"),[2];case 4:return[4,_.default.readFile(r,"utf-8")];case 5:return i=o.sent(),s=JSON.parse(i),(c=s.ttappid||s.appid)?[4,(0,l.getMeta)({appid:c})]:(a.default.error('Require parameter "appid".'),[2]);case 6:return u=o.sent(),a.default.info(u.version),[2]}}))}))})),s.default.command("set-config").description("Set tt-minigame-ide-cli config").option("-p, --proxy <proxy>","Set global proxy").option("--default","Use default").option("--envType <envType>","Set env type(online | boe | ppe)").option("--envChannel <envChannel>","Set env channel").option("-r, --allow-report-event <allowReportEvent>","allow report event when using, yes or no").action((function(e){E.reportCommandCall(e.name());var t=(0,u.cleanArgs)(e),r={};if(r.env={type:t.envType,channel:t.envChannel},void 0!==t.proxy&&(r.proxy=t.proxy),void 0!==t.allowReportEvent){if("yes"!==t.allowReportEvent&&"no"!==t.allowReportEvent)return void a.default.error('allowReportEvent can only be "yes" or "no"');r.allowReportEvent="yes"===t.allowReportEvent}(0,c.setConfig)(r,t.default)})),s.default.parse(process.argv),process.on("unhandledRejection",(function(e){var t;a.default.stopLoading(),a.default.error(null!==(t=e.stack)&&void 0!==t?t:e),E.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"unhandledRejection",message:e.toString()})})),process.on("uncaughtException",(function(e){var t;a.default.stopLoading(),a.default.error(null!==(t=e.stack)&&void 0!==t?t:e),E.report(v.CLI_EVENTS.IDE_CLI_ERROR,{type:"uncaughtException",message:e.toString()})}))},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},3477:e=>{"use strict";e.exports=require("querystring")},4521:e=>{"use strict";e.exports=require("readline")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},3732:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3732__},1606:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1606__},1887:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__1887__},469:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__469__},6883:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6883__},9508:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9508__},2896:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2896__},9258:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9258__},9849:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__9849__},6495:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__6495__},8838:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__8838__},3727:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__3727__},4563:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__4563__},7086:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__7086__},2541:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__2541__},4088:(e,t,r)=>{"use strict";const n=r(9258),o=r(7310),i=r(3152),s=r(3685),a=r(5687),c=r(3837),u=r(4940),l=r(9796),p=r(2781),d=r(2361);function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const h=f(n),_=f(o),v=f(s),m=f(a),E=f(c),g=f(u),y=f(l),b=f(p),O=f(d);function A(e,t){return function(){return e.apply(t,arguments)}}const{toString:w}=Object.prototype,{getPrototypeOf:C}=Object,I=(S=Object.create(null),e=>{const t=w.call(e);return S[t]||(S[t]=t.slice(8,-1).toLowerCase())});var S;const P=e=>(e=e.toLowerCase(),t=>I(t)===e),L=e=>t=>typeof t===e,{isArray:T}=Array,R=L("undefined"),D=P("ArrayBuffer"),x=L("string"),j=L("function"),N=L("number"),M=e=>null!==e&&"object"==typeof e,U=e=>{if("object"!==I(e))return!1;const t=C(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},k=P("Date"),F=P("File"),V=P("Blob"),G=P("FileList"),B=P("URLSearchParams");function H(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),T(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function Z(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=e=>!R(e)&&e!==q,z=(J="undefined"!=typeof Uint8Array&&C(Uint8Array),e=>J&&e instanceof J);var J;const K=P("HTMLFormElement"),$=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),X=P("RegExp"),Q=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};H(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},Y="abcdefghijklmnopqrstuvwxyz",ee="0123456789",te={DIGIT:ee,ALPHA:Y,ALPHA_DIGIT:Y+Y.toUpperCase()+ee},re=P("AsyncFunction"),ne={isArray:T,isArrayBuffer:D,isBuffer:function(e){return null!==e&&!R(e)&&null!==e.constructor&&!R(e.constructor)&&j(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||j(e.append)&&("formdata"===(t=I(e))||"object"===t&&j(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&D(e.buffer),t},isString:x,isNumber:N,isBoolean:e=>!0===e||!1===e,isObject:M,isPlainObject:U,isUndefined:R,isDate:k,isFile:F,isBlob:V,isRegExp:X,isFunction:j,isStream:e=>M(e)&&j(e.pipe),isURLSearchParams:B,isTypedArray:z,isFileList:G,forEach:H,merge:function e(){const{caseless:t}=W(this)&&this||{},r={},n=(n,o)=>{const i=t&&Z(r,o)||o;U(r[i])&&U(n)?r[i]=e(r[i],n):U(n)?r[i]=e({},n):T(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&H(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(H(t,((t,n)=>{r&&j(t)?e[n]=A(t,r):e[n]=t}),{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,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&C(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:I,kindOfTest:P,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(T(e))return e;let t=e.length;if(!N(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:K,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:Q,freezeMethods:e=>{Q(e,((t,r)=>{if(j(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];j(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return T(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Z,global:q,isContextDefined:W,ALPHABET:te,generateString:(e=16,t=te.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&j(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(M(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=T(e)?[]:{};return H(e,((e,t)=>{const i=r(e,n+1);!R(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:re,isThenable:e=>e&&(M(e)||j(e))&&j(e.then)&&j(e.catch)};function oe(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ne.inherits(oe,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:ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ie=oe.prototype,se={};function ae(e){return ne.isPlainObject(e)||ne.isArray(e)}function ce(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function ue(e,t,r){return e?e.concat(t).map((function(e,t){return e=ce(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}["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=>{se[e]={value:e}})),Object.defineProperties(oe,se),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,r,n,o,i)=>{const s=Object.create(ie);return ne.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const le=ne.toFlatObject(ne,{},null,(function(e){return/^is[A-Z]/.test(e)}));function pe(e,t,r){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new(h.default||FormData);const n=(r=ne.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ne.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ne.isDate(e))return e.toISOString();if(!a&&ne.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(e)||ne.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(ne.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ne.isArray(e)&&function(e){return ne.isArray(e)&&!e.some(ae)}(e)||(ne.isFileList(e)||ne.endsWith(r,"[]"))&&(a=ne.toArray(e)))return r=ce(r),a.forEach((function(e,n){!ne.isUndefined(e)&&null!==e&&t.append(!0===s?ue([r],n,i):null===s?r:r+"[]",c(e))})),!1;return!!ae(e)||(t.append(ue(o,r,i),c(e)),!1)}const l=[],p=Object.assign(le,{defaultVisitor:u,convertValue:c,isVisitable:ae});if(!ne.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ne.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ne.forEach(r,(function(r,i){!0===(!(ne.isUndefined(r)||null===r)&&o.call(t,r,ne.isString(i)?i.trim():i,n,p))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function de(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function fe(e,t){this._pairs=[],e&&pe(e,this,t)}const he=fe.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(e,t,r){if(!t)return e;const n=r&&r.encode||_e,o=r&&r.serialize;let i;if(i=o?o(t,r):ne.isURLSearchParams(t)?t.toString():new fe(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,de)}:de;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const me=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ne.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ge={isNode:!0,classes:{URLSearchParams:_.default.URLSearchParams,FormData:h.default,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]},ye="undefined"!=typeof window&&"undefined"!=typeof document,be=(Oe="undefined"!=typeof navigator&&navigator.product,ye&&["ReactNative","NativeScript","NS"].indexOf(Oe)<0);var Oe;const Ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,we={...Object.freeze({__proto__:null,hasBrowserEnv:ye,hasStandardBrowserWebWorkerEnv:Ae,hasStandardBrowserEnv:be}),...ge};function Ce(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&ne.isArray(n)?n.length:i,a?(ne.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&ne.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ne.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!s)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const r={};return ne.forEachEntry(e,((e,n)=>{t(function(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Ie={transitional:Ee,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=ne.isObject(e);if(o&&ne.isHTMLForm(e)&&(e=new FormData(e)),ne.isFormData(e))return n&&n?JSON.stringify(Ce(e)):e;if(ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return pe(e,new we.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return we.isNode&&ne.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=ne.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return pe(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(ne.isString(e))try{return(0,JSON.parse)(e),ne.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ie.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&ne.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw oe.from(e,oe.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:we.classes.FormData,Blob:we.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],(e=>{Ie.headers[e]={}}));const Se=Ie,Pe=ne.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"]),Le=Symbol("internals");function Te(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:ne.isArray(e)?e.map(Re):String(e)}function De(e,t,r,n,o){return ne.isFunction(n)?n.call(this,t,r):(o&&(t=r),ne.isString(t)?ne.isString(n)?-1!==t.indexOf(n):ne.isRegExp(n)?n.test(t):void 0:void 0)}class xe{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Te(t);if(!o)throw new Error("header name must be a non-empty string");const i=ne.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=Re(e))}const i=(e,t)=>ne.forEach(e,((e,r)=>o(e,r,t)));return ne.isPlainObject(e)||e instanceof this.constructor?i(e,t):ne.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Pe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=Te(e)){const r=ne.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(ne.isFunction(t))return t.call(this,e,r);if(ne.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Te(e)){const r=ne.findKey(this,e);return!(!r||void 0===this[r]||t&&!De(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Te(e)){const o=ne.findKey(r,e);!o||t&&!De(0,r[o],o,t)||(delete r[o],n=!0)}}return ne.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!De(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return ne.forEach(this,((n,o)=>{const i=ne.findKey(r,o);if(i)return t[i]=Re(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Re(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ne.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ne.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Le]=this[Le]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Te(e);t[n]||(function(e,t){const r=ne.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return ne.isArray(e)?e.forEach(n):n(e),this}}xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ne.reduceDescriptors(xe.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),ne.freezeMethods(xe);const je=xe;function Ne(e,t){const r=this||Se,n=t||r,o=je.from(n.headers);let i=n.data;return ne.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}function Ue(e,t,r){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,r),this.name="CanceledError"}function ke(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}function Fe(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}ne.inherits(Ue,oe,{__CANCEL__:!0});const Ve="1.6.5";function Ge(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Be=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function He(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let l=s,p=0;for(;l!==i;)p+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*p/d):void 0}}const Ze=Symbol("internals");class qe extends b.default.Transform{constructor(e){super({readableHighWaterMark:(e=ne.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,t)=>!ne.isUndefined(t[e])))).chunkSize});const t=this,r=this[Ze]={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=He(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",(e=>{"progress"===e&&(r.isCaptured||(r.isCaptured=!0))}));let o=0;r.updateProgress=function(e,t){let r=0;const n=1e3/t;let o=null;return function(t,i){const s=Date.now();if(t||s-r>n)return o&&(clearTimeout(o),o=null),r=s,e.apply(null,i);o||(o=setTimeout((()=>(o=null,r=Date.now(),e.apply(null,i))),n-(s-r)))}}((function(){const e=r.length,i=r.bytesSeen,s=i-o;if(!s||t.destroyed)return;const a=n(s);o=i,process.nextTick((()=>{t.emit("progress",{loaded:i,total:e,progress:e?i/e:void 0,bytes:s,rate:a||void 0,estimated:a&&e&&i<=e?(e-i)/a:void 0})}))}),r.ticksRate);const i=()=>{r.updateProgress(!0)};this.once("end",i),this.once("error",i)}_read(e){const t=this[Ze];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,r){const n=this,o=this[Ze],i=o.maxRate,s=this.readableHighWaterMark,a=o.timeWindow,c=i/(1e3/a),u=!1!==o.minChunkSize?Math.max(o.minChunkSize,.01*c):0,l=(e,t)=>{const r=Buffer.byteLength(e);let l,p=null,d=s,f=0;if(i){const e=Date.now();(!o.ts||(f=e-o.ts)>=a)&&(o.ts=e,l=c-o.bytes,o.bytes=l<0?-l:0,f=0),l=c-o.bytes}if(i){if(l<=0)return setTimeout((()=>{t(null,e)}),a-f);l<d&&(d=l)}d&&r>d&&r-d>u&&(p=e.subarray(d),e=e.subarray(0,d)),function(e,t){const r=Buffer.byteLength(e);o.bytesSeen+=r,o.bytes+=r,o.isCaptured&&o.updateProgress(),n.push(e)?process.nextTick(t):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(t)}}(e,p?()=>{process.nextTick(t,null,p)}:t)};l(e,(function e(t,n){if(t)return r(t);n?l(n,e):r(null)}))}setLength(e){return this[Ze].length=+e,this}}const We=qe,{asyncIterator:ze}=Symbol,Je=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[ze]?yield*e[ze]():yield e},Ke=ne.ALPHABET.ALPHA_DIGIT+"-_",$e=new c.TextEncoder,Xe="\r\n",Qe=$e.encode(Xe);class Ye{constructor(e,t){const{escapeName:r}=this.constructor,n=ne.isString(t);let o=`Content-Disposition: form-data; name="${r(e)}"${!n&&t.name?`; filename="${r(t.name)}"`:""}${Xe}`;n?t=$e.encode(String(t).replace(/\r?\n|\r\n?/g,Xe)):o+=`Content-Type: ${t.type||"application/octet-stream"}${Xe}`,this.headers=$e.encode(o+Xe),this.contentLength=n?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;ne.isTypedArray(e)?yield e:yield*Je(e),yield Qe}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}class et extends b.default.Transform{__transform(e,t,r){this.push(e),r()}_transform(e,t,r){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,r)}}const tt=et,rt=(e,t)=>ne.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then((e=>{try{t?n(null,...t(e)):n(null,e)}catch(e){n(e)}}),n)}:e,nt={flush:y.default.constants.Z_SYNC_FLUSH,finishFlush:y.default.constants.Z_SYNC_FLUSH},ot={flush:y.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:y.default.constants.BROTLI_OPERATION_FLUSH},it=ne.isFunction(y.default.createBrotliDecompress),{http:st,https:at}=g.default,ct=/https:?/,ut=we.protocols.map((e=>e+":"));function lt(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function pt(e,t,r){let n=t;if(!n&&!1!==n){const e=i.getProxyForUrl(r);e&&(n=new URL(e))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));const t=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=n.hostname||n.host;e.hostname=t,e.host=t,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(e){pt(e,t,e.href)}}const dt=(e,t)=>(({address:e,family:t})=>{if(!ne.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})(ne.isObject(e)?e:{address:e,family:t}),ft=we.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];ne.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),ne.isString(n)&&s.push("path="+n),ne.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}},ht=we.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=ne.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function _t(e,t){let r=0;const n=He(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,c=n(a);r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const vt={http:function(e){return t=async function(t,r,n){let{data:o,lookup:i,family:s}=e;const{responseType:a,responseEncoding:c}=e,u=e.method.toUpperCase();let l,d,f=!1;if(i){const e=rt(i,(e=>ne.isArray(e)?e:[e]));i=(t,r,n)=>{e(t,r,((e,t,o)=>{if(e)return n(e);const i=ne.isArray(t)?t.map((e=>dt(e))):[dt(t,o)];r.all?n(e,i):n(e,i[0].address,i[0].family)}))}}const h=new O.default,_=()=>{e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g),h.removeAllListeners()};function g(t){h.emit("abort",!t||t.type?new Ue(null,e,d):t)}n(((e,t)=>{l=!0,t&&(f=!0,_())})),h.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g)));const A=Fe(e.baseURL,e.url),w=new URL(A,"http://localhost"),C=w.protocol||ut[0];if("data:"===C){let n;if("GET"!==u)return ke(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{n=function(e,t,r){const n=r&&r.Blob||we.classes.Blob,o=Ge(e);if(void 0===t&&n&&(t=!0),"data"===o){e=o.length?e.slice(o.length+1):e;const r=Be.exec(e);if(!r)throw new oe("Invalid URL",oe.ERR_INVALID_URL);const i=r[1],s=r[2],a=r[3],c=Buffer.from(decodeURIComponent(a),s?"base64":"utf8");if(t){if(!n)throw new oe("Blob is not supported",oe.ERR_NOT_SUPPORT);return new n([c],{type:i})}return c}throw new oe("Unsupported protocol "+o,oe.ERR_NOT_SUPPORT)}(e.url,"blob"===a,{Blob:e.env&&e.env.Blob})}catch(t){throw oe.from(t,oe.ERR_BAD_REQUEST,e)}return"text"===a?(n=n.toString(c),c&&"utf8"!==c||(n=ne.stripBOM(n))):"stream"===a&&(n=b.default.Readable.from(n)),ke(t,r,{data:n,status:200,statusText:"OK",headers:new je,config:e})}if(-1===ut.indexOf(C))return r(new oe("Unsupported protocol "+C,oe.ERR_BAD_REQUEST,e));const I=je.from(e.headers).normalize();I.set("User-Agent","axios/"+Ve,!1);const S=e.onDownloadProgress,P=e.onUploadProgress,L=e.maxRate;let T,R;if(ne.isSpecCompliantForm(o)){const e=I.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,r)=>{const{tag:n="form-data-boundary",size:o=25,boundary:i=n+"-"+ne.generateString(o,Ke)}=r||{};if(!ne.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");const s=$e.encode("--"+i+Xe),a=$e.encode("--"+i+"--"+Xe+Xe);let c=a.byteLength;const u=Array.from(e.entries()).map((([e,t])=>{const r=new Ye(e,t);return c+=r.size,r}));c+=s.byteLength*u.length,c=ne.toFiniteNumber(c);const l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),p.Readable.from(async function*(){for(const e of u)yield s,yield*e.encode();yield a}())})(o,(e=>{I.set(e)}),{tag:`axios-${Ve}-boundary`,boundary:e&&e[1]||void 0})}else if(ne.isFormData(o)&&ne.isFunction(o.getHeaders)){if(I.set(o.getHeaders()),!I.hasContentLength())try{const e=await E.default.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&I.setContentLength(e)}catch(e){}}else if(ne.isBlob(o))o.size&&I.setContentType(o.type||"application/octet-stream"),I.setContentLength(o.size||0),o=b.default.Readable.from(Je(o));else if(o&&!ne.isStream(o)){if(Buffer.isBuffer(o));else if(ne.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!ne.isString(o))return r(new oe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",oe.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(I.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return r(new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,e))}const D=ne.toFiniteNumber(I.getContentLength());let x,j;ne.isArray(L)?(T=L[0],R=L[1]):T=R=L,o&&(P||T)&&(ne.isStream(o)||(o=b.default.Readable.from(o,{objectMode:!1})),o=b.default.pipeline([o,new We({length:D,maxRate:ne.toFiniteNumber(T)})],ne.noop),P&&o.on("progress",(e=>{P(Object.assign(e,{upload:!0}))}))),e.auth&&(x=(e.auth.username||"")+":"+(e.auth.password||"")),!x&&w.username&&(x=w.username+":"+w.password),x&&I.delete("authorization");try{j=ve(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const n=new Error(t.message);return n.config=e,n.url=e.url,n.exists=!0,r(n)}I.set("Accept-Encoding","gzip, compress, deflate"+(it?", br":""),!1);const N={path:j,method:u,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:x,protocol:C,family:s,beforeRedirect:lt,beforeRedirects:{}};let M;!ne.isUndefined(i)&&(N.lookup=i),e.socketPath?N.socketPath=e.socketPath:(N.hostname=w.hostname,N.port=w.port,pt(N,e.proxy,C+"//"+w.hostname+(w.port?":"+w.port:"")+N.path));const U=ct.test(N.protocol);if(N.agent=U?e.httpsAgent:e.httpAgent,e.transport?M=e.transport:0===e.maxRedirects?M=U?m.default:v.default:(e.maxRedirects&&(N.maxRedirects=e.maxRedirects),e.beforeRedirect&&(N.beforeRedirects.config=e.beforeRedirect),M=U?at:st),e.maxBodyLength>-1?N.maxBodyLength=e.maxBodyLength:N.maxBodyLength=1/0,e.insecureHTTPParser&&(N.insecureHTTPParser=e.insecureHTTPParser),d=M.request(N,(function(n){if(d.destroyed)return;const o=[n],i=+n.headers["content-length"];if(S){const e=new We({length:ne.toFiniteNumber(i),maxRate:ne.toFiniteNumber(R)});S&&e.on("progress",(e=>{S(Object.assign(e,{download:!0}))})),o.push(e)}let s=n;const l=n.req||d;if(!1!==e.decompress&&n.headers["content-encoding"])switch("HEAD"!==u&&204!==n.statusCode||delete n.headers["content-encoding"],(n.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":o.push(y.default.createUnzip(nt)),delete n.headers["content-encoding"];break;case"deflate":o.push(new tt),o.push(y.default.createUnzip(nt)),delete n.headers["content-encoding"];break;case"br":it&&(o.push(y.default.createBrotliDecompress(ot)),delete n.headers["content-encoding"])}s=o.length>1?b.default.pipeline(o,ne.noop):o[0];const p=b.default.finished(s,(()=>{p(),_()})),v={status:n.statusCode,statusText:n.statusMessage,headers:new je(n.headers),config:e,request:l};if("stream"===a)v.data=s,ke(t,r,v);else{const n=[];let o=0;s.on("data",(function(t){n.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(f=!0,s.destroy(),r(new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l)))})),s.on("aborted",(function(){if(f)return;const t=new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l);s.destroy(t),r(t)})),s.on("error",(function(t){d.destroyed||r(oe.from(t,null,e,l))})),s.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==a&&(e=e.toString(c),c&&"utf8"!==c||(e=ne.stripBOM(e))),v.data=e}catch(t){return r(oe.from(t,null,e,v.request,v))}ke(t,r,v)}))}h.once("abort",(e=>{s.destroyed||(s.emit("error",e),s.destroy())}))})),h.once("abort",(e=>{r(e),d.destroy(e)})),d.on("error",(function(t){r(oe.from(t,null,e,d))})),d.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void r(new oe("error trying to parse `config.timeout` to int",oe.ERR_BAD_OPTION_VALUE,e,d));d.setTimeout(t,(function(){if(l)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new oe(t,n.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,d)),g()}))}if(ne.isStream(o)){let t=!1,r=!1;o.on("end",(()=>{t=!0})),o.once("error",(e=>{r=!0,d.destroy(e)})),o.on("close",(()=>{t||r||g(new Ue("Request stream has been aborted",e,d))})),o.pipe(d)}else d.end(o)},new Promise(((e,r)=>{let n,o;const i=(e,t)=>{o||(o=!0,n&&n(e,t))},s=e=>{i(e,!0),r(e)};t((t=>{i(t),e(t)}),s,(e=>n=e)).catch(s)}));var t},xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=je.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(ne.isFormData(n))if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const p=Fe(e.baseURL,e.url);function d(){if(!l)return;const n=je.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());ke((function(e){t(e),u()}),(function(e){r(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ve(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(r(new oe("Request aborted",oe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new oe("Network Error",oe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||Ee;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new oe(t,n.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,l)),l=null},we.hasStandardBrowserEnv&&(c&&ne.isFunction(c)&&(c=c(e)),c||!1!==c&&ht(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ft.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&ne.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),ne.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",_t(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",_t(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(r(!t||t.type?new Ue(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const f=Ge(p);f&&-1===we.protocols.indexOf(f)?r(new oe("Unsupported protocol "+f+":",oe.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};ne.forEach(vt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const mt=e=>`- ${e}`,Et=e=>ne.isFunction(e)||null===e||!1===e,gt=e=>{e=ne.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Et(r)&&(n=vt[(t=String(r)).toLowerCase()],void 0===n))throw new oe(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new oe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(mt).join("\n"):" "+mt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function yt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ue(null,e)}function bt(e){return yt(e),e.headers=je.from(e.headers),e.data=Ne.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gt(e.adapter||Se.adapter)(e).then((function(t){return yt(e),t.data=Ne.call(e,e.transformResponse,t),t.headers=je.from(t.headers),t}),(function(t){return Me(t)||(yt(e),t&&t.response&&(t.response.data=Ne.call(e,e.transformResponse,t.response),t.response.headers=je.from(t.response.headers))),Promise.reject(t)}))}const Ot=e=>e instanceof je?e.toJSON():e;function At(e,t){t=t||{};const r={};function n(e,t,r){return ne.isPlainObject(e)&&ne.isPlainObject(t)?ne.merge.call({caseless:r},e,t):ne.isPlainObject(t)?ne.merge({},t):ne.isArray(t)?t.slice():t}function o(e,t,r){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!ne.isUndefined(t))return n(void 0,t)}function s(e,t){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Ot(e),Ot(t),!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,s=i(e[n],t[n],n);ne.isUndefined(s)&&i!==a||(r[n]=s)})),r}const wt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{wt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Ct={};wt.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new oe(n(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!Ct[o]&&(Ct[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};const It={assertOptions:function(e,t,r){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new oe("option "+i+" must be "+r,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}},validators:wt},St=It.validators;class Pt{constructor(e){this.defaults=e,this.interceptors={request:new me,response:new me}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=At(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&It.assertOptions(r,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),null!=n&&(ne.isFunction(n)?t.paramsSerializer={serialize:n}:It.assertOptions(n,{encode:St.function,serialize:St.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&ne.merge(o.common,o[t.method]);o&&ne.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=je.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,p=0;if(!a){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);p<l;)u=u.then(e[p++],e[p++]);return u}l=s.length;let d=t;for(p=0;p<l;){const e=s[p++],t=s[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=bt.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,l=c.length;p<l;)u=u.then(c[p++],c[p++]);return u}getUri(e){return ve(Fe((e=At(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}ne.forEach(["delete","get","head","options"],(function(e){Pt.prototype[e]=function(t,r){return this.request(At(r||{},{method:e,url:t,data:(r||{}).data}))}})),ne.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(At(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Pt.prototype[e]=t(),Pt.prototype[e+"Form"]=t(!0)}));const Lt=Pt;class Tt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Ue(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Tt((function(t){e=t})),cancel:e}}}const Rt=Tt,Dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dt).forEach((([e,t])=>{Dt[t]=e}));const xt=Dt,jt=function e(t){const r=new Lt(t),n=A(Lt.prototype.request,r);return ne.extend(n,Lt.prototype,r,{allOwnKeys:!0}),ne.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(At(t,r))},n}(Se);jt.Axios=Lt,jt.CanceledError=Ue,jt.CancelToken=Rt,jt.isCancel=Me,jt.VERSION=Ve,jt.toFormData=pe,jt.AxiosError=oe,jt.Cancel=jt.CanceledError,jt.all=function(e){return Promise.all(e)},jt.spread=function(e){return function(t){return e.apply(null,t)}},jt.isAxiosError=function(e){return ne.isObject(e)&&!0===e.isAxiosError},jt.mergeConfig=At,jt.AxiosHeaders=je,jt.formToJSON=e=>Ce(ne.isHTMLForm(e)?new FormData(e):e),jt.getAdapter=gt,jt.HttpStatusCode=xt,jt.default=jt,e.exports=jt},4649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(8804);const o=function(e,t){for(var r=e.length;r--;)if((0,n.Z)(e[r][0],t))return r;return-1};var i=Array.prototype.splice;function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}s.prototype.clear=function(){this.__data__=[],this.size=0},s.prototype.delete=function(e){var t=this.__data__,r=o(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))},s.prototype.get=function(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]},s.prototype.has=function(e){return o(this.__data__,e)>-1},s.prototype.set=function(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};const a=s},8896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"Map")},3703:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});const n=(0,r(5546).Z)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function s(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}s.prototype.clear=function(){this.__data__=n?n(null):{},this.size=0},s.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},s.prototype.get=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0},s.prototype.has=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)},s.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};const a=s;var c=r(4649),u=r(8896);const l=function(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map};function p(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}p.prototype.clear=function(){this.size=0,this.__data__={hash:new a,map:new(u.Z||c.Z),string:new a}},p.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},p.prototype.get=function(e){return l(this,e).get(e)},p.prototype.has=function(e){return l(this,e).has(e)},p.prototype.set=function(e,t){var r=l(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};const d=p},6218:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(4649);var o=r(8896),i=r(3703);function s(e){var t=this.__data__=new n.Z(e);this.size=t.size}s.prototype.clear=function(){this.__data__=new n.Z,this.size=0},s.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},s.prototype.get=function(e){return this.__data__.get(e)},s.prototype.has=function(e){return this.__data__.has(e)},s.prototype.set=function(e,t){var r=this.__data__;if(r instanceof n.Z){var s=r.__data__;if(!o.Z||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new i.Z(s)}return r.set(e,t),this.size=r.size,this};const a=s},187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Symbol},8282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=r(3221).Z.Uint8Array},848:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(4248),o=r(7885),i=r(4975),s=r(6401),a=r(8127),c=Object.prototype.hasOwnProperty;const u=function(e,t){var r=(0,o.Z)(e),u=!r&&(0,n.Z)(e),l=!r&&!u&&(0,i.Z)(e),p=!r&&!u&&!l&&(0,a.Z)(e),d=r||u||l||p,f=d?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],h=f.length;for(var _ in e)!t&&!c.call(e,_)||d&&("length"==_||l&&("offset"==_||"parent"==_)||p&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||(0,s.Z)(_,h))||f.push(_);return f}},5598:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},5810:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6299:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(905),o=r(8804),i=Object.prototype.hasOwnProperty;const s=function(e,t,r){var s=e[t];i.call(e,t)&&(0,o.Z)(s,r)&&(void 0!==r||t in e)||(0,n.Z)(e,t,r)}},905:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5088);const o=function(e,t,r){"__proto__"==t&&n.Z?(0,n.Z)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},7024:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Z});var n=r(6218);var o=r(6299),i=r(2436),s=r(298);var a=r(7477);var c=r(3221),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=u&&"object"==typeof module&&module&&!module.nodeType&&module,p=l&&l.exports===u?c.Z.Buffer:void 0,d=p?p.allocUnsafe:void 0;var f=r(6808);var h=r(8390);var _=r(7245),v=r(9878),m=r(8649),E=Object.prototype.hasOwnProperty;var g=r(8282);const y=function(e){var t=new e.constructor(e.byteLength);return new g.Z(t).set(new g.Z(e)),t};var b=/\w*$/;var O=r(187),A=O.Z?O.Z.prototype:void 0,w=A?A.valueOf:void 0;const C=function(e,t,r){var n,o,i,s=e.constructor;switch(t){case"[object ArrayBuffer]":return y(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var r=t?y(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e,t){var r=t?y(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(i=new(o=e).constructor(o.source,b.exec(o))).lastIndex=o.lastIndex,i;case"[object Symbol]":return n=e,w?Object(w.call(n)):{}}};var I=r(3122),S=Object.create;const P=function(){function e(){}return function(t){if(!(0,I.default)(t))return{};if(S)return S(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var L=r(9552),T=r(5441);var R=r(7885),D=r(4975),x=r(3391);var j=r(3225),N=r(7755),M=N.Z&&N.Z.isMap;const U=M?(0,j.Z)(M):function(e){return(0,x.Z)(e)&&"[object Map]"==(0,m.Z)(e)};var k=N.Z&&N.Z.isSet;const F=k?(0,j.Z)(k):function(e){return(0,x.Z)(e)&&"[object Set]"==(0,m.Z)(e)};var V="[object Arguments]",G="[object Function]",B="[object Object]",H={};H[V]=H["[object Array]"]=H["[object ArrayBuffer]"]=H["[object DataView]"]=H["[object Boolean]"]=H["[object Date]"]=H["[object Float32Array]"]=H["[object Float64Array]"]=H["[object Int8Array]"]=H["[object Int16Array]"]=H["[object Int32Array]"]=H["[object Map]"]=H["[object Number]"]=H[B]=H["[object RegExp]"]=H["[object Set]"]=H["[object String]"]=H["[object Symbol]"]=H["[object Uint8Array]"]=H["[object Uint8ClampedArray]"]=H["[object Uint16Array]"]=H["[object Uint32Array]"]=!0,H["[object Error]"]=H[G]=H["[object WeakMap]"]=!1;const Z=function e(t,r,c,u,l,p){var g,y=1&r,b=2&r,O=4&r;if(c&&(g=l?c(t,u,l,p):c(t)),void 0!==g)return g;if(!(0,I.default)(t))return t;var A=(0,R.Z)(t);if(A){if(g=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&E.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(t),!y)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(t,g)}else{var w=(0,m.Z)(t),S=w==G||"[object GeneratorFunction]"==w;if((0,D.Z)(t))return function(e,t){if(t)return e.slice();var r=e.length,n=d?d(r):new e.constructor(r);return e.copy(n),n}(t,y);if(w==B||w==V||S&&!l){if(g=b||S?{}:function(e){return"function"!=typeof e.constructor||(0,T.Z)(e)?{}:P((0,L.Z)(e))}(t),!y)return b?function(e,t){return(0,i.Z)(e,(0,h.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,a.Z)(t),e)}(g,t)):function(e,t){return(0,i.Z)(e,(0,f.Z)(e),t)}(t,function(e,t){return e&&(0,i.Z)(t,(0,s.default)(t),e)}(g,t))}else{if(!H[w])return l?t:{};g=C(t,w,y)}}p||(p=new n.Z);var x=p.get(t);if(x)return x;p.set(t,g),F(t)?t.forEach((function(n){g.add(e(n,r,c,n,t,p))})):U(t)&&t.forEach((function(n,o){g.set(o,e(n,r,c,o,t,p))}));var j=O?b?v.Z:_.Z:b?a.Z:s.default,N=A?void 0:j(t);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(N||t,(function(n,i){N&&(n=t[i=n]),(0,o.Z)(g,i,e(n,r,c,i,t,p))})),g}},9523:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(7653),o=r(7969);const i=function(e,t){for(var r=0,i=(t=(0,n.Z)(t,e)).length;null!=e&&r<i;)e=e[(0,o.Z)(t[r++])];return r&&r==i?e:void 0}},2938:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(5810),o=r(7885);const i=function(e,t,r){var i=t(e);return(0,o.Z)(e)?i:(0,n.Z)(i,r(e))}},9001:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(187),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n.Z?n.Z.toStringTag:void 0;var c=Object.prototype.toString;var u=n.Z?n.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}(e):function(e){return c.call(e)}(e)}},4187:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(6299),o=r(7653),i=r(6401),s=r(3122),a=r(7969);const c=function(e,t,r,c){if(!(0,s.default)(e))return e;for(var u=-1,l=(t=(0,o.Z)(t,e)).length,p=l-1,d=e;null!=d&&++u<l;){var f=(0,a.Z)(t[u]),h=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(u!=p){var _=d[f];void 0===(h=c?c(_,f,d):void 0)&&(h=(0,s.default)(_)?_:(0,i.Z)(t[u+1])?[]:{})}(0,n.Z)(d,f,h),d=d[f]}return e}},3225:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return function(t){return e(t)}}},7653:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(7885),o=r(3502),i=r(3703);function s(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(s.Cache||i.Z),r}s.Cache=i.Z;var a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g;const u=(l=s((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,r,n,o){t.push(n?o.replace(c,"$1"):r||e)})),t}),(function(e){return 500===p.size&&p.clear(),e})),p=l.cache,l);var l,p,d=r(187),f=r(5598),h=r(2758),_=d.Z?d.Z.prototype:void 0,v=_?_.toString:void 0;const m=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return(0,f.Z)(t,e)+"";if((0,h.Z)(t))return v?v.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r},E=function(e){return null==e?"":m(e)},g=function(e,t){return(0,n.Z)(e)?e:(0,o.Z)(e,t)?[e]:u(E(e))}},2436:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(6299),o=r(905);const i=function(e,t,r,i){var s=!r;r||(r={});for(var a=-1,c=t.length;++a<c;){var u=t[a],l=i?i(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),s?(0,o.Z)(r,u,l):(0,n.Z)(r,u,l)}return r}},5088:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(5546);const o=function(){try{var e=(0,n.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},1380:(e,t,r)=>{"use strict";r.d(t,{Z:()=>y});var n=r(5810),o=r(187),i=r(4248),s=r(7885),a=o.Z?o.Z.isConcatSpreadable:void 0;const c=function(e){return(0,s.Z)(e)||(0,i.Z)(e)||!!(a&&e&&e[a])},u=function e(t,r,o,i,s){var a=-1,u=t.length;for(o||(o=c),s||(s=[]);++a<u;){var l=t[a];r>0&&o(l)?r>1?e(l,r-1,o,i,s):(0,n.Z)(s,l):i||(s[s.length]=l)}return s},l=function(e){return null!=e&&e.length?u(e,1):[]};var p=Math.max;var d=r(5088),f=r(9930);const h=d.Z?function(e,t){return(0,d.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:f.Z;var _=Date.now;const v=(m=h,E=0,g=0,function(){var e=_(),t=16-(e-g);if(g=e,t>0){if(++E>=800)return arguments[0]}else E=0;return m.apply(void 0,arguments)});var m,E,g;const y=function(e){return v(function(e,t,r){return t=p(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=p(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,void 0,l),e+"")}},2168:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},7245:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(2938),o=r(6808),i=r(298);const s=function(e){return(0,n.Z)(e,i.default,o.Z)}},9878:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(2938),o=r(8390),i=r(7477);const s=function(e){return(0,n.Z)(e,i.Z,o.Z)}},5546:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(8936);const o=r(3221).Z["__core-js_shared__"];var i,s=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var a=r(3122),c=r(6682),u=/^\[object .+?Constructor\]$/,l=Function.prototype,p=Object.prototype,d=l.toString,f=p.hasOwnProperty,h=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _=function(e){return!(!(0,a.default)(e)||(t=e,s&&s in t))&&((0,n.Z)(e)?h:u).test((0,c.Z)(e));var t},v=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return _(r)?r:void 0}},9552:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=(0,r(6048).Z)(Object.getPrototypeOf,Object)},6808:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(813),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const s=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}(i(e),(function(t){return o.call(e,t)})))}:n.Z},8390:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(5810),o=r(9552),i=r(6808),s=r(813);const a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,n.Z)(t,(0,i.Z)(e)),e=(0,o.Z)(e);return t}:s.Z},8649:(e,t,r)=>{"use strict";r.d(t,{Z:()=>A});var n=r(5546),o=r(3221);const i=(0,n.Z)(o.Z,"DataView");var s=r(8896);const a=(0,n.Z)(o.Z,"Promise"),c=(0,n.Z)(o.Z,"Set"),u=(0,n.Z)(o.Z,"WeakMap");var l=r(9001),p=r(6682),d="[object Map]",f="[object Promise]",h="[object Set]",_="[object WeakMap]",v="[object DataView]",m=(0,p.Z)(i),E=(0,p.Z)(s.Z),g=(0,p.Z)(a),y=(0,p.Z)(c),b=(0,p.Z)(u),O=l.Z;(i&&O(new i(new ArrayBuffer(1)))!=v||s.Z&&O(new s.Z)!=d||a&&O(a.resolve())!=f||c&&O(new c)!=h||u&&O(new u)!=_)&&(O=function(e){var t=(0,l.Z)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,p.Z)(r):"";if(n)switch(n){case m:return v;case E:return d;case g:return f;case y:return h;case b:return _}return t});const A=O},6401:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},3502:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(7885),o=r(2758),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const a=function(e,t){if((0,n.Z)(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!(0,o.Z)(e))||s.test(e)||!i.test(e)||null!=t&&e in Object(t)}},5441:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},7755:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(2168),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o&&n.Z.process;const a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}()},6048:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return function(r){return e(t(r))}}},3221:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(2168),o="object"==typeof self&&self&&self.Object===Object&&self;const i=n.Z||o||Function("return this")()},7969:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(2758);const o=function(e){if("string"==typeof e||(0,n.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6682:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=Function.prototype.toString;const o=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7921:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(7024);const o=function(e){return(0,n.Z)(e,5)}},8804:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e,t){return e===t||e!=e&&t!=t}},772:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(9523);const o=function(e,t,r){var o=null==e?void 0:(0,n.Z)(e,t);return void 0===o?r:o}},3488:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});const n=function(e,t){return null!=e&&t in Object(e)};var o=r(7653),i=r(4248),s=r(7885),a=r(6401),c=r(1164),u=r(7969);const l=function(e,t){return null!=e&&function(e,t,r){for(var n=-1,l=(t=(0,o.Z)(t,e)).length,p=!1;++n<l;){var d=(0,u.Z)(t[n]);if(!(p=null!=e&&r(e,d)))break;e=e[d]}return p||++n!=l?p:!!(l=null==e?0:e.length)&&(0,c.Z)(l)&&(0,a.Z)(d,l)&&((0,s.Z)(e)||(0,i.Z)(e))}(e,t,n)}},9930:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return e}},4248:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(9001),o=r(3391);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,n.Z)(e)};var s=Object.prototype,a=s.hasOwnProperty,c=s.propertyIsEnumerable;const u=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},7885:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=Array.isArray},3282:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(8936),o=r(1164);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,n.Z)(e)}},4975:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(3221);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o?n.Z.Buffer:void 0;const a=(s?s.isBuffer:void 0)||function(){return!1}},8936:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3122);const i=function(e){if(!(0,o.default)(e))return!1;var t=(0,n.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1164:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3122:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3391:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return null!=e&&"object"==typeof e}},2758:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9001),o=r(3391);const i=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,n.Z)(e)}},8127:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(9001),o=r(1164),i=r(3391),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=r(3225),c=r(7755),u=c.Z&&c.Z.isTypedArray;const l=u?(0,a.Z)(u):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!s[(0,n.Z)(e)]}},298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(848),o=r(5441);const i=(0,r(6048).Z)(Object.keys,Object);var s=Object.prototype.hasOwnProperty;var a=r(3282);const c=function(e){return(0,a.Z)(e)?(0,n.Z)(e):function(e){if(!(0,o.Z)(e))return i(e);var t=[];for(var r in Object(e))s.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}},7477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(848),o=r(3122),i=r(5441);var s=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,o.default)(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=(0,i.Z)(e),r=[];for(var n in e)("constructor"!=n||!t&&s.call(e,n))&&r.push(n);return r};var c=r(3282);const u=function(e){return(0,c.Z)(e)?(0,n.Z)(e,!0):a(e)}},1395:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(5598),o=r(7024),i=r(7653);var s=r(9523);const a=function(e,t){return t.length<2?e:(0,s.Z)(e,function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(t,0,-1))};var c=r(7969);const u=function(e,t){return t=(0,i.Z)(t,e),null==(e=a(e,t))||delete e[(0,c.Z)((r=t,n=null==r?0:r.length,n?r[n-1]:void 0))];var r,n};var l=r(2436),p=r(9001),d=r(9552),f=r(3391),h=Function.prototype,_=Object.prototype,v=h.toString,m=_.hasOwnProperty,E=v.call(Object);const g=function(e){return function(e){if(!(0,f.Z)(e)||"[object Object]"!=(0,p.Z)(e))return!1;var t=(0,d.Z)(e);if(null===t)return!0;var r=m.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&v.call(r)==E}(e)?void 0:e};var y=r(1380),b=r(9878);const O=(0,y.Z)((function(e,t){var r={};if(null==e)return r;var s=!1;t=(0,n.Z)(t,(function(t){return t=(0,i.Z)(t,e),s||(s=t.length>1),t})),(0,l.Z)(e,(0,b.Z)(e),r),s&&(r=(0,o.Z)(r,7,g));for(var a=t.length;a--;)u(r,t[a]);return r}))},8337:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(9523),o=r(4187),i=r(7653);var s=r(3488);const a=function(e,t){return function(e,t,r){for(var s=-1,a=t.length,c={};++s<a;){var u=t[s],l=(0,n.Z)(e,u);r(l,u)&&(0,o.Z)(c,(0,i.Z)(u,e),l)}return c}(e,t,(function(t,r){return(0,s.Z)(e,r)}))},c=(0,r(1380).Z)((function(e,t){return null==e?{}:a(e,t)}))},6503:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>J});const n=function(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r},o=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[++n];if(!1===t(o[a],a,o))break}return e};var i=r(298);var s=r(3282);const a=(c=function(e,t){return e&&o(e,t,i.default)},function(e,t){if(null==e)return e;if(!(0,s.Z)(e))return c(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e});var c,u=r(6218),l=r(3703);function p(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new l.Z;++t<r;)this.add(e[t])}p.prototype.add=p.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},p.prototype.has=function(e){return this.__data__.has(e)};const d=p,f=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},h=function(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var p=-1,h=!0,_=2&r?new d:void 0;for(i.set(e,t),i.set(t,e);++p<a;){var v=e[p],m=t[p];if(n)var E=s?n(m,v,p,t,e,i):n(v,m,p,e,t,i);if(void 0!==E){if(E)continue;h=!1;break}if(_){if(!f(t,(function(e,t){if(s=t,!_.has(s)&&(v===e||o(v,e,r,n,i)))return _.push(t);var s}))){h=!1;break}}else if(v!==m&&!o(v,m,r,n,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var _=r(187),v=r(8282),m=r(8804);const E=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},g=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r};var y=_.Z?_.Z.prototype:void 0,b=y?y.valueOf:void 0;var O=r(7245),A=Object.prototype.hasOwnProperty;var w=r(8649),C=r(7885),I=r(4975),S=r(8127),P="[object Arguments]",L="[object Array]",T="[object Object]",R=Object.prototype.hasOwnProperty;const D=function(e,t,r,n,o,i){var s=(0,C.Z)(e),a=(0,C.Z)(t),c=s?L:(0,w.Z)(e),l=a?L:(0,w.Z)(t),p=(c=c==P?T:c)==T,d=(l=l==P?T:l)==T,f=c==l;if(f&&(0,I.Z)(e)){if(!(0,I.Z)(t))return!1;s=!0,p=!1}if(f&&!p)return i||(i=new u.Z),s||(0,S.Z)(e)?h(e,t,r,n,o,i):function(e,t,r,n,o,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new v.Z(e),new v.Z(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,m.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=E;case"[object Set]":var c=1&n;if(a||(a=g),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=h(a(e),a(t),n,o,i,s);return s.delete(e),l;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,c,r,n,o,i);if(!(1&r)){var _=p&&R.call(e,"__wrapped__"),y=d&&R.call(t,"__wrapped__");if(_||y){var D=_?e.value():e,x=y?t.value():t;return i||(i=new u.Z),o(D,x,r,n,i)}}return!!f&&(i||(i=new u.Z),function(e,t,r,n,o,i){var s=1&r,a=(0,O.Z)(e),c=a.length;if(c!=(0,O.Z)(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:A.call(t,l)))return!1}var p=i.get(e),d=i.get(t);if(p&&d)return p==t&&d==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=s;++u<c;){var _=e[l=a[u]],v=t[l];if(n)var m=s?n(v,_,l,t,e,i):n(_,v,l,e,t,i);if(!(void 0===m?_===v||o(_,v,r,n,i):m)){f=!1;break}h||(h="constructor"==l)}if(f&&!h){var E=e.constructor,g=t.constructor;E==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof g&&g instanceof g||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,r,n,o,i))};var x=r(3391);const j=function e(t,r,n,o,i){return t===r||(null==t||null==r||!(0,x.Z)(t)&&!(0,x.Z)(r)?t!=t&&r!=r:D(t,r,n,o,e,i))};var N=r(3122);const M=function(e){return e==e&&!(0,N.default)(e)},U=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},k=function(e){var t=function(e){for(var t=(0,i.default)(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,M(o)]}return t}(e);return 1==t.length&&t[0][2]?U(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],l=e[c],p=a[1];if(s&&a[2]){if(void 0===l&&!(c in e))return!1}else{var d=new u.Z;if(n)var f=n(l,p,c,e,t,d);if(!(void 0===f?j(p,l,3,n,d):f))return!1}}return!0}(r,e,t)}};var F=r(772),V=r(3488),G=r(3502),B=r(7969);var H=r(9930);var Z=r(9523);const q=function(e){return(0,G.Z)(e)?(t=(0,B.Z)(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return(0,Z.Z)(t,e)}}(e);var t},W=function(e){return"function"==typeof e?e:null==e?H.Z:"object"==typeof e?(0,C.Z)(e)?(t=e[0],r=e[1],(0,G.Z)(t)&&M(r)?U((0,B.Z)(t),r):function(e){var n=(0,F.default)(e,t);return void 0===n&&n===r?(0,V.Z)(e,t):j(r,n,3)}):k(e):q(e);var t,r},z=function(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r},J=function(e,t,r){var o=(0,C.Z)(e)?n:z,i=arguments.length<3;return o(e,W(t),r,i,a)}},5513:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r(4187);const o=function(e,t,r){return null==e?e:(0,n.Z)(e,t,r)}},813:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(){return[]}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(4354);return __webpack_exports__})()));
|