tt-minigame-ide-cli 2.0.8 → 2.0.9
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 +15 -0
- package/dist/miniprogram-utils/src/constants/slardar-events/update-events.d.ts +1 -0
- package/dist/miniprogram-utils/src/data/project.d.ts +4 -0
- package/dist/miniprogram-utils/src/electron-monitor/common/browser.d.ts +18 -0
- package/dist/miniprogram-utils/src/electron-monitor/common/share.d.ts +1 -4
- package/dist/miniprogram-utils/src/utils/index.d.ts +25 -0
- package/dist/tt-ide-cli/src/features/microgame/unity.d.ts +1 -0
- package/dist/tt-ide-cli/src/features/preview.d.ts +1 -0
- package/dist/tt-ide-cli/src/monitor/constants.d.ts +1 -0
- package/dist/tt-ide-cli/src/utils/qrcode.d.ts +8 -0
- package/dist/tt-ide-cli/src/utils/update.d.ts +7 -0
- package/package.json +1 -1
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("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__})()));
|
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,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)}},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,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,E=d?o:o[t]||(o[t]={}),g=E[s],y=d?n:h?n[t]:(n[t]||{})[s];for(u in d&&(r=t),r)(l=!f&&y&&void 0!==y[u])&&u in E||(p=l?y[u]:r[u],E[u]=d&&"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[s]=e[s],t}(p):_&&"function"==typeof p?i(Function.call,p):p,_&&((E.virtual||(E.virtual={}))[u]=p,e&c.R&&g&&!g[u]&&a(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),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,E,g,y){u(r,t,m);var b,O,A,w=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",I=E==_,S=!1,P=e.prototype,L=P[f]||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||s(A,f)||a(A,f,v)),I&&L&&L.name!==_&&(S=!0,T=function(){return L.call(this)}),n&&!y||!d&&!S&&P[f]||a(P,f,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*(d||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,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",E=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){E.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(E,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,n=a(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(a(E,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),E=n(r,p,t?2:1),g=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(i(m)){for(d=s(e.length);d>g;g++)if((v=t?E(a(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),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)(),E="Promise",g=s.TypeError,y=s.process,b=s[E],O="process"==u(y=s.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=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&&x(e),e._h=1),!0===a?r=n:(u&&u.enter(),r=a(n),u&&u.exit()),r===t.promise?c(g("Promise-chain cycle")):(i=I(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?y.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},x=function(e){v.call(s,(function(){var t;O?y.emit("rejectionHandled",e):(t=s.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){d(this,b,E,"_h"),f(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*(a||!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,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=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),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)}]))},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 a(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,s=t.host,c=t.port;if("string"!=typeof s||!s||"string"!=typeof r)return"";if(r=r.split(":",1)[0],!function(e,t){var r=(a("npm_config_no_proxy")||a("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,a=n?parseInt(n[2]):0;return!(!a||a===t)||(/^[.*]/.test(o)?("*"===o.charAt(0)&&(o=o.slice(1)),!i.call(e,o)):e!==o)}))}(s=s.replace(/:\d*$/,""),c=parseInt(c)||o[r]||0))return"";var u=a("npm_config_"+r+"_proxy")||a(r+"_proxy")||a("npm_config_proxy")||a("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: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},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),a=r(5687),s=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"],f=["abort","aborted","connect","error","socket","timeout"],d=Object.create(null);f.forEach((function(e){d[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=s.prototype.destroy||O;function y(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){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+":",a=r[i]=e[n],s=t[n]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,n,a){return o&&e instanceof o?e=C(e):L(e)?e=C(A(e)):(a=n,n=w(e),e={protocol:i}),T(n)&&(a=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,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=s.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 f)e.removeListener(r,d[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(s.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,f))o.on(i,d[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()}()}},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 a=this._options.beforeRedirect;a&&(r=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=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,f,d=I(/^host$/i,this._options.headers),h=A(this._currentUrl),_=d||h.host,m=/^\w+:/.test(i)?this._currentUrl:n.format(Object.assign(h,{host:_})),E=(p=i,f=m,l?new o(p,f):A(n.resolve(f,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(a)){var g={headers:e.headers,statusCode:t},y={url:m,method:s,headers:r};a(this._options,g,y),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=b({http:i,https:a}),e.exports.wrap=b},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_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_AI_ABNORMAL_REPLY:"IDE_AI_ABNORMAL_REPLY",IDE_AI_BUTTON_SHOW:"IDE_AI_BUTTON_SHOW",IDE_AI_STAY_DURATION:"IDE_AI_STAY_DURATION",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",IDE_DOUYIN_OAUTH_BIND_CLICK:"IDE_DOUYIN_OAUTH_BIND_CLICK",IDE_USER_LOCAL_IP_COUNT:"IDE_USER_LOCAL_IP_COUNT",IDE_WEB_CREATE:"IDE_WEB_CREATE",IDE_WEB_LOAD:"IDE_WEB_LOAD",IDE_WEB_DETECT:"IDE_WEB_DETECT"}),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",WEB_PC_SDK:"WEB_PC_SDK",SIGN_CHECKER_GUARANTEED_PAYMENT:"SIGN_CHECKER_GUARANTEED_PAYMENT",SIGN_CHECKER_TRADE_SYSTEM:"SIGN_CHECKER_TRADE_SYSTEM"},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",IDE_FORCE_UPGRADE:"IDE_FORCE_UPGRADE"},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),E=r(5833),g=r(7992),y=f(r(6503)),b=f(r(7921)),O=f(r(772)),A=f(r(3122)),w=f(r(298)),C=f(r(1395)),I=f(r(8337)),S=f(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,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,y.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,w.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,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 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,I.default)(((f={})[t]=n,f),a),c=(0,w.default)(s).length>0,l=(0,C.default)(((h={})[t]=n,h),a),p=(0,w.default)(l).length>0,(0,S.default)(this.__raw,t,n),c&&(0,S.default)(this.privateJson,t,s[t]),p&&(0,S.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),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.getWebDetect=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.webDetect)||void 0===r||r},r.prototype.getPreviewPreload=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.previewPreload)||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("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([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(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,webDetect:R.NORMAL},condition:R.NORMAL},r}(m.JSONContainer);t.ProjectConfig=j},5622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathname=t.watchBrowserINP=void 0,t.watchBrowserINP=function(e){var t=new PerformanceObserver((function(r){r.getEntries().forEach((function(r){var n,o=r.duration,i=r.processingEnd-r.startTime,a=r.processingStart-r.startTime,s=r.processingEnd-r.processingStart,c=null===(n=null==r?void 0:r.target)||void 0===n?void 0:n.outerHTML;s<1||i<100||!c||e({metrics:{inp:o,inpt:i,inputDelay:a,processTime:s},tags:{outerHTML:c,type:r.name}},(function(){return t.disconnect()}))}))}));return setTimeout((function(){t.observe({type:"event",buffered:!0})}),3e4),t},t.getPathname=function(){try{return window.location.pathname.split("/dist")[1]}catch(e){return""}}},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.getHref=t.commonParams2Context=t.BID=t.getSystemMemory=t.getCPUModel=t.getPathname=void 0;var a=i(r(2037)),s=r(5622);Object.defineProperty(t,"getPathname",{enumerable:!0,get:function(){return s.getPathname}});var c="";function u(){try{return c||(c=a.default.cpus()[0].model)}catch(e){return c="none"}}t.getCPUModel=u;var l="";function p(){try{return l||(l=Math.round(a.default.totalmem()/1024/1024/1024).toString())}catch(e){return l="none"}}function f(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=p,t.BID="electron_12345",t.commonParams2Context=function(e,t,r,n){var o,i,a,s,c,l,f,d,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!==(s=null===(a=null==e?void 0:e.ideVersionNumber)||void 0===a?void 0:a.toString())&&void 0!==s?s:"",ide_env:null!==(c=null==e?void 0:e.env)&&void 0!==c?c:"",branch:null!==(l=null==e?void 0:e.branch)&&void 0!==l?l:"",build_id:null!==(f=null==e?void 0:e.buildId)&&void 0!==f?f:"",buildId:null!==(d=null==e?void 0:e.buildId)&&void 0!==d?d:"",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:u(),system_memory:p()}},t.getHref=function(){try{return window.location.href}catch(e){return""}},t.moduleEventCacheMap={click:{},call:{}},t.timelineMap=new Map,t.setModuleUseCache=f,t.getModuleUseCache=d,t.compareCacheTriggerCount=function(e,t,r,n,i){var a;if(void 0===i&&(i=Date.now()),1===r)return!0;var s=d(e,t),c=s.startTime,u=void 0===c?0:c,l=s.triggerNum,p=Number(l)+1;if(p<r)return f(e,t,o(o({},s),{triggerNum:p,startTime:null!==(a=s.startTime)&&void 0!==a?a:i})),!1;var h=n&&i-u>n;return f(e,t,o(o({},s),{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 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.__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},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))},s=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=s(r(4088)),u=r(6912),l=c.default.create({baseURL:"https://mcs.snssdk.com",timeout:6e4,headers:{"Content-Type":"application/json"}}),p=console.info;function f(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=f;var d,h,_=function(){function e(e,t,r){var n=this;void 0===t&&(t=1e3),void 0===r&&(r=10),this._events=[],this.reporterAll=function(){0!==n._events.length&&(n.reporter(a([],i(n._events),!1)),n.clear())},this.add=function(e,t,r){if(n._events.push(f(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,s){var c=this;void 0===r&&(r={}),d||(d=new _((function(e){return n(c,void 0,void 0,(function(){var r,n,s,c,f;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===(c=r.events)||void 0===c?void 0:c.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,r.events),s=a([],i(new Set((r.events||[]).map((function(e){return null==e?void 0:e.event})))),!1).join(","),Error("Tea report error, "+((null==n?void 0:n.message)||String(n))+", event count: "+(null===(f=r.events)||void 0===f?void 0:f.length)+", failed events: "+s);case 4:return[2]}}))}))}))),d.add(e,r,s)},t.clearTeaEvents=function(){null==d||d.reporterAll()},t.reportTeaImmediately=function(e,t){var r,n=t.map((function(e){return f(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__"]),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.setBoeMap=t.setJestMock=t.setSlardarInstance=t.setEnvFunction=t.defaultEnv=t.AxiosInstance=void 0;var a=i(r(4088)),s=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},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,l=a.channel;if(!s)return e;try{for(var f=n(c),d=f.next();!d.done;d=f.next()){var h=o(d.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{d&&!d.done&&(r=f.return)&&r.call(f)}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=a.default.create({adapter:"http",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,d,h,_,v,m;return console.info("[error request proxy]",p().proxy),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!==(_=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===(d=null==e?void 0:e.response)||void 0===d?void 0:d.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){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}))}},4851:function(e,t){"use strict";var r=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())}))},n=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])}}};function o(e){return new Promise((function(t){return setTimeout(t,e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.isNeedForceUpdate=t.versionStringCompare=t.retryTask=t.sleep=t.waitUntil=t.parseJson=void 0,t.parseJson=function(e,t){void 0===t&&(t={});try{return JSON.parse(e)}catch(e){return console.error("[parseJson]",e),t}},t.waitUntil=function(e,t,r){void 0===t&&(t=3e3),void 0===r&&(r=500);var n=Date.now(),o=!1;return new Promise((function(i){var a=setInterval((function(){(o||Date.now()-n>=t)&&(i(o),clearInterval(a));try{e().then((function(e){o=e})).catch((function(e){console.error("[waitUntil/task/promise]"+e.message)}))}catch(e){console.error("[waitUntil/task]"+e.message)}}),r)}))},t.sleep=o,t.retryTask=function(e,t,i){return void 0===t&&(t=10),void 0===i&&(i=1e3),r(this,void 0,void 0,(function(){var a,s,c,u=this;return n(this,(function(l){switch(l.label){case 0:a=0,s=function(){return r(u,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return"function"!=typeof i?[3,2]:[4,i()];case 1:return e.sent(),[3,4];case 2:return[4,o(i)];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},l.label=1;case 1:return a<t?1==++a?[3,3]:[4,s()]:[3,7];case 2:l.sent(),l.label=3;case 3:return l.trys.push([3,5,,6]),[4,e()];case 4:return l.sent(),[2];case 5:if(c=l.sent(),a===t)throw c;return console.error("task failed, will retry"),[3,6];case 6:return[3,1];case 7:return[2]}}))}))},t.versionStringCompare=function(e,t){void 0===e&&(e=""),void 0===t&&(t="");for(var r=e.split("-")[0].trim().split("."),n=t.split("-")[0].trim().split("."),o=Math.max(r.length,n.length),i=0,a=0;a<o;a++){var s=r.length>a?r[a]:"0",c=isNaN(Number(s))?s.charCodeAt(0):Number(s),u=n.length>a?n[a]:"0",l=isNaN(Number(u))?u.charCodeAt(0):Number(u);if(c<l){i=-1;break}if(c>l){i=1;break}}return i},t.isNeedForceUpdate=function(e){var r=e.curVersion,n=e.updateVersion,o=e.date,i=e.appType;if(n&&-1===(0,t.versionStringCompare)(r,n)){var a=new Date(o),s=new Date(a.getTime()-12096e5),c=new Date,u=a.getFullYear()+" 年 "+(a.getMonth()+1)+" 月 "+a.getDate()+" 日";return c>=a?{message:"当前版本 "+r+" 在 "+u+"后已不再提供服务,为了给你提供更好的体验,请将 "+i+" 升级至最新版本,感谢你的理解与支持。",type:"force"}:c>=s?{message:"为了给你提供更好的体验,请在 "+u+"前将 "+i+" 升级至最新版本。逾期未升级,我们将无法继续提供服务,感谢你的理解与支持。",type:"warn"}:null}return null}},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),l=r(5796);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/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 f(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 d(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,f({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,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 a=i.sent(),s=a.success,c=a.msg,[4,(0,l.checkChannel)(t,o)];case 2:if(i.sent(),!s)throw new Error(c);return[4,d({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 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=",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 f.URL(e):null;return{env:E.env,proxy:{host:t?t.hostname:null,port:t?t.port:null}}};(0,s.setEnvFunction)(g),(0,c.setEnvFunctionForProject)(g)}t.setConfig=function(e,t){if(void 0===t&&(t=!1),t)E=(0,u.default)(m),d.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]);d.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},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","ignore-channel":!0}})];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 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,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,_,E;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,E=d.msg,!_)throw new s.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,f.validatePhoneNumber)(t),[4,E(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,_,E;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,E=d.msg,!_)throw new s.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,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),[4,(0,s.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,a.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,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.__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),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.__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 f=r(2747),d=r(7992),h=p(r(9258)),_=a(r(9849)),v=a(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(2997),C=r(4263),I=r(2893),S=r(5834),P=r(1017),L=r(9428),T=p(r(9508)),R=(0,C.getCliDefaultStoragePath)(),D=v.join(R,"preview.json"),x={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default"},j={preview:x,debug:x};if((0,C.isCli)())if(_.existsSync(D))try{j=_.readJSONSync(D)}catch(e){}else _.ensureFileSync(D),_.writeJsonSync(D,j);function N(e){var t,r,o,i;return s(this,void 0,void 0,(function(){var a,s,u,l,p,v,m,b,O,A,w,C,S,L,T,R,D,x,j,N,M,U,k,F,V;return c(this,(function(c){switch(c.label){case 0:return a=e.devAppid,s=e.projectPath,u=e.type,l=e.uploadVersion,p=e.uploadChangeLog,v=e.uploadNeedUploadSourcemap,m=e.localCompileVersion,b=e.extraCheckInfoJson,O=e.extraInfoJson,w=new h.default,[4,(0,g.getSizeLimitConfig)(a)];case 1:return C=c.sent(),S=1024*C.subTotal*1024,[4,(0,E.folderToZipStream)(s,{whiteList:[],useTypeScript:!1},!0,S)];case 2:return L=c.sent(),T=(0,I.getConfig)(),R=d.AxiosInstance.put,"preview"===u?A=T.microgameUrl.preview+a:(A=T.microgameUrl.upload+a,w.append("version",l),w.append("intro",p),w.append("need_upload_sourcemap",String(!!v)),w.append("extra_check_info_json",b)),[4,_.readJson((0,P.join)(s,"game.json"))];case 3:return D=c.sent(),x=null!==(t=D.subPackages)&&void 0!==t?t:D.subpackages,w.append("subpackage",String(Boolean(null==x?void 0:x.length))),w.append("local_compile_version",null!=m?m:"4.0.4-rc.17.ide.2.cli"),w.append("source",L,{filename:"source.zip"}),O&&w.append("extra_info_json",O),U=R,k=[A,w],F={},V={},[4,(0,y.getUserCookies)()];case 4:return[4,U.apply(void 0,k.concat([(F.headers=n.apply(void 0,[(V.Cookie=c.sent(),V),w.getHeaders()]),F.maxBodyLength=S,F)]))];case 5:if(j=c.sent(),N=j.data,M=j.headers,0===N.error||0===N.code)return[2,{metrics:null!==(r=N.performance_metrics)&&void 0!==r?r:{},logId:null!==(o=null==M?void 0:M["x-tt-logid"])&&void 0!==o?o:""}];throw new f.UploadError(null!==(i=N.message)&&void 0!==i?i:N.msg,N.error)}}))}))}function M(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,I.getConfig)().microgameUrl.compileProgress+e,[4,d.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 U(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,d,h;return c(this,(function(c){switch(c.label){case 0:return[4,M(e)];case 1:return t=c.sent(),i=t.success,a=t.msg,s=t.error,u=t.errLink,l=t.metrics,p=t.done,d=t.passJson,i||(clearInterval(o),h=new f.CompileError(a,u,s),n(h)),p&&(clearInterval(o),r({metrics:null!=l?l:{},passJson:d})),[2]}}))}))}),1e3)}))];case 1:return[2,r.sent()]}}))}))}function k(e,t){return s(this,void 0,void 0,(function(){var r,n,o,i,a,s,l,p,f;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),r=["**/*.js"],[4,(0,T.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(a=u(n),s=a.next();!s.done;s=a.next())l=s.value,i(l)}catch(e){p={error:e}}finally{try{s&&!s.done&&(f=a.return)&&f.call(a)}finally{if(p)throw p.error}}return[2,o];case 2:return c.sent(),[2,[]];case 3:return[2]}}))}))}function F(e){var t,r,o,i,a,p,_=e.appid,v=e.extraCheckInfoJson,m=e.zipStream,E=e.updateStatus,g=e.setCheckResult,b=e.projectPath,O=e.isNewPlatform;return s(this,void 0,void 0,(function(){var e,s,A,w,C,I,S,P,L,T,R,D,x,j,N,M,U,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];s=[["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(s),C=w.next(),c.label=2;case 2:return C.done?[3,5]:(I=l(C.value,2),S=I[0],[4,k(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=d.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==(U=j.value)?void 0:U.status)&&console.error("error: ",null==U?void 0:U.message),3===(null==U?void 0:U.status)&&console.info("warning: ",null==U?void 0:U.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==(U=M.value)?void 0:U.status)&&console.info("warning: ",null==U?void 0:U.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 f.UploadError(T.message);return null==O||O(null!==(a=null==T?void 0:T.is_game_migrate)&&void 0!==a&&a),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 V(e){var t,r,n;return s(this,void 0,void 0,(function(){var o,i,a,s,u,l,p,d,h,v,E,y,I,P,T,R,M,k,V,G,B,H,Z,q,W,z,J,K,$,X,Y;return c(this,(function(c){switch(c.label){case 0:return[4,(0,w.isCliNeedForceUpdate)("microgame")];case 1:return c.sent(),o={shortUrl:"",expireTime:0,originSchema:"",useCache:!1,metrics:{},passJson:{}},i=e.project,a=e.page,s=e.qrcode,u=e.cache,l=e.uploadOptions,p=e.extraInfoJson,d=e.localCompileVersion,h=e.ideConfig,v=e.debug,E=e.uploadCache,y=e.supportSourcemap,I=e.enableHotRestartCache,P=e.setCheckResult,T=e.updateStatus,R=e.isNewPlatform,M=i.path,[4,(0,L.getProjectHash)(M,!0).catch((function(){return""}))];case 2:return k=c.sent(),V=l?"upload":"preview",G=!1,H=j[B=v?"debug":"preview"]||x,a&&!a.scene&&(a.scene="990001"),u&&((0,C.isCli)()||(null==h?void 0:h.previewScene)===H.previewScene)&&k&&H.hash===k&&H.shortUrl&&H.expireTime>Date.now()/1e3?(o.shortUrl=H.shortUrl,o.expireTime=H.expireTime,o.originSchema=H.originSchema,o.useCache=!0,b.default.info("项目文件无变动,使用缓存"),G=!0,[3,16]):[3,3];case 3:return(0,O.addNodeToMetrics)(o.metrics,"compileCreate"),[4,(0,g.getAppId)(M)];case 4:return Z=c.sent(),[4,(0,g.validateAppId)(Z)];case 5:return c.sent(),(0,O.addFieldToMetrics)(o.metrics,"appId",Z),q=b.default.loading("正在准备上传..."),E&&k&&H.hash===k&&H.shortUrl&&H.expireTime>Date.now()/1e3?[3,13]:[4,(0,g.verifyPkgSize)(M)];case 6:if(W=c.sent())throw new f.ProjectError(W);return"upload"!==V||(0,C.isIDE)()?[3,8]:[4,(0,S.getMeta)(Z)];case 7:if((z=c.sent())&&l&&1===(0,m.default)(z,l.version))throw new f.UploadError(l.version+" is smaller than "+z+"(online version)");c.label=8;case 8:return"upload"!==V?[3,10]:[4,F({appid:Z,extraCheckInfoJson:null!==(t=null==l?void 0:l.extraCheckInfoJson)&&void 0!==t?t:"",updateStatus:T,setCheckResult:P,projectPath:M,isNewPlatform:R})];case 9:if(!c.sent()){if((0,C.isCli)())throw new f.UploadError("审核预检失败");return[2]}c.label=10;case 10:return q.text="正在上传中...",(0,O.addNodeToMetrics)(o.metrics,"IDERequest"),[4,N({devAppid:Z,projectPath:M,type:V,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:d,supportSourcemap:y})];case 11:return J=c.sent(),(0,O.addFieldToMetrics)(o.metrics,"logId",J.logId),q.text="查询编译进度中...",[4,U(Z)];case 12:K=c.sent(),o.metrics=(0,O.mergeMetrics)(o.metrics,J.metrics,K.metrics),o.passJson=K.passJson,(0,O.addNodeToMetrics)(o.metrics,"IDEReceiveResponse"),c.label=13;case 13:return null===(null==s?void 0:s.format)?[3,15]:(q.text="生成二维码中...",[4,(0,A.makeSchema)({devAppid:Z,extAppid:"",startPage:a.path,query:a.query,scene:a.scene,bdpLog:{launch_from:a.launchFrom,location:a.location},headers:{},ideConfig:h,qrcodeQuery:null==v?void 0:v.query,referrerInfo:a.referrerInfo,hotRestartHash:I&&k?k:"",type:V})]);case 14:$=c.sent(),o.shortUrl=$.shortUrl,o.expireTime=$.expireTime,o.originSchema=$.originSchema,c.label=15;case 15:(0,O.addNodeToMetrics)(o.metrics,"compileClose"),q.stop(),c.label=16;case 16:return"imageFile"!==(null==s?void 0:s.format)?[3,19]:s.output?[4,(0,A.toQRCodeFile)(o.shortUrl,s.output)]:[3,18];case 17:X=c.sent(),o.qrcodeFilePath=X,b.default.info("二维码图片已存储到 "+X),c.label=18;case 18:return[3,22];case 19:return"imageSVG"!==(null==s?void 0:s.format)?[3,22]:G&&H.qrcodeSVG?(o.qrcodeSVG=H.qrcodeSVG,[3,22]):[3,20];case 20:return Y=o,[4,(0,A.toQRCodeSVG)(o.shortUrl)];case 21:Y.qrcodeSVG=c.sent(),c.label=22;case 22:return function(e,t){j[t]=e,(0,C.isCli)()&&_.writeJsonSync(D,j)}({shortUrl:o.shortUrl,expireTime:o.expireTime,originSchema:o.originSchema,hash:k,previewScene:null!==(n=null==h?void 0:h.previewScene)&&void 0!==n?n:"default",qrcodeSVG:o.qrcodeSVG},B),[2,o]}}))}))}t.preview=function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,V(e)];case 1:return[2,t.sent()]}}))}))},t.upload=function(e){var t,r;return s(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,V({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=V},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 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.getMicroappInfo=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]]}}))}))},t.getMicroappInfo=function(e){return n(void 0,void 0,void 0,(function(){var t,r,n,i,a,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,s.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===(a=null===(i=r.data)||void 0===i?void 0:i.data)||void 0===a?void 0:a.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 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.unityCli=void 0;var s=r(7992),c=a(r(9258)),u=r(1728),l=a(r(9849)),p=a(r(1017)),f=r(5834),d=a(r(7086)),h=a(r(8366)),_=["0","1","2","3","4","5"],v={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:"任务准备中"},m=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:{})]}}))}))},E=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()]}}))}))},g=function(e){var t=e.projectPath,r=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,n,o,a,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),(e=(0,u.getUserId)())||r?[4,m(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,s.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 a=i.sent(),[2,"data:image/png;base64,"+Buffer.from(a.data).toString("base64")];case 3:return c=i.sent(),console.info("【Error】:",c),[2,null];case 4:return[2]}}))}))},y=function(e){var t=e.type,r=e.appid,n=e.uid;return o(void 0,void 0,void 0,(function(){var e,o,a,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,s.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===(a=o.data)||void 0===a?void 0:a.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:""}]}}))}))},b=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,m(t)]:(console.info("请先登录"),[2]);case 1:return n=i.sent(),o=n.appid,[4,y({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 2:return[2,i.sent()]}}))}))},O=function(e){var t=e.projectPath,r=e.version,a=e.publishDesc,p=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,o,f,d,h,v,g,y,b,O,A,w;return i(this,(function(i){switch(i.label){case 0:return(e=(0,u.getUserId)())||p?[4,m(t)]:(console.info("请先登录"),[2]);case 1:return o=i.sent(),f=o.appid,d=o.publishType,h=o.unityEngineVersion,[4,E(t)];case 2:return v=i.sent(),[4,C(f)];case 3:if(!i.sent())throw new Error("appid: "+f+"为非unity小游戏");if(!h)throw new Error("unityEngineVersion为必填字段,请修改project.config.json后重试");switch((g=new c.default).append("uid",null!=p?p:parseInt(e)),g.append("app_id",f),g.append("version",r),g.append("publish_type",d),g.append("unity_engine_version",h),g.append("publish_desc",null!=a?a:""),g.append("orientation","portrait"===v.deviceOrientation?"0":"1"),g.append("menu_btn_style","light"===v.menuButtonStyle?"1":"0"),""+d){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":w=l.default.createReadStream(o.build.webgl),g.append("webgl_file",w,{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":A=l.default.createReadStream(o.build.instantGame),g.append("ig_file",A,{filename:"ig_file.json"});break;case"5":A=l.default.createReadStream(o.build.instantGame),g.append("ig_file",A,{filename:"ig_file.json"}),w=l.default.createReadStream(o.build.webgl),g.append("webgl_file",w,{filename:"webgl_file.zip"});break;default:throw new Error("Publish type must be in ["+_.join(",")+"]")}return[4,s.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]}}))}))},A=function(e){var t=e.projectPath,r=e.version,n=e.updateStatus,a=e.ideUid;return o(void 0,void 0,void 0,(function(){var e,c,l,p,f;return i(this,(function(d){switch(d.label){case 0:return(e=(0,u.getUserId)())||a?[4,m(t)]:(console.info("请先登录"),[2]);case 1:return c=d.sent(),l=c.appid,p=function(){return s.AxiosInstance.request({url:"https://starkgame.zijieapi.com/api/stark_publish/query",method:"post",data:JSON.stringify({uid:""+(null!=a?a:e),app_id:l,version:r}),headers:{"Content-Type":"application/json"}})},f=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,f()];case 2:return d.sent(),[2]}}))}))},w=function(e){var t=e.projectPath,r=e.version,n=e.publishDesc,a=e.updateStatus,s=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,O({projectPath:t,version:r,publishDesc:n,ideUid:s})];case 1:return 0!==(null==(e=i.sent())?void 0:e.code)?(v.uploadError=null!==(c=e.message)&&void 0!==c?c:"",a("uploadError"),[2]):[3,3];case 2:return o=i.sent(),v.uploadError=null!==(u=o.message)&&void 0!==u?u:"发布失败",a("uploadError"),[2];case 3:return[4,A({projectPath:t,version:r,updateStatus:a,ideUid:s})];case 4:return i.sent(),[2]}}))}))},C=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,f.getMicroappInfo)(e)];case 1:return 7===(t=r.sent())?[2,!0]:null===t?[2,null]:[2,!1]}}))}))},I=function(e){return o(void 0,void 0,void 0,(function(){var t,r,n,o,a,s,c,u,l,p,f,d;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 P(null!==(o=null===(n=null==r?void 0:r.native)||void 0===n?void 0:n.apk)&&void 0!==o?o:""),[4,S(null===(a=null==r?void 0:r.native)||void 0===a?void 0:a.il2cpp,"il2cpp产物文件不存在")];case 2:return i.sent(),[4,S(null===(s=null==r?void 0:r.native)||void 0===s?void 0:s.apk,"apk产物文件不存在")];case 3:case 7:case 9:case 11:case 14:return i.sent(),[3,16];case 4:return P(null!==(u=null===(c=null==r?void 0:r.native)||void 0===c?void 0:c.apk)&&void 0!==u?u:""),[4,S(null===(l=null==r?void 0:r.native)||void 0===l?void 0:l.il2cpp,"il2cpp产物文件不存在")];case 5:return i.sent(),[4,S(null===(p=null==r?void 0:r.native)||void 0===p?void 0:p.apk,"apk产物文件不存在")];case 6:case 13:return i.sent(),[4,S(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 8:return[4,S(null==r?void 0:r.webgl,"webgl产物文件不存在")];case 10:return L(null!==(f=null==r?void 0:r.instantGame)&&void 0!==f?f:""),[4,S(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 12:return L(null!==(d=null==r?void 0:r.instantGame)&&void 0!==d?d:""),[4,S(null==r?void 0:r.instantGame,"instant game产物文件不存在")];case 15:throw new Error("Publish type must be in ["+_.join(",")+"]");case 16:return[2]}}))}))},S=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]}}))}))},P=function(e){if(".apk"!==p.default.extname(e))throw new Error("请上传apk文件")},L=function(e){if(".json"!==p.default.extname(e))throw new Error("请上传json文件")},T=function(e,t){return-1===(0,d.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,a,s,c;return i(this,(function(i){switch(i.label){case 0:return(e=(0,u.getUserId)())||r?[4,m(t)]:(console.info("请先登录"),[2]);case 1:n=i.sent(),o=n.appid,a={},i.label=2;case 2:return i.trys.push([2,4,,5]),[4,y({uid:null!=r?r:parseInt(e),appid:o,type:"current"})];case 3:return s=i.sent(),Object.assign(a,{current:s}),[3,5];case 4:return i.sent(),[3,5];case 5:return i.trys.push([5,7,,8]),[4,y({uid:null!=r?r:parseInt(e),appid:o,type:"latest"})];case 6:return c=i.sent(),Object.assign(a,{latest:c}),[3,8];case 7:return i.sent(),[3,8];case 8:return[2,a]}}))}))},getLatestVersion:b,preview:g,upload:O,queryProgress:A,uploadAndQueryProgress:w,validateFiles:I,validateAppId:C,validateVersion:T,PROGRESS:v,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,m(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,a,s,c,u,f,d,_;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==(a=i.sent())?void 0:a.unity)?(a.unity.publishType=n,[4,l.default.writeJSON(p.default.join(t,"project.config.json"),a)]):[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==(s=i.sent())?void 0:s.deviceOrientation)?(s.deviceOrientation=o,[4,l.default.writeJSON(p.default.join(t,"game.json"),s)]):[3,6];case 5:i.sent(),i.label=6;case 6:return[4,m(t)];case 7:return c=i.sent(),[4,I(c)];case 8:return i.sent(),[4,C(c.appid)];case 9:if(!i.sent())throw new Error("appid: "+c.appid+"为非unity小游戏");return[4,b({projectPath:t})];case 10:if(u=i.sent(),!T(u.version,r))throw new Error("版本号必须大于最新版本号"+u.version);return[4,w(e)];case 11:return i.sent(),e.outputPath?[4,g({projectPath:t})]:[3,14];case 12:return f=i.sent(),d=f.replace(/^data:image\/\w+;base64,/,""),_=Buffer.from(d,"base64"),[4,l.default.writeFile(e.outputPath,_)];case 13:i.sent(),h.default.info("\n测试二维码图片保存成功:",e.outputPath),i.label=14;case 14:return[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 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.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)),f=c(r(1017)),d=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,a,s,c,u;return i(this,(function(i){switch(i.label){case 0:return t={normalTotal:16,subMain:4,subPkg:20,subTotal:20,openData:4},a=(o=m.AxiosInstance).get,s=[""+(0,g.getConfig)().microgameUrl.sizeLimit+e],c={},u={},[4,(0,E.getUserCookies)()];case 1:return[4,a.apply(o,s.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,s,c,u,l,d,_,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(f.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 s=i.sent(),[4,(0,t.getSizeLimitConfig)(s)];case 3:return c=i.sent(),u=[],n?[4,(0,h.getPathByteSize)(f.default.join(e,n),t.PKG_SIZE_IGNORE_GLOBS,(0,v.getWhiteList)(!0))]:[3,5];case 4:return d=i.sent(),[3,6];case 5:d=0,i.label=6;case 6:return(l=d)>(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=f.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=a(e,2);return t[0],t[1]>(0,h.mb2Byte)(c.subPkg)})),b.length>0&&u.push(b.map((function(e){return a(e,1)[0].name})).join("、")+" 子包大小为:"+b.map((function(e){var t=a(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,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,_.fetchMeta)({appid:e})];case 1:if((n=o.sent().data)&&2!==n.tech_type)throw new d.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 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,buildNpm,_this=this;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(),buildNpm=eval("require")("@tt-miniprogram/ext-pack").buildNpm,[4,new Promise((function(e){return __awaiter(_this,void 0,void 0,(function(){var t,r,n;return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,buildNpm({projectPath})];case 1:return"success"===(t=o.sent()).result?e({success:!0,reason:t.message.title}):e({success:!1,reason:t.message.content}),[3,3];case 2:return r=o.sent(),e({success:!1,reason:null!==(n=r.message)&&void 0!==n?n:"执行构建 NPM 脚本失败"}),[3,3];case 3:return[2]}}))}))}))];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.9",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),E=l(r(9849)),g=r(9882);function y(e,t,r,n,o){return void 0===r&&(r={}),a(this,void 0,void 0,(function(){var i,a,l,f,d,h,y,b,O,A,w;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,E.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=_.default.convertPathToPattern(f),h=_.default.convertPathToPattern(e),[4,(0,_.default)(l?h:(0,g.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 y=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:b=(b=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e.path)&&e.path.startsWith(d)})),y.push.apply(y,u([],c(b),!1)),s.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=s.sent(),new p.ProjectError(w.toString());case 7:return[2]}}))}))}function b(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var r,n,o,i,c,u,l,p,d,h,_,g,b=this;return s(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 d=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 a(b,void 0,void 0,(function(){var r;return s(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,f.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,f.ensureEndSlash)(n.openDataContext),size:g},i+=g,d-=g,O.label=7;case 7:return o.total=i+d,o.main={path:c,size:d},[2,o]}}))}))}t.getFolderSize=y,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,h;return s(this,(function(s){switch(s.label){case 0:return[4,e.getAppJSON()];case 1: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=[],s.label=2;case 2:return s.trys.push([2,4,,7]),[4,b(o,n)];case 3:return c=s.sent(),[3,7];case 4:return u=s.sent(),console.error("获取包体积失败",u),[4,(0,m.sleep)(1e3)];case 5:return s.sent(),[4,b(o,n)];case 6:return c=s.sent(),[3,7];case 7:if(!c)throw Error("获取包体积失败");if(c.total>i.totalMax&&a.push("项目源码包大小 "+(0,f.formatSize)(c.total)+",超过 "+(0,f.formatSize)(i.totalMax)+"。"),(c.sub.length>0||c.openData)&&(l=c.main,d=c.sub,h=c.openData,l.size>i.mainMax&&a.push("主包大小为 "+(0,f.formatSize)(l.size)+",超过 "+(0,f.formatSize)(i.mainMax)+"。"),null==d||d.forEach((function(e){e.size>i.subMax&&a.push(e.path+" 子包大小为 "+(0,f.formatSize)(e.size)+", 超过 "+(0,f.formatSize)(i.subMax)+"。")})),(null==h?void 0:h.size)>i.subMax&&a.push("开放数据域大小为 "+(0,f.formatSize)(h.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,n){var o=t.whiteList,i=void 0===o?[]:o,l=t.useTypeScript;return void 0===n&&(n=m.HIGH_WATER_MARK),a(this,void 0,void 0,(function(){var t,o,f,h,E,y=this;return s(this,(function(b){switch(b.label){case 0:return t=function(){return a(y,void 0,void 0,(function(){var t,o,a,f,h,E,y,b,O;return s(this,(function(s){switch(s.label){case 0:return t=(0,d.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 a=s.sent(),r?[3,6]:[4,(0,m.getProjectConfig)(e)];case 2:return f=s.sent(),h=v.join(e,f.getMiniprogramRoot()),[4,f.getAppJSON()];case 3:return[4,s.sent().getKey("gameFiles")];case 4:return E=null!==(O=s.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=s.sent()).filter((function(e){return g.ALLOWED_MICROGAME_EXTS_REG.test(e)&&!e.startsWith("..")})),a.push.apply(a,u([],c(y),!1)),s.label=6;case 6:return(b=new Set(a)).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 s.sent(),[2,t]}}))}))},(o=O.get(e))?[4,o]:[3,2];case 1:b.sent(),b.label=2;case 2:f=t(),O.set(e,f),b.label=3;case 3:return b.trys.push([3,5,,6]),[4,f];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 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.__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 f=r(2747),d=r(7992),h=p(r(9258)),_=a(r(9849)),v=a(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),P=r(2997);function L(e,t){if(!e)throw new Error("请检查 url 配置是否正常");return e.replace(/\$\{appid\}/g,t)}var T=(0,C.getCliDefaultStoragePath)(),R=v.join(T,"preview.json"),D={hash:"",expireTime:0,shortUrl:"",originSchema:"",previewScene:"default",page:{}};if((0,C.isCli)())if(_.existsSync(R))try{D=_.readJSONSync(R)}catch(e){}else _.ensureFileSync(R),_.writeJsonSync(R,D);function x(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,u,l,p,_,v,m,g,y,O,A,w,S,P,T,R,D,x,N,M,U,k,F,V,G,B,H,Z;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,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,j(i,S)];case 1:c.sent(),c.label=2;case 2:return[4,(0,E.folderToZipStream)(s,{whiteList:O?["**/*"]:_?["**/*.map"]:void 0,useTypeScript:w},!1)];case 3:return x=c.sent(),N=(0,I.getConfig)(),M=d.AxiosInstance.put,O?[3,4]:("preview"===u?(a&&(R=a,D="?devappid="+i),P=L(N.url.preview,R)+D):(P=L(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",x,{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=d.AxiosInstance.post,T.append("app_id",R),T.append("tech_type",16),[4,(0,C.getMD5Stream)(x)];case 5:U=c.sent(),T.append("src_md5",U.__md5),T.append("src",U,{filename:"src.zip"}),"preview"===u?(P=N.interactGameUrl.preview,T.append("extra_json",y)):(P=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=[P,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 f.UploadError(null!==(o=F.message)&&void 0!==o?o:F.msg,F.error)}}))}))}function j(e,t){return s(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 f.UploadError("通道只能是大于0的整数");return[4,N(e)];case 1:if((r=n.sent().limit_num)&&Number(t)>=r)throw new f.UploadError("通道不能大于 "+(r-1));return[4,H(e)];case 2:if(n.sent())throw new f.UploadError("沙盒小程序不支持通道");return[2]}}))}))}function N(e){return s(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,d.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 M(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,b.getLogInfoHeaders)(e)];case 1:return u.headers=c.sent(),o=u,i=e,a="","",r&&t&&(i=t,a="?devappid="+e),s=n?(0,I.getConfig)().interactGameUrl.compileProgress+"?app_id="+e+"&stage="+(r?"preview":"latest"):L((0,I.getConfig)().url.compileProgress,i)+a,[4,d.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 U(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,p,d,h,_,v,m;return c(this,(function(c){switch(c.label){case 0:return[4,M(e,t,r,n)];case 1:return o=c.sent(),s=o.success,l=o.msg,p=o.error,d=o.errLink,h=o.metrics,_=o.done,v=o.passJson,s||(clearInterval(u),m=new f.CompileError(l,d,p),a(m)),_&&(clearInterval(u),i({metrics:null!=h?h:{},passJson:v})),[2]}}))}))}),1e3)}))];case 1:return[2,i.sent()]}}))}))}function k(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,b.getLogInfoHeaders)(e)];case 1:return n.headers=o.sent(),t=n,r=(0,I.getConfig)().url.check+"?app_id="+e,[4,d.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 F(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,k(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 V(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 f.ProjectError('当前项目为小程序项目,但是 "'+t+'" 属于小玩法 ID。');if(n&&!o)throw new f.ProjectError('当前项目为小玩法项目,但是 "'+t+'" 属于小程序 ID。');return[2]}}))}))}function G(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 a=l(o),s=a.next();!s.done;s=a.next()){var c=s.value;if(!i.includes(c)||!G(e[c],t[c]))return!1}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0}function B(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,p,d,h,v,b,I,L,T,j,N,M,k,B,H,Z,q,W,z,J,K,$,X,Y,Q,ee,te,re,ne,oe;return c(this,(function(c){switch(c.label){case 0:return[4,(0,P.isCliNeedForceUpdate)("microapp")];case 1:return c.sent(),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,p=e.localCompileVersion,d=e.ideConfig,h=e.debug,v=e.uploadCache,b=e.interactGame,I=e.supportSourcemap,L=e.enableHotRestartCache,T=e.penetrateMapJson,j=e.updateStatus,N=e.setCheckResult,M=e.traceVersion,k=e.traceMode,B=o.path,H="",v||s?[4,(0,y.getProjectHash)(B,!1,t)]:[3,3];case 2:H=c.sent(),c.label=3;case 3:return Z=u?"upload":"preview",q=!1,s&&((0,C.isCli)()||(null==d?void 0:d.previewScene)===D.previewScene)&&H&&D.hash===H&&D.shortUrl&&D.expireTime>Date.now()/1e3&&G(i,D.page)?(n.shortUrl=D.shortUrl,n.expireTime=D.expireTime,n.originSchema=D.originSchema,n.useCache=!0,O.default.info("项目文件无变动,使用缓存"),q=!0,[3,19]):[3,4];case 4:return(0,A.addNodeToMetrics)(n.metrics,"compileCreate"),[4,(0,C.getProjectConfig)(B)];case 5:return[4,(W=c.sent()).getRealAppid()];case 6:return z=c.sent(),(0,C.validateAppId)(z),[4,V(W,z)];case 7:return c.sent(),(0,A.addFieldToMetrics)(n.metrics,"appId",z),J=null,[4,(0,g.detectValidExtApp)(z,B)];case 8:if((K=c.sent()).invalidReason||(J=K.ext.extAppid),K.invalidReason&&K.invalidReason.reason!==g.INVALID_EXTAPP_REASON.EXT_DISABLED&&K.invalidReason.reason!==g.INVALID_EXTAPP_REASON.INVALID_EXT_JSON)throw new f.ProjectError('当前 ext.json "extEnable" 为 true,但是由于三方配置异常,当前工程仍为普通小程序工程,错误原因是:'+K.invalidReason.errMsg);return $=O.default.loading("正在准备上传..."),v&&H&&D.hash===H&&D.shortUrl&&D.expireTime>Date.now()/1e3?[3,16]:[4,(0,E.verifySubPackageSize)(W,Z)];case 9:return c.sent(),"upload"!==Z||b||(0,C.isIDE)()?[3,11]:[4,(0,S.getAppVersions)(z)];case 10:if(X=c.sent().audit_version,u.version||(u.version=(0,C.getNextVersion)(X),O.default.info("\nThe default version is "+u.version+".")),X&&u&&1===(0,m.default)(X,u.version))throw new f.UploadError(u.version+" is smaller than "+X+"(pre order version)");c.label=11;case 11:return Y={upload:1,check:1,compile:1},$.text="正在上传中...",null==j||j(Y),(0,A.addNodeToMetrics)(n.metrics,"IDERequest"),[4,x({devAppid:z,extAppid:J,projectPath:B,type:Z,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:W.useTypeScript(),channel:null==u?void 0:u.channel})];case 12:return Q=c.sent(),Y.upload=2,null==j||j(Y),(0,A.addFieldToMetrics)(n.metrics,"logId",Q.logId),(null==u?void 0:u.needUploadCheck)?($.text="查询预检进度中...",[4,F(z)]):[3,14];case 13:ee=c.sent(),Y.check=ee.status,null==j||j(Y),null==N||N(ee),c.label=14;case 14:return $.text="查询编译进度中...",[4,U(z,J,"preview"===Z,!!b)];case 15:te=c.sent(),Y.compile=2,null==j||j(Y),n.metrics=(0,A.mergeMetrics)(n.metrics,Q.metrics,te.metrics),n.passJson=te.passJson,(0,A.addNodeToMetrics)(n.metrics,"IDEReceiveResponse"),c.label=16;case 16:return null===(null==a?void 0:a.format)?[3,18]:($.text="生成二维码中...",[4,(0,w.makeSchema)({devAppid:z,extAppid:J,startPage:i.path,query:i.query,scene:i.scene,bdpLog:{launch_from:i.launchFrom,location:i.location,entrance_form:"990001",enter_from_merge:"scan",enter_position:"qr_code"},headers:{},ideConfig:d,qrcodeQuery:null==h?void 0:h.query,referrerInfo:i.referrerInfo,hotRestartHash:L&&H?H:"",type:Z,penetrateMapJson:T,traceVersion:M,traceMode:k,isInteractGame:!!b,uploadOptions:u})]);case 17:re=c.sent(),n.shortUrl=re.shortUrl,n.expireTime=re.expireTime,n.originSchema=re.originSchema,c.label=18;case 18:(0,A.addNodeToMetrics)(n.metrics,"compileClose"),$.stop(),c.label=19;case 19:return"imageFile"!==(null==a?void 0:a.format)?[3,22]:a.output?[4,(0,w.toQRCodeFile)(n.shortUrl,a.output)]:[3,21];case 20:ne=c.sent(),n.qrcodeFilePath=ne,O.default.info("二维码图片已存储到 "+ne),c.label=21;case 21:return[3,25];case 22:return"imageSVG"!==(null==a?void 0:a.format)?[3,25]:q&&D.qrcodeSVG?(n.qrcodeSVG=D.qrcodeSVG,[3,25]):[3,23];case 23:return oe=n,[4,(0,w.toQRCodeSVG)(n.shortUrl)];case 24:oe.qrcodeSVG=c.sent(),c.label=25;case 25:return function(e){D=e,(0,C.isCli)()&&_.writeJsonSync(R,D)}({shortUrl:n.shortUrl,expireTime:n.expireTime,originSchema:n.originSchema,hash:H,previewScene:null!==(r=null==d?void 0:d.previewScene)&&void 0!==r?r:"default",qrcodeSVG:n.qrcodeSVG,page:i}),[2,n]}}))}))}function H(e){var t,r,o;return s(this,void 0,void 0,(function(){var i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),a=d.AxiosInstance,u={url:"https://developer.open-douyin.com/bff_api/app/setting/v2/"+e+"/microappinfoservice/getMicroappInfo",params:{appId:e}},s=[{}],[4,(0,b.getLogInfoHeaders)(e)];case 1:return[4,a.apply(void 0,[(u.headers=n.apply(void 0,s.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=j,t.checkProjectMatchAppid=V,t.preview=function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,B(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,B({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=B},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 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 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 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.9",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.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",IDE_CLI_FORCE_UPGRADE:"IDE_CLI_FORCE_UPGRADE"}},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])}}},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};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),f=r(4263),d=r(9251),h="",_="";function v(){var e=(0,p.getConfig)();return l.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(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 a(void 0,void 0,void 0,(function(){var r,n,o;return s(this,(function(i){switch(i.label){case 0:if((0,f.isIDE)()||!(r=(0,d.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),E=u(r(8366)),g=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,_,E,y,b,O,A,w,C,I,S,P,L,T,R,D,x,j,N,M,U,k,F,V,G;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,E=e.isInteractGame,y=e.referrerInfo,b=e.hotRestartHash,O=e.type,A=e.penetrateMapJson,w=e.traceVersion,C=e.traceMode,I=e.uploadOptions,S=(0,v.getConfig)().url.makeSchema,P={},i&&(P={devappid:t}),[4,(0,m.getLogInfoHeaders)(t)];case 1:L=c.sent(),T=a?a+"?"+s:"",R={skip_domain_check:!!(null==_?void 0:_.skipDomainCheck),inspect_platform:null!==(N=null==_?void 0:_.inspectPlatform)&&void 0!==N?N:"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!==(U=null===(M=null==_?void 0:_.dycloudConfig)||void 0===M?void 0:M.callContainer)&&void 0!==U?U:null,websocket:null!==(F=null===(k=null==_?void 0:_.dycloudConfig)||void 0===k?void 0:k.websocket)&&void 0!==F?F:null},extra_info:null!==(V=null==_?void 0:_.extraInfo)&&void 0!==V?V:{},performance_test:null==_?void 0:_.performanceTest},(null==_?void 0:_.isSandbox)&&Object.assign(R,{is_sandbox:!0,random_key:_.randomKey,account_name:_.accountName,app_id:_.appId,app_name:_.appName,expire_time:_.expireTime}),D={start_page:encodeURIComponent(T),query:null!=s?s:"",scene:""+u,bdp_log:JSON.stringify(f),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:R,trace_mode:C},b&&{hot_restart_version:b}))},"upload"===O&&(D.version_num=I.version,D.tag=I.channel),(null===(G=null==_?void 0:_.extraInfo)||void 0===G?void 0:G.preload)&&Object.assign(D,{preload:null==_?void 0:_.extraInfo.preload}),d&&Object.assign(D,d),E&&(S=(0,v.getConfig)().interactGameUrl.makeSchema),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,p.AxiosInstance.post(S,n(n({app_id:i||t,stage:"upload"===O?"latest":"preview"},P),{schema_params:D}),{headers:Object.assign(L,h)})];case 3:return x=c.sent(),(0,g.isIDE)()&&console.info("makeSchema result",x),0===x.data.code?((0,g.isIDE)()&&console.info("makeSchema",x.data.data),r({originSchema:E?x.data.data.schema_v2:x.data.data.origin_schema,shortUrl:x.data.data.short_url,expireTime:+x.data.data.expire_time})):o(new l.SchemaError(x.data.msg)),[3,5];case 4:return j=c.sent(),o(new l.SchemaError(j.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&&E.default.warn("small QR Code may not work in some environments"),E.default.info("二维码信息:"+e+" "+r)}},2997: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.isCliNeedForceUpdate=t.getForceUpdateConfig=t.getIDESettings=void 0;var s=r(7992),c=r(4851),u=r(1728),l=a(r(8366)),p=a(r(7282)),f=r(4263),d=r(8066),h=d.CliMonitor.getInstance({cliVersion:"2.0.9",cliName:"tt-minigame-ide-cli"});function _(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:t=(0,u.getUserId)(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s.AxiosInstance.get("https://is.snssdk.com/service/settings/v2/",{params:n({device_id:""+t,user_id:""+t,app:1,aid:13,caller_name:"microapp_ide"},null==e?void 0:e.params)})];case 2:return[2,r.sent().data.data.app];case 3:return r.sent(),[2,null];case 4:return[2]}}))}))}function v(e){var t;return o(this,void 0,void 0,(function(){var r,n;return i(this,(function(o){switch(o.label){case 0:return[4,_()];case 1:return(r=o.sent())?(n=null===(t=r.ide_config)||void 0===t?void 0:t.forceUpdate)?[2,{date:n.date,updateVersion:n.cli[e]}]:[2,null]:[2]}}))}))}t.getIDESettings=_,t.getForceUpdateConfig=v,t.isCliNeedForceUpdate=function(e){return o(this,void 0,void 0,(function(){var t,r,o,a;return i(this,(function(i){switch(i.label){case 0:return(0,f.isCli)()?[4,v(e)]:[2];case 1:return(t=i.sent())?((r=(0,c.isNeedForceUpdate)(n(n({},t),{curVersion:"2.0.9",appType:"CLI"})))&&(o=r.message,a=r.type,h.report(d.CLI_EVENTS.IDE_CLI_FORCE_UPGRADE,{force_update_type:a}),"force"===a?(l.default.error(o),p.default.exit()):l.default.warn(o)),[2]):[2,null]}}))}))}},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.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)),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 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=d.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),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=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(d.homedir(),e)},t.getAppid=function(e){var t=e.getAppid();return g(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)},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 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)),E=v.CliMonitor.getInstance({cliVersion:"2.0.9",cliName:"tt-minigame-ide-cli"});a.default.version("2.0.9","-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){E.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){E.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){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})})),a.default.command("logout").description("Logout and clear the session.").action((function(e){E.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").option("--minigame-query <query>","Minigame query").option("--minigame-scene <scene>","Minigame scene").option("--minigame-launch-from <launchFrom>","Minigame launchFrom").option("--minigame-location <location>","Minigame location").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:return E.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(),[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.minigamePath,query:r.minigameQuery,scene:r.minigameScene,launchFrom:r.minigameLaunchFrom,location:r.minigameLocation},qrcode:{format:r.output?"imageFile":"terminal",output:r.output,options:{small:r.small}},localCompileVersion:"4.0.4-rc.17.ide.2.cli",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,d.generateTerminalQrCode)(i.shortUrl,{copy:r.copy,small:r.small}),[3,5];case 4:return a=o.sent(),s.default.stopLoading(),s.default.error(null!==(_=a.stack)&&void 0!==_?_:a),E.report(v.CLI_EVENTS.IDE_CLI_PREVIEW_FAIL,{type:a.name,message:null!==(m=a.message)&&void 0!==m?m:a}),[3,5];case 5: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,_,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?f.default.isAbsolute(e)||(e=f.default.join(process.cwd(),e)):e=process.cwd(),[4,l.microgame.unityCli.isUnity(e)];case 1:return o.sent()?(n=s.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]},outputPath:r.output})]):[3,3];case 2:return o.sent(),n.stop(),s.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.cli",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,d.generateTerminalQrCode)(i.shortUrl,{copy:r.copy,small:r.small}),s.default.info("🎉 Upload success"),[3,6];case 5:return a=o.sent(),s.default.stopLoading(),s.default.error(null!==(_=a.stack)&&void 0!==_?_:a),E.report(v.CLI_EVENTS.IDE_CLI_UPLOAD_FAIL,{type:a.name,message:null!==(m=a.message)&&void 0!==m?m:a}),[3,6];case 6: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 E.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,u;return o(this,(function(o){switch(o.label){case 0:return E.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,l.microgame.unityCli.isUnity(e)]:(s.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(),a=JSON.parse(i),(c=a.ttappid||a.appid)?[4,(0,l.getMeta)({appid:c})]:(s.default.error('Require parameter "appid".'),[2]);case 6:return u=o.sent(),s.default.info(u.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("--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 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),E.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),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")},7282:e=>{"use strict";e.exports=require("process")},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),a=r(3685),s=r(5687),c=r(3837),u=r(4940),l=r(9796),p=r(2781),f=r(2361);function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const h=d(n),_=d(o),v=d(a),m=d(s),E=d(c),g=d(u),y=d(l),b=d(p),O=d(f);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 a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,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"),Y=(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)},Q="abcdefghijklmnopqrstuvwxyz",ee="0123456789",te={DIGIT:ee,ALPHA:Q,ALPHA_DIGIT:Q+Q.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,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!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:Y,freezeMethods:e=>{Y(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,ae={};function se(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=>{ae[e]={value:e}})),Object.defineProperties(oe,ae),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,r,n,o,i)=>{const a=Object.create(ie);return ne.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};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,a=r.indexes,s=(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(!s&&ne.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(e)||ne.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=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(se)}(e)||(ne.isFileList(e)||ne.endsWith(r,"[]"))&&(s=ne.toArray(e)))return r=ce(r),s.forEach((function(e,n){!ne.isUndefined(e)&&null!==e&&t.append(!0===a?ue([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!se(e)||(t.append(ue(o,r,i),c(e)),!1)}const l=[],p=Object.assign(le,{defaultVisitor:u,convertValue:c,isVisitable:se});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 fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function de(e,t){this._pairs=[],e&&pe(e,this,t)}const he=de.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 de(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,fe)}:fe;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 a=Number.isFinite(+i),s=o>=e.length;return i=!i&&ne.isArray(n)?n.length:i,s?(ne.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(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])),!a)}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 a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Re(n),r[a]=!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,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,p=0;for(;l!==i;)p+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*p/f):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 a=Date.now();if(t||a-r>n)return o&&(clearTimeout(o),o=null),r=a,e.apply(null,i);o||(o=setTimeout((()=>(o=null,r=Date.now(),e.apply(null,i))),n-(a-r)))}}((function(){const e=r.length,i=r.bytesSeen,a=i-o;if(!a||t.destroyed)return;const s=n(a);o=i,process.nextTick((()=>{t.emit("progress",{loaded:i,total:e,progress:e?i/e:void 0,bytes:a,rate:s||void 0,estimated:s&&e&&i<=e?(e-i)/s: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,a=this.readableHighWaterMark,s=o.timeWindow,c=i/(1e3/s),u=!1!==o.minChunkSize?Math.max(o.minChunkSize,.01*c):0,l=(e,t)=>{const r=Buffer.byteLength(e);let l,p=null,f=a,d=0;if(i){const e=Date.now();(!o.ts||(d=e-o.ts)>=s)&&(o.ts=e,l=c-o.bytes,o.bytes=l<0?-l:0,d=0),l=c-o.bytes}if(i){if(l<=0)return setTimeout((()=>{t(null,e)}),s-d);l<f&&(f=l)}f&&r>f&&r-f>u&&(p=e.subarray(f),e=e.subarray(0,f)),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",Ye=$e.encode(Xe);class Qe{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 Ye}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:at,https:st}=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 ft=(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}),dt=we.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];ne.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ne.isString(n)&&a.push("path="+n),ne.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.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,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s);r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-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:a}=e;const{responseType:s,responseEncoding:c}=e,u=e.method.toUpperCase();let l,f,d=!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=>ft(e))):[ft(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,f):t)}n(((e,t)=>{l=!0,t&&(d=!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],a=r[2],s=r[3],c=Buffer.from(decodeURIComponent(s),a?"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"===s,{Blob:e.env&&e.env.Blob})}catch(t){throw oe.from(t,oe.ERR_BAD_REQUEST,e)}return"text"===s?(n=n.toString(c),c&&"utf8"!==c||(n=ne.stripBOM(n))):"stream"===s&&(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 a=$e.encode("--"+i+Xe),s=$e.encode("--"+i+"--"+Xe+Xe);let c=s.byteLength;const u=Array.from(e.entries()).map((([e,t])=>{const r=new Qe(e,t);return c+=r.size,r}));c+=a.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 a,yield*e.encode();yield s}())})(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:a,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?st:at),e.maxBodyLength>-1?N.maxBodyLength=e.maxBodyLength:N.maxBodyLength=1/0,e.insecureHTTPParser&&(N.insecureHTTPParser=e.insecureHTTPParser),f=M.request(N,(function(n){if(f.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 a=n;const l=n.req||f;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"])}a=o.length>1?b.default.pipeline(o,ne.noop):o[0];const p=b.default.finished(a,(()=>{p(),_()})),v={status:n.statusCode,statusText:n.statusMessage,headers:new je(n.headers),config:e,request:l};if("stream"===s)v.data=a,ke(t,r,v);else{const n=[];let o=0;a.on("data",(function(t){n.push(t),o+=t.length,e.maxContentLength>-1&&o>e.maxContentLength&&(d=!0,a.destroy(),r(new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l)))})),a.on("aborted",(function(){if(d)return;const t=new oe("maxContentLength size of "+e.maxContentLength+" exceeded",oe.ERR_BAD_RESPONSE,e,l);a.destroy(t),r(t)})),a.on("error",(function(t){f.destroyed||r(oe.from(t,null,e,l))})),a.on("end",(function(){try{let e=1===n.length?n[0]:Buffer.concat(n);"arraybuffer"!==s&&(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=>{a.destroyed||(a.emit("error",e),a.destroy())}))})),h.once("abort",(e=>{r(e),f.destroy(e)})),f.on("error",(function(t){r(oe.from(t,null,e,f))})),f.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,f));f.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,f)),g()}))}if(ne.isStream(o)){let t=!1,r=!1;o.on("end",(()=>{t=!0})),o.once("error",(e=>{r=!0,f.destroy(e)})),o.on("close",(()=>{t||r||g(new Ue("Request stream has been aborted",e,f))})),o.pipe(f)}else f.end(o)},new Promise(((e,r)=>{let n,o;const i=(e,t)=>{o||(o=!0,n&&n(e,t))},a=e=>{i(e,!0),r(e)};t((t=>{i(t),e(t)}),a,(e=>n=e)).catch(a)}));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,a,{responseType:s,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!==(a=o.getContentType())){const[e,...t]=a?a.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 f(){if(!l)return;const n=je.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());ke((function(e){t(e),u()}),(function(e){r(e),u()}),{data:s&&"text"!==s&&"json"!==s?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=f:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(f)},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&&dt.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),s&&"json"!==s&&(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 d=Ge(p);d&&-1===we.protocols.indexOf(d)?r(new oe("Unsupported protocol "+d+":",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 a(e,t){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(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:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,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,a=i(e[n],t[n],n);ne.isUndefined(a)&&i!==s||(r[n]=a)})),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],a=t[i];if(a){const t=e[i],r=void 0===t||a(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 a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.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(!s){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);p<l;)u=u.then(e[p++],e[p++]);return u}l=a.length;let f=t;for(p=0;p<l;){const e=a[p++],t=a[p++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=bt.call(this,f)}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:()=>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),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,a=e.constructor;switch(t){case"[object ArrayBuffer]":return y(e);case"[object Boolean]":case"[object Date]":return new a(+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 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,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=f?f(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,s.Z)(t),e)}(g,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)}(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?s.Z:a.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,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:()=>g});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},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 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:()=>y});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,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),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(8936);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),E=(0,p.Z)(a.Z),g=(0,p.Z)(s),y=(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 E:return f;case g:return d;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:()=>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(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:()=>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}},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),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,E=v.call(Object);const g=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)==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 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,g));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:()=>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),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 E=a?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(!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 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 a=(0,C.Z)(e),s=(0,C.Z)(t),c=a?L:(0,w.Z)(e),l=s?L:(0,w.Z)(t),p=(c=c==P?T:c)==T,f=(l=l==P?T:l)==T,d=c==l;if(d&&(0,I.Z)(e)){if(!(0,I.Z)(t))return!1;a=!0,p=!1}if(d&&!p)return i||(i=new u.Z),a||(0,S.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=E;case"[object Set]":var c=1&n;if(s||(s=g),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__"),y=f&&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!!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 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||(d=!1)}return i.delete(e),i.delete(t),d}(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,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?j(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):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,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[]}}},__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__})()));
|