builder.io 1.9.21 → 1.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/index.cjs +23 -23
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -4
- package/server/index.cjs +3 -3
- package/server/index.mjs +3 -3
- package/types/cli/code-tools.d.ts +1 -0
- package/types/cli/codegen.d.ts +10 -1
- package/types/tsconfig.tsbuildinfo +1 -1
package/cli/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var pj=Object.create;var sd=Object.defineProperty;var dj=Object.getOwnPropertyDescriptor;var fj=Object.getOwnPropertyNames;var mj=Object.getPrototypeOf,hj=Object.prototype.hasOwnProperty;var gj=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pS=(e,t)=>{for(var r in t)sd(e,r,{get:t[r],enumerable:!0})},dS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fj(t))!hj.call(e,i)&&i!==r&&sd(e,i,{get:()=>t[i],enumerable:!(n=dj(t,i))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?pj(mj(e)):{},dS(t||!e||!e.__esModule?sd(r,"default",{value:e,enumerable:!0}):r,e)),yj=e=>dS(sd({},"__esModule",{value:!0}),e);var f=gj(()=>{{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db2a5ad0f4b15df874290f3ccecd0423eac6e6d8"}}});var mS=w((Sxe,fS)=>{f();function Mg(e){return e==null?[]:Array.isArray(e)?e:[e]}function bj(e,t,r,n){var i,s=e[t],o=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);e[t]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}fS.exports=function(e,t){e=e||[],t=t||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,p=e.length;let d=t.alias!==void 0,h=t.unknown!==void 0,m=t.default!==void 0;if(t.alias=t.alias||{},t.string=Mg(t.string),t.boolean=Mg(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Mg(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(m){for(r in t.default)if(s=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[s]!==void 0)for(t[s].push(r),c=0;c<n.length;c++)t[s].push(n[c])}let g=h?Object.keys(t.alias):[];for(c=0;c<p;c++){if(i=e[c],i==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),h&&!~g.indexOf(s))return t.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===p||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],h&&!~g.indexOf(s))return t.unknown("-".repeat(u)+s);bj(a,s,l+1<n.length||o,t)}}}if(m)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(d)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}});var cd=w((Ixe,xS)=>{"use strict";f();var Gg="\x1B",Tt=`${Gg}[`,vj="\x07",zg={to(e,t){return t?`${Tt}${t+1};${e+1}H`:`${Tt}${e+1}G`},move(e,t){let r="";return e<0?r+=`${Tt}${-e}D`:e>0&&(r+=`${Tt}${e}C`),t<0?r+=`${Tt}${-t}A`:t>0&&(r+=`${Tt}${t}B`),r},up:(e=1)=>`${Tt}${e}A`,down:(e=1)=>`${Tt}${e}B`,forward:(e=1)=>`${Tt}${e}C`,backward:(e=1)=>`${Tt}${e}D`,nextLine:(e=1)=>`${Tt}E`.repeat(e),prevLine:(e=1)=>`${Tt}F`.repeat(e),left:`${Tt}G`,hide:`${Tt}?25l`,show:`${Tt}?25h`,save:`${Gg}7`,restore:`${Gg}8`},Dj={up:(e=1)=>`${Tt}S`.repeat(e),down:(e=1)=>`${Tt}T`.repeat(e)},Cj={screen:`${Tt}2J`,up:(e=1)=>`${Tt}1J`.repeat(e),down:(e=1)=>`${Tt}J`.repeat(e),line:`${Tt}2K`,lineEnd:`${Tt}K`,lineStart:`${Tt}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?zg.up():"");return e&&(t+=zg.left),t}};xS.exports={cursor:zg,scroll:Dj,erase:Cj,beep:vj}});var vt=w((Nxe,Hg)=>{f();var ld=process||{},vS=ld.argv||[],ud=ld.env||{},Ej=!(ud.NO_COLOR||vS.includes("--no-color"))&&(!!ud.FORCE_COLOR||vS.includes("--color")||ld.platform==="win32"||(ld.stdout||{}).isTTY&&ud.TERM!=="dumb"||!!ud.CI),wj=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+Sj(i,t,r,s)+t:e+i+t},Sj=(e,t,r,n)=>{let i="",s=0;do i+=e.substring(s,n)+r,s=n+t.length,n=e.indexOf(t,s);while(~n);return i+e.substring(s)},DS=(e=Ej)=>{let t=e?wj:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Hg.exports=DS();Hg.exports.createColors=DS});var YS=w((Zxe,WS)=>{"use strict";f();WS.exports=function(){if(process.env.npm_config_user_agent)return rq(process.env.npm_config_user_agent)};function rq(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});var CT=w((Bwe,kd)=>{f();kd.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;kd.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;kd.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var Ty=w((Mwe,ET)=>{f();var Sy=CT();ET.exports={isSpaceSeparator(e){return typeof e=="string"&&Sy.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Sy.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Sy.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var PT=w((Uwe,AT)=>{f();var zt=Ty(),Py,wr,zi,Rd,Ps,zn,Ht,Iy,Bu;AT.exports=function(t,r){Py=String(t),wr="start",zi=[],Rd=0,Ps=1,zn=0,Ht=void 0,Iy=void 0,Bu=void 0;do Ht=Cz(),Sz[wr]();while(Ht.type!=="eof");return typeof r=="function"?Fy({"":Bu},"",r):Bu};function Fy(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=String(i),o=Fy(n,s,r);o===void 0?delete n[s]:Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(let i in n){let s=Fy(n,i,r);s===void 0?delete n[i]:Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var Ee,be,Ou,Gi,Pe;function Cz(){for(Ee="default",be="",Ou=!1,Gi=1;;){Pe=Hi();let e=ST[Ee]();if(e)return e}}function Hi(){if(Py[Rd])return String.fromCodePoint(Py.codePointAt(Rd))}function H(){let e=Hi();return e===`
|
|
1
|
+
var pj=Object.create;var sd=Object.defineProperty;var dj=Object.getOwnPropertyDescriptor;var fj=Object.getOwnPropertyNames;var mj=Object.getPrototypeOf,hj=Object.prototype.hasOwnProperty;var gj=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pS=(e,t)=>{for(var r in t)sd(e,r,{get:t[r],enumerable:!0})},dS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fj(t))!hj.call(e,i)&&i!==r&&sd(e,i,{get:()=>t[i],enumerable:!(n=dj(t,i))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?pj(mj(e)):{},dS(t||!e||!e.__esModule?sd(r,"default",{value:e,enumerable:!0}):r,e)),yj=e=>dS(sd({},"__esModule",{value:!0}),e);var f=gj(()=>{{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"85ae8249dd9e894b19aef3820c05725a7e14d5db"}}});var mS=w((Sxe,fS)=>{f();function Mg(e){return e==null?[]:Array.isArray(e)?e:[e]}function bj(e,t,r,n){var i,s=e[t],o=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);e[t]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}fS.exports=function(e,t){e=e||[],t=t||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,p=e.length;let d=t.alias!==void 0,h=t.unknown!==void 0,m=t.default!==void 0;if(t.alias=t.alias||{},t.string=Mg(t.string),t.boolean=Mg(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Mg(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(m){for(r in t.default)if(s=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[s]!==void 0)for(t[s].push(r),c=0;c<n.length;c++)t[s].push(n[c])}let g=h?Object.keys(t.alias):[];for(c=0;c<p;c++){if(i=e[c],i==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),h&&!~g.indexOf(s))return t.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===p||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],h&&!~g.indexOf(s))return t.unknown("-".repeat(u)+s);bj(a,s,l+1<n.length||o,t)}}}if(m)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(d)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}});var cd=w((Ixe,xS)=>{"use strict";f();var Gg="\x1B",Tt=`${Gg}[`,vj="\x07",zg={to(e,t){return t?`${Tt}${t+1};${e+1}H`:`${Tt}${e+1}G`},move(e,t){let r="";return e<0?r+=`${Tt}${-e}D`:e>0&&(r+=`${Tt}${e}C`),t<0?r+=`${Tt}${-t}A`:t>0&&(r+=`${Tt}${t}B`),r},up:(e=1)=>`${Tt}${e}A`,down:(e=1)=>`${Tt}${e}B`,forward:(e=1)=>`${Tt}${e}C`,backward:(e=1)=>`${Tt}${e}D`,nextLine:(e=1)=>`${Tt}E`.repeat(e),prevLine:(e=1)=>`${Tt}F`.repeat(e),left:`${Tt}G`,hide:`${Tt}?25l`,show:`${Tt}?25h`,save:`${Gg}7`,restore:`${Gg}8`},Dj={up:(e=1)=>`${Tt}S`.repeat(e),down:(e=1)=>`${Tt}T`.repeat(e)},Cj={screen:`${Tt}2J`,up:(e=1)=>`${Tt}1J`.repeat(e),down:(e=1)=>`${Tt}J`.repeat(e),line:`${Tt}2K`,lineEnd:`${Tt}K`,lineStart:`${Tt}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?zg.up():"");return e&&(t+=zg.left),t}};xS.exports={cursor:zg,scroll:Dj,erase:Cj,beep:vj}});var vt=w((Nxe,Hg)=>{f();var ld=process||{},vS=ld.argv||[],ud=ld.env||{},Ej=!(ud.NO_COLOR||vS.includes("--no-color"))&&(!!ud.FORCE_COLOR||vS.includes("--color")||ld.platform==="win32"||(ld.stdout||{}).isTTY&&ud.TERM!=="dumb"||!!ud.CI),wj=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+Sj(i,t,r,s)+t:e+i+t},Sj=(e,t,r,n)=>{let i="",s=0;do i+=e.substring(s,n)+r,s=n+t.length,n=e.indexOf(t,s);while(~n);return i+e.substring(s)},DS=(e=Ej)=>{let t=e?wj:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Hg.exports=DS();Hg.exports.createColors=DS});var YS=w((Zxe,WS)=>{"use strict";f();WS.exports=function(){if(process.env.npm_config_user_agent)return rq(process.env.npm_config_user_agent)};function rq(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});var CT=w((Bwe,kd)=>{f();kd.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;kd.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;kd.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var Ty=w((Mwe,ET)=>{f();var Sy=CT();ET.exports={isSpaceSeparator(e){return typeof e=="string"&&Sy.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Sy.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Sy.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var PT=w((Uwe,AT)=>{f();var zt=Ty(),Py,wr,zi,Rd,Ps,zn,Ht,Iy,Bu;AT.exports=function(t,r){Py=String(t),wr="start",zi=[],Rd=0,Ps=1,zn=0,Ht=void 0,Iy=void 0,Bu=void 0;do Ht=Cz(),Sz[wr]();while(Ht.type!=="eof");return typeof r=="function"?Fy({"":Bu},"",r):Bu};function Fy(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){let s=String(i),o=Fy(n,s,r);o===void 0?delete n[s]:Object.defineProperty(n,s,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(let i in n){let s=Fy(n,i,r);s===void 0?delete n[i]:Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var Ee,be,Ou,Gi,Pe;function Cz(){for(Ee="default",be="",Ou=!1,Gi=1;;){Pe=Hi();let e=ST[Ee]();if(e)return e}}function Hi(){if(Py[Rd])return String.fromCodePoint(Py.codePointAt(Rd))}function H(){let e=Hi();return e===`
|
|
2
2
|
`?(Ps++,zn=0):e?zn+=e.length:zn++,e&&(Rd+=e.length),e}var ST={default(){switch(Pe){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
3
3
|
`:case"\r":case"\u2028":case"\u2029":H();return;case"/":H(),Ee="comment";return;case void 0:return H(),ft("eof")}if(zt.isSpaceSeparator(Pe)){H();return}return ST[wr]()},comment(){switch(Pe){case"*":H(),Ee="multiLineComment";return;case"/":H(),Ee="singleLineComment";return}throw mt(H())},multiLineComment(){switch(Pe){case"*":H(),Ee="multiLineCommentAsterisk";return;case void 0:throw mt(H())}H()},multiLineCommentAsterisk(){switch(Pe){case"*":H();return;case"/":H(),Ee="default";return;case void 0:throw mt(H())}H(),Ee="multiLineComment"},singleLineComment(){switch(Pe){case`
|
|
4
4
|
`:case"\r":case"\u2028":case"\u2029":H(),Ee="default";return;case void 0:return H(),ft("eof")}H()},value(){switch(Pe){case"{":case"[":return ft("punctuator",H());case"n":return H(),Co("ull"),ft("null",null);case"t":return H(),Co("rue"),ft("boolean",!0);case"f":return H(),Co("alse"),ft("boolean",!1);case"-":case"+":H()==="-"&&(Gi=-1),Ee="sign";return;case".":be=H(),Ee="decimalPointLeading";return;case"0":be=H(),Ee="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":be=H(),Ee="decimalInteger";return;case"I":return H(),Co("nfinity"),ft("numeric",1/0);case"N":return H(),Co("aN"),ft("numeric",NaN);case'"':case"'":Ou=H()==='"',be="",Ee="string";return}throw mt(H())},identifierNameStartEscape(){if(Pe!=="u")throw mt(H());H();let e=_y();switch(e){case"$":case"_":break;default:if(!zt.isIdStartChar(e))throw wT();break}be+=e,Ee="identifierName"},identifierName(){switch(Pe){case"$":case"_":case"\u200C":case"\u200D":be+=H();return;case"\\":H(),Ee="identifierNameEscape";return}if(zt.isIdContinueChar(Pe)){be+=H();return}return ft("identifier",be)},identifierNameEscape(){if(Pe!=="u")throw mt(H());H();let e=_y();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!zt.isIdContinueChar(e))throw wT();break}be+=e,Ee="identifierName"},sign(){switch(Pe){case".":be=H(),Ee="decimalPointLeading";return;case"0":be=H(),Ee="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":be=H(),Ee="decimalInteger";return;case"I":return H(),Co("nfinity"),ft("numeric",Gi*(1/0));case"N":return H(),Co("aN"),ft("numeric",NaN)}throw mt(H())},zero(){switch(Pe){case".":be+=H(),Ee="decimalPoint";return;case"e":case"E":be+=H(),Ee="decimalExponent";return;case"x":case"X":be+=H(),Ee="hexadecimal";return}return ft("numeric",Gi*0)},decimalInteger(){switch(Pe){case".":be+=H(),Ee="decimalPoint";return;case"e":case"E":be+=H(),Ee="decimalExponent";return}if(zt.isDigit(Pe)){be+=H();return}return ft("numeric",Gi*Number(be))},decimalPointLeading(){if(zt.isDigit(Pe)){be+=H(),Ee="decimalFraction";return}throw mt(H())},decimalPoint(){switch(Pe){case"e":case"E":be+=H(),Ee="decimalExponent";return}if(zt.isDigit(Pe)){be+=H(),Ee="decimalFraction";return}return ft("numeric",Gi*Number(be))},decimalFraction(){switch(Pe){case"e":case"E":be+=H(),Ee="decimalExponent";return}if(zt.isDigit(Pe)){be+=H();return}return ft("numeric",Gi*Number(be))},decimalExponent(){switch(Pe){case"+":case"-":be+=H(),Ee="decimalExponentSign";return}if(zt.isDigit(Pe)){be+=H(),Ee="decimalExponentInteger";return}throw mt(H())},decimalExponentSign(){if(zt.isDigit(Pe)){be+=H(),Ee="decimalExponentInteger";return}throw mt(H())},decimalExponentInteger(){if(zt.isDigit(Pe)){be+=H();return}return ft("numeric",Gi*Number(be))},hexadecimal(){if(zt.isHexDigit(Pe)){be+=H(),Ee="hexadecimalInteger";return}throw mt(H())},hexadecimalInteger(){if(zt.isHexDigit(Pe)){be+=H();return}return ft("numeric",Gi*Number(be))},string(){switch(Pe){case"\\":H(),be+=Ez();return;case'"':if(Ou)return H(),ft("string",be);be+=H();return;case"'":if(!Ou)return H(),ft("string",be);be+=H();return;case`
|
|
@@ -98,7 +98,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
98
98
|
`)+`\r
|
|
99
99
|
\r
|
|
100
100
|
`+r)}function ma(e,t,r,n,i){if(e.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,ma),e.emit("wsClientError",s,r,t)}else Zp(r,n,i)}});var W7=w((QUe,V7)=>{f();var Vw=class{constructor(t,r,n){this.etaBufferLength=t||100,this.valueBuffer=[n],this.timeBuffer=[r],this.eta="0"}update(t,r,n){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(n-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,n=Math.min(this.etaBufferLength,r),i=this.valueBuffer[r-1]-this.valueBuffer[r-n],s=this.timeBuffer[r-1]-this.timeBuffer[r-n],o=i/s;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(t/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};V7.exports=Vw});var Yw=w((eje,Y7)=>{f();var ha=require("readline"),Ww=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&ha.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,ha.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(ha.moveCursor(this.stream,0,-this.dy),ha.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&ha.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&ha.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&ha.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
101
|
-
`),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Y7.exports=Ww});var X7=w((rje,J7)=>{"use strict";f();J7.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Z7=w((ije,Q7)=>{"use strict";f();var Tbe=X7();Q7.exports=e=>typeof e=="string"?e.replace(Tbe(),""):e});var tU=w((oje,Jw)=>{"use strict";f();var eU=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Jw.exports=eU;Jw.exports.default=eU});var nU=w((cje,rU)=>{"use strict";f();rU.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var sU=w((lje,Xw)=>{"use strict";f();var Abe=Z7(),Pbe=tU(),Fbe=nU(),iU=e=>{if(typeof e!="string"||e.length===0||(e=Abe(e),e.length===0))return 0;e=e.replace(Fbe()," ");let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Pbe(n)?2:1)}return t};Xw.exports=iU;Xw.exports.default=iU});var Qw=w((dje,oU)=>{f();oU.exports=function(t,r,n){if(r.autopadding!==!0)return t;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(t,3);default:return t}}});var Zw=w((mje,aU)=>{f();aU.exports=function(t,r){let n=Math.round(t*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var eS=w((gje,cU)=>{f();cU.exports=function(t,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return t>3600?s(Math.floor(t/3600))+"h"+s(i(t%3600/60))+"m":t>60?s(Math.floor(t/60))+"m"+s(i(t%60))+"s":t>10?s(i(t))+"s":s(t)+"s"}});var tS=w((bje,uU)=>{f();var _be=sU(),Ibe=Qw(),kbe=Zw(),Nbe=eS();uU.exports=function(t,r,n){let i=t.format,s=t.formatTime||Nbe,o=t.formatValue||Ibe,a=t.formatBar||kbe,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,t),percentage:o(c,t,"percentage"),total:o(r.total,t,"total"),value:o(r.value,t,"value"),eta:o(r.eta,t,"eta"),eta_formatted:s(r.eta,t,5),duration:o(l,t,"duration"),duration_formatted:s(l,t,1)});i=i.replace(/\{(\w+)\}/g,function(m,g){return typeof p[g]<"u"?p[g]:m});let d=Math.max(0,r.maxWidth-_be(i)-2),h=Math.floor(d/2);switch(t.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=h>0?" ".repeat(h)+i:i;break;case"left":default:break}return i}});var Tg=w((vje,lU)=>{f();function ot(e,t){return typeof e>"u"||e===null?t:e}lU.exports={parse:function(t,r){let n={},i=Object.assign({},r,t);return n.throttleTime=1e3/ot(i.fps,10),n.stream=ot(i.stream,process.stderr),n.terminal=ot(i.terminal,null),n.clearOnComplete=ot(i.clearOnComplete,!1),n.stopOnComplete=ot(i.stopOnComplete,!1),n.barsize=ot(i.barsize,40),n.align=ot(i.align,"left"),n.hideCursor=ot(i.hideCursor,!1),n.linewrap=ot(i.linewrap,!1),n.barGlue=ot(i.barGlue,""),n.barCompleteChar=ot(i.barCompleteChar,"="),n.barIncompleteChar=ot(i.barIncompleteChar,"-"),n.format=ot(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=ot(i.formatTime,null),n.formatValue=ot(i.formatValue,null),n.formatBar=ot(i.formatBar,null),n.etaBufferLength=ot(i.etaBuffer,10),n.etaAsynchronousUpdate=ot(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=ot(i.progressCalculationRelative,!1),n.synchronousUpdate=ot(i.synchronousUpdate,!0),n.noTTYOutput=ot(i.noTTYOutput,!1),n.notTTYSchedule=ot(i.notTTYSchedule,2e3),n.emptyOnZero=ot(i.emptyOnZero,!1),n.forceRedraw=ot(i.forceRedraw,!1),n.autopadding=ot(i.autopadding,!1),n.gracefulExit=ot(i.gracefulExit,!1),n},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?ot(t.autopaddingChar," "):"",t}}});var rS=w((Eje,dU)=>{f();var pU=W7(),Rbe=Yw(),Obe=tS(),Bbe=Tg(),Lbe=require("events");dU.exports=class extends Lbe{constructor(t){super(),this.options=Bbe.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Rbe(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new pU(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:Obe}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,n){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new pU(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let n=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var mU=w((Tje,fU)=>{f();var Mbe=rS(),$be=Tg();fU.exports=class extends Mbe{constructor(t,r){super($be.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var gU=w((Fje,hU)=>{f();var Ube=Yw(),jbe=rS(),qbe=Tg(),Gbe=require("events");hU.exports=class extends Gbe{constructor(t,r){super(),this.bars=[],this.options=qbe.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Ube(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,n,i={}){let s=new jbe(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(t,r,n),this.emit("start")),s}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var bU=w((Ije,yU)=>{f();yU.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var vU=w((Nje,xU)=>{f();xU.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var CU=w((Oje,DU)=>{f();DU.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var wU=w((Lje,EU)=>{f();EU.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var TU=w(($je,SU)=>{f();var zbe=bU(),Hbe=vU(),Kbe=CU(),Vbe=wU();SU.exports={legacy:zbe,shades_classic:Hbe,shades_grey:Kbe,rect:Vbe}});var FU=w((jje,PU)=>{f();var AU=mU(),Wbe=gU(),Ybe=TU(),Jbe=tS(),Xbe=Qw(),Qbe=Zw(),Zbe=eS();PU.exports={Bar:AU,SingleBar:AU,MultiBar:Wbe,Presets:Ybe,Format:{Formatter:Jbe,BarFormat:Qbe,ValueFormat:Xbe,TimeFormat:Zbe}}});var OU=w((eqe,RU)=>{f();RU.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Cxe={};pS(Cxe,{default:()=>Dxe});module.exports=yj(Cxe);f();f();try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="066069c9-1485-4b2d-b7d8-e9c809683c1a",e._sentryDebugIdIdentifier="sentry-dbid-066069c9-1485-4b2d-b7d8-e9c809683c1a")}catch{}f();var ij=require("../core/index.cjs"),sj=require("../node/index.cjs"),oj=require("../server/index.cjs"),aj=q(mS(),1);f();f();var th=require("fs/promises");f();var $g=q(require("prettier"),1),hS=require("module"),gS=q(require("path"),1);function xj(e){if(!e)return $g.default;try{let r=(0,hS.createRequire)(e)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return $g.default}}async function Zr(e,t,r,n){try{let i=gS.default.resolve(e,n??"file.tsx"),s=xj(i),o=await s.resolveConfig(i);return o?await s.format(t,{...o,filepath:n,parser:r}):await s.format(t,{filepath:n,parser:r})}catch{return t}}f();var o3=require("http");f();var Ug="preview-url";var ba="framework",od="platform",ad="node",yS="/~builder-connect",ho="/~builder-connected",jg="/~builder-dev-tools",qg="/~builder-dev-tools.js",go="/~builder-dev-tools-close",bS="/mappings";var a3=require("os"),fn=require("path"),kr=require("fs");f();var yd=require("util");f();var pr=q(cd(),1),va=require("process"),Ds=q(require("readline"),1),Wg=q(require("readline"),1),_S=require("stream"),IS=q(vt(),1);function Tj({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var Aj=Tj();function kS(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Aj,"")}function NS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RS={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,o=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,o=i<<10|s,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=r(n),s=0,o=0;o<i.length;o++)s=s+this.characterLength(i[o]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var o="",a=0,c=r(n),u=0;u<c.length;u++){var l=c[u],p=t.length(l);if(a>=i-(p==2?1:0))if(a+p<=s)o+=l;else break;a+=p}return o}})(RS);var Pj=RS.exports,Fj=NS(Pj),_j=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Ij=NS(_j);function vu(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=kS(e),e.length===0))return 0;e=e.replace(Ij()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Fj.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Kg=10,CS=(e=0)=>t=>`\x1B[${t+e}m`,ES=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,wS=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Dt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Dt.modifier);var kj=Object.keys(Dt.color),Nj=Object.keys(Dt.bgColor);[...kj,...Nj];function Rj(){let e=new Map;for(let[t,r]of Object.entries(Dt)){for(let[n,i]of Object.entries(r))Dt[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Dt[n],e.set(i[0],i[1]);Object.defineProperty(Dt,t,{value:r,enumerable:!1})}return Object.defineProperty(Dt,"codes",{value:e,enumerable:!1}),Dt.color.close="\x1B[39m",Dt.bgColor.close="\x1B[49m",Dt.color.ansi=CS(),Dt.color.ansi256=ES(),Dt.color.ansi16m=wS(),Dt.bgColor.ansi=CS(Kg),Dt.bgColor.ansi256=ES(Kg),Dt.bgColor.ansi16m=wS(Kg),Object.defineProperties(Dt,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>Dt.rgbToAnsi256(...Dt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Dt.ansi256ToAnsi(Dt.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Dt.ansi256ToAnsi(Dt.hexToAnsi256(t)),enumerable:!1}}),Dt}var Oj=Rj(),gd=new Set(["\x1B","\x9B"]),Bj=39,Jg="\x07",OS="[",Lj="]",BS="m",Xg=`${Lj}8;;`,SS=e=>`${gd.values().next().value}${OS}${e}${BS}`,TS=e=>`${gd.values().next().value}${Xg}${e}${Jg}`,Mj=e=>e.split(" ").map(t=>vu(t)),Vg=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=vu(kS(e[e.length-1]));for(let[a,c]of n.entries()){let u=vu(c);if(o+u<=r?e[e.length-1]+=c:(e.push(c),o=0),gd.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(Xg)),i){s?c===Jg&&(i=!1,s=!1):c===BS&&(i=!1);continue}o+=u,o===r&&a<n.length-1&&(e.push(""),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},$j=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(vu(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Uj=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=Mj(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=vu(a[a.length-1]);if(u!==0&&(p>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),p=0),(p>0||r.trim===!1)&&(a[a.length-1]+=" ",p++)),r.hard&&o[u]>t){let d=t-p,h=1+Math.floor((o[u]-d-1)/t);Math.floor((o[u]-1)/t)<h&&a.push(""),Vg(a,l,t);continue}if(p+o[u]>t&&p>0&&o[u]>0){if(r.wordWrap===!1&&p<t){Vg(a,l,t);continue}a.push("")}if(p+o[u]>t&&r.wordWrap===!1){Vg(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>$j(u)));let c=[...a.join(`
|
|
101
|
+
`),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Y7.exports=Ww});var X7=w((rje,J7)=>{"use strict";f();J7.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Z7=w((ije,Q7)=>{"use strict";f();var Tbe=X7();Q7.exports=e=>typeof e=="string"?e.replace(Tbe(),""):e});var tU=w((oje,Jw)=>{"use strict";f();var eU=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Jw.exports=eU;Jw.exports.default=eU});var nU=w((cje,rU)=>{"use strict";f();rU.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var sU=w((lje,Xw)=>{"use strict";f();var Abe=Z7(),Pbe=tU(),Fbe=nU(),iU=e=>{if(typeof e!="string"||e.length===0||(e=Abe(e),e.length===0))return 0;e=e.replace(Fbe()," ");let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Pbe(n)?2:1)}return t};Xw.exports=iU;Xw.exports.default=iU});var Qw=w((dje,oU)=>{f();oU.exports=function(t,r,n){if(r.autopadding!==!0)return t;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(t,3);default:return t}}});var Zw=w((mje,aU)=>{f();aU.exports=function(t,r){let n=Math.round(t*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var eS=w((gje,cU)=>{f();cU.exports=function(t,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return t>3600?s(Math.floor(t/3600))+"h"+s(i(t%3600/60))+"m":t>60?s(Math.floor(t/60))+"m"+s(i(t%60))+"s":t>10?s(i(t))+"s":s(t)+"s"}});var tS=w((bje,uU)=>{f();var _be=sU(),Ibe=Qw(),kbe=Zw(),Nbe=eS();uU.exports=function(t,r,n){let i=t.format,s=t.formatTime||Nbe,o=t.formatValue||Ibe,a=t.formatBar||kbe,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,t),percentage:o(c,t,"percentage"),total:o(r.total,t,"total"),value:o(r.value,t,"value"),eta:o(r.eta,t,"eta"),eta_formatted:s(r.eta,t,5),duration:o(l,t,"duration"),duration_formatted:s(l,t,1)});i=i.replace(/\{(\w+)\}/g,function(m,g){return typeof p[g]<"u"?p[g]:m});let d=Math.max(0,r.maxWidth-_be(i)-2),h=Math.floor(d/2);switch(t.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=h>0?" ".repeat(h)+i:i;break;case"left":default:break}return i}});var Tg=w((vje,lU)=>{f();function ot(e,t){return typeof e>"u"||e===null?t:e}lU.exports={parse:function(t,r){let n={},i=Object.assign({},r,t);return n.throttleTime=1e3/ot(i.fps,10),n.stream=ot(i.stream,process.stderr),n.terminal=ot(i.terminal,null),n.clearOnComplete=ot(i.clearOnComplete,!1),n.stopOnComplete=ot(i.stopOnComplete,!1),n.barsize=ot(i.barsize,40),n.align=ot(i.align,"left"),n.hideCursor=ot(i.hideCursor,!1),n.linewrap=ot(i.linewrap,!1),n.barGlue=ot(i.barGlue,""),n.barCompleteChar=ot(i.barCompleteChar,"="),n.barIncompleteChar=ot(i.barIncompleteChar,"-"),n.format=ot(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=ot(i.formatTime,null),n.formatValue=ot(i.formatValue,null),n.formatBar=ot(i.formatBar,null),n.etaBufferLength=ot(i.etaBuffer,10),n.etaAsynchronousUpdate=ot(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=ot(i.progressCalculationRelative,!1),n.synchronousUpdate=ot(i.synchronousUpdate,!0),n.noTTYOutput=ot(i.noTTYOutput,!1),n.notTTYSchedule=ot(i.notTTYSchedule,2e3),n.emptyOnZero=ot(i.emptyOnZero,!1),n.forceRedraw=ot(i.forceRedraw,!1),n.autopadding=ot(i.autopadding,!1),n.gracefulExit=ot(i.gracefulExit,!1),n},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?ot(t.autopaddingChar," "):"",t}}});var rS=w((Eje,dU)=>{f();var pU=W7(),Rbe=Yw(),Obe=tS(),Bbe=Tg(),Lbe=require("events");dU.exports=class extends Lbe{constructor(t){super(),this.options=Bbe.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Rbe(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new pU(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:Obe}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,n){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new pU(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let n=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var mU=w((Tje,fU)=>{f();var Mbe=rS(),$be=Tg();fU.exports=class extends Mbe{constructor(t,r){super($be.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var gU=w((Fje,hU)=>{f();var Ube=Yw(),jbe=rS(),qbe=Tg(),Gbe=require("events");hU.exports=class extends Gbe{constructor(t,r){super(),this.bars=[],this.options=qbe.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Ube(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,n,i={}){let s=new jbe(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(t,r,n),this.emit("start")),s}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var bU=w((Ije,yU)=>{f();yU.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var vU=w((Nje,xU)=>{f();xU.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var CU=w((Oje,DU)=>{f();DU.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var wU=w((Lje,EU)=>{f();EU.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var TU=w(($je,SU)=>{f();var zbe=bU(),Hbe=vU(),Kbe=CU(),Vbe=wU();SU.exports={legacy:zbe,shades_classic:Hbe,shades_grey:Kbe,rect:Vbe}});var FU=w((jje,PU)=>{f();var AU=mU(),Wbe=gU(),Ybe=TU(),Jbe=tS(),Xbe=Qw(),Qbe=Zw(),Zbe=eS();PU.exports={Bar:AU,SingleBar:AU,MultiBar:Wbe,Presets:Ybe,Format:{Formatter:Jbe,BarFormat:Qbe,ValueFormat:Xbe,TimeFormat:Zbe}}});var OU=w((eqe,RU)=>{f();RU.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Cxe={};pS(Cxe,{default:()=>Dxe});module.exports=yj(Cxe);f();f();try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e6bfdaf0-34b8-4fed-a374-5134528bb983",e._sentryDebugIdIdentifier="sentry-dbid-e6bfdaf0-34b8-4fed-a374-5134528bb983")}catch{}f();var ij=require("../core/index.cjs"),sj=require("../node/index.cjs"),oj=require("../server/index.cjs"),aj=q(mS(),1);f();f();var th=require("fs/promises");f();var $g=q(require("prettier"),1),hS=require("module"),gS=q(require("path"),1);function xj(e){if(!e)return $g.default;try{let r=(0,hS.createRequire)(e)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return $g.default}}async function Zr(e,t,r,n){try{let i=gS.default.resolve(e,n??"file.tsx"),s=xj(i),o=await s.resolveConfig(i);return o?await s.format(t,{...o,filepath:n,parser:r}):await s.format(t,{filepath:n,parser:r})}catch{return t}}f();var o3=require("http");f();var Ug="preview-url";var ba="framework",od="platform",ad="node",yS="/~builder-connect",ho="/~builder-connected",jg="/~builder-dev-tools",qg="/~builder-dev-tools.js",go="/~builder-dev-tools-close",bS="/mappings";var a3=require("os"),fn=require("path"),kr=require("fs");f();var yd=require("util");f();var pr=q(cd(),1),va=require("process"),Ds=q(require("readline"),1),Wg=q(require("readline"),1),_S=require("stream"),IS=q(vt(),1);function Tj({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var Aj=Tj();function kS(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Aj,"")}function NS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RS={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,o=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,o=i<<10|s,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=r(n),s=0,o=0;o<i.length;o++)s=s+this.characterLength(i[o]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var o="",a=0,c=r(n),u=0;u<c.length;u++){var l=c[u],p=t.length(l);if(a>=i-(p==2?1:0))if(a+p<=s)o+=l;else break;a+=p}return o}})(RS);var Pj=RS.exports,Fj=NS(Pj),_j=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Ij=NS(_j);function vu(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=kS(e),e.length===0))return 0;e=e.replace(Ij()," ");let r=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Fj.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Kg=10,CS=(e=0)=>t=>`\x1B[${t+e}m`,ES=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,wS=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Dt={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Dt.modifier);var kj=Object.keys(Dt.color),Nj=Object.keys(Dt.bgColor);[...kj,...Nj];function Rj(){let e=new Map;for(let[t,r]of Object.entries(Dt)){for(let[n,i]of Object.entries(r))Dt[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Dt[n],e.set(i[0],i[1]);Object.defineProperty(Dt,t,{value:r,enumerable:!1})}return Object.defineProperty(Dt,"codes",{value:e,enumerable:!1}),Dt.color.close="\x1B[39m",Dt.bgColor.close="\x1B[49m",Dt.color.ansi=CS(),Dt.color.ansi256=ES(),Dt.color.ansi16m=wS(),Dt.bgColor.ansi=CS(Kg),Dt.bgColor.ansi256=ES(Kg),Dt.bgColor.ansi16m=wS(Kg),Object.defineProperties(Dt,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>Dt.rgbToAnsi256(...Dt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Dt.ansi256ToAnsi(Dt.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Dt.ansi256ToAnsi(Dt.hexToAnsi256(t)),enumerable:!1}}),Dt}var Oj=Rj(),gd=new Set(["\x1B","\x9B"]),Bj=39,Jg="\x07",OS="[",Lj="]",BS="m",Xg=`${Lj}8;;`,SS=e=>`${gd.values().next().value}${OS}${e}${BS}`,TS=e=>`${gd.values().next().value}${Xg}${e}${Jg}`,Mj=e=>e.split(" ").map(t=>vu(t)),Vg=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=vu(kS(e[e.length-1]));for(let[a,c]of n.entries()){let u=vu(c);if(o+u<=r?e[e.length-1]+=c:(e.push(c),o=0),gd.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(Xg)),i){s?c===Jg&&(i=!1,s=!1):c===BS&&(i=!1);continue}o+=u,o===r&&a<n.length-1&&(e.push(""),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},$j=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(vu(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Uj=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=Mj(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=vu(a[a.length-1]);if(u!==0&&(p>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),p=0),(p>0||r.trim===!1)&&(a[a.length-1]+=" ",p++)),r.hard&&o[u]>t){let d=t-p,h=1+Math.floor((o[u]-d-1)/t);Math.floor((o[u]-1)/t)<h&&a.push(""),Vg(a,l,t);continue}if(p+o[u]>t&&p>0&&o[u]>0){if(r.wordWrap===!1&&p<t){Vg(a,l,t);continue}a.push("")}if(p+o[u]>t&&r.wordWrap===!1){Vg(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>$j(u)));let c=[...a.join(`
|
|
102
102
|
`)];for(let[u,l]of c.entries()){if(n+=l,gd.has(l)){let{groups:d}=new RegExp(`(?:\\${OS}(?<code>\\d+)m|\\${Xg}(?<uri>.*)${Jg})`).exec(c.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let h=Number.parseFloat(d.code);i=h===Bj?void 0:h}else d.uri!==void 0&&(s=d.uri.length===0?void 0:d.uri)}let p=Oj.codes.get(Number(i));c[u+1]===`
|
|
103
103
|
`?(s&&(n+=TS("")),i&&p&&(n+=SS(p))):l===`
|
|
104
104
|
`&&(i&&p&&(n+=SS(i)),s&&(n+=TS(s)))}return n};function AS(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
@@ -165,7 +165,7 @@ ${US}${n.trimStart()}`),r=3+(0,yd.stripVTControlCharacters)(n.trimStart()).lengt
|
|
|
165
165
|
`),m(),i()};return{start:v,stop:C,message:(x="")=>{a=y(x??a)}}};var Zs=q(vt(),1);f();var xe=q(require("typescript"),1);var ge=q(vt(),1);f();f();function Re(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Dd(e,t=""){let r=Re(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function Gt(e,t,r){if(t){let n=e.ts.createPrinter({newLine:e.ts.NewLineKind.LineFeed,removeComments:r});return e.ts.isSourceFile(t)?n.printFile(t).trim()+`
|
|
166
166
|
`:n.printNode(e.ts.EmitHint.Unspecified,t,e.ts.createSourceFile("module.tsx","",e.ts.ScriptTarget.Latest)).trim()+`
|
|
167
167
|
`}return""}f();var XS=q(YS(),1);function dr(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function Oe(e,t,r){t=jn(t),r=jn(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let i;return n==="index"?i=e.relative(t,r):i=e.relative(t,e.join(r,n)),i=jn(e.normalize(i)),i.startsWith(".")||(i="./"+i),i}function jn(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function yo(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),i=n[n.length-1];return JS(i==="index"?e.basename(e.dirname(t)):i)}function JS(e){return at(e).replace(/ /g,"")}function yn(e,t){let r=e.extname(t),n=jn(e.basename(t,r)).split("/").pop();return at(n==="index"?e.basename(e.dirname(t)):n)}function ct(e,t){let r=jn(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(i=>i!=="."&&i!==".."&&i!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(i=>i.name.includes("next"))?"@/"+r:"~/"+r}function qe(e,t){let r=t,n=[];for(let i=0;i<2;i++){let s=e.basename(r);if(!s||s==="components")break;n.unshift(s),r=e.dirname(r)}return n.join("/")}function at(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function Ur(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function it(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}async function QS(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function Du(e){return typeof e=="number"}function Da(e){return typeof e=="boolean"}function Cr(e){return typeof e=="string"}function Ca(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function tn(e){return JSON.parse(JSON.stringify(e))}function Cd(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function ZS(){try{let e=(0,XS.default)();if(e?.name)return e.name}catch{}return"npm"}function nq(){return process.platform.startsWith("win")}function fr(){return nq()?'"@builder.io/dev-tools"':"builder.io"}function ny(e){return e.replace(/[^a-zA-Z0-9-_]/g,"_")}f();function Er(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var iq=["node_modules","dist","build","public"];async function jr(e,t){async function r(i,s){if(s>10)return;let o=await e.readdir(i);for(let a of o){if(iq.includes(a))continue;let c=e.join(i,a),u=await e.stat(c);if(u){if(u.isFile()&&a.startsWith("builder-registry."))return c;if(u.isDirectory()){let l=await r(c,s+1);if(l)return l}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await Er(e)?"ts":"js"}`;return e.join(t,s)}return n}async function rn(e,t){let r=e.resolve("/");for(let n=0;n<20;n++){let i=e.join(t,"package.json"),s=await e.readFile(i);if(s)return JSON.parse(s);if(t===r)break;t=e.dirname(t)}return null}async function e1(e,t){for(let r=0;r<20;r++){let n=e.dirname(t),i=e.join(n,"node_modules");if(await e.exists(i))return i;if(t===e.getAppRootDir())break;t=e.dirname(t)}return e.join(e.getAppRootDir(),"node_modules")}async function Cu(e,t,r){let n=await e.readdir(t);return n.includes(r)?e.join(t,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let o=e.join(t,s);if((await e.stat(o)).isDirectory()){let c=await Cu(e,o,r);if(c)return c}}))).find(s=>typeof s=="string")}async function Ut(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await e1(e,t[0]),i=e.join(n,"typescript","lib"),s=new Map,o={fileExists:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=Eu.get(a);if(!c){try{e.statSync(a).isFile()?c={exists:!0,content:e.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}Eu.set(a,c)}return c.exists}if(!s.has(a))if(e.existsSync(a)){let u=e.statSync(a);s.set(a,u.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>e.normalize(a),getCurrentDirectory:()=>e.cwd(),getDefaultLibFileName:()=>e.join(i,"lib.d.ts"),getDefaultLibLocation:()=>i,getNewLine:()=>`
|
|
168
|
-
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=Eu.get(a);if(u)return Re(e,u.content)}let c;try{c=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=e.basename(a),l=e.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=r1.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new wd(u)}return a.includes("node_modules")&&(c?Eu.set(a,{exists:!0,content:c}):Eu.set(a,{exists:!1})),Re(e,c)},readFile:a=>{let c=e.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return sq(e,o,t,r)}catch(a){if(a instanceof wd){await oq(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function sq(e,t,r,n){let i={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),o=>e.existsSync(o));if(s){let o=t1.get(s);if(!o){let a=e.ts.readConfigFile(s,c=>{let u=e.readFileSync(c);return typeof u=="string"?u:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>e.readdirSync(u),fileExists:u=>e.existsSync(u),readFile:u=>e.readFileSync(u)||void 0},e.dirname(s),void 0,s).options,t1.set(s,o))}o&&(i.options=tn(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=e.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),e.ts.createProgram(i)}async function Ea(e,t,r){r||(r=await Ut(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}var wd=class{libName;constructor(t){this.libName=t}};async function oq(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Ed.has(t)||Ed.set(t,fetch(r).then(n=>n.text()).then(n=>{r1.set(t,n)})),await Ed.get(t),Ed.delete(t)}var r1=new Map,Ed=new Map,Eu=new Map,t1=new Map;async function n1(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:iy(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function iy(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}f();f();var aq="1.9.
|
|
168
|
+
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=Eu.get(a);if(u)return Re(e,u.content)}let c;try{c=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=e.basename(a),l=e.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=r1.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new wd(u)}return a.includes("node_modules")&&(c?Eu.set(a,{exists:!0,content:c}):Eu.set(a,{exists:!1})),Re(e,c)},readFile:a=>{let c=e.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return sq(e,o,t,r)}catch(a){if(a instanceof wd){await oq(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function sq(e,t,r,n){let i={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),o=>e.existsSync(o));if(s){let o=t1.get(s);if(!o){let a=e.ts.readConfigFile(s,c=>{let u=e.readFileSync(c);return typeof u=="string"?u:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>e.readdirSync(u),fileExists:u=>e.existsSync(u),readFile:u=>e.readFileSync(u)||void 0},e.dirname(s),void 0,s).options,t1.set(s,o))}o&&(i.options=tn(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=e.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),e.ts.createProgram(i)}async function Ea(e,t,r){r||(r=await Ut(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}var wd=class{libName;constructor(t){this.libName=t}};async function oq(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Ed.has(t)||Ed.set(t,fetch(r).then(n=>n.text()).then(n=>{r1.set(t,n)})),await Ed.get(t),Ed.delete(t)}var r1=new Map,Ed=new Map,Eu=new Map,t1=new Map;async function n1(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:iy(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function iy(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}f();f();var aq="1.9.23",Ce=process.env.OVERRIDE_VERSION??aq;f();f();async function bo(e){let t=[],r=await rn(e,e.getRepoRootDir());if(r){let n=await s1(r,e);t.push(...n)}return t}async function s1(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let i of cq)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};i1.has(i)&&(s.version=await i1.get(i)(t)),r.push(s)}}return r}function sy(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var i1=new Map([["next",async e=>{if(!e.spawnSync)return;let t=ZS(),r=t==="npm"?"npx":t,{stdout:n}=e.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let i=n.match(/(Next.js v)([\d.]+)/g);if(!i)return;let s=i[0].split("Next.js v")[1],[o,a,c]=s.split(".");return{major:sy(o),minor:sy(a),patch:sy(c)}}]]),cq=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"];f();f();async function bn(e){let t=o1(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function xn(e,t){t=typeof t=="object"&&t!=null?t:{};let r=o1(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function o1(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}f();f();async function oi(e,t,r){let n={envKey:r,envValue:null,file:""};for(let i of t){let s=e.join(e.getAppRootDir(),i),o=await uq(e,s);if(o){let a=o[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=e.join(e.getAppRootDir(),t[t.length-1]),n}async function uq(e,t){let r=await e.readFile(t);return typeof r=="string"?a1(r):null}function a1(e){let t={},r=e.replace(/\r\n?/gm,`
|
|
169
169
|
`),n;for(;(n=lq.exec(r))!=null;){let i=n[1],s=n[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|
170
170
|
`),s=s.replace(/\\r/g,"\r")),t[i]=s}return t}var lq=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;async function ai(e,t,r,n){let i="# https://www.builder.io/c/docs/using-your-api-key",s=await e.readFile(t);try{if(s)if(s.includes(r))if(s.includes(n))e.debug(`"${r}" with "${n}" already set in ${t}`);else return e.debug(`Replace "${r}" in ${t}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await e.writeFile(t,s),"update";else return e.debug(`Append "${r}" to ${t}`),s+=`
|
|
171
171
|
|
|
@@ -1182,7 +1182,7 @@ module.exports = nextConfig
|
|
|
1182
1182
|
`:`
|
|
1183
1183
|
`)+r,i=n+1,n=e.indexOf(`
|
|
1184
1184
|
`,i)}while(n!==-1);return s+=e.slice(i),s}var{stdout:KP,stderr:VP}=GP,db=Symbol("GENERATOR"),$a=Symbol("STYLER"),qu=Symbol("IS_EMPTY"),WP=["ansi","ansi","ansi256","ansi16m"],Ua=Object.create(null),tV=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=KP?KP.level:0;e.level=t.level===void 0?r:t.level},ef=class{constructor(t){return YP(t)}},YP=e=>{let t=(...r)=>r.join(" ");return tV(t,e),Object.setPrototypeOf(t,Gu.prototype),t};function Gu(e){return YP(e)}Object.setPrototypeOf(Gu.prototype,Function.prototype);for(let[e,t]of Object.entries(Hn))Ua[e]={get(){let r=tf(this,mb(t.open,t.close,this[$a]),this[qu]);return Object.defineProperty(this,e,{value:r}),r}};Ua.visible={get(){let e=tf(this,this[$a],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var fb=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Hn[r].ansi16m(...n):t==="ansi256"?Hn[r].ansi256(Hn.rgbToAnsi256(...n)):Hn[r].ansi(Hn.rgbToAnsi(...n)):e==="hex"?fb("rgb",t,r,...Hn.hexToRgb(...n)):Hn[r][e](...n),rV=["rgb","hex","ansi256"];for(let e of rV){Ua[e]={get(){let{level:r}=this;return function(...n){let i=mb(fb(e,WP[r],"color",...n),Hn.color.close,this[$a]);return tf(this,i,this[qu])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ua[t]={get(){let{level:r}=this;return function(...n){let i=mb(fb(e,WP[r],"bgColor",...n),Hn.bgColor.close,this[$a]);return tf(this,i,this[qu])}}}}var nV=Object.defineProperties(()=>{},{...Ua,level:{enumerable:!0,get(){return this[db].level},set(e){this[db].level=e}}}),mb=(e,t,r)=>{let n,i;return r===void 0?(n=e,i=t):(n=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:i,parent:r}},tf=(e,t,r)=>{let n=(...i)=>iV(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,nV),n[db]=e,n[$a]=t,n[qu]=r,n},iV=(e,t)=>{if(e.level<=0||!t)return e[qu]?"":t;let r=e[$a];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=zP(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
1185
|
-
`);return s!==-1&&(t=HP(t,i,n,s)),n+t+i};Object.defineProperties(Gu.prototype,Ua);var EFe=Gu(),wFe=Gu({level:VP?VP.level:0});var Ie=new ef({level:2}),JP={comment:Ie.gray,quote:Ie.gray,keyword:Ie.green,"selector-tag":Ie.green,addition:Ie.green,number:Ie.cyan,string:Ie.cyan,"meta meta-string":Ie.cyan,literal:Ie.cyan,doctag:Ie.cyan,regexp:Ie.cyan,title:Ie.blue,section:Ie.blue,name:Ie.blue,"selector-id":Ie.blue,"selector-class":Ie.blue,attribute:Ie.yellow,attr:Ie.yellow,variable:Ie.yellow,"template-variable":Ie.yellow,"class title":Ie.yellow,type:Ie.yellow,symbol:Ie.magenta,bullet:Ie.magenta,subst:Ie.magenta,meta:Ie.magenta,"meta keyword":Ie.magenta,"selector-attr":Ie.magenta,"selector-pseudo":Ie.magenta,link:Ie.magenta,built_in:Ie.red,deletion:Ie.red,emphasis:Ie.italic,strong:Ie.bold,formula:Ie.inverse};function zu(e){let t=lb(e);return{highlight:r,highlightAuto:n,listLanguages:t.listLanguages,register:t.register,registerAlias:t.registerAlias,registered:t.registered};function r(i,s,o){let a=t.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:hb(o||JP,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=t.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:hb(o||JP,c)}}}function hb(e,t){let r=new Set(t.type==="element"&&Array.isArray(t.properties.className)?t.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in e)if(Object.hasOwn(e,o)){let a=o.split(" "),c=e[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in t?s=t.value:"children"in t&&(s=sV(n,t.children)),i&&(s=i(s)),s}function sV(e,t){let r=[],n=-1;for(;++n<t.length;)r.push(hb(e,t[n]));return r.join("")}f();var XP=q(require("@sentry/node"),1),QP=q(require("@amplitude/analytics-node"),1);async function te(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([XP.flush(2e3),QP.flush().promise])}catch(t){console.error(t)}process.exit(e)}f();var Fe=process.env.AIR_HOST||"https://api.builder.io";f();var Ci=q(require("@amplitude/analytics-node"),1),Xn=q(require("@sentry/node"),1);var ZP="1.9.21";f();var Vt=require("fs/promises"),e2=require("crypto"),ut=require("fs"),yl=require("os"),Ne=q(require("path"),1),t2=q(require("typescript"),1),r2=q(require("launch-editor"),1);var Bo=require("child_process");var Px={};pS(Px,{MagicastError:()=>yr,builders:()=>wJ,detectCodeFormat:()=>X_,generateCode:()=>Ax,loadFile:()=>CJ,parseExpression:()=>Z_,parseModule:()=>Q_,writeFile:()=>EJ});f();var Tf=require("fs");var Rf=q(SF(),1),y_=q(r_(),1);function cn(e){var t=e.use(Ft),r=t.Type,n=t.builtInTypes,i=n.number;function s(u){return r.from(l=>i.check(l)&&l>=u,i+" >= "+u)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=r.or(n.string,n.number,n.boolean,n.null,n.undefined);let c=r.from(u=>{if(u===null)return!0;var l=typeof u;return!(l==="object"||l==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:c}}function tt(e){try{var t=e(),r=t.exports,n=r.default}catch{return}n&&n!==r&&typeof r=="object"&&(Object.assign(n,r,{default:n}),r.__esModule&&Object.defineProperty(n,"__esModule",{value:!0}),t.exports=n)}var YW=Object.defineProperty,JW=(e,t,r)=>t in e?YW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ar=(e,t,r)=>(JW(e,typeof t!="symbol"?t+"":t,r),r),b_=Object.prototype,Af=b_.toString,wn=b_.hasOwnProperty,Oo=class{assert(t,r){if(!this.check(t,r)){var n=Cx(t);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let t=this;return new dl(t)}},dl=class extends Oo{constructor(t){super(),this.elemType=t,Ar(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,r){return Array.isArray(t)&&t.every(n=>this.elemType.check(n,r))}},Pf=class extends Oo{constructor(t){super(),this.value=t,Ar(this,"kind","IdentityType")}toString(){return String(this.value)}check(t,r){let n=t===this.value;return!n&&typeof r=="function"&&r(this,t),n}},Ff=class extends Oo{constructor(t){super(),this.fields=t,Ar(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,r){return Af.call(t)===Af.call({})&&this.fields.every(n=>n.type.check(t[n.name],r))}},_f=class extends Oo{constructor(t){super(),this.types=t,Ar(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(t,r){return this.types.some(n=>n.check(t,!!r))?!0:(typeof r=="function"&&r(this,t),!1)}},Ro=class extends Oo{constructor(t,r){super(),this.name=t,this.predicate=r,Ar(this,"kind","PredicateType")}toString(){return this.name}check(t,r){let n=this.predicate(t,r);return!n&&typeof r=="function"&&r(this,t),n}},ll=class e{constructor(t,r){this.type=t,this.typeName=r,Ar(this,"baseNames",[]),Ar(this,"ownFields",Object.create(null)),Ar(this,"allSupertypes",Object.create(null)),Ar(this,"supertypeList",[]),Ar(this,"allFields",Object.create(null)),Ar(this,"fieldNames",[]),Ar(this,"finalized",!1),Ar(this,"buildable",!1),Ar(this,"buildParams",[])}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return wn.call(t.allSupertypes,this.typeName)}else throw new Error(t+" is not a Def")}checkAllFields(t,r){var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function i(s){var o=n[s],a=o.type,c=o.getValue(t);return a.check(c,r)}return t!==null&&typeof t=="object"&&Object.keys(n).every(i)}bases(...t){var r=this.baseNames;if(this.finalized){if(t.length!==r.length)throw new Error("");for(var n=0;n<t.length;n++)if(t[n]!==r[n])throw new Error("");return this}return t.forEach(i=>{r.indexOf(i)<0&&r.push(i)}),this}},If=class{constructor(t,r,n,i){this.name=t,this.type=r,this.defaultFn=n,Ar(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(t){var r=t[this.name];return typeof r<"u"||typeof this.defaultFn=="function"&&(r=this.defaultFn.call(t)),r}};function Cx(e){return Array.isArray(e)?"["+e.map(Cx).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+" }":JSON.stringify(e)}function Ft(e){let t={or(...R){return new _f(R.map(L=>t.from(L)))},from(R,L){if(R instanceof dl||R instanceof Pf||R instanceof Ff||R instanceof _f||R instanceof Ro)return R;if(R instanceof ll)return R.type;if(a.check(R)){if(R.length!==1)throw new Error("only one element type is permitted for typed arrays");return new dl(t.from(R[0]))}if(c.check(R))return new Ff(Object.keys(R).map(W=>new If(W,t.from(R[W],W))));if(typeof R=="function"){var K=r.indexOf(R);if(K>=0)return n[K];if(typeof L!="string")throw new Error("missing name");return new Ro(L,R)}return new Pf(R)},def(R){return wn.call(b,R)?b[R]:b[R]=new C(R)},hasDef(R){return wn.call(b,R)}};var r=[],n=[];function i(R,L){let K=Af.call(L),W=new Ro(R,ce=>Af.call(ce)===K);return L&&typeof L.constructor=="function"&&(r.push(L.constructor),n.push(W)),W}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),c=i("object",{}),u=i("RegExp",/./),l=i("Date",new Date),p=i("number",3),d=i("boolean",!0),h=i("null",null),m=i("undefined",void 0),g=typeof BigInt=="function"?i("BigInt",BigInt(1234)):new Ro("BigInt",()=>!1),y={string:s,function:o,array:a,object:c,RegExp:u,Date:l,number:p,boolean:d,null:h,undefined:m,BigInt:g};var b=Object.create(null);function v(R){if(R&&typeof R=="object"){var L=R.type;if(typeof L=="string"&&wn.call(b,L)){var K=b[L];if(K.finalized)return K}}return null}class C extends ll{constructor(L){super(new Ro(L,(K,W)=>this.check(K,W)),L)}check(L,K){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(L===null||typeof L!="object")return!1;var W=v(L);return W?K&&W===this?this.checkAllFields(L,K):this.isSupertypeOf(W)?K?W.checkAllFields(L,K)&&this.checkAllFields(L,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(L,K):!1}build(...L){if(this.buildParams=L,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let K=(ce,se,Z,xt)=>{if(!wn.call(ce,se)){var Me=this.allFields;if(!wn.call(Me,se))throw new Error(""+se);var J=Me[se],$e=J.type,X;if(xt)X=Z;else if(J.defaultFn)X=J.defaultFn.call(ce);else{var me="no value or default function given for field "+JSON.stringify(se)+" of "+this.typeName+"("+this.buildParams.map(function(ue){return Me[ue]}).join(", ")+")";throw new Error(me)}if(!$e.check(X))throw new Error(Cx(X)+" does not match field "+J+" of type "+this.typeName);ce[se]=X}},W=(...ce)=>{var se=ce.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var Z=Object.create(S);if(this.buildParams.forEach(function(xt,Me){Me<se?K(Z,xt,ce[Me],!0):K(Z,xt,null,!1)}),Object.keys(this.allFields).forEach(function(xt){K(Z,xt,null,!1)}),Z.type!==this.typeName)throw new Error("");return Z};return W.from=ce=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var se=Object.create(S);if(Object.keys(this.allFields).forEach(function(Z){wn.call(ce,Z)?K(se,Z,ce[Z],!0):K(se,Z,null,!1)}),se.type!==this.typeName)throw new Error("");return se},Object.defineProperty(E,I(this.typeName),{enumerable:!0,value:W}),this}field(L,K,W,ce){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(L)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[L]=new If(L,t.from(K),W,ce),this)}finalize(){if(!this.finalized){var L=this.allFields,K=this.allSupertypes;this.baseNames.forEach(ce=>{var se=b[ce];if(se instanceof ll)se.finalize(),k(L,se.allFields),k(K,se.allSupertypes);else{var Z="unknown supertype name "+JSON.stringify(ce)+" for subtype "+JSON.stringify(this.typeName);throw new Error(Z)}}),k(L,this.ownFields),K[this.typeName]=this,this.fieldNames.length=0;for(var W in L)wn.call(L,W)&&!L[W].hidden&&this.fieldNames.push(W);Object.defineProperty(T,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,M(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&N(this.typeName)}}}function x(R){if(!wn.call(b,R))throw new Error("");var L=b[R];if(L.finalized!==!0)throw new Error("");return L.supertypeList.slice(1)}function D(R){for(var L={},K=Object.keys(b),W=K.length,ce=0;ce<W;++ce){var se=K[ce],Z=b[se];if(Z.finalized!==!0)throw new Error(""+se);for(var xt=0;xt<Z.supertypeList.length;++xt){var Me=Z.supertypeList[xt];if(wn.call(R,Me)){L[se]=Me;break}}}return L}var E=Object.create(null),S={};function P(R,L){var K=S[R];return m.check(L)?delete S[R]:(o.assert(L),Object.defineProperty(S,R,{enumerable:!0,configurable:!0,value:L})),K}function I(R){return R.replace(/^[A-Z]+/,function(L){var K=L.length;switch(K){case 0:return"";case 1:return L.toLowerCase();default:return L.slice(0,K-1).toLowerCase()+L.charAt(K-1)}})}function A(R){return R=I(R),R.replace(/(Expression)?$/,"Statement")}var T={};function G(R){var L=v(R);if(L)return L.fieldNames.slice(0);if("type"in R)throw new Error("did not recognize object of type "+JSON.stringify(R.type));return Object.keys(R)}function V(R,L){var K=v(R);if(K){var W=K.allFields[L];if(W)return W.getValue(R)}return R&&R[L]}function Y(R,L,K){G(R).forEach(function(W){L.call(this,W,V(R,W))},K)}function F(R,L,K){return G(R).some(function(W){return L.call(this,W,V(R,W))},K)}function N(R){var L=A(R);if(E[L])return;var K=E[I(R)];if(!K)return;let W=function(...ce){return E.expressionStatement(K.apply(E,ce))};W.from=function(...ce){return E.expressionStatement(K.from.apply(E,ce))},E[L]=W}function M(R,L){L.length=0,L.push(R);for(var K=Object.create(null),W=0;W<L.length;++W){R=L[W];var ce=b[R];if(ce.finalized!==!0)throw new Error("");wn.call(K,R)&&delete L[K[R]],K[R]=W,L.push.apply(L,ce.baseNames)}for(var se=0,Z=se,xt=L.length;Z<xt;++Z)wn.call(L,Z)&&(L[se++]=L[Z]);L.length=se}function k(R,L){return Object.keys(L).forEach(function(K){R[K]=L[K]}),R}function $(){Object.keys(b).forEach(function(R){b[R].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:D,builders:E,defineMethod:P,getBuilderName:I,getStatementBuilderName:A,namedTypes:T,getFieldNames:G,getFieldValue:V,eachField:Y,someField:F,finalize:$}}tt(()=>module);var XW=Object.prototype,yf=XW.hasOwnProperty;function x_(e){var t=e.use(Ft),r=t.builtInTypes.array,n=t.builtInTypes.number;let i=function p(d,h,m){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(h){if(!(h instanceof p))throw new Error("")}else h=null,m=null;this.value=d,this.parentPath=h,this.name=m,this.__childCache=null};var s=i.prototype;function o(p){return p.__childCache||(p.__childCache=Object.create(null))}function a(p,d){var h=o(p),m=p.getValueProperty(d),g=h[d];return(!yf.call(h,d)||g.value!==m)&&(g=h[d]=new p.constructor(m,p,d)),g}s.getValueProperty=function(d){return this.value[d]},s.get=function(...d){for(var h=this,m=d.length,g=0;g<m;++g)h=a(h,d[g]);return h},s.each=function(d,h){for(var m=[],g=this.value.length,y=0,y=0;y<g;++y)yf.call(this.value,y)&&(m[y]=this.get(y));for(h=h||this,y=0;y<g;++y)yf.call(m,y)&&d.call(h,m[y])},s.map=function(d,h){var m=[];return this.each(function(g){m.push(d.call(this,g))},h),m},s.filter=function(d,h){var m=[];return this.each(function(g){d.call(this,g)&&m.push(g)},h),m};function c(){}function u(p,d,h,m){if(r.assert(p.value),d===0)return c;var g=p.value.length;if(g<1)return c;var y=arguments.length;y===2?(h=0,m=g):y===3?(h=Math.max(h,0),m=g):(h=Math.max(h,0),m=Math.min(m,g)),n.assert(h),n.assert(m);for(var b=Object.create(null),v=o(p),C=h;C<m;++C)if(yf.call(p.value,C)){var x=p.get(C);if(x.name!==C)throw new Error("");var D=C+d;x.name=D,b[D]=x,delete v[C]}return delete v.length,function(){for(var E in b){var S=b[E];if(S.name!==+E)throw new Error("");v[E]=S,p.value[E]=S.value}}}s.shift=function(){var d=u(this,-1),h=this.value.shift();return d(),h},s.unshift=function(...d){var h=u(this,d.length),m=this.value.unshift.apply(this.value,d);return h(),m},s.push=function(...d){return r.assert(this.value),delete o(this).length,this.value.push.apply(this.value,d)},s.pop=function(){r.assert(this.value);var d=o(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},s.insertAt=function(d){var h=arguments.length,m=u(this,h-1,d);if(m===c&&h<=1)return this;d=Math.max(d,0);for(var g=1;g<h;++g)this.value[d+g-1]=arguments[g];return m(),this},s.insertBefore=function(...d){for(var h=this.parentPath,m=d.length,g=[this.name],y=0;y<m;++y)g.push(d[y]);return h.insertAt.apply(h,g)},s.insertAfter=function(...d){for(var h=this.parentPath,m=d.length,g=[this.name+1],y=0;y<m;++y)g.push(d[y]);return h.insertAt.apply(h,g)};function l(p){if(!(p instanceof i))throw new Error("");var d=p.parentPath;if(!d)return p;var h=d.value,m=o(d);if(h[p.name]===p.value)m[p.name]=p;else if(r.check(h)){var g=h.indexOf(p.value);g>=0&&(m[p.name=g]=p)}else h[p.name]=p.value,m[p.name]=p;if(h[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return s.replace=function(d){var h=[],m=this.parentPath.value,g=o(this.parentPath),y=arguments.length;if(l(this),r.check(m)){for(var b=m.length,v=u(this.parentPath,y-1,this.name+1),C=[this.name,1],x=0;x<y;++x)C.push(arguments[x]);var D=m.splice.apply(m,C);if(D[0]!==this.value)throw new Error("");if(m.length!==b-1+y)throw new Error("");if(v(),y===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(m[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),x=0;x<y;++x)h.push(this.parentPath.get(this.name+x));if(h[0]!==this)throw new Error("")}}else if(y===1)this.value!==d&&(this.__childCache=null),this.value=m[this.name]=d,h.push(this);else if(y===0)delete m[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return h},i}tt(()=>module);var Qa=Object.prototype.hasOwnProperty;function QW(e){var t=e.use(Ft),r=t.Type,n=t.namedTypes,i=n.Node,s=n.Expression,o=t.builtInTypes.array,a=t.builders;let c=function x(D,E){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");l.check(D.value)||u.assert(D.value);var S;if(E){if(!(E instanceof x))throw new Error("");S=E.depth+1}else E=null,S=0;Object.defineProperties(this,{path:{value:D},node:{value:D.value},isGlobal:{value:!E,enumerable:!0},depth:{value:S},parent:{value:E},bindings:{value:{}},types:{value:{}}})};var u=r.or(n.Program,n.Function,n.CatchClause),l=r.or(n.Function,n.ClassDeclaration,n.ClassExpression,n.InterfaceDeclaration,n.TSInterfaceDeclaration,n.TypeAlias,n.TSTypeAliasDeclaration),p=r.or(n.TypeParameter,n.TSTypeParameter);c.isEstablishedBy=function(x){return u.check(x)||l.check(x)};var d=c.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Qa.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Qa.call(this.types,x)},d.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var D=0;this.declares(x+D);)++D;var E=x+D;return this.bindings[E]=t.builders.identifier(E)},d.injectTemporary=function(x,D){x||(x=this.declareTemporary());var E=this.path.get("body");return n.BlockStatement.check(E.value)&&(E=E.get("body")),E.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,D||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var D in this.bindings)delete this.bindings[D];for(var D in this.types)delete this.types[D];h(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function h(x,D,E){var S=x.value;if(l.check(S)){let P=x.get("typeParameters","params");o.check(P.value)&&P.each(I=>{C(I,E)})}u.check(S)&&(n.CatchClause.check(S)?b(x.get("param"),D):m(x,D,E))}function m(x,D,E){var S=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&b(x.parent.get("id"),D),S&&(o.check(S)?x.each(P=>{y(P,D,E)}):n.Function.check(S)?(x.get("params").each(P=>{b(P,D)}),y(x.get("body"),D,E),m(x.get("typeParameters"),D,E)):n.TypeAlias&&n.TypeAlias.check(S)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(S)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(S)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(S)?v(x.get("id"),E):n.VariableDeclarator.check(S)?(b(x.get("id"),D),y(x.get("init"),D,E)):S.type==="ImportSpecifier"||S.type==="ImportNamespaceSpecifier"||S.type==="ImportDefaultSpecifier"?b(x.get(S.local?"local":S.name?"name":"id"),D):i.check(S)&&!s.check(S)&&t.eachField(S,function(P,I){var A=x.get(P);if(!g(A,I))throw new Error("");y(A,D,E)}))}function g(x,D){return!!(x.value===D||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(D)&&D.length===0)}function y(x,D,E){var S=x.value;if(!(!S||s.check(S)))if(n.FunctionDeclaration.check(S)&&S.id!==null)b(x.get("id"),D);else if(n.ClassDeclaration&&n.ClassDeclaration.check(S)&&S.id!==null)b(x.get("id"),D),m(x.get("typeParameters"),D,E);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(S)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(S))v(x.get("id"),E);else if(u.check(S)){if(n.CatchClause.check(S)&&n.Identifier.check(S.param)){var P=S.param.name,I=Qa.call(D,P);m(x.get("body"),D,E),I||delete D[P]}}else m(x,D,E)}function b(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)?Qa.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(E)?b(x.get("left"),D):n.ObjectPattern&&n.ObjectPattern.check(E)?x.get("properties").each(function(S){var P=S.value;n.Pattern.check(P)?b(S,D):n.Property.check(P)||n.ObjectProperty&&n.ObjectProperty.check(P)?b(S.get("value"),D):n.SpreadProperty&&n.SpreadProperty.check(P)&&b(S.get("argument"),D)}):n.ArrayPattern&&n.ArrayPattern.check(E)?x.get("elements").each(function(S){var P=S.value;n.Pattern.check(P)?b(S,D):n.SpreadElement&&n.SpreadElement.check(P)&&b(S.get("argument"),D)}):n.PropertyPattern&&n.PropertyPattern.check(E)?b(x.get("pattern"),D):(n.SpreadElementPattern&&n.SpreadElementPattern.check(E)||n.RestElement&&n.RestElement.check(E)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(E))&&b(x.get("argument"),D)}function v(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)&&(Qa.call(D,E.name)?D[E.name].push(x):D[E.name]=[x])}function C(x,D){var E=x.value;p.assert(E),Qa.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]}return d.lookup=function(x){for(var D=this;D&&!D.declares(x);D=D.parent);return D},d.lookupType=function(x){for(var D=this;D&&!D.declaresType(x);D=D.parent);return D},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}tt(()=>module);function v_(e){var t=e.use(Ft),r=t.namedTypes,n=t.builders,i=t.builtInTypes.number,s=t.builtInTypes.array,o=e.use(x_),a=e.use(QW);let c=function y(b,v,C){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,b,v,C)};var u=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(u,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),u.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},u.prune=function(){var y=this.parent;return this.replace(),m(y)},u._computeNode=function(){var y=this.value;if(r.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},u._computeParent=function(){var y=this.value,b=this.parentPath;if(!r.Node.check(y)){for(;b&&!r.Node.check(b.value);)b=b.parentPath;b&&(b=b.parentPath)}for(;b&&!r.Node.check(b.value);)b=b.parentPath;return b||null},u._computeScope=function(){var y=this.value,b=this.parentPath,v=b&&b.scope;return r.Node.check(y)&&a.isEstablishedBy(y)&&(v=new a(this,v)),v||null},u.getValueProperty=function(y){return t.getFieldValue(this.value,y)},u.needsParens=function(y){var b=this.parentPath;if(!b)return!1;var v=this.value;if(!r.Expression.check(v)||v.type==="Identifier")return!1;for(;!r.Node.check(b.value);)if(b=b.parentPath,!b)return!1;var C=b.value;switch(v.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return C.type==="MemberExpression"&&this.name==="object"&&C.object===v;case"BinaryExpression":case"LogicalExpression":switch(C.type){case"CallExpression":return this.name==="callee"&&C.callee===v;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&C.object===v;case"BinaryExpression":case"LogicalExpression":{let x=v,D=C.operator,E=p[D],S=x.operator,P=p[S];if(E>P)return!0;if(E===P&&this.name==="right"){if(C.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(C.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(C.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return C.type==="MemberExpression"&&i.check(v.value)&&this.name==="object"&&C.object===v;case"AssignmentExpression":case"ConditionalExpression":switch(C.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&C.callee===v;case"ConditionalExpression":return this.name==="test"&&C.test===v;case"MemberExpression":return this.name==="object"&&C.object===v;default:return!1}default:if(C.type==="NewExpression"&&this.name==="callee"&&C.callee===v)return d(v)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function l(y){return r.BinaryExpression.check(y)||r.LogicalExpression.check(y)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,b){y.forEach(function(v){p[v]=b})});function d(y){return r.CallExpression.check(y)?!0:s.check(y)?y.some(d):r.Node.check(y)?t.someField(y,function(b,v){return d(v)}):!1}u.canBeFirstInStatement=function(){var y=this.node;return!r.FunctionExpression.check(y)&&!r.ObjectExpression.check(y)},u.firstInStatement=function(){return h(this)};function h(y){for(var b,v;y.parent;y=y.parent){if(b=y.node,v=y.parent.node,r.BlockStatement.check(v)&&y.parent.name==="body"&&y.name===0){if(v.body[0]!==b)throw new Error("Nodes must be equal");return!0}if(r.ExpressionStatement.check(v)&&y.name==="expression"){if(v.expression!==b)throw new Error("Nodes must be equal");return!0}if(r.SequenceExpression.check(v)&&y.parent.name==="expressions"&&y.name===0){if(v.expressions[0]!==b)throw new Error("Nodes must be equal");continue}if(r.CallExpression.check(v)&&y.name==="callee"){if(v.callee!==b)throw new Error("Nodes must be equal");continue}if(r.MemberExpression.check(v)&&y.name==="object"){if(v.object!==b)throw new Error("Nodes must be equal");continue}if(r.ConditionalExpression.check(v)&&y.name==="test"){if(v.test!==b)throw new Error("Nodes must be equal");continue}if(l(v)&&y.name==="left"){if(v.left!==b)throw new Error("Nodes must be equal");continue}if(r.UnaryExpression.check(v)&&!v.prefix&&y.name==="argument"){if(v.argument!==b)throw new Error("Nodes must be equal");continue}return!1}return!0}function m(y){if(r.VariableDeclaration.check(y.node)){var b=y.get("declarations").value;if(!b||b.length===0)return y.prune()}else if(r.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else r.IfStatement.check(y.node)&&g(y);return y}function g(y){var b=y.get("test").value,v=y.get("alternate").value,C=y.get("consequent").value;if(!C&&!v){var x=n.expressionStatement(b);y.replace(x)}else if(!C&&v){var D=n.unaryExpression("!",b,!0);r.UnaryExpression.check(b)&&b.operator==="!"&&(D=b.argument),y.get("test").replace(D),y.get("consequent").replace(v),y.get("alternate").replace()}}return c}tt(()=>module);var bf=Object.prototype.hasOwnProperty;function ZW(e){var t=e.use(Ft),r=e.use(v_),n=t.builtInTypes.array,i=t.builtInTypes.object,s=t.builtInTypes.function,o;let a=function m(){if(!(this instanceof m))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=bf.call(this._methodNameTable,"Block")||bf.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function c(m){var g=Object.create(null);for(var y in m)/^visit[A-Z]/.test(y)&&(g[y.slice(5)]=!0);for(var b=t.computeSupertypeLookupTable(g),v=Object.create(null),C=Object.keys(b),x=C.length,D=0;D<x;++D){var E=C[D];y="visit"+b[E],s.check(m[y])&&(v[E]=y)}return v}a.fromMethodsObject=function(g){if(g instanceof a)return g;if(!i.check(g))return new a;let y=function v(){if(!(this instanceof v))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var b=y.prototype=Object.create(l);return b.constructor=y,u(b,g),u(y,a),s.assert(y.fromMethodsObject),s.assert(y.visit),new y};function u(m,g){for(var y in g)bf.call(g,y)&&(m[y]=g[y]);return m}a.visit=function(g,y){return a.fromMethodsObject(y).visit(g)};var l=a.prototype;l.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var m=arguments.length,g=new Array(m),y=0;y<m;++y)g[y]=arguments[y];g[0]instanceof r||(g[0]=new r({root:g[0]}).get("root")),this.reset.apply(this,g);var b;try{var v=this.visitWithoutReset(g[0]);b=!0}finally{if(this._visiting=!1,!b&&this._abortRequested)return g[0].value}return v},l.AbortRequest=function(){},l.abort=function(){var m=this;m._abortRequested=!0;var g=new m.AbortRequest;throw g.cancel=function(){m._abortRequested=!1},g},l.reset=function(m){},l.visitWithoutReset=function(m){if(this instanceof this.Context)return this.visitor.visitWithoutReset(m);if(!(m instanceof r))throw new Error("");var g=m.value,y=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(y){var b=this.acquireContext(m);try{return b.invokeVisitorMethod(y)}finally{this.releaseContext(b)}}else return p(m,this)};function p(m,g){if(!(m instanceof r))throw new Error("");if(!(g instanceof a))throw new Error("");var y=m.value;if(n.check(y))m.each(g.visitWithoutReset,g);else if(i.check(y)){var b=t.getFieldNames(y);g._shouldVisitComments&&y.comments&&b.indexOf("comments")<0&&b.push("comments");for(var v=b.length,C=[],x=0;x<v;++x){var D=b[x];bf.call(y,D)||(y[D]=t.getFieldValue(y,D)),C.push(m.get(D))}for(var x=0;x<v;++x)g.visitWithoutReset(C[x])}return m.value}l.acquireContext=function(m){return this._reusableContextStack.length===0?new this.Context(m):this._reusableContextStack.pop().reset(m)},l.releaseContext=function(m){if(!(m instanceof this.Context))throw new Error("");this._reusableContextStack.push(m),m.currentPath=null},l.reportChanged=function(){this._changeReported=!0},l.wasChangeReported=function(){return this._changeReported};function d(m){function g(b){if(!(this instanceof g))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(b instanceof r))throw new Error("");Object.defineProperty(this,"visitor",{value:m,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=b,this.needToCallTraverse=!0,Object.seal(this)}if(!(m instanceof a))throw new Error("");var y=g.prototype=Object.create(m);return y.constructor=g,u(y,h),g}var h=Object.create(null);return h.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},h.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");var y=this.visitor[g].call(this,this.currentPath);if(y===!1?this.needToCallTraverse=!1:y!==o&&(this.currentPath=this.currentPath.replace(y)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var b=this.currentPath;return b&&b.value},h.traverse=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,p(g,a.fromMethodsObject(y||this.visitor))},h.visit=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(y||this.visitor).visitWithoutReset(g)},h.reportChanged=function(){this.visitor.reportChanged()},h.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}tt(()=>module);function eY(e){var t=e.use(Ft),r=t.getFieldNames,n=t.getFieldValue,i=t.builtInTypes.array,s=t.builtInTypes.object,o=t.builtInTypes.Date,a=t.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function u(m,g,y){return i.check(y)?y.length=0:y=null,p(m,g,y)}u.assert=function(m,g){var y=[];if(!u(m,g,y))if(y.length===0){if(m!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(l).join(""))};function l(m){return/[_$a-z][_$a-z0-9]*/i.test(m)?"."+m:"["+JSON.stringify(m)+"]"}function p(m,g,y){return m===g?!0:i.check(m)?d(m,g,y):s.check(m)?h(m,g,y):o.check(m)?o.check(g)&&+m==+g:a.check(m)?a.check(g)&&m.source===g.source&&m.global===g.global&&m.multiline===g.multiline&&m.ignoreCase===g.ignoreCase:m==g}function d(m,g,y){i.assert(m);var b=m.length;if(!i.check(g)||g.length!==b)return y&&y.push("length"),!1;for(var v=0;v<b;++v){if(y&&y.push(v),v in m!=v in g||!p(m[v],g[v],y))return!1;if(y){var C=y.pop();if(C!==v)throw new Error(""+C)}}return!0}function h(m,g,y){if(s.assert(m),!s.check(g))return!1;if(m.type!==g.type)return y&&y.push("type"),!1;var b=r(m),v=b.length,C=r(g),x=C.length;if(v===x){for(var D=0;D<v;++D){var E=b[D],S=n(m,E),P=n(g,E);if(y&&y.push(E),!p(S,P,y))return!1;if(y){var I=y.pop();if(I!==E)throw new Error(""+I)}}return!0}if(!y)return!1;var A=Object.create(null);for(D=0;D<v;++D)A[b[D]]=!0;for(D=0;D<x;++D){if(E=C[D],!c.call(A,E))return y.push(E),!1;delete A[E]}for(E in A){y.push(E);break}return!1}return u}tt(()=>module);function tY(e){let t=rY(),r=t.use(Ft);e.forEach(t.use),r.finalize();let n=t.use(ZW);return{Type:r.Type,builtInTypes:r.builtInTypes,namedTypes:r.namedTypes,builders:r.builders,defineMethod:r.defineMethod,getFieldNames:r.getFieldNames,getFieldValue:r.getFieldValue,eachField:r.eachField,someField:r.someField,getSupertypeNames:r.getSupertypeNames,getBuilderName:r.getBuilderName,astNodesAreEquivalent:t.use(eY),finalize:r.finalize,Path:t.use(x_),NodePath:t.use(v_),PathVisitor:n,use:t.use,visit:n.visit}}function rY(){let e=[],t=[];function r(i){var s=e.indexOf(i);return s===-1&&(s=e.length,e.push(i),t[s]=i(n)),t[s]}var n={use:r};return n}tt(()=>module);function D_(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}tt(()=>module);function C_(e){let t=e.use(D_);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}tt(()=>module);function E_(e){let t=e.use(C_);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}tt(()=>module);function nY(e){let t=e.use(E_);return t.LogicalOperators.forEach(r=>{let n=r+"=";t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}tt(()=>module);function iY(e){var t=e.use(Ft),r=t.Type,n=r.def,i=r.or,s=e.use(cn),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:u,LogicalOperators:l}=e.use(D_);n("Printable").field("loc",i(n("SourceLocation"),null),o.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),o.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),o.null),n("Position").field("line",a(1)).field("column",a(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),o.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),o.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),o.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,o.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],o.emptyArray).field("finalizer",i(n("BlockStatement"),null),o.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),o.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null),o.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var p=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean,o.true);let d=i(...c);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n("Expression")).field("right",n("Expression"));let h=i(...u);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",i(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var m=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",m).field("argument",n("Expression")).field("prefix",Boolean);var g=i(...l);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),n("Literal").bases("Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp,BigInt)),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}tt(()=>module);function sY(e){e.use(iY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("Function").field("generator",Boolean,i.false).field("expression",Boolean,i.false).field("defaults",[n(r("Expression"),null)],i.emptyArray).field("rest",n(r("Identifier"),null),i.null),r("RestElement").bases("Pattern").build("argument").field("argument",r("Pattern")).field("typeAnnotation",n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),i.null),r("SpreadElementPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("FunctionDeclaration").build("id","params","body","generator","expression").field("id",n(r("Identifier"),null)),r("FunctionExpression").build("id","params","body","generator","expression"),r("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,i.null).field("body",n(r("BlockStatement"),r("Expression"))).field("generator",!1,i.false),r("ForOfStatement").bases("Statement").build("left","right","body").field("left",n(r("VariableDeclaration"),r("Pattern"))).field("right",r("Expression")).field("body",r("Statement")),r("YieldExpression").bases("Expression").build("argument","delegate").field("argument",n(r("Expression"),null)).field("delegate",Boolean,i.false),r("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionBlock").bases("Node").build("left","right","each").field("left",r("Pattern")).field("right",r("Expression")).field("each",Boolean),r("Property").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("value",n(r("Expression"),r("Pattern"))).field("method",Boolean,i.false).field("shorthand",Boolean,i.false).field("computed",Boolean,i.false),r("ObjectProperty").field("shorthand",Boolean,i.false),r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("pattern",r("Pattern")).field("computed",Boolean,i.false),r("ObjectPattern").bases("Pattern").build("properties").field("properties",[n(r("PropertyPattern"),r("Property"))]),r("ArrayPattern").bases("Pattern").build("elements").field("elements",[n(r("Pattern"),null)]),r("SpreadElement").bases("Node").build("argument").field("argument",r("Expression")),r("ArrayExpression").field("elements",[n(r("Expression"),r("SpreadElement"),r("RestElement"),null)]),r("NewExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("CallExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("AssignmentPattern").bases("Pattern").build("left","right").field("left",r("Pattern")).field("right",r("Expression")),r("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",n("constructor","method","get","set")).field("key",r("Expression")).field("value",r("Function")).field("computed",Boolean,i.false).field("static",Boolean,i.false);let s=n(r("MethodDefinition"),r("VariableDeclarator"),r("ClassPropertyDefinition"),r("ClassProperty"),r("StaticBlock"));r("ClassProperty").bases("Declaration").build("key").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("computed",Boolean,i.false),r("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),r("ClassBody").bases("Declaration").build("body").field("body",[s]),r("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n(r("Identifier"),null)).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("ClassExpression").bases("Expression").build("id","body","superClass").field("id",n(r("Identifier"),null),i.null).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("Super").bases("Expression").build(),r("Specifier").bases("Node"),r("ModuleSpecifier").bases("Specifier").field("local",n(r("Identifier"),null),i.null).field("id",n(r("Identifier"),null),i.null).field("name",n(r("Identifier"),null),i.null),r("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",r("Identifier")),r("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),r("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),r("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[n(r("ImportSpecifier"),r("ImportNamespaceSpecifier"),r("ImportDefaultSpecifier"))],i.emptyArray).field("source",r("Literal")).field("importKind",n("value","type"),function(){return"value"}),r("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",n(r("Declaration"),null)).field("specifiers",[r("ExportSpecifier")],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",r("Identifier")),r("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",n(r("Declaration"),r("Expression"))),r("ExportAllDeclaration").bases("Declaration").build("source").field("source",r("Literal")),r("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",r("Expression")).field("quasi",r("TemplateLiteral")),r("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[r("TemplateElement")]).field("expressions",[r("Expression")]),r("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),r("MetaProperty").bases("Expression").build("meta","property").field("meta",r("Identifier")).field("property",r("Identifier"))}tt(()=>module);function oY(e){e.use(C_),e.use(sY)}tt(()=>module);function aY(e){e.use(oY);let r=e.use(Ft).Type.def,n=e.use(cn).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}tt(()=>module);function cY(e){e.use(aY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("ForOfStatement").field("await",Boolean,i.false),r("SpreadProperty").bases("Node").build("argument").field("argument",r("Expression")),r("ObjectExpression").field("properties",[n(r("Property"),r("SpreadProperty"),r("SpreadElement"))]),r("TemplateElement").field("value",{cooked:n(String,null),raw:String}),r("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("ObjectPattern").field("properties",[n(r("PropertyPattern"),r("Property"),r("RestElement"),r("SpreadPropertyPattern"))])}tt(()=>module);function uY(e){e.use(cY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}tt(()=>module);function lY(e){e.use(E_),e.use(uY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,s=e.use(cn).defaults;r("ImportExpression").bases("Expression").build("source").field("source",r("Expression")),r("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",r("Literal")).field("exported",n(r("Identifier"),null,void 0),s.null),r("ChainElement").bases("Node").field("optional",Boolean,s.false),r("CallExpression").bases("Expression","ChainElement"),r("MemberExpression").bases("Expression","ChainElement"),r("ChainExpression").bases("Expression").build("expression").field("expression",r("ChainElement")),r("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,s.true),r("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,s.true)}tt(()=>module);function pY(e){e.use(nY),e.use(lY)}tt(()=>module);function dY(e){e.use(pY);let r=e.use(Ft).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}tt(()=>module);function gl(e){e.use(dY);let t=e.use(Ft),r=t.Type,n=t.Type.def,i=r.or,o=e.use(cn).defaults;n("AwaitExpression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,o.false),n("Decorator").bases("Node").build("expression").field("expression",n("Expression")),n("Property").field("decorators",i([n("Decorator")],null),o.null),n("MethodDefinition").field("decorators",i([n("Decorator")],null),o.null),n("PrivateName").bases("Expression","Pattern").build("id").field("id",n("Identifier")),n("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",n("PrivateName")).field("value",i(n("Expression"),null),o.null),n("ImportAttribute").bases("Node").build("key","value").field("key",i(n("Identifier"),n("Literal"))).field("value",n("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{n(a).field("assertions",[n("ImportAttribute")],o.emptyArray)}),n("RecordExpression").bases("Expression").build("properties").field("properties",[i(n("ObjectProperty"),n("ObjectMethod"),n("SpreadElement"))]),n("TupleExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),n("SpreadElement"),null)]),n("ModuleExpression").bases("Node").build("body").field("body",n("Program"))}tt(()=>module);function fY(e){e.use(gl);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("JSXAttribute").bases("Node").build("name","value").field("name",n(r("JSXIdentifier"),r("JSXNamespacedName"))).field("value",n(r("Literal"),r("JSXExpressionContainer"),r("JSXElement"),r("JSXFragment"),null),i.null),r("JSXIdentifier").bases("Identifier").build("name").field("name",String),r("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",r("JSXIdentifier")).field("name",r("JSXIdentifier")),r("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",n(r("JSXIdentifier"),r("JSXMemberExpression"))).field("property",r("JSXIdentifier")).field("computed",Boolean,i.false);let s=n(r("JSXIdentifier"),r("JSXNamespacedName"),r("JSXMemberExpression"));r("JSXSpreadAttribute").bases("Node").build("argument").field("argument",r("Expression"));let o=[n(r("JSXAttribute"),r("JSXSpreadAttribute"))];r("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n(r("Expression"),r("JSXEmptyExpression")));let a=[n(r("JSXText"),r("JSXExpressionContainer"),r("JSXSpreadChild"),r("JSXElement"),r("JSXFragment"),r("Literal"))];r("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningElement")).field("closingElement",n(r("JSXClosingElement"),null),i.null).field("children",a,i.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),r("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",o,i.emptyArray).field("selfClosing",Boolean,i.false),r("JSXClosingElement").bases("Node").build("name").field("name",s),r("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",r("JSXOpeningFragment")).field("closingFragment",r("JSXClosingFragment")).field("children",a,i.emptyArray),r("JSXOpeningFragment").bases("Node").build(),r("JSXClosingFragment").bases("Node").build(),r("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),r("JSXEmptyExpression").bases("Node").build(),r("JSXSpreadChild").bases("Node").build("expression").field("expression",r("Expression"))}tt(()=>module);function w_(e){var t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults,s=n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),o=n(r("TypeParameterDeclaration"),r("TSTypeParameterDeclaration"),null);r("Identifier").field("typeAnnotation",s,i.null),r("ObjectPattern").field("typeAnnotation",s,i.null),r("Function").field("returnType",s,i.null).field("typeParameters",o,i.null),r("ClassProperty").build("key","value","typeAnnotation","static").field("value",n(r("Expression"),null)).field("static",Boolean,i.false).field("typeAnnotation",s,i.null),["ClassDeclaration","ClassExpression"].forEach(a=>{r(a).field("typeParameters",o,i.null).field("superTypeParameters",n(r("TypeParameterInstantiation"),r("TSTypeParameterInstantiation"),null),i.null).field("implements",n([r("ClassImplements")],[r("TSExpressionWithTypeArguments")]),i.emptyArray)})}tt(()=>module);function S_(e){e.use(gl),e.use(w_);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("Flow").bases("Node"),r("FlowType").bases("Flow"),r("AnyTypeAnnotation").bases("FlowType").build(),r("EmptyTypeAnnotation").bases("FlowType").build(),r("MixedTypeAnnotation").bases("FlowType").build(),r("VoidTypeAnnotation").bases("FlowType").build(),r("SymbolTypeAnnotation").bases("FlowType").build(),r("NumberTypeAnnotation").bases("FlowType").build(),r("BigIntTypeAnnotation").bases("FlowType").build(),r("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),r("StringTypeAnnotation").bases("FlowType").build(),r("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),r("BooleanTypeAnnotation").bases("FlowType").build(),r("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),r("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullLiteralTypeAnnotation").bases("FlowType").build(),r("NullTypeAnnotation").bases("FlowType").build(),r("ThisTypeAnnotation").bases("FlowType").build(),r("ExistsTypeAnnotation").bases("FlowType").build(),r("ExistentialTypeParam").bases("FlowType").build(),r("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[r("FunctionTypeParam")]).field("returnType",r("FlowType")).field("rest",n(r("FunctionTypeParam"),null)).field("typeParameters",n(r("TypeParameterDeclaration"),null)),r("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n(r("Identifier"),null)).field("typeAnnotation",r("FlowType")).field("optional",Boolean),r("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",r("FlowType")),r("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[n(r("ObjectTypeProperty"),r("ObjectTypeSpreadProperty"))]).field("indexers",[r("ObjectTypeIndexer")],i.emptyArray).field("callProperties",[r("ObjectTypeCallProperty")],i.emptyArray).field("inexact",n(Boolean,void 0),i.undefined).field("exact",Boolean,i.false).field("internalSlots",[r("ObjectTypeInternalSlot")],i.emptyArray),r("Variance").bases("Node").build("kind").field("kind",n("plus","minus"));let s=n(r("Variance"),"plus","minus",null);r("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",n(r("Literal"),r("Identifier"))).field("value",r("FlowType")).field("optional",Boolean).field("variance",s,i.null),r("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",r("Identifier")).field("key",r("FlowType")).field("value",r("FlowType")).field("variance",s,i.null).field("static",Boolean,i.false),r("ObjectTypeCallProperty").bases("Node").build("value").field("value",r("FunctionTypeAnnotation")).field("static",Boolean,i.false),r("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("id",r("Identifier")),r("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("typeParameters",n(r("TypeParameterInstantiation"),null)),r("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",r("Identifier")).field("property",n(r("MemberTypeAnnotation"),r("GenericTypeAnnotation"))),r("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",r("FlowType")).field("indexType",r("FlowType")),r("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",r("FlowType")).field("indexType",r("FlowType")).field("optional",Boolean),r("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",r("FlowType")),r("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",r("FlowType")),r("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",r("Identifier")).field("value",r("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),r("TypeParameterDeclaration").bases("Node").build("params").field("params",[r("TypeParameter")]),r("TypeParameterInstantiation").bases("Node").build("params").field("params",[r("FlowType")]),r("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",s,i.null).field("bound",n(r("TypeAnnotation"),null),i.null).field("default",n(r("FlowType"),null),i.null),r("ClassProperty").field("variance",s,i.null),r("ClassImplements").bases("Node").build("id").field("id",r("Identifier")).field("superClass",n(r("Expression"),null),i.null).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",r("ObjectTypeAnnotation")).field("extends",n([r("InterfaceExtends")],null),i.null),r("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null),i.null).field("body",r("ObjectTypeAnnotation")).field("extends",[r("InterfaceExtends")]),r("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),r("InterfaceExtends").bases("Node").build("id").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("right",r("FlowType")),r("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),r("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("impltype",r("FlowType")).field("supertype",n(r("FlowType"),null)),r("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",n(r("FlowType"),null)),r("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",r("Expression")).field("typeAnnotation",r("TypeAnnotation")),r("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("DeclareVariable").bases("Statement").build("id").field("id",r("Identifier")),r("DeclareFunction").bases("Statement").build("id").field("id",r("Identifier")).field("predicate",n(r("FlowPredicate"),null),i.null),r("DeclareClass").bases("InterfaceDeclaration").build("id"),r("DeclareModule").bases("Statement").build("id","body").field("id",n(r("Identifier"),r("Literal"))).field("body",r("BlockStatement")),r("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",r("TypeAnnotation")),r("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(r("DeclareVariable"),r("DeclareFunction"),r("DeclareClass"),r("FlowType"),r("TypeAlias"),r("DeclareOpaqueType"),r("InterfaceDeclaration"),null)).field("specifiers",[n(r("ExportSpecifier"),r("ExportBatchSpecifier"))],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",n(r("Literal"),null),i.null),r("ImportDeclaration").field("importKind",n("value","type","typeof"),()=>"value"),r("FlowPredicate").bases("Flow"),r("InferredPredicate").bases("FlowPredicate").build(),r("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",r("Expression")),r("Function").field("predicate",n(r("FlowPredicate"),null),i.null),r("CallExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("NewExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("EnumDeclaration").bases("Declaration").build("id","body").field("id",r("Identifier")).field("body",n(r("EnumBooleanBody"),r("EnumNumberBody"),r("EnumStringBody"),r("EnumSymbolBody"))),r("EnumBooleanBody").build("members","explicitType").field("members",[r("EnumBooleanMember")]).field("explicitType",Boolean),r("EnumNumberBody").build("members","explicitType").field("members",[r("EnumNumberMember")]).field("explicitType",Boolean),r("EnumStringBody").build("members","explicitType").field("members",n([r("EnumStringMember")],[r("EnumDefaultedMember")])).field("explicitType",Boolean),r("EnumSymbolBody").build("members").field("members",[r("EnumDefaultedMember")]),r("EnumBooleanMember").build("id","init").field("id",r("Identifier")).field("init",n(r("Literal"),Boolean)),r("EnumNumberMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumStringMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumDefaultedMember").build("id").field("id",r("Identifier"))}tt(()=>module);function mY(e){e.use(gl);var t=e.use(Ft),r=e.use(cn).defaults,n=t.Type.def,i=t.Type.or;n("VariableDeclaration").field("declarations",[i(n("VariableDeclarator"),n("Identifier"))]),n("Property").field("value",i(n("Expression"),n("Pattern"))),n("ArrayPattern").field("elements",[i(n("Pattern"),n("SpreadElement"),null)]),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"))]),n("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("Declaration"),n("Expression"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],r.emptyArray).field("source",i(n("Literal"),null),r.null),n("Block").bases("Comment").build("value","leading","trailing"),n("Line").bases("Comment").build("value","leading","trailing")}tt(()=>module);function T_(e){e.use(gl);let t=e.use(Ft),r=e.use(cn).defaults,n=t.Type.def,i=t.Type.or,{undefined:s}=t.builtInTypes;n("Noop").bases("Statement").build(),n("DoExpression").bases("Expression").build("body").field("body",[n("Statement")]),n("BindExpression").bases("Expression").build("object","callee").field("object",i(n("Expression"),null)).field("callee",n("Expression")),n("ParenthesizedExpression").bases("Expression").build("expression").field("expression",n("Expression")),n("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("CommentBlock").bases("Comment").build("value","leading","trailing"),n("CommentLine").bases("Comment").build("value","leading","trailing"),n("Directive").bases("Node").build("value").field("value",n("DirectiveLiteral")),n("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,r["use strict"]),n("InterpreterDirective").bases("Node").build("value").field("value",String),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray),n("Program").bases("Node").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray).field("interpreter",i(n("InterpreterDirective"),null),r.null);function o(l=String,p){return["extra",{rawValue:l,raw:String},function(){let h=t.getFieldValue(this,"value");return{rawValue:h,raw:p?p(h):String(h)}}]}n("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>JSON.stringify(l))),n("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",i(String,null),r.null).field(...o(Number)),n("BigIntLiteral").bases("Literal").build("value").field("value",i(String,Number)).field(...o(String,l=>l+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>l+"m")),n("NullLiteral").bases("Literal").build().field("value",null,r.null),n("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),n("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,s),l=>`/${l.pattern}/${l.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=i(n("Property"),n("ObjectMethod"),n("ObjectProperty"),n("SpreadProperty"),n("SpreadElement"));n("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),n("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",i("method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("computed",Boolean,r.false).field("generator",Boolean,r.false).field("async",Boolean,r.false).field("accessibility",i(n("Literal"),null),r.null).field("decorators",i([n("Decorator")],null),r.null),n("ObjectProperty").bases("Node").build("key","value").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("accessibility",i(n("Literal"),null),r.null).field("computed",Boolean,r.false);var c=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("ClassAccessorProperty"),n("StaticBlock"));n("ClassBody").bases("Declaration").build("body").field("body",[c]),n("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",i(n("Literal"),n("Identifier"),n("Expression"))),n("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",n("PrivateName")),n("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",i(n("Literal"),n("Identifier"),n("PrivateName"),n("Expression"))).field("value",i(n("Expression"),null),r.null),["ClassMethod","ClassPrivateMethod"].forEach(l=>{n(l).field("kind",i("get","set","method","constructor"),()=>"method").field("body",n("BlockStatement")).field("access",i("public","private","protected",null),r.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(l=>{n(l).field("computed",Boolean,r.false).field("static",Boolean,r.false).field("abstract",Boolean,r.false).field("accessibility",i("public","private","protected",null),r.null).field("decorators",i([n("Decorator")],null),r.null).field("definite",Boolean,r.false).field("optional",Boolean,r.false).field("override",Boolean,r.false).field("readonly",Boolean,r.false)});var u=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",i([n("Decorator")],null),r.null),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("RestProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("Import").bases("Expression").build()}tt(()=>module);function hY(e){let r=e.use(Ft).Type.def;e.use(T_),e.use(S_),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}tt(()=>module);function gY(e){e.use(T_),e.use(w_);var t=e.use(Ft),r=t.namedTypes,n=t.Type.def,i=t.Type.or,s=e.use(cn).defaults,o=t.Type.from(function(l,p){return!!(r.StringLiteral&&r.StringLiteral.check(l,p)||r.Literal&&r.Literal.check(l,p)&&typeof l.value=="string")},"StringLiteral");n("TSType").bases("Node");var a=i(n("Identifier"),n("TSQualifiedName"));n("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),n("TSHasOptionalTypeParameterInstantiation").field("typeParameters",i(n("TSTypeParameterInstantiation"),null),s.null),n("TSHasOptionalTypeParameters").field("typeParameters",i(n("TSTypeParameterDeclaration"),null,void 0),s.null),n("TSHasOptionalTypeAnnotation").field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null),n("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),n("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",n("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(l=>{n(l).bases("TSType").build()}),n("TSArrayType").bases("TSType").build("elementType").field("elementType",n("TSType")),n("TSLiteralType").bases("TSType").build("literal").field("literal",i(n("NumericLiteral"),n("StringLiteral"),n("BooleanLiteral"),n("TemplateLiteral"),n("UnaryExpression"),n("BigIntLiteral"))),n("TemplateLiteral").field("expressions",i([n("Expression")],[n("TSType")])),["TSUnionType","TSIntersectionType"].forEach(l=>{n(l).bases("TSType").build("types").field("types",[n("TSType")])}),n("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",n("TSType")).field("extendsType",n("TSType")).field("trueType",n("TSType")).field("falseType",n("TSType")),n("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",n("TSTypeParameter")),n("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType"));var c=[i(n("Identifier"),n("RestElement"),n("ArrayPattern"),n("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(l=>{n(l).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",c)}),n("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,s.false).field("async",Boolean,s.false).field("generator",Boolean,s.false).field("id",i(n("Identifier"),null),s.null).field("params",[n("Pattern")]).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,s.false).field("generator",Boolean,s.false).field("params",[n("Pattern")]).field("abstract",Boolean,s.false).field("accessibility",i("public","private","protected",void 0),s.undefined).field("static",Boolean,s.false).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("key",i(n("Identifier"),n("StringLiteral"),n("NumericLiteral"),n("Expression"))).field("kind",i("get","set","method","constructor"),function(){return"method"}).field("access",i("public","private","protected",void 0),s.undefined).field("decorators",i([n("Decorator")],null),s.null).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",i(Boolean,"+","-"),s.false).field("typeParameter",n("TSTypeParameter")).field("optional",i(Boolean,"+","-"),s.false).field("typeAnnotation",i(n("TSType"),null),s.null),n("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i(n("TSType"),n("TSNamedTupleMember"))]),n("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",n("Identifier")).field("optional",Boolean,s.false).field("elementType",n("TSType")),n("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",n("TSType")).field("indexType",n("TSType")),n("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",n("TSType")),n("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i(n("TSType"),n("TSTypeAnnotation"))),n("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[n("Identifier")]).field("readonly",Boolean,s.false),n("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",n("Expression")).field("computed",Boolean,s.false).field("readonly",Boolean,s.false).field("optional",Boolean,s.false).field("initializer",i(n("Expression"),null),s.null),n("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",n("Expression")).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("parameters",c),n("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",i(n("Identifier"),n("TSThisType"))).field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null).field("asserts",Boolean,s.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(l=>{n(l).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",c)}),n("TSEnumMember").bases("Node").build("id","initializer").field("id",i(n("Identifier"),o)).field("initializer",i(n("Expression"),null),s.null),n("TSTypeQuery").bases("TSType").build("exprName").field("exprName",i(a,n("TSImportType")));var u=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[u]),n("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",i(n("Identifier"),String)).field("constraint",i(n("TSType"),void 0),s.undefined).field("default",i(n("TSType"),void 0),s.undefined),n("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",n("TSType")).field("expression",n("Expression")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[n("TSTypeParameter")]),n("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",n("Expression")),n("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[n("TSType")]),n("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",n("Identifier")).field("const",Boolean,s.false).field("declare",Boolean,s.false).field("members",[n("TSEnumMember")]).field("initializer",i(n("Expression"),null),s.null),n("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",n("Identifier")).field("declare",Boolean,s.false).field("typeAnnotation",n("TSType")),n("TSModuleBlock").bases("Node").build("body").field("body",[n("Statement")]),n("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",i(o,a)).field("declare",Boolean,s.false).field("global",Boolean,s.false).field("body",i(n("TSModuleBlock"),n("TSModuleDeclaration"),null),s.null),n("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",i(a,void 0),s.undefined),n("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",n("Identifier")).field("isExport",Boolean,s.false).field("moduleReference",i(a,n("TSExternalModuleReference"))),n("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),n("TSExportAssignment").bases("Statement").build("expression").field("expression",n("Expression")),n("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",n("Identifier")),n("TSInterfaceBody").bases("Node").build("body").field("body",[u]),n("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),n("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,s.false).field("extends",i([n("TSExpressionWithTypeArguments")],null),s.null).field("body",n("TSInterfaceBody")),n("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",i("public","private","protected",void 0),s.undefined).field("readonly",Boolean,s.false).field("parameter",i(n("Identifier"),n("AssignmentPattern"))),n("ClassProperty").field("access",i("public","private","protected",void 0),s.undefined),n("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),n("ClassBody").field("body",[i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassAccessorProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("StaticBlock"),n("TSDeclareMethod"),u)])}tt(()=>module);var Yn;Yn||(Yn={});var{astNodesAreEquivalent:y_e,builders:sc,builtInTypes:Jn,defineMethod:b_e,eachField:x_e,finalize:v_e,getBuilderName:D_e,getFieldNames:yY,getFieldValue:ts,getSupertypeNames:C_e,namedTypes:bY,NodePath:xY,Path:E_e,PathVisitor:w_e,someField:vY,Type:S_e,use:T_e,visit:A_e}=tY([gl,fY,S_,mY,hY,gY]);Object.assign(Yn,bY);var xf=Yn,n_=Rf.default.SourceMapConsumer,DY=Rf.default.SourceMapGenerator,A_=Object.prototype.hasOwnProperty;function CY(){return`
|
|
1185
|
+
`);return s!==-1&&(t=HP(t,i,n,s)),n+t+i};Object.defineProperties(Gu.prototype,Ua);var EFe=Gu(),wFe=Gu({level:VP?VP.level:0});var Ie=new ef({level:2}),JP={comment:Ie.gray,quote:Ie.gray,keyword:Ie.green,"selector-tag":Ie.green,addition:Ie.green,number:Ie.cyan,string:Ie.cyan,"meta meta-string":Ie.cyan,literal:Ie.cyan,doctag:Ie.cyan,regexp:Ie.cyan,title:Ie.blue,section:Ie.blue,name:Ie.blue,"selector-id":Ie.blue,"selector-class":Ie.blue,attribute:Ie.yellow,attr:Ie.yellow,variable:Ie.yellow,"template-variable":Ie.yellow,"class title":Ie.yellow,type:Ie.yellow,symbol:Ie.magenta,bullet:Ie.magenta,subst:Ie.magenta,meta:Ie.magenta,"meta keyword":Ie.magenta,"selector-attr":Ie.magenta,"selector-pseudo":Ie.magenta,link:Ie.magenta,built_in:Ie.red,deletion:Ie.red,emphasis:Ie.italic,strong:Ie.bold,formula:Ie.inverse};function zu(e){let t=lb(e);return{highlight:r,highlightAuto:n,listLanguages:t.listLanguages,register:t.register,registerAlias:t.registerAlias,registered:t.registered};function r(i,s,o){let a=t.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:hb(o||JP,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=t.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:hb(o||JP,c)}}}function hb(e,t){let r=new Set(t.type==="element"&&Array.isArray(t.properties.className)?t.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in e)if(Object.hasOwn(e,o)){let a=o.split(" "),c=e[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in t?s=t.value:"children"in t&&(s=sV(n,t.children)),i&&(s=i(s)),s}function sV(e,t){let r=[],n=-1;for(;++n<t.length;)r.push(hb(e,t[n]));return r.join("")}f();var XP=q(require("@sentry/node"),1),QP=q(require("@amplitude/analytics-node"),1);async function te(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([XP.flush(2e3),QP.flush().promise])}catch(t){console.error(t)}process.exit(e)}f();var Fe=process.env.AIR_HOST||"https://api.builder.io";f();var Ci=q(require("@amplitude/analytics-node"),1),Xn=q(require("@sentry/node"),1);var ZP="1.9.23";f();var Vt=require("fs/promises"),e2=require("crypto"),ut=require("fs"),yl=require("os"),Ne=q(require("path"),1),t2=q(require("typescript"),1),r2=q(require("launch-editor"),1);var Bo=require("child_process");var Px={};pS(Px,{MagicastError:()=>yr,builders:()=>wJ,detectCodeFormat:()=>X_,generateCode:()=>Ax,loadFile:()=>CJ,parseExpression:()=>Z_,parseModule:()=>Q_,writeFile:()=>EJ});f();var Tf=require("fs");var Rf=q(SF(),1),y_=q(r_(),1);function cn(e){var t=e.use(Ft),r=t.Type,n=t.builtInTypes,i=n.number;function s(u){return r.from(l=>i.check(l)&&l>=u,i+" >= "+u)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=r.or(n.string,n.number,n.boolean,n.null,n.undefined);let c=r.from(u=>{if(u===null)return!0;var l=typeof u;return!(l==="object"||l==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:c}}function tt(e){try{var t=e(),r=t.exports,n=r.default}catch{return}n&&n!==r&&typeof r=="object"&&(Object.assign(n,r,{default:n}),r.__esModule&&Object.defineProperty(n,"__esModule",{value:!0}),t.exports=n)}var YW=Object.defineProperty,JW=(e,t,r)=>t in e?YW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ar=(e,t,r)=>(JW(e,typeof t!="symbol"?t+"":t,r),r),b_=Object.prototype,Af=b_.toString,wn=b_.hasOwnProperty,Oo=class{assert(t,r){if(!this.check(t,r)){var n=Cx(t);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let t=this;return new dl(t)}},dl=class extends Oo{constructor(t){super(),this.elemType=t,Ar(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,r){return Array.isArray(t)&&t.every(n=>this.elemType.check(n,r))}},Pf=class extends Oo{constructor(t){super(),this.value=t,Ar(this,"kind","IdentityType")}toString(){return String(this.value)}check(t,r){let n=t===this.value;return!n&&typeof r=="function"&&r(this,t),n}},Ff=class extends Oo{constructor(t){super(),this.fields=t,Ar(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,r){return Af.call(t)===Af.call({})&&this.fields.every(n=>n.type.check(t[n.name],r))}},_f=class extends Oo{constructor(t){super(),this.types=t,Ar(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(t,r){return this.types.some(n=>n.check(t,!!r))?!0:(typeof r=="function"&&r(this,t),!1)}},Ro=class extends Oo{constructor(t,r){super(),this.name=t,this.predicate=r,Ar(this,"kind","PredicateType")}toString(){return this.name}check(t,r){let n=this.predicate(t,r);return!n&&typeof r=="function"&&r(this,t),n}},ll=class e{constructor(t,r){this.type=t,this.typeName=r,Ar(this,"baseNames",[]),Ar(this,"ownFields",Object.create(null)),Ar(this,"allSupertypes",Object.create(null)),Ar(this,"supertypeList",[]),Ar(this,"allFields",Object.create(null)),Ar(this,"fieldNames",[]),Ar(this,"finalized",!1),Ar(this,"buildable",!1),Ar(this,"buildParams",[])}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return wn.call(t.allSupertypes,this.typeName)}else throw new Error(t+" is not a Def")}checkAllFields(t,r){var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function i(s){var o=n[s],a=o.type,c=o.getValue(t);return a.check(c,r)}return t!==null&&typeof t=="object"&&Object.keys(n).every(i)}bases(...t){var r=this.baseNames;if(this.finalized){if(t.length!==r.length)throw new Error("");for(var n=0;n<t.length;n++)if(t[n]!==r[n])throw new Error("");return this}return t.forEach(i=>{r.indexOf(i)<0&&r.push(i)}),this}},If=class{constructor(t,r,n,i){this.name=t,this.type=r,this.defaultFn=n,Ar(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(t){var r=t[this.name];return typeof r<"u"||typeof this.defaultFn=="function"&&(r=this.defaultFn.call(t)),r}};function Cx(e){return Array.isArray(e)?"["+e.map(Cx).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+" }":JSON.stringify(e)}function Ft(e){let t={or(...R){return new _f(R.map(L=>t.from(L)))},from(R,L){if(R instanceof dl||R instanceof Pf||R instanceof Ff||R instanceof _f||R instanceof Ro)return R;if(R instanceof ll)return R.type;if(a.check(R)){if(R.length!==1)throw new Error("only one element type is permitted for typed arrays");return new dl(t.from(R[0]))}if(c.check(R))return new Ff(Object.keys(R).map(W=>new If(W,t.from(R[W],W))));if(typeof R=="function"){var K=r.indexOf(R);if(K>=0)return n[K];if(typeof L!="string")throw new Error("missing name");return new Ro(L,R)}return new Pf(R)},def(R){return wn.call(b,R)?b[R]:b[R]=new C(R)},hasDef(R){return wn.call(b,R)}};var r=[],n=[];function i(R,L){let K=Af.call(L),W=new Ro(R,ce=>Af.call(ce)===K);return L&&typeof L.constructor=="function"&&(r.push(L.constructor),n.push(W)),W}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),c=i("object",{}),u=i("RegExp",/./),l=i("Date",new Date),p=i("number",3),d=i("boolean",!0),h=i("null",null),m=i("undefined",void 0),g=typeof BigInt=="function"?i("BigInt",BigInt(1234)):new Ro("BigInt",()=>!1),y={string:s,function:o,array:a,object:c,RegExp:u,Date:l,number:p,boolean:d,null:h,undefined:m,BigInt:g};var b=Object.create(null);function v(R){if(R&&typeof R=="object"){var L=R.type;if(typeof L=="string"&&wn.call(b,L)){var K=b[L];if(K.finalized)return K}}return null}class C extends ll{constructor(L){super(new Ro(L,(K,W)=>this.check(K,W)),L)}check(L,K){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(L===null||typeof L!="object")return!1;var W=v(L);return W?K&&W===this?this.checkAllFields(L,K):this.isSupertypeOf(W)?K?W.checkAllFields(L,K)&&this.checkAllFields(L,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(L,K):!1}build(...L){if(this.buildParams=L,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let K=(ce,se,Z,xt)=>{if(!wn.call(ce,se)){var Me=this.allFields;if(!wn.call(Me,se))throw new Error(""+se);var J=Me[se],$e=J.type,X;if(xt)X=Z;else if(J.defaultFn)X=J.defaultFn.call(ce);else{var me="no value or default function given for field "+JSON.stringify(se)+" of "+this.typeName+"("+this.buildParams.map(function(ue){return Me[ue]}).join(", ")+")";throw new Error(me)}if(!$e.check(X))throw new Error(Cx(X)+" does not match field "+J+" of type "+this.typeName);ce[se]=X}},W=(...ce)=>{var se=ce.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var Z=Object.create(S);if(this.buildParams.forEach(function(xt,Me){Me<se?K(Z,xt,ce[Me],!0):K(Z,xt,null,!1)}),Object.keys(this.allFields).forEach(function(xt){K(Z,xt,null,!1)}),Z.type!==this.typeName)throw new Error("");return Z};return W.from=ce=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var se=Object.create(S);if(Object.keys(this.allFields).forEach(function(Z){wn.call(ce,Z)?K(se,Z,ce[Z],!0):K(se,Z,null,!1)}),se.type!==this.typeName)throw new Error("");return se},Object.defineProperty(E,I(this.typeName),{enumerable:!0,value:W}),this}field(L,K,W,ce){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(L)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[L]=new If(L,t.from(K),W,ce),this)}finalize(){if(!this.finalized){var L=this.allFields,K=this.allSupertypes;this.baseNames.forEach(ce=>{var se=b[ce];if(se instanceof ll)se.finalize(),k(L,se.allFields),k(K,se.allSupertypes);else{var Z="unknown supertype name "+JSON.stringify(ce)+" for subtype "+JSON.stringify(this.typeName);throw new Error(Z)}}),k(L,this.ownFields),K[this.typeName]=this,this.fieldNames.length=0;for(var W in L)wn.call(L,W)&&!L[W].hidden&&this.fieldNames.push(W);Object.defineProperty(T,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,M(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&N(this.typeName)}}}function x(R){if(!wn.call(b,R))throw new Error("");var L=b[R];if(L.finalized!==!0)throw new Error("");return L.supertypeList.slice(1)}function D(R){for(var L={},K=Object.keys(b),W=K.length,ce=0;ce<W;++ce){var se=K[ce],Z=b[se];if(Z.finalized!==!0)throw new Error(""+se);for(var xt=0;xt<Z.supertypeList.length;++xt){var Me=Z.supertypeList[xt];if(wn.call(R,Me)){L[se]=Me;break}}}return L}var E=Object.create(null),S={};function P(R,L){var K=S[R];return m.check(L)?delete S[R]:(o.assert(L),Object.defineProperty(S,R,{enumerable:!0,configurable:!0,value:L})),K}function I(R){return R.replace(/^[A-Z]+/,function(L){var K=L.length;switch(K){case 0:return"";case 1:return L.toLowerCase();default:return L.slice(0,K-1).toLowerCase()+L.charAt(K-1)}})}function A(R){return R=I(R),R.replace(/(Expression)?$/,"Statement")}var T={};function G(R){var L=v(R);if(L)return L.fieldNames.slice(0);if("type"in R)throw new Error("did not recognize object of type "+JSON.stringify(R.type));return Object.keys(R)}function V(R,L){var K=v(R);if(K){var W=K.allFields[L];if(W)return W.getValue(R)}return R&&R[L]}function Y(R,L,K){G(R).forEach(function(W){L.call(this,W,V(R,W))},K)}function F(R,L,K){return G(R).some(function(W){return L.call(this,W,V(R,W))},K)}function N(R){var L=A(R);if(E[L])return;var K=E[I(R)];if(!K)return;let W=function(...ce){return E.expressionStatement(K.apply(E,ce))};W.from=function(...ce){return E.expressionStatement(K.from.apply(E,ce))},E[L]=W}function M(R,L){L.length=0,L.push(R);for(var K=Object.create(null),W=0;W<L.length;++W){R=L[W];var ce=b[R];if(ce.finalized!==!0)throw new Error("");wn.call(K,R)&&delete L[K[R]],K[R]=W,L.push.apply(L,ce.baseNames)}for(var se=0,Z=se,xt=L.length;Z<xt;++Z)wn.call(L,Z)&&(L[se++]=L[Z]);L.length=se}function k(R,L){return Object.keys(L).forEach(function(K){R[K]=L[K]}),R}function $(){Object.keys(b).forEach(function(R){b[R].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:D,builders:E,defineMethod:P,getBuilderName:I,getStatementBuilderName:A,namedTypes:T,getFieldNames:G,getFieldValue:V,eachField:Y,someField:F,finalize:$}}tt(()=>module);var XW=Object.prototype,yf=XW.hasOwnProperty;function x_(e){var t=e.use(Ft),r=t.builtInTypes.array,n=t.builtInTypes.number;let i=function p(d,h,m){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(h){if(!(h instanceof p))throw new Error("")}else h=null,m=null;this.value=d,this.parentPath=h,this.name=m,this.__childCache=null};var s=i.prototype;function o(p){return p.__childCache||(p.__childCache=Object.create(null))}function a(p,d){var h=o(p),m=p.getValueProperty(d),g=h[d];return(!yf.call(h,d)||g.value!==m)&&(g=h[d]=new p.constructor(m,p,d)),g}s.getValueProperty=function(d){return this.value[d]},s.get=function(...d){for(var h=this,m=d.length,g=0;g<m;++g)h=a(h,d[g]);return h},s.each=function(d,h){for(var m=[],g=this.value.length,y=0,y=0;y<g;++y)yf.call(this.value,y)&&(m[y]=this.get(y));for(h=h||this,y=0;y<g;++y)yf.call(m,y)&&d.call(h,m[y])},s.map=function(d,h){var m=[];return this.each(function(g){m.push(d.call(this,g))},h),m},s.filter=function(d,h){var m=[];return this.each(function(g){d.call(this,g)&&m.push(g)},h),m};function c(){}function u(p,d,h,m){if(r.assert(p.value),d===0)return c;var g=p.value.length;if(g<1)return c;var y=arguments.length;y===2?(h=0,m=g):y===3?(h=Math.max(h,0),m=g):(h=Math.max(h,0),m=Math.min(m,g)),n.assert(h),n.assert(m);for(var b=Object.create(null),v=o(p),C=h;C<m;++C)if(yf.call(p.value,C)){var x=p.get(C);if(x.name!==C)throw new Error("");var D=C+d;x.name=D,b[D]=x,delete v[C]}return delete v.length,function(){for(var E in b){var S=b[E];if(S.name!==+E)throw new Error("");v[E]=S,p.value[E]=S.value}}}s.shift=function(){var d=u(this,-1),h=this.value.shift();return d(),h},s.unshift=function(...d){var h=u(this,d.length),m=this.value.unshift.apply(this.value,d);return h(),m},s.push=function(...d){return r.assert(this.value),delete o(this).length,this.value.push.apply(this.value,d)},s.pop=function(){r.assert(this.value);var d=o(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},s.insertAt=function(d){var h=arguments.length,m=u(this,h-1,d);if(m===c&&h<=1)return this;d=Math.max(d,0);for(var g=1;g<h;++g)this.value[d+g-1]=arguments[g];return m(),this},s.insertBefore=function(...d){for(var h=this.parentPath,m=d.length,g=[this.name],y=0;y<m;++y)g.push(d[y]);return h.insertAt.apply(h,g)},s.insertAfter=function(...d){for(var h=this.parentPath,m=d.length,g=[this.name+1],y=0;y<m;++y)g.push(d[y]);return h.insertAt.apply(h,g)};function l(p){if(!(p instanceof i))throw new Error("");var d=p.parentPath;if(!d)return p;var h=d.value,m=o(d);if(h[p.name]===p.value)m[p.name]=p;else if(r.check(h)){var g=h.indexOf(p.value);g>=0&&(m[p.name=g]=p)}else h[p.name]=p.value,m[p.name]=p;if(h[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return s.replace=function(d){var h=[],m=this.parentPath.value,g=o(this.parentPath),y=arguments.length;if(l(this),r.check(m)){for(var b=m.length,v=u(this.parentPath,y-1,this.name+1),C=[this.name,1],x=0;x<y;++x)C.push(arguments[x]);var D=m.splice.apply(m,C);if(D[0]!==this.value)throw new Error("");if(m.length!==b-1+y)throw new Error("");if(v(),y===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(m[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),x=0;x<y;++x)h.push(this.parentPath.get(this.name+x));if(h[0]!==this)throw new Error("")}}else if(y===1)this.value!==d&&(this.__childCache=null),this.value=m[this.name]=d,h.push(this);else if(y===0)delete m[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return h},i}tt(()=>module);var Qa=Object.prototype.hasOwnProperty;function QW(e){var t=e.use(Ft),r=t.Type,n=t.namedTypes,i=n.Node,s=n.Expression,o=t.builtInTypes.array,a=t.builders;let c=function x(D,E){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");l.check(D.value)||u.assert(D.value);var S;if(E){if(!(E instanceof x))throw new Error("");S=E.depth+1}else E=null,S=0;Object.defineProperties(this,{path:{value:D},node:{value:D.value},isGlobal:{value:!E,enumerable:!0},depth:{value:S},parent:{value:E},bindings:{value:{}},types:{value:{}}})};var u=r.or(n.Program,n.Function,n.CatchClause),l=r.or(n.Function,n.ClassDeclaration,n.ClassExpression,n.InterfaceDeclaration,n.TSInterfaceDeclaration,n.TypeAlias,n.TSTypeAliasDeclaration),p=r.or(n.TypeParameter,n.TSTypeParameter);c.isEstablishedBy=function(x){return u.check(x)||l.check(x)};var d=c.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Qa.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Qa.call(this.types,x)},d.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var D=0;this.declares(x+D);)++D;var E=x+D;return this.bindings[E]=t.builders.identifier(E)},d.injectTemporary=function(x,D){x||(x=this.declareTemporary());var E=this.path.get("body");return n.BlockStatement.check(E.value)&&(E=E.get("body")),E.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,D||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var D in this.bindings)delete this.bindings[D];for(var D in this.types)delete this.types[D];h(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function h(x,D,E){var S=x.value;if(l.check(S)){let P=x.get("typeParameters","params");o.check(P.value)&&P.each(I=>{C(I,E)})}u.check(S)&&(n.CatchClause.check(S)?b(x.get("param"),D):m(x,D,E))}function m(x,D,E){var S=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&b(x.parent.get("id"),D),S&&(o.check(S)?x.each(P=>{y(P,D,E)}):n.Function.check(S)?(x.get("params").each(P=>{b(P,D)}),y(x.get("body"),D,E),m(x.get("typeParameters"),D,E)):n.TypeAlias&&n.TypeAlias.check(S)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(S)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(S)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(S)?v(x.get("id"),E):n.VariableDeclarator.check(S)?(b(x.get("id"),D),y(x.get("init"),D,E)):S.type==="ImportSpecifier"||S.type==="ImportNamespaceSpecifier"||S.type==="ImportDefaultSpecifier"?b(x.get(S.local?"local":S.name?"name":"id"),D):i.check(S)&&!s.check(S)&&t.eachField(S,function(P,I){var A=x.get(P);if(!g(A,I))throw new Error("");y(A,D,E)}))}function g(x,D){return!!(x.value===D||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(D)&&D.length===0)}function y(x,D,E){var S=x.value;if(!(!S||s.check(S)))if(n.FunctionDeclaration.check(S)&&S.id!==null)b(x.get("id"),D);else if(n.ClassDeclaration&&n.ClassDeclaration.check(S)&&S.id!==null)b(x.get("id"),D),m(x.get("typeParameters"),D,E);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(S)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(S))v(x.get("id"),E);else if(u.check(S)){if(n.CatchClause.check(S)&&n.Identifier.check(S.param)){var P=S.param.name,I=Qa.call(D,P);m(x.get("body"),D,E),I||delete D[P]}}else m(x,D,E)}function b(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)?Qa.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(E)?b(x.get("left"),D):n.ObjectPattern&&n.ObjectPattern.check(E)?x.get("properties").each(function(S){var P=S.value;n.Pattern.check(P)?b(S,D):n.Property.check(P)||n.ObjectProperty&&n.ObjectProperty.check(P)?b(S.get("value"),D):n.SpreadProperty&&n.SpreadProperty.check(P)&&b(S.get("argument"),D)}):n.ArrayPattern&&n.ArrayPattern.check(E)?x.get("elements").each(function(S){var P=S.value;n.Pattern.check(P)?b(S,D):n.SpreadElement&&n.SpreadElement.check(P)&&b(S.get("argument"),D)}):n.PropertyPattern&&n.PropertyPattern.check(E)?b(x.get("pattern"),D):(n.SpreadElementPattern&&n.SpreadElementPattern.check(E)||n.RestElement&&n.RestElement.check(E)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(E))&&b(x.get("argument"),D)}function v(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)&&(Qa.call(D,E.name)?D[E.name].push(x):D[E.name]=[x])}function C(x,D){var E=x.value;p.assert(E),Qa.call(D,E.name)?D[E.name].push(x):D[E.name]=[x]}return d.lookup=function(x){for(var D=this;D&&!D.declares(x);D=D.parent);return D},d.lookupType=function(x){for(var D=this;D&&!D.declaresType(x);D=D.parent);return D},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}tt(()=>module);function v_(e){var t=e.use(Ft),r=t.namedTypes,n=t.builders,i=t.builtInTypes.number,s=t.builtInTypes.array,o=e.use(x_),a=e.use(QW);let c=function y(b,v,C){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,b,v,C)};var u=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(u,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),u.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},u.prune=function(){var y=this.parent;return this.replace(),m(y)},u._computeNode=function(){var y=this.value;if(r.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},u._computeParent=function(){var y=this.value,b=this.parentPath;if(!r.Node.check(y)){for(;b&&!r.Node.check(b.value);)b=b.parentPath;b&&(b=b.parentPath)}for(;b&&!r.Node.check(b.value);)b=b.parentPath;return b||null},u._computeScope=function(){var y=this.value,b=this.parentPath,v=b&&b.scope;return r.Node.check(y)&&a.isEstablishedBy(y)&&(v=new a(this,v)),v||null},u.getValueProperty=function(y){return t.getFieldValue(this.value,y)},u.needsParens=function(y){var b=this.parentPath;if(!b)return!1;var v=this.value;if(!r.Expression.check(v)||v.type==="Identifier")return!1;for(;!r.Node.check(b.value);)if(b=b.parentPath,!b)return!1;var C=b.value;switch(v.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return C.type==="MemberExpression"&&this.name==="object"&&C.object===v;case"BinaryExpression":case"LogicalExpression":switch(C.type){case"CallExpression":return this.name==="callee"&&C.callee===v;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&C.object===v;case"BinaryExpression":case"LogicalExpression":{let x=v,D=C.operator,E=p[D],S=x.operator,P=p[S];if(E>P)return!0;if(E===P&&this.name==="right"){if(C.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(C.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(C.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return C.type==="MemberExpression"&&i.check(v.value)&&this.name==="object"&&C.object===v;case"AssignmentExpression":case"ConditionalExpression":switch(C.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&C.callee===v;case"ConditionalExpression":return this.name==="test"&&C.test===v;case"MemberExpression":return this.name==="object"&&C.object===v;default:return!1}default:if(C.type==="NewExpression"&&this.name==="callee"&&C.callee===v)return d(v)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function l(y){return r.BinaryExpression.check(y)||r.LogicalExpression.check(y)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,b){y.forEach(function(v){p[v]=b})});function d(y){return r.CallExpression.check(y)?!0:s.check(y)?y.some(d):r.Node.check(y)?t.someField(y,function(b,v){return d(v)}):!1}u.canBeFirstInStatement=function(){var y=this.node;return!r.FunctionExpression.check(y)&&!r.ObjectExpression.check(y)},u.firstInStatement=function(){return h(this)};function h(y){for(var b,v;y.parent;y=y.parent){if(b=y.node,v=y.parent.node,r.BlockStatement.check(v)&&y.parent.name==="body"&&y.name===0){if(v.body[0]!==b)throw new Error("Nodes must be equal");return!0}if(r.ExpressionStatement.check(v)&&y.name==="expression"){if(v.expression!==b)throw new Error("Nodes must be equal");return!0}if(r.SequenceExpression.check(v)&&y.parent.name==="expressions"&&y.name===0){if(v.expressions[0]!==b)throw new Error("Nodes must be equal");continue}if(r.CallExpression.check(v)&&y.name==="callee"){if(v.callee!==b)throw new Error("Nodes must be equal");continue}if(r.MemberExpression.check(v)&&y.name==="object"){if(v.object!==b)throw new Error("Nodes must be equal");continue}if(r.ConditionalExpression.check(v)&&y.name==="test"){if(v.test!==b)throw new Error("Nodes must be equal");continue}if(l(v)&&y.name==="left"){if(v.left!==b)throw new Error("Nodes must be equal");continue}if(r.UnaryExpression.check(v)&&!v.prefix&&y.name==="argument"){if(v.argument!==b)throw new Error("Nodes must be equal");continue}return!1}return!0}function m(y){if(r.VariableDeclaration.check(y.node)){var b=y.get("declarations").value;if(!b||b.length===0)return y.prune()}else if(r.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else r.IfStatement.check(y.node)&&g(y);return y}function g(y){var b=y.get("test").value,v=y.get("alternate").value,C=y.get("consequent").value;if(!C&&!v){var x=n.expressionStatement(b);y.replace(x)}else if(!C&&v){var D=n.unaryExpression("!",b,!0);r.UnaryExpression.check(b)&&b.operator==="!"&&(D=b.argument),y.get("test").replace(D),y.get("consequent").replace(v),y.get("alternate").replace()}}return c}tt(()=>module);var bf=Object.prototype.hasOwnProperty;function ZW(e){var t=e.use(Ft),r=e.use(v_),n=t.builtInTypes.array,i=t.builtInTypes.object,s=t.builtInTypes.function,o;let a=function m(){if(!(this instanceof m))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=bf.call(this._methodNameTable,"Block")||bf.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function c(m){var g=Object.create(null);for(var y in m)/^visit[A-Z]/.test(y)&&(g[y.slice(5)]=!0);for(var b=t.computeSupertypeLookupTable(g),v=Object.create(null),C=Object.keys(b),x=C.length,D=0;D<x;++D){var E=C[D];y="visit"+b[E],s.check(m[y])&&(v[E]=y)}return v}a.fromMethodsObject=function(g){if(g instanceof a)return g;if(!i.check(g))return new a;let y=function v(){if(!(this instanceof v))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var b=y.prototype=Object.create(l);return b.constructor=y,u(b,g),u(y,a),s.assert(y.fromMethodsObject),s.assert(y.visit),new y};function u(m,g){for(var y in g)bf.call(g,y)&&(m[y]=g[y]);return m}a.visit=function(g,y){return a.fromMethodsObject(y).visit(g)};var l=a.prototype;l.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var m=arguments.length,g=new Array(m),y=0;y<m;++y)g[y]=arguments[y];g[0]instanceof r||(g[0]=new r({root:g[0]}).get("root")),this.reset.apply(this,g);var b;try{var v=this.visitWithoutReset(g[0]);b=!0}finally{if(this._visiting=!1,!b&&this._abortRequested)return g[0].value}return v},l.AbortRequest=function(){},l.abort=function(){var m=this;m._abortRequested=!0;var g=new m.AbortRequest;throw g.cancel=function(){m._abortRequested=!1},g},l.reset=function(m){},l.visitWithoutReset=function(m){if(this instanceof this.Context)return this.visitor.visitWithoutReset(m);if(!(m instanceof r))throw new Error("");var g=m.value,y=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(y){var b=this.acquireContext(m);try{return b.invokeVisitorMethod(y)}finally{this.releaseContext(b)}}else return p(m,this)};function p(m,g){if(!(m instanceof r))throw new Error("");if(!(g instanceof a))throw new Error("");var y=m.value;if(n.check(y))m.each(g.visitWithoutReset,g);else if(i.check(y)){var b=t.getFieldNames(y);g._shouldVisitComments&&y.comments&&b.indexOf("comments")<0&&b.push("comments");for(var v=b.length,C=[],x=0;x<v;++x){var D=b[x];bf.call(y,D)||(y[D]=t.getFieldValue(y,D)),C.push(m.get(D))}for(var x=0;x<v;++x)g.visitWithoutReset(C[x])}return m.value}l.acquireContext=function(m){return this._reusableContextStack.length===0?new this.Context(m):this._reusableContextStack.pop().reset(m)},l.releaseContext=function(m){if(!(m instanceof this.Context))throw new Error("");this._reusableContextStack.push(m),m.currentPath=null},l.reportChanged=function(){this._changeReported=!0},l.wasChangeReported=function(){return this._changeReported};function d(m){function g(b){if(!(this instanceof g))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(b instanceof r))throw new Error("");Object.defineProperty(this,"visitor",{value:m,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=b,this.needToCallTraverse=!0,Object.seal(this)}if(!(m instanceof a))throw new Error("");var y=g.prototype=Object.create(m);return y.constructor=g,u(y,h),g}var h=Object.create(null);return h.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},h.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");var y=this.visitor[g].call(this,this.currentPath);if(y===!1?this.needToCallTraverse=!1:y!==o&&(this.currentPath=this.currentPath.replace(y)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var b=this.currentPath;return b&&b.value},h.traverse=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,p(g,a.fromMethodsObject(y||this.visitor))},h.visit=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(y||this.visitor).visitWithoutReset(g)},h.reportChanged=function(){this.visitor.reportChanged()},h.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}tt(()=>module);function eY(e){var t=e.use(Ft),r=t.getFieldNames,n=t.getFieldValue,i=t.builtInTypes.array,s=t.builtInTypes.object,o=t.builtInTypes.Date,a=t.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function u(m,g,y){return i.check(y)?y.length=0:y=null,p(m,g,y)}u.assert=function(m,g){var y=[];if(!u(m,g,y))if(y.length===0){if(m!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(l).join(""))};function l(m){return/[_$a-z][_$a-z0-9]*/i.test(m)?"."+m:"["+JSON.stringify(m)+"]"}function p(m,g,y){return m===g?!0:i.check(m)?d(m,g,y):s.check(m)?h(m,g,y):o.check(m)?o.check(g)&&+m==+g:a.check(m)?a.check(g)&&m.source===g.source&&m.global===g.global&&m.multiline===g.multiline&&m.ignoreCase===g.ignoreCase:m==g}function d(m,g,y){i.assert(m);var b=m.length;if(!i.check(g)||g.length!==b)return y&&y.push("length"),!1;for(var v=0;v<b;++v){if(y&&y.push(v),v in m!=v in g||!p(m[v],g[v],y))return!1;if(y){var C=y.pop();if(C!==v)throw new Error(""+C)}}return!0}function h(m,g,y){if(s.assert(m),!s.check(g))return!1;if(m.type!==g.type)return y&&y.push("type"),!1;var b=r(m),v=b.length,C=r(g),x=C.length;if(v===x){for(var D=0;D<v;++D){var E=b[D],S=n(m,E),P=n(g,E);if(y&&y.push(E),!p(S,P,y))return!1;if(y){var I=y.pop();if(I!==E)throw new Error(""+I)}}return!0}if(!y)return!1;var A=Object.create(null);for(D=0;D<v;++D)A[b[D]]=!0;for(D=0;D<x;++D){if(E=C[D],!c.call(A,E))return y.push(E),!1;delete A[E]}for(E in A){y.push(E);break}return!1}return u}tt(()=>module);function tY(e){let t=rY(),r=t.use(Ft);e.forEach(t.use),r.finalize();let n=t.use(ZW);return{Type:r.Type,builtInTypes:r.builtInTypes,namedTypes:r.namedTypes,builders:r.builders,defineMethod:r.defineMethod,getFieldNames:r.getFieldNames,getFieldValue:r.getFieldValue,eachField:r.eachField,someField:r.someField,getSupertypeNames:r.getSupertypeNames,getBuilderName:r.getBuilderName,astNodesAreEquivalent:t.use(eY),finalize:r.finalize,Path:t.use(x_),NodePath:t.use(v_),PathVisitor:n,use:t.use,visit:n.visit}}function rY(){let e=[],t=[];function r(i){var s=e.indexOf(i);return s===-1&&(s=e.length,e.push(i),t[s]=i(n)),t[s]}var n={use:r};return n}tt(()=>module);function D_(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}tt(()=>module);function C_(e){let t=e.use(D_);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}tt(()=>module);function E_(e){let t=e.use(C_);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}tt(()=>module);function nY(e){let t=e.use(E_);return t.LogicalOperators.forEach(r=>{let n=r+"=";t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}tt(()=>module);function iY(e){var t=e.use(Ft),r=t.Type,n=r.def,i=r.or,s=e.use(cn),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:u,LogicalOperators:l}=e.use(D_);n("Printable").field("loc",i(n("SourceLocation"),null),o.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),o.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),o.null),n("Position").field("line",a(1)).field("column",a(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),o.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),o.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),o.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,o.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],o.emptyArray).field("finalizer",i(n("BlockStatement"),null),o.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),o.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null),o.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var p=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean,o.true);let d=i(...c);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n("Expression")).field("right",n("Expression"));let h=i(...u);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",i(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var m=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",m).field("argument",n("Expression")).field("prefix",Boolean);var g=i(...l);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),n("Literal").bases("Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp,BigInt)),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}tt(()=>module);function sY(e){e.use(iY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("Function").field("generator",Boolean,i.false).field("expression",Boolean,i.false).field("defaults",[n(r("Expression"),null)],i.emptyArray).field("rest",n(r("Identifier"),null),i.null),r("RestElement").bases("Pattern").build("argument").field("argument",r("Pattern")).field("typeAnnotation",n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),i.null),r("SpreadElementPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("FunctionDeclaration").build("id","params","body","generator","expression").field("id",n(r("Identifier"),null)),r("FunctionExpression").build("id","params","body","generator","expression"),r("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,i.null).field("body",n(r("BlockStatement"),r("Expression"))).field("generator",!1,i.false),r("ForOfStatement").bases("Statement").build("left","right","body").field("left",n(r("VariableDeclaration"),r("Pattern"))).field("right",r("Expression")).field("body",r("Statement")),r("YieldExpression").bases("Expression").build("argument","delegate").field("argument",n(r("Expression"),null)).field("delegate",Boolean,i.false),r("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionBlock").bases("Node").build("left","right","each").field("left",r("Pattern")).field("right",r("Expression")).field("each",Boolean),r("Property").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("value",n(r("Expression"),r("Pattern"))).field("method",Boolean,i.false).field("shorthand",Boolean,i.false).field("computed",Boolean,i.false),r("ObjectProperty").field("shorthand",Boolean,i.false),r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("pattern",r("Pattern")).field("computed",Boolean,i.false),r("ObjectPattern").bases("Pattern").build("properties").field("properties",[n(r("PropertyPattern"),r("Property"))]),r("ArrayPattern").bases("Pattern").build("elements").field("elements",[n(r("Pattern"),null)]),r("SpreadElement").bases("Node").build("argument").field("argument",r("Expression")),r("ArrayExpression").field("elements",[n(r("Expression"),r("SpreadElement"),r("RestElement"),null)]),r("NewExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("CallExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("AssignmentPattern").bases("Pattern").build("left","right").field("left",r("Pattern")).field("right",r("Expression")),r("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",n("constructor","method","get","set")).field("key",r("Expression")).field("value",r("Function")).field("computed",Boolean,i.false).field("static",Boolean,i.false);let s=n(r("MethodDefinition"),r("VariableDeclarator"),r("ClassPropertyDefinition"),r("ClassProperty"),r("StaticBlock"));r("ClassProperty").bases("Declaration").build("key").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("computed",Boolean,i.false),r("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),r("ClassBody").bases("Declaration").build("body").field("body",[s]),r("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n(r("Identifier"),null)).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("ClassExpression").bases("Expression").build("id","body","superClass").field("id",n(r("Identifier"),null),i.null).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("Super").bases("Expression").build(),r("Specifier").bases("Node"),r("ModuleSpecifier").bases("Specifier").field("local",n(r("Identifier"),null),i.null).field("id",n(r("Identifier"),null),i.null).field("name",n(r("Identifier"),null),i.null),r("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",r("Identifier")),r("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),r("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),r("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[n(r("ImportSpecifier"),r("ImportNamespaceSpecifier"),r("ImportDefaultSpecifier"))],i.emptyArray).field("source",r("Literal")).field("importKind",n("value","type"),function(){return"value"}),r("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",n(r("Declaration"),null)).field("specifiers",[r("ExportSpecifier")],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",r("Identifier")),r("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",n(r("Declaration"),r("Expression"))),r("ExportAllDeclaration").bases("Declaration").build("source").field("source",r("Literal")),r("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",r("Expression")).field("quasi",r("TemplateLiteral")),r("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[r("TemplateElement")]).field("expressions",[r("Expression")]),r("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),r("MetaProperty").bases("Expression").build("meta","property").field("meta",r("Identifier")).field("property",r("Identifier"))}tt(()=>module);function oY(e){e.use(C_),e.use(sY)}tt(()=>module);function aY(e){e.use(oY);let r=e.use(Ft).Type.def,n=e.use(cn).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}tt(()=>module);function cY(e){e.use(aY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("ForOfStatement").field("await",Boolean,i.false),r("SpreadProperty").bases("Node").build("argument").field("argument",r("Expression")),r("ObjectExpression").field("properties",[n(r("Property"),r("SpreadProperty"),r("SpreadElement"))]),r("TemplateElement").field("value",{cooked:n(String,null),raw:String}),r("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("ObjectPattern").field("properties",[n(r("PropertyPattern"),r("Property"),r("RestElement"),r("SpreadPropertyPattern"))])}tt(()=>module);function uY(e){e.use(cY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}tt(()=>module);function lY(e){e.use(E_),e.use(uY);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,s=e.use(cn).defaults;r("ImportExpression").bases("Expression").build("source").field("source",r("Expression")),r("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",r("Literal")).field("exported",n(r("Identifier"),null,void 0),s.null),r("ChainElement").bases("Node").field("optional",Boolean,s.false),r("CallExpression").bases("Expression","ChainElement"),r("MemberExpression").bases("Expression","ChainElement"),r("ChainExpression").bases("Expression").build("expression").field("expression",r("ChainElement")),r("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,s.true),r("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,s.true)}tt(()=>module);function pY(e){e.use(nY),e.use(lY)}tt(()=>module);function dY(e){e.use(pY);let r=e.use(Ft).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}tt(()=>module);function gl(e){e.use(dY);let t=e.use(Ft),r=t.Type,n=t.Type.def,i=r.or,o=e.use(cn).defaults;n("AwaitExpression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,o.false),n("Decorator").bases("Node").build("expression").field("expression",n("Expression")),n("Property").field("decorators",i([n("Decorator")],null),o.null),n("MethodDefinition").field("decorators",i([n("Decorator")],null),o.null),n("PrivateName").bases("Expression","Pattern").build("id").field("id",n("Identifier")),n("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",n("PrivateName")).field("value",i(n("Expression"),null),o.null),n("ImportAttribute").bases("Node").build("key","value").field("key",i(n("Identifier"),n("Literal"))).field("value",n("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{n(a).field("assertions",[n("ImportAttribute")],o.emptyArray)}),n("RecordExpression").bases("Expression").build("properties").field("properties",[i(n("ObjectProperty"),n("ObjectMethod"),n("SpreadElement"))]),n("TupleExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),n("SpreadElement"),null)]),n("ModuleExpression").bases("Node").build("body").field("body",n("Program"))}tt(()=>module);function fY(e){e.use(gl);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("JSXAttribute").bases("Node").build("name","value").field("name",n(r("JSXIdentifier"),r("JSXNamespacedName"))).field("value",n(r("Literal"),r("JSXExpressionContainer"),r("JSXElement"),r("JSXFragment"),null),i.null),r("JSXIdentifier").bases("Identifier").build("name").field("name",String),r("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",r("JSXIdentifier")).field("name",r("JSXIdentifier")),r("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",n(r("JSXIdentifier"),r("JSXMemberExpression"))).field("property",r("JSXIdentifier")).field("computed",Boolean,i.false);let s=n(r("JSXIdentifier"),r("JSXNamespacedName"),r("JSXMemberExpression"));r("JSXSpreadAttribute").bases("Node").build("argument").field("argument",r("Expression"));let o=[n(r("JSXAttribute"),r("JSXSpreadAttribute"))];r("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n(r("Expression"),r("JSXEmptyExpression")));let a=[n(r("JSXText"),r("JSXExpressionContainer"),r("JSXSpreadChild"),r("JSXElement"),r("JSXFragment"),r("Literal"))];r("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningElement")).field("closingElement",n(r("JSXClosingElement"),null),i.null).field("children",a,i.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),r("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",o,i.emptyArray).field("selfClosing",Boolean,i.false),r("JSXClosingElement").bases("Node").build("name").field("name",s),r("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",r("JSXOpeningFragment")).field("closingFragment",r("JSXClosingFragment")).field("children",a,i.emptyArray),r("JSXOpeningFragment").bases("Node").build(),r("JSXClosingFragment").bases("Node").build(),r("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),r("JSXEmptyExpression").bases("Node").build(),r("JSXSpreadChild").bases("Node").build("expression").field("expression",r("Expression"))}tt(()=>module);function w_(e){var t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults,s=n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),o=n(r("TypeParameterDeclaration"),r("TSTypeParameterDeclaration"),null);r("Identifier").field("typeAnnotation",s,i.null),r("ObjectPattern").field("typeAnnotation",s,i.null),r("Function").field("returnType",s,i.null).field("typeParameters",o,i.null),r("ClassProperty").build("key","value","typeAnnotation","static").field("value",n(r("Expression"),null)).field("static",Boolean,i.false).field("typeAnnotation",s,i.null),["ClassDeclaration","ClassExpression"].forEach(a=>{r(a).field("typeParameters",o,i.null).field("superTypeParameters",n(r("TypeParameterInstantiation"),r("TSTypeParameterInstantiation"),null),i.null).field("implements",n([r("ClassImplements")],[r("TSExpressionWithTypeArguments")]),i.emptyArray)})}tt(()=>module);function S_(e){e.use(gl),e.use(w_);let t=e.use(Ft),r=t.Type.def,n=t.Type.or,i=e.use(cn).defaults;r("Flow").bases("Node"),r("FlowType").bases("Flow"),r("AnyTypeAnnotation").bases("FlowType").build(),r("EmptyTypeAnnotation").bases("FlowType").build(),r("MixedTypeAnnotation").bases("FlowType").build(),r("VoidTypeAnnotation").bases("FlowType").build(),r("SymbolTypeAnnotation").bases("FlowType").build(),r("NumberTypeAnnotation").bases("FlowType").build(),r("BigIntTypeAnnotation").bases("FlowType").build(),r("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),r("StringTypeAnnotation").bases("FlowType").build(),r("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),r("BooleanTypeAnnotation").bases("FlowType").build(),r("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),r("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullLiteralTypeAnnotation").bases("FlowType").build(),r("NullTypeAnnotation").bases("FlowType").build(),r("ThisTypeAnnotation").bases("FlowType").build(),r("ExistsTypeAnnotation").bases("FlowType").build(),r("ExistentialTypeParam").bases("FlowType").build(),r("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[r("FunctionTypeParam")]).field("returnType",r("FlowType")).field("rest",n(r("FunctionTypeParam"),null)).field("typeParameters",n(r("TypeParameterDeclaration"),null)),r("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n(r("Identifier"),null)).field("typeAnnotation",r("FlowType")).field("optional",Boolean),r("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",r("FlowType")),r("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[n(r("ObjectTypeProperty"),r("ObjectTypeSpreadProperty"))]).field("indexers",[r("ObjectTypeIndexer")],i.emptyArray).field("callProperties",[r("ObjectTypeCallProperty")],i.emptyArray).field("inexact",n(Boolean,void 0),i.undefined).field("exact",Boolean,i.false).field("internalSlots",[r("ObjectTypeInternalSlot")],i.emptyArray),r("Variance").bases("Node").build("kind").field("kind",n("plus","minus"));let s=n(r("Variance"),"plus","minus",null);r("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",n(r("Literal"),r("Identifier"))).field("value",r("FlowType")).field("optional",Boolean).field("variance",s,i.null),r("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",r("Identifier")).field("key",r("FlowType")).field("value",r("FlowType")).field("variance",s,i.null).field("static",Boolean,i.false),r("ObjectTypeCallProperty").bases("Node").build("value").field("value",r("FunctionTypeAnnotation")).field("static",Boolean,i.false),r("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("id",r("Identifier")),r("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("typeParameters",n(r("TypeParameterInstantiation"),null)),r("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",r("Identifier")).field("property",n(r("MemberTypeAnnotation"),r("GenericTypeAnnotation"))),r("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",r("FlowType")).field("indexType",r("FlowType")),r("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",r("FlowType")).field("indexType",r("FlowType")).field("optional",Boolean),r("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",r("FlowType")),r("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",r("FlowType")),r("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",r("Identifier")).field("value",r("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),r("TypeParameterDeclaration").bases("Node").build("params").field("params",[r("TypeParameter")]),r("TypeParameterInstantiation").bases("Node").build("params").field("params",[r("FlowType")]),r("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",s,i.null).field("bound",n(r("TypeAnnotation"),null),i.null).field("default",n(r("FlowType"),null),i.null),r("ClassProperty").field("variance",s,i.null),r("ClassImplements").bases("Node").build("id").field("id",r("Identifier")).field("superClass",n(r("Expression"),null),i.null).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",r("ObjectTypeAnnotation")).field("extends",n([r("InterfaceExtends")],null),i.null),r("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null),i.null).field("body",r("ObjectTypeAnnotation")).field("extends",[r("InterfaceExtends")]),r("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),r("InterfaceExtends").bases("Node").build("id").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("right",r("FlowType")),r("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),r("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("impltype",r("FlowType")).field("supertype",n(r("FlowType"),null)),r("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",n(r("FlowType"),null)),r("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",r("Expression")).field("typeAnnotation",r("TypeAnnotation")),r("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("DeclareVariable").bases("Statement").build("id").field("id",r("Identifier")),r("DeclareFunction").bases("Statement").build("id").field("id",r("Identifier")).field("predicate",n(r("FlowPredicate"),null),i.null),r("DeclareClass").bases("InterfaceDeclaration").build("id"),r("DeclareModule").bases("Statement").build("id","body").field("id",n(r("Identifier"),r("Literal"))).field("body",r("BlockStatement")),r("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",r("TypeAnnotation")),r("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(r("DeclareVariable"),r("DeclareFunction"),r("DeclareClass"),r("FlowType"),r("TypeAlias"),r("DeclareOpaqueType"),r("InterfaceDeclaration"),null)).field("specifiers",[n(r("ExportSpecifier"),r("ExportBatchSpecifier"))],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",n(r("Literal"),null),i.null),r("ImportDeclaration").field("importKind",n("value","type","typeof"),()=>"value"),r("FlowPredicate").bases("Flow"),r("InferredPredicate").bases("FlowPredicate").build(),r("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",r("Expression")),r("Function").field("predicate",n(r("FlowPredicate"),null),i.null),r("CallExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("NewExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("EnumDeclaration").bases("Declaration").build("id","body").field("id",r("Identifier")).field("body",n(r("EnumBooleanBody"),r("EnumNumberBody"),r("EnumStringBody"),r("EnumSymbolBody"))),r("EnumBooleanBody").build("members","explicitType").field("members",[r("EnumBooleanMember")]).field("explicitType",Boolean),r("EnumNumberBody").build("members","explicitType").field("members",[r("EnumNumberMember")]).field("explicitType",Boolean),r("EnumStringBody").build("members","explicitType").field("members",n([r("EnumStringMember")],[r("EnumDefaultedMember")])).field("explicitType",Boolean),r("EnumSymbolBody").build("members").field("members",[r("EnumDefaultedMember")]),r("EnumBooleanMember").build("id","init").field("id",r("Identifier")).field("init",n(r("Literal"),Boolean)),r("EnumNumberMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumStringMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumDefaultedMember").build("id").field("id",r("Identifier"))}tt(()=>module);function mY(e){e.use(gl);var t=e.use(Ft),r=e.use(cn).defaults,n=t.Type.def,i=t.Type.or;n("VariableDeclaration").field("declarations",[i(n("VariableDeclarator"),n("Identifier"))]),n("Property").field("value",i(n("Expression"),n("Pattern"))),n("ArrayPattern").field("elements",[i(n("Pattern"),n("SpreadElement"),null)]),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"))]),n("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("Declaration"),n("Expression"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],r.emptyArray).field("source",i(n("Literal"),null),r.null),n("Block").bases("Comment").build("value","leading","trailing"),n("Line").bases("Comment").build("value","leading","trailing")}tt(()=>module);function T_(e){e.use(gl);let t=e.use(Ft),r=e.use(cn).defaults,n=t.Type.def,i=t.Type.or,{undefined:s}=t.builtInTypes;n("Noop").bases("Statement").build(),n("DoExpression").bases("Expression").build("body").field("body",[n("Statement")]),n("BindExpression").bases("Expression").build("object","callee").field("object",i(n("Expression"),null)).field("callee",n("Expression")),n("ParenthesizedExpression").bases("Expression").build("expression").field("expression",n("Expression")),n("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("CommentBlock").bases("Comment").build("value","leading","trailing"),n("CommentLine").bases("Comment").build("value","leading","trailing"),n("Directive").bases("Node").build("value").field("value",n("DirectiveLiteral")),n("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,r["use strict"]),n("InterpreterDirective").bases("Node").build("value").field("value",String),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray),n("Program").bases("Node").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray).field("interpreter",i(n("InterpreterDirective"),null),r.null);function o(l=String,p){return["extra",{rawValue:l,raw:String},function(){let h=t.getFieldValue(this,"value");return{rawValue:h,raw:p?p(h):String(h)}}]}n("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>JSON.stringify(l))),n("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",i(String,null),r.null).field(...o(Number)),n("BigIntLiteral").bases("Literal").build("value").field("value",i(String,Number)).field(...o(String,l=>l+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>l+"m")),n("NullLiteral").bases("Literal").build().field("value",null,r.null),n("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),n("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,s),l=>`/${l.pattern}/${l.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=i(n("Property"),n("ObjectMethod"),n("ObjectProperty"),n("SpreadProperty"),n("SpreadElement"));n("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),n("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",i("method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("computed",Boolean,r.false).field("generator",Boolean,r.false).field("async",Boolean,r.false).field("accessibility",i(n("Literal"),null),r.null).field("decorators",i([n("Decorator")],null),r.null),n("ObjectProperty").bases("Node").build("key","value").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("accessibility",i(n("Literal"),null),r.null).field("computed",Boolean,r.false);var c=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("ClassAccessorProperty"),n("StaticBlock"));n("ClassBody").bases("Declaration").build("body").field("body",[c]),n("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",i(n("Literal"),n("Identifier"),n("Expression"))),n("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",n("PrivateName")),n("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",i(n("Literal"),n("Identifier"),n("PrivateName"),n("Expression"))).field("value",i(n("Expression"),null),r.null),["ClassMethod","ClassPrivateMethod"].forEach(l=>{n(l).field("kind",i("get","set","method","constructor"),()=>"method").field("body",n("BlockStatement")).field("access",i("public","private","protected",null),r.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(l=>{n(l).field("computed",Boolean,r.false).field("static",Boolean,r.false).field("abstract",Boolean,r.false).field("accessibility",i("public","private","protected",null),r.null).field("decorators",i([n("Decorator")],null),r.null).field("definite",Boolean,r.false).field("optional",Boolean,r.false).field("override",Boolean,r.false).field("readonly",Boolean,r.false)});var u=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",i([n("Decorator")],null),r.null),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("RestProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("Import").bases("Expression").build()}tt(()=>module);function hY(e){let r=e.use(Ft).Type.def;e.use(T_),e.use(S_),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}tt(()=>module);function gY(e){e.use(T_),e.use(w_);var t=e.use(Ft),r=t.namedTypes,n=t.Type.def,i=t.Type.or,s=e.use(cn).defaults,o=t.Type.from(function(l,p){return!!(r.StringLiteral&&r.StringLiteral.check(l,p)||r.Literal&&r.Literal.check(l,p)&&typeof l.value=="string")},"StringLiteral");n("TSType").bases("Node");var a=i(n("Identifier"),n("TSQualifiedName"));n("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),n("TSHasOptionalTypeParameterInstantiation").field("typeParameters",i(n("TSTypeParameterInstantiation"),null),s.null),n("TSHasOptionalTypeParameters").field("typeParameters",i(n("TSTypeParameterDeclaration"),null,void 0),s.null),n("TSHasOptionalTypeAnnotation").field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null),n("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),n("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",n("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(l=>{n(l).bases("TSType").build()}),n("TSArrayType").bases("TSType").build("elementType").field("elementType",n("TSType")),n("TSLiteralType").bases("TSType").build("literal").field("literal",i(n("NumericLiteral"),n("StringLiteral"),n("BooleanLiteral"),n("TemplateLiteral"),n("UnaryExpression"),n("BigIntLiteral"))),n("TemplateLiteral").field("expressions",i([n("Expression")],[n("TSType")])),["TSUnionType","TSIntersectionType"].forEach(l=>{n(l).bases("TSType").build("types").field("types",[n("TSType")])}),n("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",n("TSType")).field("extendsType",n("TSType")).field("trueType",n("TSType")).field("falseType",n("TSType")),n("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",n("TSTypeParameter")),n("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType"));var c=[i(n("Identifier"),n("RestElement"),n("ArrayPattern"),n("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(l=>{n(l).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",c)}),n("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,s.false).field("async",Boolean,s.false).field("generator",Boolean,s.false).field("id",i(n("Identifier"),null),s.null).field("params",[n("Pattern")]).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,s.false).field("generator",Boolean,s.false).field("params",[n("Pattern")]).field("abstract",Boolean,s.false).field("accessibility",i("public","private","protected",void 0),s.undefined).field("static",Boolean,s.false).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("key",i(n("Identifier"),n("StringLiteral"),n("NumericLiteral"),n("Expression"))).field("kind",i("get","set","method","constructor"),function(){return"method"}).field("access",i("public","private","protected",void 0),s.undefined).field("decorators",i([n("Decorator")],null),s.null).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",i(Boolean,"+","-"),s.false).field("typeParameter",n("TSTypeParameter")).field("optional",i(Boolean,"+","-"),s.false).field("typeAnnotation",i(n("TSType"),null),s.null),n("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i(n("TSType"),n("TSNamedTupleMember"))]),n("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",n("Identifier")).field("optional",Boolean,s.false).field("elementType",n("TSType")),n("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",n("TSType")).field("indexType",n("TSType")),n("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",n("TSType")),n("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i(n("TSType"),n("TSTypeAnnotation"))),n("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[n("Identifier")]).field("readonly",Boolean,s.false),n("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",n("Expression")).field("computed",Boolean,s.false).field("readonly",Boolean,s.false).field("optional",Boolean,s.false).field("initializer",i(n("Expression"),null),s.null),n("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",n("Expression")).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("parameters",c),n("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",i(n("Identifier"),n("TSThisType"))).field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null).field("asserts",Boolean,s.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(l=>{n(l).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",c)}),n("TSEnumMember").bases("Node").build("id","initializer").field("id",i(n("Identifier"),o)).field("initializer",i(n("Expression"),null),s.null),n("TSTypeQuery").bases("TSType").build("exprName").field("exprName",i(a,n("TSImportType")));var u=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[u]),n("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",i(n("Identifier"),String)).field("constraint",i(n("TSType"),void 0),s.undefined).field("default",i(n("TSType"),void 0),s.undefined),n("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",n("TSType")).field("expression",n("Expression")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[n("TSTypeParameter")]),n("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",n("Expression")),n("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[n("TSType")]),n("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",n("Identifier")).field("const",Boolean,s.false).field("declare",Boolean,s.false).field("members",[n("TSEnumMember")]).field("initializer",i(n("Expression"),null),s.null),n("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",n("Identifier")).field("declare",Boolean,s.false).field("typeAnnotation",n("TSType")),n("TSModuleBlock").bases("Node").build("body").field("body",[n("Statement")]),n("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",i(o,a)).field("declare",Boolean,s.false).field("global",Boolean,s.false).field("body",i(n("TSModuleBlock"),n("TSModuleDeclaration"),null),s.null),n("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",i(a,void 0),s.undefined),n("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",n("Identifier")).field("isExport",Boolean,s.false).field("moduleReference",i(a,n("TSExternalModuleReference"))),n("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),n("TSExportAssignment").bases("Statement").build("expression").field("expression",n("Expression")),n("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",n("Identifier")),n("TSInterfaceBody").bases("Node").build("body").field("body",[u]),n("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),n("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,s.false).field("extends",i([n("TSExpressionWithTypeArguments")],null),s.null).field("body",n("TSInterfaceBody")),n("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",i("public","private","protected",void 0),s.undefined).field("readonly",Boolean,s.false).field("parameter",i(n("Identifier"),n("AssignmentPattern"))),n("ClassProperty").field("access",i("public","private","protected",void 0),s.undefined),n("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),n("ClassBody").field("body",[i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassAccessorProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("StaticBlock"),n("TSDeclareMethod"),u)])}tt(()=>module);var Yn;Yn||(Yn={});var{astNodesAreEquivalent:y_e,builders:sc,builtInTypes:Jn,defineMethod:b_e,eachField:x_e,finalize:v_e,getBuilderName:D_e,getFieldNames:yY,getFieldValue:ts,getSupertypeNames:C_e,namedTypes:bY,NodePath:xY,Path:E_e,PathVisitor:w_e,someField:vY,Type:S_e,use:T_e,visit:A_e}=tY([gl,fY,S_,mY,hY,gY]);Object.assign(Yn,bY);var xf=Yn,n_=Rf.default.SourceMapConsumer,DY=Rf.default.SourceMapGenerator,A_=Object.prototype.hasOwnProperty;function CY(){return`
|
|
1186
1186
|
`}function i_(e,t,r){return e&&A_.call(e,t)?e[t]:r}function EY(...e){let t={},r=e.length;for(let n=0;n<r;++n){let i=Object.keys(e[n]),s=i.length;for(let o=0;o<s;++o)t[i[o]]=!0}return t}function je(e,t){return e.line-t.line||e.column-t.column}function Ls(e){return{line:e.line,column:e.column}}function wY(e,t){if(e){if(!t)return e}else return t||null;let r=new n_(e),n=new n_(t),i=new DY({file:t.file,sourceRoot:t.sourceRoot}),s={};return n.eachMapping(function(o){let a=r.originalPositionFor({line:o.originalLine,column:o.originalColumn}),c=a.source;if(c===null)return;i.addMapping({source:c,original:Ls(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let u=r.sourceContentFor(c);u&&!A_.call(s,c)&&(s[c]=u,i.setSourceContent(c,u))}),i.toJSON()}function P_(e,t){if(!e.loc)return null;let r={start:e.loc.start,end:e.loc.end};function n(i){fx(r,i.loc)}return e.declaration&&e.declaration.decorators&&Of(e)&&e.declaration.decorators.forEach(n),je(r.start,r.end)<0&&(r.start=Ls(r.start),t.skipSpaces(r.start,!1,!0),je(r.start,r.end)<0&&(r.end=Ls(r.end),t.skipSpaces(r.end,!0,!0))),e.comments&&e.comments.forEach(n),r}function fx(e,t){e&&t&&(je(t.start,e.start)<0&&(e.start=t.start),je(e.end,t.end)<0&&(e.end=t.end))}function Ex(e,t){let r=e.loc;if(r&&(r.start.line<1&&(r.start.line=1),r.end.line<1&&(r.end.line=1)),e.type==="File"&&(r.start=t.firstPos(),r.end=t.lastPos()),SY(e,t),TY(e,t),r&&e.decorators)e.decorators.forEach(function(n){fx(r,n.loc)});else if(e.declaration&&Of(e)){e.declaration.loc=null;let n=e.declaration.decorators;n&&n.forEach(function(i){fx(r,i.loc)})}else if(xf.MethodDefinition&&xf.MethodDefinition.check(e)||xf.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,xf.FunctionExpression.check(e.value)&&(e.value.id=null);else if(e.type==="ObjectTypeProperty"){let n=e.loc,i=n&&n.end;i&&(i=Ls(i),t.prevPos(i)&&t.charAt(i)===","&&(i=t.skipSpaces(i,!0,!0))&&(n.end=i))}}function SY(e,t){if(e.type!=="ForStatement")return;function r(n){let i=n&&n.loc,s=i&&i.start,o=i&&Ls(i.end);for(;s&&o&&je(s,o)<0&&(t.prevPos(o),t.charAt(o)===";");)i.end.line=o.line,i.end.column=o.column}r(e.init),r(e.test),r(e.update)}function TY(e,t){if(e.type==="TemplateLiteral"&&e.quasis.length!==0){if(e.loc){let r=Ls(e.loc.start),n=e.quasis[0];je(n.loc.start,r)<0&&(n.loc.start=r);let i=Ls(e.loc.end),s=e.quasis[e.quasis.length-1];je(i,s.loc.end)<0&&(s.loc.end=i)}e.expressions.forEach(function(r,n){let i=t.skipSpaces(r.loc.start,!0,!1);if(t.prevPos(i)&&t.charAt(i)==="{"&&t.prevPos(i)&&t.charAt(i)==="$"){let o=e.quasis[n];je(i,o.loc.end)<0&&(o.loc.end=i)}let s=t.skipSpaces(r.loc.end,!1,!1);if(t.charAt(s)==="}"){let o=e.quasis[n+1];je(o.loc.start,s)<0&&(o.loc.start=s)}})}}function Of(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function F_(e){let t=e.getParentNode();return e.getName()==="declaration"&&Of(t)?t:null}function pl(e,t){let r=e.trailingComma;return typeof r=="object"?!!r[t]:!!r}var mx={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:CY(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},AY=mx.hasOwnProperty;function Bf(e){let t=e||mx;function r(n){return AY.call(t,n)?t[n]:mx[n]}return{tabWidth:+r("tabWidth"),useTabs:!!r("useTabs"),reuseWhitespace:!!r("reuseWhitespace"),lineTerminator:r("lineTerminator"),wrapColumn:Math.max(r("wrapColumn"),0),sourceFileName:r("sourceFileName"),sourceMapName:r("sourceMapName"),sourceRoot:r("sourceRoot"),inputSourceMap:r("inputSourceMap"),parser:r("esprima")||r("parser"),range:r("range"),tolerant:r("tolerant"),quote:r("quote"),trailingComma:r("trailingComma"),arrayBracketSpacing:r("arrayBracketSpacing"),objectCurlySpacing:r("objectCurlySpacing"),arrowParensAlways:r("arrowParensAlways"),flowObjectCommas:r("flowObjectCommas"),tokens:!!r("tokens")}}var hx=class e{constructor(t,r,n=r){this.sourceLines=t,this.sourceLoc=r,this.targetLoc=n}slice(t,r,n=t.lastPos()){let i=this.sourceLines,s=this.sourceLoc,o=this.targetLoc;function a(c){let u=s[c],l=o[c],p=r;return c==="end"&&(p=n),PY(i,u,t,l,p)}if(je(r,o.start)<=0)if(je(o.end,n)<=0)o={start:Bs(o.start,r.line,r.column),end:Bs(o.end,r.line,r.column)};else{if(je(n,o.start)<=0)return null;s={start:s.start,end:a("end")},o={start:Bs(o.start,r.line,r.column),end:Bs(n,r.line,r.column)}}else{if(je(o.end,r)<=0)return null;je(o.end,n)<=0?(s={start:a("start"),end:s.end},o={start:{line:1,column:0},end:Bs(o.end,r.line,r.column)}):(s={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:Bs(n,r.line,r.column)})}return new e(this.sourceLines,s,o)}add(t,r){return new e(this.sourceLines,this.sourceLoc,{start:s_(this.targetLoc.start,t,r),end:s_(this.targetLoc.end,t,r)})}subtract(t,r){return new e(this.sourceLines,this.sourceLoc,{start:Bs(this.targetLoc.start,t,r),end:Bs(this.targetLoc.end,t,r)})}indent(t,r=!1,n=!1){if(t===0)return this;let i=this.targetLoc,s=i.start.line,o=i.end.line;if(r&&s===1&&o===1)return this;if(i={start:i.start,end:i.end},!r||s>1){let a=i.start.column+t;i.start={line:s,column:n?Math.max(0,a):a}}if(!r||o>1){let a=i.end.column+t;i.end={line:o,column:n?Math.max(0,a):a}}return new e(this.sourceLines,this.sourceLoc,i)}};function s_(e,t,r){return{line:e.line+t-1,column:e.line===1?e.column+r:e.column}}function Bs(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function PY(e,t,r,n,i){let s=je(n,i);if(s===0)return t;let o,a;if(s<0){o=e.skipSpaces(t)||e.lastPos(),a=r.skipSpaces(n)||r.lastPos();let c=i.line-a.line;for(o.line+=c,a.line+=c,c>0&&(o.column=0,a.column=0);je(a,i)<0&&r.nextPos(a,!0););}else{o=e.skipSpaces(t,!0)||e.firstPos(),a=r.skipSpaces(n,!0)||r.firstPos();let c=i.line-a.line;for(o.line+=c,a.line+=c,c<0&&(o.column=e.getLineLength(o.line),a.column=r.getLineLength(a.line));je(i,a)<0&&r.prevPos(a,!0););}return o}var FY=Object.defineProperty,_Y=(e,t,r)=>t in e?FY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,il=(e,t,r)=>(_Y(e,typeof t!="symbol"?t+"":t,r),r),nc=class e{constructor(t,r=null){this.infos=t,il(this,"length"),il(this,"name"),il(this,"mappings",[]),il(this,"cachedSourceMap",null),il(this,"cachedTabWidth"),this.length=t.length,this.name=r||null,this.name&&this.mappings.push(new hx(this,{start:this.firstPos(),end:this.lastPos()}))}toString(t){return this.sliceString(this.firstPos(),this.lastPos(),t)}getSourceMap(t,r){if(!t)return null;let n=this;function i(a){return a=a||{},a.file=t,r&&(a.sourceRoot=r),a}if(n.cachedSourceMap)return i(n.cachedSourceMap.toJSON());let s=new Rf.default.SourceMapGenerator(i()),o={};return n.mappings.forEach(function(a){let c=a.sourceLines.skipSpaces(a.sourceLoc.start)||a.sourceLines.lastPos(),u=n.skipSpaces(a.targetLoc.start)||n.lastPos();for(;je(c,a.sourceLoc.end)<0&&je(u,a.targetLoc.end)<0;){a.sourceLines.charAt(c),n.charAt(u);let l=a.sourceLines.name;if(s.addMapping({source:l,original:{line:c.line,column:c.column},generated:{line:u.line,column:u.column}}),!gx.call(o,l)){let p=a.sourceLines.toString();s.setSourceContent(l,p),o[l]=p}n.nextPos(u,!0),a.sourceLines.nextPos(c,!0)}}),n.cachedSourceMap=s,s.toJSON()}bootstrapCharAt(t){let r=t.line,n=t.column,i=this.toString().split(yx),s=i[r-1];return typeof s>"u"?"":n===s.length&&r<i.length?`
|
|
1187
1187
|
`:n>=s.length?"":s.charAt(n)}charAt(t){let r=t.line,n=t.column,i=this,s=i.infos,o=s[r-1],a=n;if(typeof o>"u"||a<0)return"";let c=this.getIndentAt(r);return a<c?" ":(a+=o.sliceStart-c,a===o.sliceEnd&&r<this.length?`
|
|
1188
1188
|
`:a>=o.sliceEnd?"":o.line.charAt(a))}stripMargin(t,r){if(t===0)return this;if(r&&this.length===1)return this;let n=new e(this.infos.map(function(i,s){return i.line&&(s>0||!r)&&(i={...i,indent:Math.max(0,i.indent-t)}),i}));if(this.mappings.length>0){let i=n.mappings;this.mappings.forEach(function(s){i.push(s.indent(t,r,!0))})}return n}indent(t){if(t===0)return this;let r=new e(this.infos.map(function(n){return n.line&&!n.locked&&(n={...n,indent:n.indent+t}),n}));if(this.mappings.length>0){let n=r.mappings;this.mappings.forEach(function(i){n.push(i.indent(t))})}return r}indentTail(t){if(t===0)return this;if(this.length<2)return this;let r=new e(this.infos.map(function(n,i){return i>0&&n.line&&!n.locked&&(n={...n,indent:n.indent+t}),n}));if(this.mappings.length>0){let n=r.mappings;this.mappings.forEach(function(i){n.push(i.indent(t,!0))})}return r}lockIndentTail(){return this.length<2?this:new e(this.infos.map((t,r)=>({...t,locked:r>0})))}getIndentAt(t){return Math.max(this.infos[t-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let t=[],r=0;for(let s=1,o=this.length;s<=o;++s){let a=this.infos[s-1],c=a.line.slice(a.sliceStart,a.sliceEnd);if(Za(c))continue;let u=Math.abs(a.indent-r);t[u]=~~t[u]+1,r=a.indent}let n=-1,i=2;for(let s=1;s<t.length;s+=1)gx.call(t,s)&&t[s]>n&&(n=t[s],i=s);return this.cachedTabWidth=i}startsWithComment(){if(this.infos.length===0)return!1;let t=this.infos[0],r=t.sliceStart,n=t.sliceEnd,i=t.line.slice(r,n).trim();return i.length===0||i.slice(0,2)==="//"||i.slice(0,2)==="/*"}isOnlyWhitespace(){return Za(this.toString())}isPrecededOnlyByWhitespace(t){let r=this.infos[t.line-1],n=Math.max(r.indent,0),i=t.column-n;if(i<=0)return!0;let s=r.sliceStart,o=Math.min(s+i,r.sliceEnd),a=r.line.slice(s,o);return Za(a)}getLineLength(t){let r=this.infos[t-1];return this.getIndentAt(t)+r.sliceEnd-r.sliceStart}nextPos(t,r=!1){let n=Math.max(t.line,0);return Math.max(t.column,0)<this.getLineLength(n)?(t.column+=1,r?!!this.skipSpaces(t,!1,!0):!0):n<this.length?(t.line+=1,t.column=0,r?!!this.skipSpaces(t,!1,!0):!0):!1}prevPos(t,r=!1){let n=t.line,i=t.column;if(i<1){if(n-=1,n<1)return!1;i=this.getLineLength(n)}else i=Math.min(i-1,this.getLineLength(n));return t.line=n,t.column=i,r?!!this.skipSpaces(t,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(t,r=!1,n=!1){if(t?t=n?t:{line:t.line,column:t.column}:r?t=this.lastPos():t=this.firstPos(),r){for(;this.prevPos(t);)if(!Za(this.charAt(t))&&this.nextPos(t))return t;return null}else{for(;Za(this.charAt(t));)if(!this.nextPos(t))return null;return t}}trimLeft(){let t=this.skipSpaces(this.firstPos(),!1,!0);return t?this.slice(t):No}trimRight(){let t=this.skipSpaces(this.lastPos(),!0,!0);return t?this.slice(this.firstPos(),t):No}trim(){let t=this.skipSpaces(this.firstPos(),!1,!0);if(t===null)return No;let r=this.skipSpaces(this.lastPos(),!0,!0);return r===null?No:this.slice(t,r)}eachPos(t,r=this.firstPos(),n=!1){let i=this.firstPos();if(r&&(i.line=r.line,i.column=r.column),!(n&&!this.skipSpaces(i,!1,!0)))do t.call(this,i);while(this.nextPos(i,n))}bootstrapSlice(t,r){let n=this.toString().split(yx).slice(t.line-1,r.line);return n.length>0&&(n.push(n.pop().slice(0,r.column)),n[0]=n[0].slice(t.column)),j(n.join(`
|
|
@@ -1315,7 +1315,7 @@ Restarting server after Builder Devtools update...
|
|
|
1315
1315
|
<h3>How's Devtools working for you?</h3>
|
|
1316
1316
|
<p>We'd love your feedback!</p>
|
|
1317
1317
|
</div>
|
|
1318
|
-
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.9.21"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1318
|
+
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.9.23"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1319
1319
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
1320
1320
|
<aside>
|
|
1321
1321
|
<div class="logo"></div>
|
|
@@ -1354,7 +1354,7 @@ Restarting server after Builder Devtools update...
|
|
|
1354
1354
|
</nav>
|
|
1355
1355
|
</section>
|
|
1356
1356
|
</main>
|
|
1357
|
-
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.9.
|
|
1357
|
+
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.9.23"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.9.23"),mo());})();`)}async function pR(e){return dR(e,`<!doctype html>
|
|
1358
1358
|
<html lang="en" dir="ltr">
|
|
1359
1359
|
<head>
|
|
1360
1360
|
<meta charset="utf-8" />
|
|
@@ -1764,7 +1764,7 @@ Use ${(0,U.cyan)(`npx ${fr()} figma help <command>`)} for detailed help about a
|
|
|
1764
1764
|
}
|
|
1765
1765
|
}, 500);
|
|
1766
1766
|
|
|
1767
|
-
</script>`;o.end(p)}catch{o.headersSent||(o.statusCode=500,o.end("Error processing response"))}})}catch{o.headersSent||(o.statusCode=500,o.end("Error handling proxy response"))}},onError:(i,s,o)=>{}}};f();function _c(e){let t=e.filter(i=>i!==void 0);if(typeof AbortSignal.any=="function")return AbortSignal.any(t);let r=new AbortController,n=()=>r.abort();for(let i of t){if(i.aborted){r.abort();break}i.addEventListener("abort",n,{once:!0})}return r.signal.addEventListener("abort",()=>{for(let i of t)i.removeEventListener("abort",n)}),r.signal}async function b8(e,t,r){let n=new dn(500),i=new dn(500),s=new dn(500),o=new dn(1e3),a=new URL(t.serverUrl||"http://localhost:80"),c,u={},l="stopped",p="stopped",d=r,h=[],m=new g8.default,g,y,b=t.devCommand,v=t.setupCommand,C=new AbortController;function x(){h.push({all:new dn(
|
|
1767
|
+
</script>`;o.end(p)}catch{o.headersSent||(o.statusCode=500,o.end("Error processing response"))}})}catch{o.headersSent||(o.statusCode=500,o.end("Error handling proxy response"))}},onError:(i,s,o)=>{}}};f();function _c(e){let t=e.filter(i=>i!==void 0);if(typeof AbortSignal.any=="function")return AbortSignal.any(t);let r=new AbortController,n=()=>r.abort();for(let i of t){if(i.aborted){r.abort();break}i.addEventListener("abort",n,{once:!0})}return r.signal.addEventListener("abort",()=>{for(let i of t)i.removeEventListener("abort",n)}),r.signal}async function b8(e,t,r){let n=new dn(500),i=new dn(500),s=new dn(500),o=new dn(1e3),a=new URL(t.serverUrl||"http://localhost:80"),c,u={},l="stopped",p="stopped",d=r,h=[],m=new g8.default,g,y,b=t.devCommand,v=t.setupCommand,C=new AbortController;function x(){h.push({all:new dn(300),out:new dn(300),err:new dn(300)})}async function D(k=5e3,$=2e3){return new Promise(R=>{if(l!=="running"&&l!=="starting")return R();let L,K=se=>{L&&clearTimeout(L),L=setTimeout(()=>{ce(),R()},se)},W=()=>K($),ce=()=>{m.off("stdout",W),m.off("stderr",W),L&&clearTimeout(L)};m.on("stdout",W),m.on("stderr",W),K(k)})}let E,S=async()=>c?.pid?Qne(c.pid):[],P=()=>{E=Km(a.href,e)};function I(k){l!==k&&(l=k,l!=="running"&&T("stopped"),m.emit("devState",l))}function A(k){d!==k&&(d=k,m.emit("setupState",d),d!=="installed"&&T("stopped"),d==="installed"&&N())}function T(k){p!==k&&(p=k,m.emit("httpServerState",p))}async function G(){let k=0;for(;C;){C=new AbortController;let $=setTimeout(()=>{C?.abort()},15e3);await Promise.allSettled([V(C.signal).then(R=>{l!=="running"||d!=="installed"?T("stopped"):R==="error-5xx"||R==="error-fetch"?(k++,k>2&&T(R)):(k=0,T(R))}),new Promise(R=>{setTimeout(()=>{R()},2e3),C?.signal.addEventListener("abort",()=>{R()})})]),clearTimeout($)}}async function V(k){try{if(l!=="running")return"stopped";if(p==="stopped")return"connecting";let $=await fetch(a.href,{method:"GET",signal:k,keepalive:!1,headers:{connection:"close"}});if($.status<400)return"ok-2xx";if($.status<500)return"error-4xx";if($.status<600)return"error-5xx"}catch($){return $ instanceof Error&&$.name==="AbortError"?"connecting":"error-fetch"}return"connecting"}function Y(){return l==="running"||l==="starting"?"running":d==="installed"?l:d}function F(k){if(!y){let $=v;if(!$)return A("installed"),Promise.resolve({code:0,output:""});g&&g.abort(),A("installing"),y=new Promise(R=>{g=new AbortController,n.clear();let L=process.env.SHELL||process.env.COMSPEC||"/bin/sh";c=(0,R0.spawn)(L,[...ql($,L)],{stdio:["ignore","pipe","pipe"],cwd:t.bashWorkingDirectory??t.workingDirectory,env:{...process.env,NO_COLOR:"1",FORCE_COLOR:"0",NPM_CONFIG_PROGRESS:"false",TERM:"dumb",CI:"true",...u}}),_c([k,g.signal]).addEventListener("abort",()=>{Wo(e,c).then(()=>{d==="installing"&&A("install-aborted"),R({code:null,output:n.getContent()})})}),c.on("error",W=>{A("install-failed"),R({code:null,output:n.getContent()})}),c.stdout.on("data",W=>{let ce=W.toString();n.write(ce),m.emit("installStdout",ce)}),c.stderr.on("data",W=>{let ce=W.toString();n.write(ce),m.emit("installStderr",ce)}),c.on("close",W=>{A(W===0?"installed":"install-failed"),R({code:W,output:n.getContent()})})}).then(R=>(g=void 0,y=void 0,R))}return y}async function N(k){if(Y()==="stopped"||Y()==="failed")try{return await M(k),!0}catch{return!1}return!1}async function M(k){if(await Wo(e,c,k),!b){I("unset");return}if(C?.abort(),I("stopped"),!k?.aborted)return new Promise($=>{k?.aborted&&$(),k?.addEventListener("abort",()=>{$()});let R=process.env.SHELL||process.env.COMSPEC||"/bin/sh";c=(0,R0.spawn)(R,[...ql(b??"",R)],{stdio:["ignore","pipe","pipe"],cwd:t.bashWorkingDirectory??t.workingDirectory,env:{...process.env,NO_COLOR:"1",FORCE_COLOR:"0",NPM_CONFIG_PROGRESS:"false",TERM:"dumb",CI:"true",...u}}),x(),c.on("spawn",()=>{I("starting"),D().then(()=>{I("running"),C?.abort(),$()})}),c.on("error",L=>{I("failed"),e.Sentry?.captureException(L),$()}),c.on("close",L=>{I(L===0?"stopped":"failed"),m.emit("close",L)}),c.stdout.on("data",L=>{let K=L.toString();i.write(K),o.write(K);let W=h[h.length-1];W&&(W.out.write(K),W.all.write(K)),m.emit("stdout",K)}),c.stderr.on("data",L=>{let K=L.toString();s.write(K),o.write(K);let W=h[h.length-1];W&&(W.err.write(K),W.all.write(K)),m.emit("stderr",K)})})}return P(),G(),d==="installed"&&M(),{clearEnvVariables(){u={}},setEnvVariable(k,$){$===void 0?delete u[k]:u[k]=$},async setSetupCommand(k,$,R){return v===k&&!$?null:(v=k,await F(R))},async runSetupCommand(k){return await F(k)},async ensureSetupCommand(k){return(d==="install-failed"||d==="not-installed"||d==="installing")&&await F(k),d==="installed"},get setupCommandPromise(){return y},abortSetupCommand(){g?.abort()},async setDevCommand(k,$){return b===k?!1:(b=k,d==="installed"&&await M($),!0)},getOpenPorts:S,async setProxyServer(k){return a.href===k?!1:(a.href=k,P(),C?.abort(),!0)},async setPort(k){return Number(a.port)===k?!1:(a.port=k.toString(),P(),C?.abort(),!0)},pingServer(k){return fetch(a.href,{signal:k})},ensureDevCommand:N,onClose(k){m.on("close",k)},addCheckpoint:x,emitter:m,getCheckpoints(k,$){return h.slice(-k).map(R=>$==="all"?R.all.getContent():$==="out"?R.out.getContent():$==="err"?R.err.getContent():"").join(`
|
|
1768
1768
|
`)},getAllStdout(){return i.getContent()},getAllStderr(){return s.getContent()},getOutput(){return o.getContent()},getSetupOutput(){return n.getContent()},async waitUntilIdle(k,$){return D(k,$)},async restart(k){return M(k)},get httpServerState(){return p},get devCommand(){return b??""},get proxyTarget(){return a.href},get envVars(){return u},get proxyPort(){return Number(a.port)},get proxyMiddleware(){return E},get setupCommand(){return v},get setupState(){return d},get devState(){return l},get state(){return Y()},get pid(){return c?.pid},async close(){try{C?.abort(),g?.abort(),C=void 0,y=void 0,g=void 0,v=void 0,m.removeAllListeners(),await Wo(e,c),n.clear(),n.clear(),h=[],i.clear(),s.clear(),o.clear(),c=void 0}catch(k){e.Sentry?.captureException(k)}}}}var Qne=e=>{try{let t=(0,y8.execSync)(`parent=${e}
|
|
1769
1769
|
pids=$(ps -e -o pid=,ppid= |
|
|
1770
1770
|
awk -v root=$parent '
|
|
@@ -1799,7 +1799,7 @@ ${t}`.toLowerCase();return r.some(i=>i.test(n))};async function C8({sys:e,creden
|
|
|
1799
1799
|
`)}if(t.length>5e4&&!r){let n=t.split(`
|
|
1800
1800
|
`);throw new Error(`The file content of ${e} is too large to view (${n.length} lines).
|
|
1801
1801
|
Provide a viewRange to view a specific part of the file.
|
|
1802
|
-
The "grep_search" tool can be used to find the relevant part lines of a file.`)}return t}function k8(e,t){if(e!=null)return t?e.replace(new RegExp(`\\B${t}/\\b`,"g"),""):e}function N8(e,t){if(!e||!t||t.length===0)return e;let r=e;for(let n of t)if(n&&n.trim()){let i=n.replace(/[.*+?^${}()|[\]\\]/gi,"\\$&");r=r.replace(new RegExp(i,"g"),"******")}return r}var O8=q(require("@sentry/node"),1);async function B8(e,t,r,n){let i=[],s=o=>{let a=o instanceof Promise?o:Promise.resolve(o);i.push(a),a.then(c=>{n({type:"tool_result",result:c})}).catch(c=>{O8.captureException(new Error("Unhandled tool call error",{cause:c}))})};for(let o of t){let a=_c([o.abortController.signal,e.signal]),c=r?.find(u=>u.tool_use_id===o.id);if(c){i.push(c);continue}if(a.aborted)s({type:"tool_result",tool_use_id:o.id,tool_name:o.name,tool_input:JSON.stringify(o.input),content:"Aborted by the user. So the task could not be completed.",is_error:!0,title:"Aborted by the user."});else try{let u=await sie(o,{...e,signal:a});s(typeof u=="function"?u().then(l=>R8(o,l)):R8(o,u))}catch(u){s({type:"tool_result",tool_name:o.name,tool_input:JSON.stringify(o.input),tool_use_id:o.id,content:u instanceof Error?u.message:"Unknown error",is_error:!0,title:`Error calling tool "${o.name}"`})}}return Promise.all(i)}function R8(e,t){return{type:"tool_result",tool_use_id:e.id,tool_name:e.name,tool_input:JSON.stringify(e.input),content:t.toolResult,is_error:t.isError,title:t.title}}function sie(e,t){switch(e.name){case"view_path":return cie(t,e.input);case"Read":return uie(t,e.input);case"LS":return lie(t,e.input);case"glob_search":case"Glob":return pie(t,e.input);case"grep_search":case"Grep":return fie(t,e.input);case"dev_server_control":case"DevServerControl":return aie(t,e.input);case"bash":case"Bash":return gie(t,e.input,e.id);case"Agent":return yie(t,e.input,e.id);case"Revert":return oie(t,e.input);default:throw new Error("Unknown tool call. Do not use this tool anymore.")}}async function oie(e,{checkpoint_id:t}){if(!t)return{isError:!0,toolResult:"No checkpoint_id provided",title:"Revert failed"};let r=await e.restore({location:"before",predicate:n=>n?.completionId.startsWith(t)??!1,revert:!0,dryRun:!1,forceReplay:!1});return r.undone?{isError:!1,toolResult:`Reverted to checkpoint ${t} successfully`,title:"Reverted to checkpoint"}:{isError:!0,toolResult:`Failed to revert to checkpoint ${t}. ${r.message}`,title:"Revert failed"}}async function aie(e,{restart:t,get_logs:r,set_proxy_port:n,set_dev_command:i,set_and_run_setup_command:s,set_env_variable:o}){if(!e.devServerOrchestrator)return{isError:!0,toolResult:"Seems like the 'DevServerControl' tool is not available. Please suggest the user to either restore or try to fix the issue themself.",title:"Getting debug output"};let a=!1,c="";if(o){let[u,l]=o;return e.devServerOrchestrator.setEnvVariable(u,l),e.patchFusionConfig({envVariables:{[u]:l}}),{isError:!1,toolResult:`Environment variable "${o[0]}" was set to "${o[1]}", if this environment variable is expected to be used by the dev server, a restart is required.`,title:"Environment variable set"}}if(s){let u=await e.devServerOrchestrator.setSetupCommand(s,!0,e.signal),l=u?.code!==0,p=u?.output??"Setup command was not updated";return l&&(p+=` exited with code ${u?.code}`),{isError:l,toolResult:p,title:"Setup command output"}}if(i&&await e.devServerOrchestrator.setDevCommand(i,e.signal)&&(e.patchFusionConfig({devCommand:i}),a=!0),e.devServerOrchestrator.state==="unset")return{isError:!0,title:"Dev server is not configured",toolResult:"Dev server process is unset, please call the tool again with a set_dev_command to provide a valid dev server command."};if(n){let u=e.devServerOrchestrator.proxyPort;await e.devServerOrchestrator.setPort(n),e.patchFusionConfig({serverUrl:e.devServerOrchestrator.proxyTarget}),c+=`Dev server proxy port was set to "${n}" successfully! (previous port: "${u}")
|
|
1802
|
+
The "grep_search" tool can be used to find the relevant part lines of a file.`)}return t}function k8(e,t){if(e!=null)return t?e.replace(new RegExp(`\\B${t}/\\b`,"g"),""):e}function N8(e,t){if(!e||!t||t.length===0)return e;let r=e;for(let n of t)if(n&&n.trim()){let i=n.replace(/[.*+?^${}()|[\]\\]/gi,"\\$&");r=r.replace(new RegExp(i,"g"),"******")}return r}var O8=q(require("@sentry/node"),1);async function B8(e,t,r,n){let i=[],s=o=>{let a=o instanceof Promise?o:Promise.resolve(o);i.push(a),a.then(c=>{n({type:"tool_result",result:c})}).catch(c=>{O8.captureException(new Error("Unhandled tool call error",{cause:c}))})};for(let o of t){let a=_c([o.abortController.signal,e.signal]),c=r?.find(u=>u.tool_use_id===o.id);if(c){i.push(c);continue}if(a.aborted)s({type:"tool_result",tool_use_id:o.id,tool_name:o.name,tool_input:JSON.stringify(o.input),content:"Aborted by the user. So the task could not be completed.",is_error:!0,title:"Aborted by the user."});else try{let u=await sie(o,{...e,signal:a});s(typeof u=="function"?u().then(l=>R8(o,l)):R8(o,u))}catch(u){s({type:"tool_result",tool_name:o.name,tool_input:JSON.stringify(o.input),tool_use_id:o.id,content:u instanceof Error?u.message:"Unknown error",is_error:!0,title:`Error calling tool "${o.name}"`})}}return Promise.all(i)}function R8(e,t){return{type:"tool_result",tool_use_id:e.id,tool_name:e.name,tool_input:JSON.stringify(e.input),content:t.toolResult,is_error:t.isError,title:t.title}}function sie(e,t){switch(e.name){case"view_path":return cie(t,e.input);case"Read":return uie(t,e.input);case"LS":return lie(t,e.input);case"glob_search":case"Glob":return pie(t,e.input);case"grep_search":case"Grep":return fie(t,e.input);case"dev_server_control":case"DevServerControl":return aie(t,e.input);case"bash":case"Bash":return gie(t,e.input,e.id);case"AskUser":return t.passThrough(e,t.signal);case"Agent":return yie(t,e.input,e.id);case"Revert":return oie(t,e.input);default:throw new Error("Unknown tool call. Do not use this tool anymore.")}}async function oie(e,{checkpoint_id:t}){if(!t)return{isError:!0,toolResult:"No checkpoint_id provided",title:"Revert failed"};let r=await e.restore({location:"before",predicate:n=>n?.completionId.startsWith(t)??!1,revert:!0,dryRun:!1,forceReplay:!1});return r.undone?{isError:!1,toolResult:`Reverted to checkpoint ${t} successfully`,title:"Reverted to checkpoint"}:{isError:!0,toolResult:`Failed to revert to checkpoint ${t}. ${r.message}`,title:"Revert failed"}}async function aie(e,{restart:t,get_logs:r,set_proxy_port:n,set_dev_command:i,set_and_run_setup_command:s,set_env_variable:o}){if(!e.devServerOrchestrator)return{isError:!0,toolResult:"Seems like the 'DevServerControl' tool is not available. Please suggest the user to either restore or try to fix the issue themself.",title:"Getting debug output"};let a=!1,c="";if(o){let[u,l]=o;return e.devServerOrchestrator.setEnvVariable(u,l),e.patchFusionConfig({envVariables:{[u]:l}}),{isError:!1,toolResult:`Environment variable "${o[0]}" was set to "${o[1]}", if this environment variable is expected to be used by the dev server, a restart is required.`,title:"Environment variable set"}}if(s){let u=await e.devServerOrchestrator.setSetupCommand(s,!0,e.signal),l=u?.code!==0,p=u?.output??"Setup command was not updated";return l&&(p+=` exited with code ${u?.code}`),{isError:l,toolResult:p,title:"Setup command output"}}if(i&&await e.devServerOrchestrator.setDevCommand(i,e.signal)&&(e.patchFusionConfig({devCommand:i}),a=!0),e.devServerOrchestrator.state==="unset")return{isError:!0,title:"Dev server is not configured",toolResult:"Dev server process is unset, please call the tool again with a set_dev_command to provide a valid dev server command."};if(n){let u=e.devServerOrchestrator.proxyPort;await e.devServerOrchestrator.setPort(n),e.patchFusionConfig({serverUrl:e.devServerOrchestrator.proxyTarget}),c+=`Dev server proxy port was set to "${n}" successfully! (previous port: "${u}")
|
|
1803
1803
|
`,c+=` - The new proxy target is: ${e.devServerOrchestrator.proxyTarget}
|
|
1804
1804
|
`}if(!a&&t&&(await e.devServerOrchestrator.restart(e.signal),a=!0),(a||n)&&e.emitter.emit("step",{type:"builder-action",action:"refresh",metadata:{}}),a){let u=await e.devServerOrchestrator.getOpenPorts();return i?c+=`Dev server command was set to "${i}"`:c+="Dev server restarted",e.devServerOrchestrator.state==="running"?(c+=" and running",u.length>0&&(c+=` (open http ports: ${u.join(", ")})`)):c+=" and failed",{isError:e.devServerOrchestrator.state!=="running",toolResult:`${c}
|
|
1805
1805
|
<initial_logs>
|
|
@@ -1808,7 +1808,7 @@ ${e.devServerOrchestrator.getCheckpoints(1,"all")}
|
|
|
1808
1808
|
|
|
1809
1809
|
existed with 1 code`:`Dev server currently not running
|
|
1810
1810
|
|
|
1811
|
-
existed with 1 code`,title:"Dev server logs"}}async function cie({readFile:e,stat:t,listDir:r,files:n},{file_path:i,view_range:s}){let o=`Read path "${i}"`;try{let a=await t(i);if(!a)throw new Error(`File or directory not found: ${i}`);if(a.isFile()){o=`Read file "${i}"`,s&&(o+=` (lines ${s[0]} to ${s[1]})`);let c=await e(i);if(c===null)throw new Error(`File not found: ${i}`);let u=I8(i,c,s);return n.push({filePath:i,content:c,importance:.1,wasIncluded:!0}),{isError:!1,toolResult:u,title:o}}else if(a.isDirectory()){o=`Listing directory "${i}"`;let c=await r(i);return{isError:!1,toolResult:L0({paths:c,maxFilesPerDir:400,maxDepth:2}),title:o}}else throw new Error("Unknown file type")}catch(a){return{isError:!0,toolResult:a instanceof Error?a.message:String(a),title:o}}}async function uie({listDir:e,readFile:t,stat:r,files:n},{file_path:i,offset:s=0,limit:o=
|
|
1811
|
+
existed with 1 code`,title:"Dev server logs"}}async function cie({readFile:e,stat:t,listDir:r,files:n},{file_path:i,view_range:s}){let o=`Read path "${i}"`;try{let a=await t(i);if(!a)throw new Error(`File or directory not found: ${i}`);if(a.isFile()){o=`Read file "${i}"`,s&&(o+=` (lines ${s[0]} to ${s[1]})`);let c=await e(i);if(c===null)throw new Error(`File not found: ${i}`);let u=I8(i,c,s);return n.push({filePath:i,content:c,importance:.1,wasIncluded:!0}),{isError:!1,toolResult:u,title:o}}else if(a.isDirectory()){o=`Listing directory "${i}"`;let c=await r(i);return{isError:!1,toolResult:L0({paths:c,maxFilesPerDir:400,maxDepth:2}),title:o}}else throw new Error("Unknown file type")}catch(a){return{isError:!0,toolResult:a instanceof Error?a.message:String(a),title:o}}}async function uie({listDir:e,readFile:t,stat:r,files:n},{file_path:i,offset:s=0,limit:o=1500}){let a=`Read file "${i}"`;(s>0||o!==1500)&&(a+=` (offset: ${s}, limit: ${o})`);try{let c=await r(i);if(!c)throw new Error(`File or directory not found: ${i}`);if(!c.isFile()){let p=await e(i);return{isError:!1,toolResult:L0({paths:p,maxFilesPerDir:400,maxDepth:2}),title:a}}let u=await t(i);if(u===null)throw new Error(`File not found: ${i}`);if(u.trim()==="")return{isError:!1,toolResult:"WARNING: File exists but has empty contents.",title:a};let l=_8(u,s,o);return n.push({filePath:i,content:u,importance:.1,wasIncluded:!0}),{isError:!1,toolResult:l,title:a}}catch(c){return{isError:!0,toolResult:c instanceof Error?c.message:String(c),title:a}}}async function lie({listDir:e,stat:t},{path:r}){if(!r)return{isError:!0,toolResult:"No path provided",title:"List directory"};let n=await t(r);if(!n)return{isError:!0,toolResult:`File or directory not found: ${r}`,title:"List directory"};if(!n.isDirectory())return{isError:!0,toolResult:`Path is not a directory: ${r}`,title:"List directory"};let i=await e(r);return i.length===0?{isError:!1,toolResult:"The directory is empty",title:"List directory"}:{isError:!1,toolResult:i.join(`
|
|
1812
1812
|
`),title:`Files in "${r}"`}}async function pie({getAllFiles:e},{pattern:t}){let r=await e({pattern:t});if(r.length>0){if(r.length>500){let n=r.length;r=r.slice(0,500),r.push(`... list truncated, too many matches (${n}). Please narrow down the search.`)}return{isError:!1,toolResult:r.join(`
|
|
1813
1813
|
`),title:`Files matching "${t}" across workspaces`}}else return{isError:!0,toolResult:`No files found matching glob pattern "${t}". Maybe use the "LS" tool to manually list all files`,title:"Glob search"}}async function L8(e,t,r,n,i){let s=await M8(e),o=["--path-separator","/","--json","--max-columns","200"];return n&&n.split(",").forEach(a=>{o.push("--glob",a)}),i&&i.split(",").forEach(a=>{o.push("--glob",`!${a}`)}),o.push("--",r),new Promise(a=>{let c=(0,Vm.spawn)(s,o,{env:process.env,cwd:t,stdio:["ignore","pipe","pipe"]}),u="";c.stdout.on("data",l=>{u+=l.toString()}),c.on("error",()=>{a({matches:[]})}),c.on("close",l=>{if(l!==0)a({matches:[]});else{let p=[],d=u.split(`
|
|
1814
1814
|
`);for(let h of d)if(h.trim()){let m=JSON.parse(h);m.type==="match"&&p.push({path:m.data.path.text,lineNumber:m.data.line_number,lineContent:m.data.lines.text})}a({matches:p})}})})}async function M8(e){let{rgPath:t}=await import("@vscode/ripgrep");return e.existsSync(t)?t:"rg"}var die=["!**/.git/**","!**/.hg/**","!**/.svn/**","!**/.DS_Store","!**/.idea/**","!**/.vscode/**","!**/.cache/**","!**/coverage/**","!**/node_modules/**","!**/dist/**","!**/build/**","!**/*.tsbuildinfo","!**/package-lock.json","!**/yarn.lock","!**/pnpm-lock.yaml","!**/*.min.js","!**/*.min.css","!**/*.bundle.js","!**/*.chunk.js","!**/builder-registry.*","!**/*.bundle.css","!**/*.map","!**/vendor/**","!**/target/**","!**/__pycache__/**","!**/*.pyc","!**/*.pyo","!**/*.class","!**/*.jar","!**/build/**/*.gradle","!**/*.lock","!**/*.log","!**/*.o","!**/*.a","!**/*.so","!**/*.dylib","!**/*.dll","!**/*.exe","!**/*.zip","!**/*.tar","!**/*.tar.gz","!**/*.tgz","!**/*.7z","!**/*.rar","!**/*.png","!**/*.jpg","!**/*.jpeg","!**/*.gif","!**/*.svg","!**/*.ico","!**/*.webp","!**/*.mp4","!**/*.mp3"];async function fie({signal:e,bashWorkingDirectory:t,sys:r,filterText:n},i){let s=await M8(r),o=["--path-separator","/","-A","1","-B","1","--max-columns","300","--heading","--line-number","-i"],a=t,c=`Grepping codebase with "${i.query}"`,u="";if(i.include_glob){u+=` (in: ${i.include_glob})`;let l=i.include_glob.split(",");l.length===1&&/^\w.+\/\*\*(\/\*)?$/.test(l[0])?a=r.join(t,l[0].replace(/\/\*\*(\/\*)?$/,"")):i.include_glob.split(",").forEach(p=>{o.push("--glob",p)})}return i.exclude_glob&&(u+=` (excluding: ${i.exclude_glob})`,i.exclude_glob.split(",").forEach(l=>{o.push("--glob",`!${l}`)})),die.forEach(l=>{o.push("--glob",l)}),c+=u,o.push("--",i.query),mie(s,o,a,n,e,i.query,u,c)}async function mie(e,t,r,n,i,s,o,a){return new Promise(c=>{let u=new dn(300,350),l=(0,Vm.spawn)(e,t,{env:process.env,cwd:r,stdio:["ignore","pipe","pipe"],signal:i});l.stdout.on("data",p=>{u.write(p.toString())}),l.stderr.on("data",p=>{u.write(p.toString())}),l.on("error",p=>{c({isError:!0,toolResult:`Failed to start ripgrep process: ${p.message}`,title:a})}),l.on("close",p=>{c(p!==0?{isError:!0,toolResult:`No matches found for pattern: "${s}" ${o||""}`,title:a}:{isError:!1,toolResult:n(u.getContent()),title:a})})})}function hie(e){return e.includes("npm i")||e==="yarn"||e.includes("pnpm i")}async function gie({sys:e,signal:t,allowedCommands:r,bashWorkingDirectory:n,emitter:i,devServerOrchestrator:s,filterText:o},{command:a,timeout:c,description:u},l){let p=c?AbortSignal.timeout(c):void 0,d=p?AbortSignal.any([t,p]):t;if(a){if(s&&a.includes(s.devCommand))return{isError:!0,toolResult:`Seems like you tried to execute "${s.devCommand}", however "bash" tool is not the right tool to use, use "DevServerControl" tool with {"restart": true} instead.`,title:`Bash command "${a}"`};let h=A8(),m=B0(a,h);if(m)return{isError:!0,toolResult:`Security policy violation (${m.policy}): ${m.message}`,title:`Bash command blocked: "${a}"`};if(!T8(a,r))return{isError:!0,toolResult:`Command "${a}" is not allowed by configured policies.`,title:`Bash command "${a}"`};if(t.aborted)return{isError:!0,toolResult:"Command aborted/skipped by the user. The command was not even executed.",title:`Bash command "${a}"`};let y=await new Promise(b=>{let v=process.env.SHELL||process.env.COMSPEC||"/bin/sh",C=(0,Vm.spawn)(v,[...ql(a,v)],{stdio:["ignore","pipe","pipe"],cwd:n,env:{...process.env,NO_COLOR:"1",FORCE_COLOR:"0",NPM_CONFIG_PROGRESS:"false",TERM:"dumb",CI:"true",...s?.envVars}}),x=new dn(500);C.stdout.on("data",E=>{let S=E.toString();x.write(S),i.emit("step",{type:"stdio",id:l,command:a,stream:"stdout",source:"tool-command",content:S})}),C.stderr.on("data",E=>{let S=E.toString();x.write(S),i.emit("step",{type:"stdio",id:l,command:a,stream:"stderr",source:"tool-command",content:S})});let D=async()=>{await Wo(e,C);let S=p?.aborted&&!t.aborted?`Command timed out after ${c}ms`:"Command aborted/skipped by the user";b({isError:!0,toolResult:`${S}. Stdout so far:
|
|
@@ -1821,9 +1821,9 @@ exited with code ${E}`),b({isError:P,toolResult:S.trim(),title:`Bash command "${
|
|
|
1821
1821
|
`):void 0,oldContent:u.length>0?u.join(`
|
|
1822
1822
|
`):void 0})}let d=p.substring(4).split(" ")[0],h=bie(d);p.startsWith("--- ")?(i=h,n=h,o=0,a=0,c=[],u=[],s=null):p.startsWith("+++ ")&&(d==="/dev/null"?n=i:n=h);continue}else{if(p.startsWith("@@"))continue;p.startsWith("+")?(o++,c.push(p.substring(1)),s===null&&(s="update")):p.startsWith("-")?(a++,u.push(p.substring(1)),s===null&&(s="update")):(p.startsWith(" ")||p==="")&&(c.push(p.substring(1)),u.push(p.substring(1)))}}if(n&&s){let l=s;o>0&&a===0?l="create":o===0&&a>0?l="delete":l="update";let p=l==="delete"&&i?i:n;t.push({filePath:p,addedLines:o,removedLines:a,action:l,content:c.length>0?c.join(`
|
|
1823
1823
|
`):void 0,oldContent:u.length>0?u.join(`
|
|
1824
|
-
`):void 0})}return t}var xie=["initial-with-url","initial-without-url","success"],Pi=class{#l;#d;#m;#u;#x;#e;#s;#
|
|
1824
|
+
`):void 0})}return t}var xie=["initial-with-url","initial-without-url","success"],Pi=class{#l;#d;#m;#u;#x;#e;#s;#M;#$;#v;#c=!1;#r=new Jm.default;#D;#T;#U;#k=void 0;#j=void 0;#W=Promise.resolve(void 0);#f=[];#N=new Map;#Y=[];#C;#ue=0;#A;#h;#t;#q;#P;#F=void 0;#J;#o;#a;#R;#X;#n;#Q;#O=0;#E;#g;#i;#y;#G;#Z;#z=!1;#ee=0;#w=0;#p=[];#_;#H=new Set;constructor(t){if(this.#e=t.sys,this.#Z=t.modelOverride,this.#s=t.credentials,"initialUrl"in t){let n=Tie(t.initialUrl).id;n?this.#h=n:this.#M=t.initialUrl}"sessionOrCompletionId"in t&&(this.#h=t.sessionOrCompletionId);let r=t.workingDirectory??t.fusionConfig?.workingDirectory;if(this.#o=r?t.sys.resolve(t.sys.cwd(),r):t.sys.getAppRootDir(),this.#$=t.position,this.#D=t.mode,this.#t=t.fusionContext,this.#i=t.fusionConfig,this.#y=t.fusionConfig?.projectId,this.#G=t.fusionConfig?.branchName,this.#T=t.fusionContext?.gitFeatureBranch?.trim(),t.enabledTools?this.#g=t.enabledTools:this.#D==="quality-v3"?(this.#g=["write_file","search_replace_file","view_path","get_rule","get_style_inspiration","bash","grep_search","web_search","find_media"],t.fusionContext?.devServerOrchestrator&&this.#g.push("dev_server_control")):this.#D==="quality-v4"&&(this.#g=["Write","Edit","Read","MultiEdit","Grep","Glob","Bash","ReadRule","WebSearch","Agent","TodoRead","TodoWrite","FindMedia","GetScreenshot","AskUser"],t.fusionContext?.git&&this.#g.push("Revert"),t.fusionContext?.devServerOrchestrator&&this.#g.push("DevServerControl")),this.#X=t.maxTokens,this.#J=t.builtInCustomInstructions??[],this.#n=t.fusionConfig?.workspace,this.#Q=t.mcpServers??!1,this.#R=this.#o,this.#a=this.#o,this.#n?.folders.length){let n=this.#n.folders.filter(i=>i.enableGit);if(n.length===1){let i=n[0];this.#a=this.#e.resolve(this.#o,i.path);let s=i.backupMetadata?.check.backup;this.#_=Gl({version:s?.version,originalRepoUrl:s?.repoUrl,commitHash:s?.lastCommitHash})}else n.length>1&&this.#e.Sentry?.captureException(new Error("Multiple git enabled folders found"))}this.#n?.folders[0]&&this.#L()&&(this.#R=this.#e.resolve(this.#o,this.#n.folders[0].path))}get fusionConfig(){return this.#i}get workingDirectory(){return this.#o}async initializeSession(t={}){return this.#q||(this.#q=this.#de(t)),await this.#q}async loadHistory(){let t=this.getSessionContext(),r=await U0(this.#e,this.#s,t.sessionId,!1),n=new Set;for(let s of r.turns)s.beforeCommit&&n.add(s.beforeCommit),s.afterCommit&&n.add(s.afterCommit);if(n.size>0)try{let o=(await this.git(["cat-file","--batch-check","--buffer"],{sys:this.#e,cwd:this.#a,stdin:Array.from(n).map(a=>`${a}^{commit}`).join(`
|
|
1825
1825
|
`)})).trim().split(`
|
|
1826
|
-
`);for(let a of o)if(a.includes("missing")){let c=a.split(/\s+/)[0].replace("^{commit}","");n.delete(c)}}catch(s){this.#e.Sentry?.captureException(s)}let i=r.turns.filter(s=>!(s.beforeCommit&&!n.has(s.beforeCommit)||s.afterCommit&&!n.has(s.afterCommit)));return{sessionId:t.sessionId,title:t.title,beforeCommit:t.beforeCommit,createdUnixTime:t.createdUnixTime,updatedUnixTime:t.updatedUnixTime,turns:i}}async loadWholeSession(t={}){let{getAll:r=!0}=t,n=this.getSessionContext(),i=0;for(;n.canLoadMore&&n.canLoadMore;){let s=await this.loadMoreTurns();i+=s.length}return{sessionId:n.sessionId,title:n.title,beforeCommit:n.beforeCommit,createdUnixTime:n.createdUnixTime,updatedUnixTime:n.updatedUnixTime,addedTurns:i,turns:r?n.turns:n.turns.slice(0,i)}}async loadMoreTurns(){return this.#P||(this.#P=this.#
|
|
1826
|
+
`);for(let a of o)if(a.includes("missing")){let c=a.split(/\s+/)[0].replace("^{commit}","");n.delete(c)}}catch(s){this.#e.Sentry?.captureException(s)}let i=r.turns.filter(s=>!(s.beforeCommit&&!n.has(s.beforeCommit)||s.afterCommit&&!n.has(s.afterCommit)));return{sessionId:t.sessionId,title:t.title,beforeCommit:t.beforeCommit,createdUnixTime:t.createdUnixTime,updatedUnixTime:t.updatedUnixTime,turns:i}}async loadWholeSession(t={}){let{getAll:r=!0}=t,n=this.getSessionContext(),i=0;for(;n.canLoadMore&&n.canLoadMore;){let s=await this.loadMoreTurns();i+=s.length}return{sessionId:n.sessionId,title:n.title,beforeCommit:n.beforeCommit,createdUnixTime:n.createdUnixTime,updatedUnixTime:n.updatedUnixTime,addedTurns:i,turns:r?n.turns:n.turns.slice(0,i)}}async loadMoreTurns(){return this.#P||(this.#P=this.#le().then(t=>(this.#P=void 0,t))),this.#P}async#le(){let t=this.getSessionContext();if(t.canLoadMore){let r=t.turns[0]?.completionId,n=await U0(this.#e,this.#s,t.sessionId,!0,r);return n.turns.length>0&&t.turns.unshift(...n.turns),t.canLoadMore=n.canLoadMore,n.turns}return[]}async#pe(){try{let t=this.#e.join(this.#a,"file.tsx");return await W8.default.resolveConfig(this.#e.join(t,"file.tsx"))}catch{return null}}async#K(){return[...await Sie(this.#e,this.#a),...this.#J??[]]}async#de(t){try{if(this.#z)throw new Error("Code session already closed");if(this.#l)throw new Error("Session context already initialized");this.#c&&console.log(`\u{1F4C1} Current AI working directory: ${this.#o}`);let r=await this.#me(),n=await this.#pe(),i,s;this.#h||(this.#h=r?.sessionId),this.#h?t.skipSessionLoading?i=this.#h:(s=await U0(this.#e,this.#s,this.#h,!0),i=s.sessionId,this.#c&&console.log("SESSION recovered",s)):i=(0,Y8.randomUUID)(),this.#T||(this.#T=r?.featureBranch?.trim());let o={turns:s?.turns??[],sessionId:i,customInstructions:await this.#K(),title:s?.title,beforeCommit:s?.beforeCommit,createdUnixTime:s?.createdUnixTime??Date.now(),updatedUnixTime:s?.updatedUnixTime??Date.now(),userContext:await j0(this.#e,this.#a),prettierConfig:n,canLoadMore:s?.canLoadMore??!1,state:s?.turns.length?"success":this.#M?"initial-with-url":"initial-without-url"};if(s){let c=us(s.turns);c?.completionId!==s.lastCompletionId&&this.#e.Sentry?.captureException(new Error("Last completion id mismatch"),{tags:{operation:"codegen-initialize-session"},extra:{lastTurn:c,sessionMetadata:s}})}this.#c&&this.#r.on("step",c=>{c.type!=="delta"&&console.log(`Event: ${JSON.stringify(c)}`)}),await this.#he(o),this.#l=o;let a=this.#t?.devServerOrchestrator;if(a){let c=g=>{this.#r.emit("step",{type:"dev-server",devServerState:a.devState,setupState:g,httpServerState:a.httpServerState,devCommand:a.devCommand,setupCommand:a.setupCommand,proxyServer:a.proxyTarget}),this.#B()},u=g=>{this.#r.emit("step",{type:"dev-server",devServerState:g,setupState:a.setupState,httpServerState:a.httpServerState,devCommand:a.devCommand,setupCommand:a.setupCommand,proxyServer:a.proxyTarget}),this.#B()},l=g=>{this.#r.emit("step",{type:"dev-server",devServerState:a.devState,setupState:a.setupState,httpServerState:g,devCommand:a.devCommand,setupCommand:a.setupCommand,proxyServer:a.proxyTarget}),g==="ok-2xx"&&this.requestRefresh(),this.#B()},p=g=>{this.#r.emit("step",{type:"stdio",id:"devServer",command:a.devCommand,stream:"stdout",source:"run-command",content:g})},d=g=>{this.#r.emit("step",{type:"stdio",id:"devServer",command:a.devCommand,stream:"stderr",source:"run-command",content:g})},h=g=>{this.#r.emit("step",{type:"stdio",id:"setupCommand",command:a.setupCommand??"",stream:"stdout",source:"setup-command",content:g})},m=g=>{this.#r.emit("step",{type:"stdio",id:"setupCommand",command:a.setupCommand??"",stream:"stderr",source:"setup-command",content:g})};a.emitter.on("setupState",c),a.emitter.on("devState",u),a.emitter.on("httpServerState",l),a.emitter.on("stdout",p),a.emitter.on("stderr",d),a.emitter.on("installStdout",h),a.emitter.on("installStderr",m),this.#Y.push(()=>{a.emitter.off("setupState",c),a.emitter.off("devState",u),a.emitter.off("httpServerState",l),a.emitter.off("stdout",p),a.emitter.off("stderr",d),a.emitter.off("installStdout",h),a.emitter.off("installStderr",m)})}}catch(r){throw console.error(r),this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-initialize-session"}}),r}}async#fe(){let t=this.#t?.devServerOrchestrator;if(!t)return null;let r=t.setupState;if(r==="installing")return null;await t.waitUntilIdle(500,500);let n=t.devCommand,i=t.devState,s=t.state,o=t.setupCommand,a=await t.getOpenPorts(),c=t.proxyTarget,u=t.httpServerState,l=u==="error-5xx"||u==="error-fetch",p="",d=!1;s==="install-failed"||s==="install-aborted"?p=t.getSetupOutput():(p=t.getCheckpoints(1,i!=="running"?"err":"all"),d=Pie(p??""));let h="",m="";return s==="not-installed"||s==="install-failed"||s==="install-aborted"||s==="failed"||s==="unset"||l||d?(m=`The app seems to be in a non-functional state, please fix and debug. Here's some information we already know:
|
|
1827
1827
|
`,m+=`- The setup command is: "${o}" [state=${r}]
|
|
1828
1828
|
(You can use the 'DevServerControl' tool to 'set_and_run_setup_command' to change it.)
|
|
1829
1829
|
`,m+=`- The dev server command is: "${n}" [state=${i}]
|
|
@@ -1840,30 +1840,30 @@ exited with code ${E}`),b({isError:P,toolResult:S.trim(),title:`Bash command "${
|
|
|
1840
1840
|
${t.getSetupOutput().slice(-8e3)}
|
|
1841
1841
|
`:p&&(m+=`- Here are the logs from the dev server command (${n}):
|
|
1842
1842
|
${p}
|
|
1843
|
-
`),{devServerState:i,setupState:r,httpServerState:u,proxyServer:c,devCommand:n,setupCommand:o,logs:p,prompt:m,message:h}):null}async#
|
|
1843
|
+
`),{devServerState:i,setupState:r,httpServerState:u,proxyServer:c,devCommand:n,setupCommand:o,logs:p,prompt:m,message:h}):null}async#me(){if(this.#t?.git)try{B.info("\u{1F504} Initializing Fusion session for AI side-car branch workflow...");let t=await this.#e.getRepoInfo(this.#a);if(!t.hasGit)if(this.#t.gitAutoInit){B.warn("\u{1F6E0}\uFE0F No git repository detected. Initializing a new git repository...");try{await this.git(["init"]),await this.git(["add","."]),await this.git(["branch","-M","main"]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Initial commit for Fusion workflow"]),B.info("\u2705 Successfully initialized a new git repository")}catch(i){console.error("\u274C Failed to initialize git repository:",i);return}}else{B.error("\u274C Error: Not in a git repository. Fusion requires a git repository.");return}if(t=await this.#e.getRepoInfo(this.#a),!t.hasGit)throw new Error("Git could not be initialized");let r=t.currentBranch,n=Iie(r);return{featureBranch:n.featureBranch,sessionId:n.sessionId,currentCommitHash:t.commit}}catch(t){B.error(`\u274C Error initializing Fusion session: ${t}`),this.#e.Sentry?.captureException(t,{tags:{operation:"codegen-initialize-session"}})}return{featureBranch:void 0,sessionId:void 0,currentCommitHash:void 0}}async#he(t){if(this.#t?.git){let r=`ai_${this.getFeatureBranch()}_${t.sessionId}`;if(this.#U=r.trim(),await this.getCurrentBranch()!==r)try{await this.git(["checkout",r])}catch{await this.git(["checkout","-b",r])}let i=us(t.turns)?.afterCommit;if(i){let s=await this.getCurrentCommitHash();s!==i&&this.#e.Sentry?.captureException(new Error("Init: After commit mismatch"),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:t.sessionId,afterCommit:i,currentCommitHash:s}})}if(t.beforeCommit)try{await this.git(["rev-parse","--quiet","--verify",t.beforeCommit])}catch(s){this.#e.Sentry?.captureException(new Error("Init: Before commit not found",{cause:s}),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:t.sessionId,beforeCommit:t.beforeCommit,turnStates:t.turns.length,lastCompletionId:us(t.turns)?.completionId}})}}}async#ge(t,r){let n;try{n=(await this.git(["remote","get-url","origin"],r)).trim()}catch{}try{new URL(t)}catch{throw this.#e.Sentry?.captureException(new Error("Provided remote url is invalid"),{tags:{operation:"codegen-git"},extra:{url:t,currentOriginUrl:n}}),new Error("Provided remote url is invalid")}n!==t&&(this.#_=void 0,n?await this.git(["remote","set-url","origin",t],r):await this.git(["remote","add","origin",t],r))}async pushRepoV2({repoFullName:t}){if(!this.#t?.git)throw new Error("Can not push to repo");if(!t)return{success:!1,error:"Missing required fields"};try{this.#n?.folders.forEach(r=>{r.enableGit&&(r.repoName=t)}),await this.#te();try{return{success:!0,...await this.pushChanges(!1)}}catch(r){return B.error(`Error pushing initial changes to remote: ${r}`),this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-git"}}),{success:!0,error:"Successfully set remote, but failed to push initial changes.",details:r instanceof Error?r.toString():String(r)}}}catch(r){return this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-git"}}),{success:!1,error:"Failed to set remote url"}}}async#te(){try{if(!this.#y)return;let t=new URL(`${Fe}/projects/git-configs`);t.searchParams.set("projectId",this.#y),this.#s.builderPublicKey&&t.searchParams.set("apiKey",this.#s.builderPublicKey),this.#s.userId&&t.searchParams.set("userId",this.#s.userId);let r=await he(t,{keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.#s.builderPrivateKey}`}});if(!r.ok)throw new Error(`Failed to get updated remote URL: ${r.statusText}`);let{gitConfigs:n}=await r.json();for(let i of this.#n?.folders||[]){let s=i.repoName;if(!s)continue;let o=n[s];if(o?.url){let a=this.#e.resolve(this.#o,i.path);try{await this.#ge(o.url,a),this.#c&&console.log(`Updated git remote URL for repo: ${s} in folder: ${i.path}`)}catch(c){this.#e.Sentry?.captureException(c,{tags:{operation:"codegen-git"},extra:{folder:i,repoFullName:s,resolvedPath:a,configUrl:o.url}})}}}}catch(t){this.#c&&console.error(`Failed to update git remote URLs: ${t instanceof Error?t.message:String(t)}`),this.#r.emit("step",{type:"error",message:`Failed to update git remote URLs: ${t instanceof Error?t.message:String(t)}`,code:"git-update-error"}),this.#e.Sentry?.captureException(t,{tags:{operation:"codegen-git"},extra:{projectId:this.#y,workspaceFolders:this.#n?.folders}})}}async archiveProject(){if(!this.#t?.git)throw new Error("Can not archive project in non git mode");try{let t=Date.now(),r=Math.random().toString(36).substring(2,8),n=`project-${t}-${r}.zip`,i="/tmp",s=this.#e.join(i,n);return Ym.default.mkdirSync(i,{recursive:!0}),await this.git(["archive","--format=zip","-o",s,"HEAD"]),s}catch(t){throw new Error("Failed to archive project",{cause:t})}}isIdle(){let t=this.getSessionContext(),r=["generating","replay"];return!this.#E&&!r.includes(t.state)&&this.#p.length===0}async needsBackup(){if(!this.#t?.git||!this.#y||!this.#G)return!1;let t=await this.getCurrentCommitHash();if(!t)return!1;let r=this.#n?.folders.find(i=>i.enableGit)?.originalRepoUrl;if(!r)return!1;let n=Gl({version:"v2",originalRepoUrl:r,commitHash:t});return this.#_!==n}async uploadBackup(){try{let t=this.#y,r=this.#G;if(!this.#t?.git)throw new Error("Cannot upload backup in non-git mode");if(!t)throw new Error("Project ID is required for backup upload");if(!r)throw new Error("Branch ID is required for backup upload");let n=this.getAiBranch(),i=this.getFeatureBranch(),s=this.#n?.folders.find(a=>a.enableGit)?.originalRepoUrl;if(!s)throw new Error("Original repo URL is required for backup upload");let o=await this.#ne(()=>C8({sys:this.#e,credentials:this.#s,projectId:t,branchName:r,repoPath:this.#a,aiBranch:n,featureBranch:i,workspace:this.#n,debug:this.#c,originalRepoUrl:s}));return o.success&&(this.#_=o.backupRef),o}catch(t){return console.error("Failed to upload backup",t),this.#_=void 0,this.#e.Sentry?.captureException(t,{tags:{operation:"codegen-backup",backupError:""}}),{success:!1,error:t}}}getCommitMode(){return this.#i?.commitMode??"prs"}async#V(){return this.getCommitMode()==="commits"?`${this.getFeatureBranch()}`:`${this.getAiBranch()}`}async#re(){let t=this.getCommitMode(),r=await this.#V(),n=await this.getCurrentBranch();return t==="commits"?["push","--no-verify","--set-upstream","-f","origin",`${n}:${r}`]:["push","--no-verify","--set-upstream","-f","origin",r]}async#ye(){try{let t=this.getSessionContext(),r=Array.from(this.#H);if(this.#H.clear(),r.length===0||!t.prettierConfig)return!1;for(let n of r){let i=await this.#e.readFile(n);if(!i)continue;let s=await Zr(this.#o,i,void 0,n);await this.#e.writeFile(n,s)}if(this.#t?.git){if(await this.isCleanWorkTree())return!1;await this.manualCommit({add:".",commitMessage:"Prettier format pending files"})}return!0}catch(t){return this.#e.Sentry?.captureException(new Error("Failed to format pending files",{cause:t})),!1}}async pushChanges(t=!0){if(!this.#t?.git)throw new Error("Can not push changes in non-git mode");await this.#ye(),t&&await this.pullLatestFromRemote();let r=await this.#re();try{let n=await this.git(r),i=n.toLowerCase().trim(),s=i.includes("everything up-to-date"),o=i.includes("[new branch]"),a=i.includes("set up to track"),c=await this.emitGitStatus();return{output:n,upToDate:s,createdBranch:o,setUpToStream:a,status:c}}catch(n){throw this.#e.Sentry?.captureException(new Error(`Push failed: git ${r.join(" ")}`,{cause:n}),{tags:{operation:"codegen-git"},extra:{pullFirst:t,commitMode:this.getCommitMode()}}),n}}async hasChangesRelativeToRemote(){if(!this.#t?.git)return!1;let t=this.#k;return t?t.canSync:!1}async pullLatestFromRemote(){if(!this.#t?.git)throw new Error("Can not pull changes in non-git mode");let t=await this.#V();try{return await this.git(["pull","--no-rebase","origin",t]),!0}catch(r){let n=await this.#e.getRepoInfo(this.#a);return this.#e.Sentry?.captureException(new Error("Git Pull failed",{cause:r}),{tags:{operation:"codegen-git"},extra:{remoteBranchPair:t,...n}}),!1}}async syncChangesFromMain(t){if(!this.#t?.git)throw new Error("Can not pull changes in non-git mode");if(!t)throw new Error("Main branch name is required");try{return await this.git(["fetch","origin",t]),await this.git(["merge",`origin/${t}`]),await this.pushChanges(!1),{success:!0,message:`Successfully merged ${t} into current branch`}}catch(r){let n=r instanceof Error?r.message:String(r);try{let i=await this.git(this.#ae());if(i.includes("UU ")||i.includes("AA ")||i.includes("DD "))return{success:!1,conflicts:!0,message:`Repository has unmerged files. Review and resolve all merge conflicts in the affected files.
|
|
1844
1844
|
1. Make a plan to systematically address each conflicted file
|
|
1845
1845
|
2. Update all files that are in conflict
|
|
1846
|
-
3. After all files are committed, run: git ${(await this.#
|
|
1847
|
-
Original error: ${n}`}}catch(i){this.#e.Sentry?.captureException(new Error(`Could not check git status: ${i}`,{cause:i}),{tags:{operation:"codegen-git"}})}throw this.#e.Sentry?.captureException(new Error(`Pull changes failed from ${t}`,{cause:r}),{tags:{operation:"codegen-git"}}),new Error(`Failed to merge ${t}: ${n}`)}}async getCurrentCommitHash(t="HEAD"){if(this.#t?.git)try{return(await this.git(["rev-parse",t])).trim()}catch{return}}async getCurrentBranch(){return(await this.git(["branch","--show-current"])).trim()}getFeatureBranch(){if(!this.#T)throw new Error("Feature branch is missing");return this.#T}getAiBranch(){if(!this
|
|
1846
|
+
3. After all files are committed, run: git ${(await this.#re()).join(" ")}
|
|
1847
|
+
Original error: ${n}`}}catch(i){this.#e.Sentry?.captureException(new Error(`Could not check git status: ${i}`,{cause:i}),{tags:{operation:"codegen-git"}})}throw this.#e.Sentry?.captureException(new Error(`Pull changes failed from ${t}`,{cause:r}),{tags:{operation:"codegen-git"}}),new Error(`Failed to merge ${t}: ${n}`)}}async getCurrentCommitHash(t="HEAD"){if(this.#t?.git)try{return(await this.git(["rev-parse",t])).trim()}catch{return}}async getCurrentBranch(){return(await this.git(["branch","--show-current"])).trim()}getFeatureBranch(){if(!this.#T)throw new Error("Feature branch is missing");return this.#T}getAiBranch(){if(!this.#U)throw new Error("AI branch is missing");return this.#U}async git(t,r){if(!this.#t?.git)throw new Error("Can not execute git command in non-git mode.");let n=t[0],i=n==="push"||n==="fetch"||n==="pull",s=Date.now(),o=s-this.#ee,c=1e3*60;return i&&o>10*c&&(this.#ee=s,await this.#te()),await this.#ne(()=>this.#be(t,r))}#ne(t){let r=this.#W.then(()=>t());return this.#W=r.catch(()=>{}),r}async#be(t,r){if(!this.#t?.git)throw new Error(`Can not execute git command in non-git mode: git ${t.join(" ")}`);let n=`git ${t.join(" ")}`;this.#E&&this.#e.Sentry?.captureException(new Error(`currentGitCommand is not finished yet. Current command: ${this.#E}, New command Received: ${n}`),{tags:{operation:"codegen-git"},extra:{oldCommand:this.#E,newCommand:n}});try{return this.#E=n,await Js(t,{cwd:typeof r=="string"?r:this.#a,debug:this.#c,sys:this.#e,timeout:60*1e3,...typeof r=="object"?r:void 0})}finally{this.#E=void 0}}async runCheckCommand(){let t=this.#i?.checkCommand;return t?new Promise(r=>{(0,V8.exec)(t,{cwd:this.#o},(n,i,s)=>{r(n?{code:n.code??-1,logs:`${n.message}
|
|
1848
1848
|
${i}
|
|
1849
1849
|
${s}`}:{code:0,logs:`${i}
|
|
1850
|
-
${s}`})})}):null}setDebug(t){this.#c=t}async getAllFiles(t={}){let{getDotFiles:r=!1,pattern:n="**/*"}=t;if(!this.#n?.folders?.length)return xc(this.#o,n,q8(this.#i?.accessControl),r);let i=[],s=await this.#e.readdir(this.#o);for(let o of s)H8(o)&&i.push(o);!i.includes("AGENTS.md")&&this.#n.agentsMD&&i.push("AGENTS.md");for(let o of this.#n.folders){let a=this.#e.resolve(this.#o,o.path),c=await xc(a,"**/*",void 0,r),u=this.#B()?".":o.name||this.#e.basename(a);for(let l of c)u!=="."?i.push(this.#e.join(u,l)):i.push(l)}return i}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#s.builderPublicKey}async revertToCommitHash(t){await this.git(["revert","--no-commit",`${t}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let r=await this.getCurrentCommitHash();if(!r){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git"}});return}let n=this.getLastTurn();n&&await this.#I({id:n.completionId,afterCommit:r})}async restore({location:t,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let m=c-1;m>=-1;m--)if(r(m>=0?a.turns[m]:null,m)){u=m;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort(!0);let l=new Map,p=!!this.#t?.git,d=a.turns,h=Math.max(0,t==="before"?u:u+1);for(let m=d.length-1;m>=h;m--){let g=d[m];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let m;if(p){u===-1?a.beforeCommit?m=a.beforeCommit:d.length>0&&(m=d[0].beforeCommit):u<d.length&&(t==="after"?(m=d[u].afterCommit,!m&&u+1<d.length&&(m=d[u+1].beforeCommit)):m=d[u].beforeCommit);let v={commitHash:m,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:t,forceReplay:s,dryRun:i,debug:o};if(!m)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git"},contexts:{restore:v}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(m):await this.git(["reset","--quiet","--hard",m])}catch(C){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:C}),{tags:{operation:"codegen-git"},contexts:{restore:v}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[v,C]of l.entries())try{C?await this.writeFile(v,C):await this.deleteFile(v)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(h,d.length-h);this.#c&&console.log("Remaining turns",d);let y=us(d);y&&y?.afterCommit!==m&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git"},extra:{lastTurn:y,commitHash:m}}),y.afterCommit=m,this.#I({id:y.completionId,afterCommit:m}));let b=y?.completionId;if(g.length>0&&(await z8(this.#e,this.#s,{lastCompletionId:b,sessionId:a.sessionId},!!this.#c),a.updatedUnixTime=Date.now()),s){let v=a.state;this.#r.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:v},...this.#ne(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:t},{type:"state",newState:v,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#r.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:t})}return await this.#re(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#re(t){return await this.#t?.devServerOrchestrator?.ensureDevCommand(t)}async restoreHEAD(){return this.restore({location:"after",predicate:()=>!0,debug:"restoreHEAD"})}async restoreAll(){return this.restore({location:"before",predicate:(t,r)=>r===-1,debug:"restoreAll"})}async restoreFromCompletionId({location:t,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:t,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#P,i.turns=[],i.canLoadMore=!0,await z8(this.#e,this.#s,{sessionId:i.sessionId,lastCompletionId:r},!!this.#c),await this.loadMoreTurns(),this.restore({location:t,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(t){return this.restoreFromCompletionId({location:"before",completionId:t,forceReplay:!1})}async undoLastUserMessage(t=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:t})}getLastCompletionId(){let t=this.getSessionContext();return G8(t)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let t=this.getSessionContext();return vie(t)}getLastTurn(){let t=this.getSessionContext();return G8(t)}getNextUrl(){return this.getLastTurn()?.nextUrl}getNextMessage(){let t=new Promise(r=>{this.#u?r():this.#m=r}).then(()=>{let r=this.#u;if(r)return!r.dropAbortedPrompt&&this.#x&&(r=K8(this.#x,r)),this.#u=void 0,this.#x=r,r});return{shouldWait:!this.#u,promise:t}}async sendFeedback(t){if(process.env.NODE_ENV==="test")return;_e("quality code feedback given",{spaceId:this.#s.builderPublicKey,sentiment:t.feedbackSentiment,mode:"cli"});let r=t.id??this.getLastCompletionId();r&&await this.#I({...t,id:r})}#I(t){let r=wie(this.#e,this.#s,t,!!this.#c);return this.#p.push(r),r.finally(()=>{let n=this.#p.indexOf(r);n!==-1&&this.#p.splice(n,1)}),r}async lastTurnHasChanges(){let t=await this.undoLastUserMessage(!0);return t.undone?t.undone.length>0:!1}#S(t){let r=this.getSessionContext(),n=r.state;n!==t&&(r.state=t,this.#r.emit("step",{type:"state",abortable:t==="generating",previousState:n,newState:t}))}waitUntilState(t,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===t){n();return}let s,o=a=>{a.type==="state"&&a.newState===t&&(clearTimeout(s),this.#r.removeListener("step",o),n())};s=setTimeout(()=>{this.#r.removeListener("step",o),n()},r),this.#r.on("step",o)})}async clearSession(){let t=this.getSessionContext();t.turns=[],t.customInstructions=await this.#H()}async sendMessage(t,r=!0){!t.dropAbortedPrompt&&this.#u&&(t=K8(this.#u,t)),this.#u=t,r&&await this.abort(),this.#m&&this.#m()}getTurns(){let t=this.getSessionContext();return structuredClone(t.turns)}getSessionContext(){if(!this.#l)throw new Error("Session context not initialized");return this.#l}async runSetupCommand(){return await this.#t?.devServerOrchestrator?.runSetupCommand()}abortSetupCommand(){this.#t?.devServerOrchestrator?.abortSetupCommand()}toolsRunning(){return this.#f.length>0}abortAllTools(){for(let t of this.#f)t.abortController.abort()}abortToolCall(t){let r=this.#f.find(n=>n.id===t);if(r)return r.abortController.abort(),!0;if(this.#f.length===0){let n=new AbortController;return n.abort(),this.#f.push({id:t,abortController:n,input:{id:t},name:"bash"}),!0}return!1}async abort(t=!1){if(t&&(this.#x=void 0),this.#w=0,this.#d){if(this.#d.abort(),this.#d=void 0,this.#ie()){let r=this.getLinesStats();await this.sendFeedback({acceptedLines:r.net,linesOfCodeAdded:r.added,linesOfCodeRemoved:r.removed})}return!0}return!1}async stopEventLoop(){await this.abort(!0),this.#v?.abort(),this.#v=void 0,this.#m&&this.#m()}requestRefresh(){this.#r.emit("step",{type:"builder-action",action:"refresh",metadata:{}})}async configureDevOrchestrator(t){let r=this.#t?.devServerOrchestrator,n={devCommand:!1,setupCommand:!1,proxyServer:!1,env:!1};if(r){let i=[];t.env&&(t.replaceEnvs&&r.clearEnvVariables(),Object.entries(t.env).forEach(([s,o])=>{r.setEnvVariable(s,o??void 0)}),n.env=!0),t.proxyServer?i.push(r?.setProxyServer(t.proxyServer).then(s=>n.proxyServer=s)):t.proxyPort&&i.push(r?.setPort(t.proxyPort).then(s=>n.proxyServer=s)),t.setupCommand&&i.push(r.setSetupCommand(t.setupCommand,!1).then(s=>n.setupCommand=!!s)),t.devCommand&&i.push(r.setDevCommand(t.devCommand).then(s=>n.devCommand=s)),await Promise.allSettled(i)}return n}async close(t=!1){if(this.#G)return;this.#G=!0,this.#W.forEach(n=>n()),await this.stopEventLoop(),await this.waitUntilState("close",5e3),this.#r.removeAllListeners(),await Promise.allSettled(this.#p);let r=await this.needsBackup();this.#c&&console.log(`\u{1F50D} Closing code gen server: ${JSON.stringify({uploadGitBackup:t,needsBackup:r})}`),t&&r&&await this.uploadBackup()}updateLastCommit(t){if(!this.#t?.git)return!1;let r=this.#i?.projectId,n=this.#i?.branchName;if(!r||!n)return!1;let i=zl(this.#e,this.#s,{projectId:r,branchName:n,lastCommitHash:t,clearSecondaryVolumeId:!0});return this.#p.push(i),i.finally(()=>{let s=this.#p.indexOf(i);s!==-1&&this.#p.splice(s,1)}),i}async emitGitStatus(){let t=await this.#ye();return t&&(this.#k=t,this.#r.emit("step",t),this.updateLastCommit(t.currentCommit)),t}async manualCommit(t){await this.git(["add",t.add]),await this.git(["commit","--quiet","--no-verify","-m",t.commitMessage]);let r=await this.getCurrentCommitHash(),n=this.getLastTurn();n&&await this.#I({id:n.completionId,afterCommit:r}),await this.emitGitStatus()}async#O(){let t=this.getSessionContext();if(t.state==="generating"||t.state==="close")return this.#A=void 0,!1;let r,n=await this.#pe();return n&&(r={actionButtonText:"Try to fix",type:"build-error",level:"error",canAutoApply:!this.#u&&xie.includes(t.state),healthStatus:n,message:n.message,userMessage:{userPrompt:n.prompt,skipSearch:!0,displayPrompt:"The app seems to be in a broken state, please fix and debug."}}),this.#A=r,this.#r.emit("step",{type:"wait-for-input",state:t.state,suggestion:r}),!0}async#ye(){if(!this.#t?.git)return null;this.#R++;let t=this.#ie(),r=await this.#K(),n=!1,i="",s=null;try{let l=await this.git(["rev-parse","--absolute-git-dir"]);s=this.#e.join(l,"FETCH_HEAD"),Ym.default.existsSync(s)&&Ym.default.unlinkSync(s)}catch(l){this.#e.Sentry?.captureException(l,{tags:{operation:"codegen-git"},extra:{fetchHeadFilePath:s,isCheckingGitStatus:this.#R}}),s=null}try{i=await this.git(["fetch","--no-tags","origin",r]),n=!0}catch{n=!1}let o=await this.#e.getRepoInfo(this.#a),a=t?1:0,c=0;if(n)try{let l=_ie(await this.git(["rev-list","--left-right","--count","HEAD...FETCH_HEAD"]));a=l.ahead,c=l.behind}catch(l){let p=null;if(s)try{p=await this.#e.readFile(this.#e.join(this.#a,".git/FETCH_HEAD")),p=`FETCH_HEAD: ${p}`}catch(d){p=`FETCH_HEAD FAILED: ${String(d)}`}else p="FETCH_HEAD MISSING";this.#e.Sentry?.captureException(l,{tags:{operation:"codegen-git"},extra:{fetchOutput:i,fetchHead:p,remoteBranch:r,currentBranch:o.currentBranch,currentCommit:o.commit,isCheckingGitStatus:this.#R}})}let u=this.getSessionContext().beforeCommit;return this.#R--,{type:"git",remoteBranchExists:n,hasGeneratingPlaceholder:await this.#we(),isSessionDirty:t||!!u&&u!==o.commit,canSync:a>0||c>0,canPush:a>0,canPull:c>0,ahead:a,behind:c,currentCommit:o.commit,currentBranch:o.currentBranch,remoteBranch:r}}#ne(){let t=this.getSessionContext(),r=t.turns,n=[];n.push({type:"session",title:t.title,beforeCommit:t.beforeCommit,createdUnixTime:t.createdUnixTime,updatedUnixTime:t.updatedUnixTime,turns:t.turns.length,id:t.sessionId,lastCompletionId:this.getLastCompletionId()});for(let i of r){n.push({type:"user",displayPrompt:i.userMessage?i.userMessage.displayPrompt??i.userMessage.userPrompt:void 0,attachments:i.userMessage?.attachments,id:i.completionId,user:i.user,role:i.user.role,compacting:!1});for(let s of i.actions)(s.type==="tool"||s.type==="text"||s.type==="thinking")&&(n.push({type:"start",name:s.type,content:"",id:s.id??"",filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??""}),n.push({type:"delta",name:s.type,delta:s.content}),s.type==="tool"?n.push({type:s.type,id:s.id,name:s.filePath,content:s.content}):s.type==="thinking"?n.push({type:"planning",content:s.content}):s.type==="text"&&n.push({type:"text",content:s.content}))}return n}connectToEventLoop(t,r){if(t){let n=[],i=this.getSessionContext();n.push({type:"state",newState:"replay",abortable:!1,previousState:i.state}),this.#U&&n.push(this.#U),this.#k&&n.push(this.#k),n.push(...this.#ne());let s=this.#F?us(this.#F):void 0;if(s)switch(s.type){case"file":case"diff":case"text":case"thinking":case"suggestion":case"tool":n.push({type:"start",id:s.id,name:s.type,filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??"",content:""}),n.push({type:"delta",name:s.type,delta:s.content});break}let o=this.#t?.devServerOrchestrator;o?(n.push({type:"dev-server",devServerState:o.devState,setupState:o.setupState,httpServerState:o.httpServerState,devCommand:o.devCommand,setupCommand:o.setupCommand,proxyServer:o.proxyTarget}),o.setupState!=="installed"&&n.push({type:"stdio",id:"setupCommand",command:o.setupCommand??"",content:o.getSetupOutput(),source:"run-command",stream:"stdout"}),n.push({type:"stdio",id:"devServer",command:o.devCommand,content:o.getOutput(),source:"run-command",stream:"stdout"})):r({type:"dev-server",devServerState:"running",setupState:"installed",httpServerState:"ok-2xx",devCommand:this.#i?.devCommand,setupCommand:this.#i?.setupCommand,proxyServer:this.#i?.serverUrl}),n.push({type:"state",newState:i.state,abortable:i.state==="generating",previousState:"replay"}),this.#C&&i.state!=="generating"&&n.push({type:"wait-for-input",state:i.state,suggestion:this.#A}),r({type:"batch",steps:n})}return this.#r.on("step",r),this.waitForEventLoop(),()=>{this.#r.off("step",r)}}waitUntilIdle(){return this.waitForEventLoop(),(0,Jm.once)(this.#r,"idle").then(()=>Promise.allSettled(this.#p)).then(()=>{})}waitForEventLoop(){return this.#C?this.#C:this.#C=this.#be()}async#be(){if(this.#C||this.#v)throw new Error("Event loop already started");let t=Fie(),r=o=>{o.type==="error"&&this.#w>0&&(o.restoreCredits=this.#w,this.#w=0,Cie(this.#e,this.#s,s.sessionId,o.restoreCredits).catch(a=>{this.#e.Sentry?.captureException(a)})),this.#r.emit("step",o)};this.#v=new AbortController;let n=this.#v.signal,i=this.#t?.devServerOrchestrator,s=this.getSessionContext();this.#e.Sentry?.setContext("codeGen",{sessionId:s.sessionId}),await this.emitGitStatus(),i?.setupState==="not-installed"&&this.runSetupCommand();try{for(;!n.aborted;){this.#d=void 0;let o=this.getNextMessage();o.shouldWait&&await this.#O()&&this.#r.emit("idle");let a=await o.promise;if(n.aborted)break;if(a){try{this.#A=void 0,a.logsCheckpoint&&i?.addCheckpoint(),this.#d=new AbortController;let c=_c([n,this.#d.signal]);if(c?.aborted)throw Nc();this.#S("generating"),await this.#xe(a,c,r),this.#S("success"),this.#A=void 0}catch(c){c instanceof Error?c.name==="AbortError"?(r({type:"user-abort",hasContinueMessage:!!this.#u}),this.#S("abort")):(this.#x=void 0,r({type:"error",code:"cli-genetic-error",message:c.message,metadata:{error:c}}),this.#e.Sentry?.captureException(c),this.#S("error")):this.#S("error")}this.#ae++}}}catch(o){throw this.#e.Sentry?.captureException(o,{level:"fatal"}),o}finally{this.#v=void 0,this.#C=void 0,t()}this.#r.emit("idle"),this.#S("close")}async#xe(t,r,n){this.#w=0;let i=this.getSessionContext(),s=0;for(;;){if(r?.aborted)throw Nc();try{let o=await this.#Ce(s===0?t:void 0,r,n);if(o.user.role==="user"){let c=o.files.filter(u=>(u.importance??0)>2.5&&u.content).map(u=>({filePath:u.filePath,size:u.content?.length??0,isCustomInstruction:!1,wasIncluded:u.wasIncluded}));i.customInstructions.forEach(u=>{u.filePath&&c.push({filePath:u.filePath,size:u.content?.length??0,isCustomInstruction:!0,wasIncluded:!0})}),n({type:"user-input",prompt:o.userMessage?.displayPrompt??o.userPrompt,files:c})}let a=await this.#ve(i,o,r,n);if(this.#x=void 0,await this.#re(),!a)break}finally{Die(i.turns),s++}}}async#ve(t,r,n,i){if(this.#F)throw new Error("generateCompletion already started");let s=this.getLastTurn()?.nextUrl??this.#L;i({type:"start",id:"",name:"thinking",title:"Thinking",content:""});try{let o=this.#F=[],a=await this.getCurrentCommitHash();!t.beforeCommit&&a&&(t.beforeCommit=a);let c={url:s,position:this.#M,eventName:"cli code",maxPages:2,autoContinue:1,codeGenMode:this.#D,userContext:t.userContext,files:r.files,mcpServers:this.#X,maxTokens:this.#J,aclPolicy:this.#i?.accessControl,repoIndexingConfig:this.#i?.repoIndexingConfig,attachments:r.attachments,customInstructions:t.customInstructions,sessionId:t.sessionId,userPrompt:r.userPrompt,ephemeralUserPrompt:r.userMessage?.ephemeralUserPrompt,displayUserPrompt:r.userMessage?.displayPrompt,projectId:this.#y,pingEvents:!0,workingDirectory:this.#o,beforeCommit:a,toolResults:r.toolResults,role:r.user.role,user:r.user,enabledTools:this.#g,searchResponse:r.searchResponse},u=Eie(this.#e,this.#s,c,this.#c,n),l;for await(let p of u){let d=async g=>{if(g.type==="user"){let y=l={state:"running",unixTime:Date.now(),title:"",sentiment:void 0,userMessage:r.userMessage,afterCommit:a,beforeCommit:a,creditsUsed:0,actions:[],applyResults:[],completionId:g.id??"",nextUrl:void 0,user:g.user,autoContinue:!1};l=y,t.turns.push(y),g.compacting&&(t.customInstructions=await this.#H()),i({type:"user",displayPrompt:g.displayPrompt,id:g.id,user:g.user,role:g.user.role,compacting:g.compacting})}else if(g.type==="mcp-status")this.#U=g,i(g);else{if(g.type==="error")return i(g),!0;if(g.type==="done"){this.#w+=g.creditsUsed;let y=l=await this.#Ee(t,g,l,a);for(let C of g.actions??[])C.type==="tool_result"&&i({type:"tool_result",result:{content:C.content,tool_use_id:C.id,type:"tool_result",title:C.actionTitle,tool_name:C.filePath,is_error:!!C.errors?.length}});y.applyResults.length>0&&this.#t?.devServerOrchestrator?.addCheckpoint();let b=await this.#Se(this.#e,y),v=await this.commitWorkInProgress(y);v&&(b=!0,y.afterCommit=v,a=v),this.#I({id:y.completionId,beforeCommit:y.beforeCommit,afterCommit:y.afterCommit}),i({type:"done",stopReason:g.stopReason,id:g.id,applyResults:y.applyResults,actions:g.actions??[],creditsUsed:g.creditsUsed,sessionUsage:g.sessionUsage,usage:g.usage,url:g.nextUrl,hasChanges:b})}else{if(g.type==="continue")return i({type:"continue",id:g.id,url:g.nextUrl,autoContinue:g.autoContinue}),!0;g.type==="thinking"&&(g.actionTitle="Planning"),"content"in g&&g.type!=="delta"&&i({type:"start",name:g.type,filePath:g.filePath??"",id:"id"in g?g.id:void 0,title:g.actionTitle??g.artifactTitle??g.filePath??"",content:g.content??""})}}return!1},h=async g=>{g.type==="thinking"&&i({type:"planning",content:g.content}),g.type==="server_tool_result"&&i({type:"server_tool_result",content:JSON.parse(g.content),title:g.actionTitle??g.artifactTitle??"Server Tool Result",id:g.id}),g.type==="file"&&g.filePath&&!g.synthetic&&i({type:"file",filePath:g.filePath,content:g.content,title:g.actionTitle??g.artifactTitle??"Created",id:g.id,errors:g.errors}),g.type==="diff"&&g.filePath&&!g.synthetic&&i({type:"diff",filePath:g.filePath,title:g.actionTitle??g.artifactTitle??"Updated",content:g.content,id:g.id,errors:g.errors}),g.type==="tool"&&g.filePath?i({type:"tool",name:g.filePath,id:g.id,content:g.content}):g.type==="text"&&i({type:"text",content:g.content})},m=async(g,y)=>{i({type:"delta",name:g.type,delta:y})};if(p.type!=="ping")if(p.type==="delta"){let g=p.content,y=us(o);y&&"content"in y&&(y.content+=g,await m(y,g))}else{let g=us(o);if(g&&"content"in g&&(g.incomplete=!1,await h(g)),o.push(p),await d(p))break}}return l?l.actions.some(p=>p.type==="tool")||l.autoContinue:!1}finally{this.#F=void 0}}async commitWorkInProgress(t){if(this.#t?.git&&!await this.isCleanWorkTree())try{await this.git(["add","."]);let n=`${t.title}
|
|
1850
|
+
${s}`})})}):null}setDebug(t){this.#c=t}async getAllFiles(t={}){let{getDotFiles:r=!1,pattern:n="**/*"}=t;if(!this.#n?.folders?.length)return xc(this.#o,n,q8(this.#i?.accessControl),r);let i=[],s=await this.#e.readdir(this.#o);for(let o of s)H8(o)&&i.push(o);!i.includes("AGENTS.md")&&this.#n.agentsMD&&i.push("AGENTS.md");for(let o of this.#n.folders){let a=this.#e.resolve(this.#o,o.path),c=await xc(a,"**/*",void 0,r),u=this.#L()?".":o.name||this.#e.basename(a);for(let l of c)u!=="."?i.push(this.#e.join(u,l)):i.push(l)}return i}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#s.builderPublicKey}async revertToCommitHash(t){await this.git(["revert","--no-commit",`${t}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let n=(await this.emitGitStatus())?.currentCommit;if(!n){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git"}});return}let i=this.getLastTurn();i&&await this.#I({id:i.completionId,afterCommit:n})}async resetToCommitHash(t){if(await this.git(["reset","--quiet","--hard",t]),(await this.emitGitStatus())?.currentCommit!==t)throw new Error("Failed to reset commit hash")}async restore({location:t,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let m=c-1;m>=-1;m--)if(r(m>=0?a.turns[m]:null,m)){u=m;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort(!0);let l=new Map,p=!!this.#t?.git,d=a.turns,h=Math.max(0,t==="before"?u:u+1);for(let m=d.length-1;m>=h;m--){let g=d[m];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let m;if(p){u===-1?a.beforeCommit?m=a.beforeCommit:d.length>0&&(m=d[0].beforeCommit):u<d.length&&(t==="after"?(m=d[u].afterCommit,!m&&u+1<d.length&&(m=d[u+1].beforeCommit)):m=d[u].beforeCommit);let v={commitHash:m,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:t,forceReplay:s,dryRun:i,debug:o};if(!m)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git"},contexts:{restore:v}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(m):await this.resetToCommitHash(m)}catch(C){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:C}),{tags:{operation:"codegen-git"},contexts:{restore:v}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[v,C]of l.entries())try{C?await this.writeFile(v,C):await this.deleteFile(v)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(h,d.length-h);this.#c&&console.log("Remaining turns",d);let y=us(d);y&&y?.afterCommit!==m&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git"},extra:{lastTurn:y,commitHash:m}}),y.afterCommit=m,this.#I({id:y.completionId,afterCommit:m}));let b=y?.completionId;if(g.length>0&&(await z8(this.#e,this.#s,{lastCompletionId:b,sessionId:a.sessionId},!!this.#c),a.updatedUnixTime=Date.now()),s){let v=a.state;this.#r.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:v},...this.#se(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:t},{type:"state",newState:v,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#r.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:b,location:t})}return await this.#ie(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#ie(t){return await this.#t?.devServerOrchestrator?.ensureDevCommand(t)}async restoreHEAD(){return this.restore({location:"after",predicate:()=>!0,debug:"restoreHEAD"})}async restoreAll(){return this.restore({location:"before",predicate:(t,r)=>r===-1,debug:"restoreAll"})}async restoreFromCompletionId({location:t,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:t,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#P,i.turns=[],i.canLoadMore=!0,await z8(this.#e,this.#s,{sessionId:i.sessionId,lastCompletionId:r},!!this.#c),await this.loadMoreTurns(),this.restore({location:t,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(t){return this.restoreFromCompletionId({location:"before",completionId:t,forceReplay:!1})}async undoLastUserMessage(t=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:t})}getLastCompletionId(){let t=this.getSessionContext();return G8(t)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let t=this.getSessionContext();return vie(t)}getLastTurn(){let t=this.getSessionContext();return G8(t)}getNextUrl(){return this.getLastTurn()?.nextUrl}getNextMessage(){let t=new Promise(r=>{this.#u?r():this.#m=r}).then(()=>{let r=this.#u;if(r)return!r.dropAbortedPrompt&&this.#x&&(r=K8(this.#x,r)),this.#u=void 0,this.#x=r,r});return{shouldWait:!this.#u,promise:t}}async sendFeedback(t){if(process.env.NODE_ENV==="test")return;_e("quality code feedback given",{spaceId:this.#s.builderPublicKey,sentiment:t.feedbackSentiment,mode:"cli"});let r=t.id??this.getLastCompletionId();r&&await this.#I({...t,id:r})}#I(t){let r=wie(this.#e,this.#s,t,!!this.#c);return this.#p.push(r),r.finally(()=>{let n=this.#p.indexOf(r);n!==-1&&this.#p.splice(n,1)}),r}async lastTurnHasChanges(){let t=await this.undoLastUserMessage(!0);return t.undone?t.undone.length>0:!1}#S(t){let r=this.getSessionContext(),n=r.state;n!==t&&(r.state=t,this.#r.emit("step",{type:"state",abortable:t==="generating",previousState:n,newState:t}))}waitUntilState(t,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===t){n();return}let s,o=a=>{a.type==="state"&&a.newState===t&&(clearTimeout(s),this.#r.removeListener("step",o),n())};s=setTimeout(()=>{this.#r.removeListener("step",o),n()},r),this.#r.on("step",o)})}async clearSession(){let t=this.getSessionContext();t.turns=[],t.customInstructions=await this.#K()}async sendMessage(t,r=!0){!t.dropAbortedPrompt&&this.#u&&(t=K8(this.#u,t)),this.#u=t,r&&await this.abort(),this.#m&&this.#m()}getTurns(){let t=this.getSessionContext();return structuredClone(t.turns)}getSessionContext(){if(!this.#l)throw new Error("Session context not initialized");return this.#l}async runSetupCommand(){return await this.#t?.devServerOrchestrator?.runSetupCommand()}abortSetupCommand(){this.#t?.devServerOrchestrator?.abortSetupCommand()}toolsRunning(){return this.#f.length>0}abortAllTools(){for(let t of this.#f)t.abortController.abort()}toolFullfilment(t,r){return typeof r=="string"&&(r={toolResult:r,isError:!1}),this.fulfillToolCall(t,r)}fulfillToolCall(t,r){let n=this.#N.get(t);return n?(n(r),this.#N.delete(t),!0):!1}abortToolCall(t){let r=this.#f.find(n=>n.id===t);if(r)return r.abortController.abort(),!0;if(this.#f.length===0){let n=new AbortController;return n.abort(),this.#f.push({id:t,abortController:n,input:{id:t},name:"bash"}),!0}return!1}async abort(t=!1){if(t&&(this.#x=void 0),this.#w=0,this.#d){if(this.#d.abort(),this.#d=void 0,this.#oe()){let r=this.getLinesStats();await this.sendFeedback({acceptedLines:r.net,linesOfCodeAdded:r.added,linesOfCodeRemoved:r.removed})}return!0}return!1}async stopEventLoop(){await this.abort(!0),this.#v?.abort(),this.#v=void 0,this.#m&&this.#m()}requestRefresh(){this.#r.emit("step",{type:"builder-action",action:"refresh",metadata:{}})}async configureDevOrchestrator(t){let r=this.#t?.devServerOrchestrator,n={devCommand:!1,setupCommand:!1,proxyServer:!1,env:!1};if(r){let i=[];t.env&&(t.replaceEnvs&&r.clearEnvVariables(),Object.entries(t.env).forEach(([s,o])=>{r.setEnvVariable(s,o??void 0)}),n.env=!0),t.proxyServer?i.push(r?.setProxyServer(t.proxyServer).then(s=>n.proxyServer=s)):t.proxyPort&&i.push(r?.setPort(t.proxyPort).then(s=>n.proxyServer=s)),t.setupCommand&&i.push(r.setSetupCommand(t.setupCommand,!1).then(s=>n.setupCommand=!!s)),t.devCommand&&i.push(r.setDevCommand(t.devCommand).then(s=>n.devCommand=s)),await Promise.allSettled(i)}return n}async close(t=!1){if(this.#z)return;this.#z=!0,this.#Y.forEach(n=>n()),await this.stopEventLoop(),await this.waitUntilState("close",5e3),this.#r.removeAllListeners(),await Promise.allSettled(this.#p);let r=await this.needsBackup();this.#c&&console.log(`\u{1F50D} Closing code gen server: ${JSON.stringify({uploadGitBackup:t,needsBackup:r})}`),t&&r&&await this.uploadBackup()}updateLastCommit(t){if(!this.#t?.git)return!1;let r=this.#i?.projectId,n=this.#i?.branchName;if(!r||!n)return!1;let i=zl(this.#e,this.#s,{projectId:r,branchName:n,lastCommitHash:t,clearSecondaryVolumeId:!0});return this.#p.push(i),i.finally(()=>{let s=this.#p.indexOf(i);s!==-1&&this.#p.splice(s,1)}),i}async emitGitStatus(){let t=await this.#xe();return t&&(this.#k=t,this.#r.emit("step",t),this.updateLastCommit(t.currentCommit)),t}async manualCommit(t){await this.git(["add",t.add]),await this.git(["commit","--quiet","--no-verify","-m",t.commitMessage]);let r=await this.getCurrentCommitHash(),n=this.getLastTurn();n&&await this.#I({id:n.completionId,afterCommit:r}),await this.emitGitStatus()}async#B(){let t=this.getSessionContext();if(t.state==="generating"||t.state==="close")return this.#A=void 0,!1;let r,n=await this.#fe();return n&&(r={actionButtonText:"Try to fix",type:"build-error",level:"error",canAutoApply:!this.#u&&xie.includes(t.state),healthStatus:n,message:n.message,userMessage:{userPrompt:n.prompt,skipSearch:!0,displayPrompt:"The app seems to be in a broken state, please fix and debug."}}),this.#A=r,this.#r.emit("step",{type:"wait-for-input",state:t.state,suggestion:r}),!0}async#xe(){if(!this.#t?.git)return null;this.#O++;let t=this.#oe(),r=await this.#V(),n=!1,i="",s=null;try{let l=await this.git(["rev-parse","--absolute-git-dir"]);s=this.#e.join(l,"FETCH_HEAD"),Ym.default.existsSync(s)&&Ym.default.unlinkSync(s)}catch(l){this.#e.Sentry?.captureException(l,{tags:{operation:"codegen-git"},extra:{fetchHeadFilePath:s,isCheckingGitStatus:this.#O}}),s=null}try{i=await this.git(["fetch","--no-tags","origin",r]),n=!0}catch{n=!1}let o=await this.#e.getRepoInfo(this.#a),a=t?1:0,c=0;if(n)try{let l=_ie(await this.git(["rev-list","--left-right","--count","HEAD...FETCH_HEAD"]));a=l.ahead,c=l.behind}catch(l){let p=null;if(s)try{p=await this.#e.readFile(this.#e.join(this.#a,".git/FETCH_HEAD")),p=`FETCH_HEAD: ${p}`}catch(d){p=`FETCH_HEAD FAILED: ${String(d)}`}else p="FETCH_HEAD MISSING";this.#e.Sentry?.captureException(l,{tags:{operation:"codegen-git"},extra:{fetchOutput:i,fetchHead:p,remoteBranch:r,currentBranch:o.currentBranch,currentCommit:o.commit,isCheckingGitStatus:this.#O}})}let u=this.getSessionContext().beforeCommit;return this.#O--,{type:"git",remoteBranchExists:n,hasGeneratingPlaceholder:await this.#Te(),isSessionDirty:t||!!u&&u!==o.commit,canSync:a>0||c>0,canPush:a>0,canPull:c>0,ahead:a,behind:c,currentCommit:o.commit,currentBranch:o.currentBranch,remoteBranch:r}}#se(){let t=this.getSessionContext(),r=t.turns,n=[];n.push({type:"session",title:t.title,beforeCommit:t.beforeCommit,createdUnixTime:t.createdUnixTime,updatedUnixTime:t.updatedUnixTime,turns:t.turns.length,id:t.sessionId,lastCompletionId:this.getLastCompletionId()});for(let i of r){n.push({type:"user",displayPrompt:i.userMessage?i.userMessage.displayPrompt??i.userMessage.userPrompt:void 0,attachments:i.userMessage?.attachments,id:i.completionId,user:i.user,role:i.user.role,compacting:!1});for(let s of i.actions)(s.type==="tool"||s.type==="text"||s.type==="thinking")&&(n.push({type:"start",name:s.type,content:"",id:s.id??"",filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??""}),n.push({type:"delta",name:s.type,delta:s.content}),s.type==="tool"?n.push({type:s.type,id:s.id,name:s.filePath,content:s.content}):s.type==="thinking"?n.push({type:"planning",content:s.content}):s.type==="text"&&n.push({type:"text",content:s.content}))}return n}connectToEventLoop(t,r){if(t){let n=[],i=this.getSessionContext();n.push({type:"state",newState:"replay",abortable:!1,previousState:i.state}),this.#j&&n.push(this.#j),this.#k&&n.push(this.#k),n.push(...this.#se());let s=this.#F?us(this.#F):void 0;if(s)switch(s.type){case"file":case"diff":case"text":case"thinking":case"suggestion":case"tool":n.push({type:"start",id:s.id,name:s.type,filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??"",content:""}),n.push({type:"delta",name:s.type,delta:s.content});break}let o=this.#t?.devServerOrchestrator;o?(n.push({type:"dev-server",devServerState:o.devState,setupState:o.setupState,httpServerState:o.httpServerState,devCommand:o.devCommand,setupCommand:o.setupCommand,proxyServer:o.proxyTarget}),o.setupState!=="installed"&&n.push({type:"stdio",id:"setupCommand",command:o.setupCommand??"",content:o.getSetupOutput(),source:"run-command",stream:"stdout"}),n.push({type:"stdio",id:"devServer",command:o.devCommand,content:o.getOutput(),source:"run-command",stream:"stdout"})):r({type:"dev-server",devServerState:"running",setupState:"installed",httpServerState:"ok-2xx",devCommand:this.#i?.devCommand,setupCommand:this.#i?.setupCommand,proxyServer:this.#i?.serverUrl}),n.push({type:"state",newState:i.state,abortable:i.state==="generating",previousState:"replay"}),this.#C&&i.state!=="generating"&&n.push({type:"wait-for-input",state:i.state,suggestion:this.#A}),r({type:"batch",steps:n})}return this.#r.on("step",r),this.waitForEventLoop(),()=>{this.#r.off("step",r)}}waitUntilIdle(){return this.waitForEventLoop(),(0,Jm.once)(this.#r,"idle").then(()=>Promise.allSettled(this.#p)).then(()=>{})}waitForEventLoop(){return this.#C?this.#C:this.#C=this.#ve()}async#ve(){if(this.#C||this.#v)throw new Error("Event loop already started");let t=Fie(),r=o=>{o.type==="error"&&this.#w>0&&(o.restoreCredits=this.#w,this.#w=0,Cie(this.#e,this.#s,s.sessionId,o.restoreCredits).catch(a=>{this.#e.Sentry?.captureException(a)})),this.#r.emit("step",o)};this.#v=new AbortController;let n=this.#v.signal,i=this.#t?.devServerOrchestrator,s=this.getSessionContext();this.#e.Sentry?.setContext("codeGen",{sessionId:s.sessionId}),await this.emitGitStatus(),i?.setupState==="not-installed"&&this.runSetupCommand();try{for(;!n.aborted;){this.#d=void 0;let o=this.getNextMessage();o.shouldWait&&await this.#B()&&this.#r.emit("idle");let a=await o.promise;if(n.aborted)break;if(a){try{this.#A=void 0,a.logsCheckpoint&&i?.addCheckpoint(),this.#d=new AbortController;let c=_c([n,this.#d.signal]);if(c?.aborted)throw Nc();this.#S("generating"),await this.#De(a,c,r),this.#S("success"),this.#A=void 0}catch(c){c instanceof Error?c.name==="AbortError"?(r({type:"user-abort",hasContinueMessage:!!this.#u}),this.#S("abort")):(this.#x=void 0,r({type:"error",code:"cli-genetic-error",message:c.message,metadata:{error:c}}),this.#e.Sentry?.captureException(c),this.#S("error")):this.#S("error")}this.#ue++}}}catch(o){throw this.#e.Sentry?.captureException(o,{level:"fatal"}),o}finally{this.#v=void 0,this.#C=void 0,t()}this.#r.emit("idle"),this.#S("close")}async#De(t,r,n){this.#w=0;let i=this.getSessionContext(),s=0;for(;;){if(r?.aborted)throw Nc();try{let o=await this.#we(s===0?t:void 0,r,n);if(o.modelOverride=t.modelOverride,o.user.role==="user"){let c=o.files.filter(u=>(u.importance??0)>2.5&&u.content).map(u=>({filePath:u.filePath,size:u.content?.length??0,isCustomInstruction:!1,wasIncluded:u.wasIncluded}));i.customInstructions.forEach(u=>{u.filePath&&c.push({filePath:u.filePath,size:u.content?.length??0,isCustomInstruction:!0,wasIncluded:!0})}),n({type:"user-input",prompt:o.userMessage?.displayPrompt??o.userPrompt,files:c})}let a=await this.#Ce(i,o,r,n);if(this.#x=void 0,await this.#ie(),!a)break}finally{Die(i.turns),s++}}}async#Ce(t,r,n,i){if(this.#F)throw new Error("generateCompletion already started");let s=this.getLastTurn()?.nextUrl??this.#M;i({type:"start",id:"",name:"thinking",title:"Thinking",content:""});try{let o=this.#F=[],a=await this.getCurrentCommitHash();!t.beforeCommit&&a&&(t.beforeCommit=a);let c={url:s,position:this.#$,eventName:"cli code",maxPages:2,autoContinue:1,codeGenMode:this.#D,userContext:t.userContext,files:r.files,mcpServers:this.#Q,maxTokens:this.#X,aclPolicy:this.#i?.accessControl,repoIndexingConfig:this.#i?.repoIndexingConfig,attachments:r.attachments,customInstructions:t.customInstructions,sessionId:t.sessionId,userPrompt:r.userPrompt,ephemeralUserPrompt:r.userMessage?.ephemeralUserPrompt,displayUserPrompt:r.userMessage?.displayPrompt,projectId:this.#y,pingEvents:!0,workingDirectory:this.#o,beforeCommit:a,toolResults:r.toolResults,role:r.user.role,user:r.user,enabledTools:this.#g,searchResponse:r.searchResponse,modelOverride:r.modelOverride??this.#Z},u=Eie(this.#e,this.#s,c,this.#c,n),l;for await(let p of u){let d=async g=>{if(g.type==="user"){let y=l={state:"running",unixTime:Date.now(),title:"",sentiment:void 0,userMessage:r.userMessage,afterCommit:a,beforeCommit:a,creditsUsed:0,actions:[],applyResults:[],completionId:g.id??"",nextUrl:void 0,user:g.user,autoContinue:!1};l=y,t.turns.push(y),g.compacting&&(t.customInstructions=await this.#K()),i({type:"user",displayPrompt:g.displayPrompt,id:g.id,user:g.user,role:g.user.role,compacting:g.compacting})}else if(g.type==="mcp-status")this.#j=g,i(g);else{if(g.type==="error")return i(g),!0;if(g.type==="done"){this.#w+=g.creditsUsed;let y=l=await this.#Se(t,g,l,a);for(let C of g.actions??[])C.type==="tool_result"&&i({type:"tool_result",result:{content:C.content,tool_use_id:C.id,type:"tool_result",title:C.actionTitle,tool_name:C.filePath,is_error:!!C.errors?.length}});y.applyResults.length>0&&this.#t?.devServerOrchestrator?.addCheckpoint();let b=await this.#Ae(this.#e,y),v=await this.commitWorkInProgress(y);v&&(b=!0,y.afterCommit=v,a=v),this.#I({id:y.completionId,beforeCommit:y.beforeCommit,afterCommit:y.afterCommit}),i({type:"done",stopReason:g.stopReason,id:g.id,applyResults:y.applyResults,actions:g.actions??[],creditsUsed:g.creditsUsed,sessionUsage:g.sessionUsage,usage:g.usage,url:g.nextUrl,hasChanges:b})}else{if(g.type==="continue")return i({type:"continue",id:g.id,url:g.nextUrl,autoContinue:g.autoContinue}),!0;g.type==="thinking"&&(g.actionTitle="Planning"),"content"in g&&g.type!=="delta"&&i({type:"start",name:g.type,filePath:g.filePath??"",id:"id"in g?g.id:void 0,title:g.actionTitle??g.artifactTitle??g.filePath??"",content:g.content??""})}}return!1},h=async g=>{g.type==="thinking"&&i({type:"planning",content:g.content}),g.type==="server_tool_result"&&i({type:"server_tool_result",content:JSON.parse(g.content),title:g.actionTitle??g.artifactTitle??"Server Tool Result",id:g.id}),g.type==="file"&&g.filePath&&!g.synthetic&&i({type:"file",filePath:g.filePath,content:g.content,title:g.actionTitle??g.artifactTitle??"Created",id:g.id,errors:g.errors}),g.type==="diff"&&g.filePath&&!g.synthetic&&i({type:"diff",filePath:g.filePath,title:g.actionTitle??g.artifactTitle??"Updated",content:g.content,id:g.id,errors:g.errors}),g.type==="tool"&&g.filePath?i({type:"tool",name:g.filePath,id:g.id,content:g.content}):g.type==="text"&&i({type:"text",content:g.content})},m=async(g,y)=>{i({type:"delta",name:g.type,delta:y})};if(p.type!=="ping")if(p.type==="delta"){let g=p.content,y=us(o);y&&"content"in y&&(y.content+=g,await m(y,g))}else{let g=us(o);if(g&&"content"in g&&(g.incomplete=!1,await h(g)),o.push(p),await d(p))break}}return l?l.actions.some(p=>p.type==="tool")||l.autoContinue:!1}finally{this.#F=void 0}}async commitWorkInProgress(t){if(this.#t?.git&&!await this.isCleanWorkTree())try{await this.git(["add","."]);let n=`${t.title}
|
|
1851
1851
|
${t.completionId}`.split(`
|
|
1852
|
-
`).flatMap(s=>["-m",s]);await this.git(["commit","--allow-empty","--quiet","--no-verify",...n]);let i=await this.getCurrentCommitHash();return await this.emitGitStatus(),i}catch(r){this.#e.Sentry?.captureException(new Error("Error commiting work in progress",{cause:r}),{tags:{operation:"codegen-git"}})}}async#
|
|
1852
|
+
`).flatMap(s=>["-m",s]);await this.git(["commit","--allow-empty","--quiet","--no-verify",...n]);let i=await this.getCurrentCommitHash();return await this.emitGitStatus(),i}catch(r){this.#e.Sentry?.captureException(new Error("Error commiting work in progress",{cause:r}),{tags:{operation:"codegen-git"}})}}async#Ee(t,r,n,i){let s=r.actions.filter(o=>o.type==="tool"&&o.id).map(o=>{let a=o.content.trim();return{id:o.id,name:o.filePath,input:a?JSON.parse(a):{},abortController:this.#f.find(c=>c.id===o.id)?.abortController??new AbortController}})??[];if(s.length>0){this.#f=s;try{let o={sys:this.#e,credentials:this.#s,files:t.files,user:t.user,position:this.#$,fusionConfig:this.#i,signal:n,emitter:this.#r,filterText:c=>(c=k8(c,this.#R),this.#i?.accessControl?.secrets&&(c=N8(c,this.#i.accessControl.secrets)),c),allowedCommands:P8(this.#i?.allowedCommands??[]),getAllFiles:c=>this.getAllFiles(c),workingDirectory:this.#o,bashWorkingDirectory:this.#R,workspaceFolders:this.#n?.folders??[],restore:c=>this.restore(c),patchFusionConfig:c=>{t.patchFusionConfig||(t.patchFusionConfig={});let u=t.patchFusionConfig.envVariables;Object.assign(t.patchFusionConfig,c),t.patchFusionConfig.envVariables={...u,...c.envVariables}},readFile:c=>this.readFile(c),writeFile:(c,u)=>this.writeFile(c,u),deleteFile:c=>this.deleteFile(c),fileExists:c=>this.fileExists(c),listDir:c=>this.listDir(c),stat:c=>this.stat(c),passThrough:(c,u)=>{let l={toolResult:"Aborted by the user. So the task could not be completed.",isError:!0,title:"Aborted by the user."};return new Promise(p=>{let d=()=>{u.removeEventListener("abort",h),this.#N.delete(c.id)},h=()=>{d(),p(l)};if(u.aborted){h();return}u.addEventListener("abort",h),this.#N.set(c.id,m=>{d(),p(m)}),this.#r.emit("step",{type:"tool-call-request",id:c.id,name:c.name,input:c.input})})},resolveWorkspacePath:(c,u)=>this.resolveWorkspacePath(c,u),absolutePathToWorkspaceUrl:c=>this.absolutePathToWorkspaceUrl(c),...this.#t},a=await B8(o,s,r.cachedToolResults,i);if(r.cachedToolResults=a,o.signal?.aborted)throw Nc();t.patchFusionConfig&&this.#r.emit("step",{type:"fusion-config-patch",patch:t.patchFusionConfig}),t.files=o.files,t.toolResults=a}finally{this.#f=[]}}}async#we(t,r,n){let i=this.getSessionContext(),s=us(i.turns),o=structuredClone(t?.user??s?.user??{source:"agent",role:"agent"}),a={userMessage:t,userPrompt:t?.userPrompt??"",files:[],attachments:[],searchResponse:null,rerankFiles:0,mostRelevantFile:null,toolResults:[],user:o,modelOverride:t?.modelOverride},c=!!this.getLastTurn()?.nextUrl,u=i.turns.length<2||!c,l=null;if(t){if(u){let C=function(D){return b&&H8(D)?5:m.has(D)||v.some(E=>D.toLowerCase().startsWith(E.toLowerCase()))?2:0};var p=C;let d=AR(await this.getAllFiles()),h=new Set,m=new Set,g=i.sessionId;if(!(t.skipSearch??this.#D!="quality")){n({type:"start",title:"Searching codebase",id:"",content:"",name:"search"});let D=await this.#e.getRepoInfo(this.#a),E=await rn(this.#e,this.#a);if(r?.aborted)throw Nc();if(l=await BR(this.#e,this.#s,r,{query:t.userPrompt,selectedFiles:t.files,repoInfo:D,limit:10,files:d.slice(0,300),packageJson:E?JSON.stringify(E):void 0,sessionId:g}),r?.aborted)throw Nc();if(this.#c&&console.log(`Search Codebase results: ${JSON.stringify(l,void 0,2)}`),l){for(let S of l.relevantPaths)h.add(kc(S));for(let S of l.ranked)h.add(kc(S.filePath));if(this.#D==="quality"){let S=0;for(let P of l.grepQueries){let I=await L8(this.#e,this.#o,P);for(let A of I.matches)S===0?h.add(kc(A.path)):m.add(kc(A.path));S++}}}}if(t.files)for(let D of t.files)h.add(kc(D));let b=t.includeBaseFiles??i.turns.length===0,v=Array.from(h),x=r.aborted?[]:d.map(D=>{let E=C(D);if(E===0)return{filePath:D};let S=null;try{if(S=this.readFileSync(D),!S)return{filePath:D}}catch{return{filePath:D}}let P=S.length<3e4;return{filePath:D,content:S,importance:P?E:2}});a.files=x}if(this.#t?.git){let d,h=await this.getChangesReport();if(h){for(let m of h.files)if(!a.files.some(g=>g.filePath===m))try{let g=await this.readFile(m);a.files.push({filePath:m,importance:0,content:g??void 0})}catch{a.files.push({filePath:m,importance:0})}h.diff.length<3e4?d=h.diff:d=h.files.map(m=>`- ${m}`).join(`
|
|
1853
1853
|
`).trim().slice(0,3e4),d&&(a.userPrompt=`
|
|
1854
1854
|
Since last time, some files were changed by the user or tools (formatting for example):
|
|
1855
1855
|
<modified-files-context>
|
|
1856
1856
|
${d}
|
|
1857
1857
|
</modified-files-context>
|
|
1858
1858
|
|
|
1859
|
-
${a.userPrompt}`)}}a.attachments=t.attachments??[],a.searchResponse=l,a.rerankFiles=0,a.mostRelevantFile=null,a.toolResults=[]}else a.user.role="agent";return s&&await this.#
|
|
1859
|
+
${a.userPrompt}`)}}a.attachments=t.attachments??[],a.searchResponse=l,a.rerankFiles=0,a.mostRelevantFile=null,a.toolResults=[]}else a.user.role="agent";return s&&await this.#Ee(a,s,r,n),a}async#Se(t,r,n,i){let{actions:s}=r,o=n||{state:"done",unixTime:r.unixTime??Date.now(),title:r.actionTitle,user:{source:"agent",role:"agent"},completionId:r.id??"",creditsUsed:r.creditsUsed??0,nextUrl:r.nextUrl,applyResults:[],actions:s??[],userMessage:void 0,beforeCommit:i,afterCommit:i,sentiment:void 0,autoContinue:r.autoContinue};if(o.state="done",o.title=r.actionTitle??"",o.creditsUsed=r.creditsUsed??0,o.nextUrl=r.nextUrl,o.autoContinue=r.autoContinue,o.actions=s??[],n||t.turns.push(o),Array.isArray(s))for(let a of s){let c=a.filePath;if(a.type==="file"&&c&&!a.incomplete){let l=await this.fileExists(c)?this.readFileSync(c):null;if(l)if(a.content.trim()==="")o.applyResults.push({action:"delete",filePath:c,addedLines:0,removedLines:l.split(`
|
|
1860
1860
|
`).length,content:"",oldContent:l});else{let p=RR(l,a.content);o.applyResults.push({action:"update",filePath:c,addedLines:p.filter(d=>d.added).reduce((d,h)=>d+(h.count??0),0),removedLines:p.filter(d=>d.removed).reduce((d,h)=>d+(h.count??0),0),content:a.content,oldContent:l})}else o.applyResults.push({action:"create",filePath:c,addedLines:a.content.split(`
|
|
1861
|
-
`).length,removedLines:0,content:a.content,oldContent:""})}}return o}#
|
|
1862
|
-
`).map(c=>(c=c.trim(),c?this.absolutePathToWorkspaceUrl(this.#e.join(this.#a,c)):null)).filter(c=>c!=null),s=await this.git(["--no-pager","diff","-U0","--no-color",r]).then(c=>c.trim()),o="",a=this.#n?.folders.find(c=>c.enableGit);return a&&!this.#
|
|
1863
|
-
`),{files:i,diff:`${o}${s}`}}catch(t){this.#e.Sentry?.captureException(t,{tags:{operation:"codegen-git"}});return}}#
|
|
1861
|
+
`).length,removedLines:0,content:a.content,oldContent:""})}}return o}#oe(){let t=this.getSessionContext(),r=t.beforeCommit,n=t.turns.findLast(s=>s.afterCommit??s.beforeCommit),i=n?.afterCommit??n?.beforeCommit;return r&&i&&r!==i?!0:t.turns.some(s=>s.applyResults.length>0)}async#Te(){try{let t="{/* TODO: FUSION_GENERATION_APP_PLACEHOLDER replace everything here with the actual app! */}",r=await this.#e.readFile(this.resolveWorkspacePath("client/pages/Index.tsx",!0).resolvedPath);if((await this.#e.readFile(this.resolveWorkspacePath("client/App.tsx",!0).resolvedPath))?.includes('<Route path="/" element={<Index />} />')&&r&&r.includes(t))return!0}catch{}return!1}async getChangesReport(){if(this.#t?.git)try{let r=this.getSessionContext().turns.findLast(c=>c.actions.some(u=>u.type==="file"||u.type==="diff"))?.afterCommit;if(!r)return;let i=(await this.git(["--no-pager","diff","--name-only",r])).trim().split(`
|
|
1862
|
+
`).map(c=>(c=c.trim(),c?this.absolutePathToWorkspaceUrl(this.#e.join(this.#a,c)):null)).filter(c=>c!=null),s=await this.git(["--no-pager","diff","-U0","--no-color",r]).then(c=>c.trim()),o="",a=this.#n?.folders.find(c=>c.enableGit);return a&&!this.#ce()&&s.length>0&&(o=`Changes inside "${a.name}/":
|
|
1863
|
+
`),{files:i,diff:`${o}${s}`}}catch(t){this.#e.Sentry?.captureException(t,{tags:{operation:"codegen-git"}});return}}#ae(){return["status","--porcelain=v1","-z","--ignore-submodules=dirty"]}async isCleanWorkTree(){try{return(await this.git(this.#ae())).trim().length===0}catch{return!1}}async#Ae(t,r){let n=!1,i=r.applyResults;for(let s of i)try{if(s.action==="delete")await this.deleteFile(s.filePath)&&(n=!0);else if(s.content&&await this.writeFile(s.filePath,s.content)){let{resolvedPath:a}=this.resolveWorkspacePath(s.filePath,!0);this.#H.add(a),n=!0}}catch(o){t.Sentry?.captureException(o)}return n}#ce(){return this.#n?.folders?.length===1&&this.#n.folders[0].name==="."}#L(){return this.#n?.folders?.length===1}resolveWorkspacePath(t,r){return $8({filePath:t,forceWorkspace:r,workspace:this.#n,workingDirectory:this.#o,sys:this.#e,canCollapseWorkspace:this.#L()})}#b(){try{let t=this.getSessionContext();return us(t.turns)?.user.principals}catch{return}}absolutePathToWorkspaceUrl(t){return U8({absolutePath:t,workspace:this.#n,workingDirectory:this.#o,sys:this.#e,canCollapseWorkspace:this.#L()})}async readFile(t){let r=Qs(t,"read",this.#i?.accessControl,this.#b());if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return this.#n.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n))return await this.#e.readFile(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n))return await this.#e.readFile(n)}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:t}})}return null}async fileExists(t){let r=Qs(t,"read",this.#i?.accessControl,this.#b());if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return!0;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n)||({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n)))return!0}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:t}})}return!1}readFileSync(t){let r=Qs(t,"read",this.#i?.accessControl,this.#b());if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return this.#n.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(this.#e.existsSync(n))return this.#e.readFileSync(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),this.#e.existsSync(n))return this.#e.readFileSync(n)}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:t}})}return null}async writeFile(t,r){let n=Qs(t,"write",this.#i?.accessControl,this.#b());if(!n.allowed)throw new Error(`ACL denied: ${n.message}`);try{let{resolvedPath:i}=this.resolveWorkspacePath(t,!0);return await this.#e.writeFile(i,r),!0}catch(i){return this.#e.Sentry?.captureException(i,{extra:{filePath:t}}),!1}}async listDir(t){let r=Qs(t,"list",this.#i?.accessControl,this.#b());if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n,workspaceFolder:i}=this.resolveWorkspacePath(t,!0);if(!await this.#e.exists(n))return[];let s=await this.#e.readdir(n,!1);if(this.#ce())return s.map(o=>this.#e.join(t,o).replace(/^\.\//,""));if(i&&this.#n?.folders){let o=i.name||i.path;return s.map(a=>`${o}/${this.#e.join(t,a).replace(/^\.\//,"")}`)}return s}catch(n){return this.#e.Sentry?.captureException(n,{extra:{dirPath:t}}),[]}}async stat(t){let r=Qs(t,"read",this.#i?.accessControl,this.#b());if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n))return await this.#e.stat(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n))return await this.#e.stat(n)}catch(n){this.#e.Sentry?.captureException(n,{extra:{filePath:t}})}return null}async deleteFile(t){let r=Qs(t,"write",this.#i?.accessControl,this.#b());if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!0);return await this.#e.exists(n)?(await this.#e.unlink(n),!0):!1}catch(n){return this.#e.Sentry?.captureException(n,{extra:{filePath:t}}),!1}}getLinesStats(){let t=this.#l?.turns.reduce((r,n)=>{let i=n.applyResults.reduce((s,o)=>({added:s.added+o.addedLines,removed:s.removed+o.removedLines}),{added:0,removed:0});return{added:r.added+i.added,removed:r.removed+i.removed}},{added:0,removed:0})??{added:0,removed:0};return{...t,net:t.added-t.removed}}async getDiffFromRemote(){if(!this.#t?.git)return[];try{let t=(await this.git(["branch","--show-current"])).trim();if(!t)throw new Error("Could not determine current branch");let r=!1;try{r=(await this.git(["remote"])).includes("origin")}catch{return console.warn("No git remotes configured, cannot get diff from remote"),[]}if(!r){console.warn("Origin remote not found, trying to get diff from local main branch");try{let o=await this.git(["branch","--list"]),a=o.includes("* main")||o.includes(" main"),c=o.includes("* master")||o.includes(" master"),u=null;if(a?u="main":c&&(u="master"),u&&u!==t){let l=await this.git(["diff",u,"--"]);return!l||l.trim()===""?[]:$0(l)}else return console.warn("No local main/master branch found or already on main branch"),[]}catch(o){return console.warn("Failed to get diff from local main branch:",o),[]}}let n=!1,i;try{let o=`origin/${t}`;if(n=(await this.git(["ls-remote","--heads","origin",t])).trim().length>0,n)i=o;else{i=await this.getDefaultBranch();let c=i.split("/")[1];try{await this.git(["fetch","origin",c])}catch(u){console.warn("Failed to fetch latest changes from remote:",u)}}}catch(o){return console.warn("Failed to check remote branches:",o),[]}let s=await this.git(["diff",i,"--"]);return!s||s.trim()===""?[]:$0(s)}catch(t){return console.error("getDiffFromRemote error:",t),[]}}async getDefaultBranch(){try{let r=(await this.git(["remote","show","origin"])).match(/HEAD branch: (.+)/);if(r)return`origin/${r[1].trim()}`}catch{}try{if((await this.git(["ls-remote","--heads","origin","main"])).trim().length>0)return"origin/main"}catch{}try{if((await this.git(["ls-remote","--heads","origin","master"])).trim().length>0)return"origin/master"}catch{}try{let r=(await this.git(["ls-remote","--heads","origin"])).trim().split(`
|
|
1864
1864
|
`).map(n=>n.split(" ")[1]).filter(n=>n&&!n.includes("HEAD"));if(r.length>0)return`origin/${r[0].replace("refs/heads/","")}`}catch{}throw new Error("Could not determine default branch. No remote branches found.")}};function G8(e){for(let t=e.turns.length-1;t>=0;t--){let r=e.turns[t];if(r.state==="done"&&r.nextUrl)return r}}function vie(e){for(let t=e.turns.length-1;t>=0;t--){let r=e.turns[t];if(r.nextUrl&&(r.applyResults.length>0||r.user.role==="user"))return r}}function us(e){return e[e.length-1]}function Die(e){for(let t=e.length-1;t>=0;t--)e[t].state!=="done"&&e.splice(t,1)}async function Cie(e,t,r,n){let i=new URL(`${Fe}/codegen/restore-consumed-credit`);t.builderPublicKey&&i.searchParams.set("apiKey",t.builderPublicKey),t.userId&&i.searchParams.set("userId",t.userId);let s={"Content-Type":"application/json"};t.builderPrivateKey&&(s.Authorization=`Bearer ${t.builderPrivateKey}`);try{await he(i,{method:"POST",body:JSON.stringify({sessionId:r,restoreCredits:n}),headers:s})}catch(o){e.Sentry?.captureException(o)}}async function*Eie(e,t,r,n,i){if(!t.builderPrivateKey)throw new Error("Missing builder public key during completion stream");let s=JSON.stringify(r),o=new URL(`${Fe}/codegen/completion`);t.builderPublicKey&&o.searchParams.set("apiKey",t.builderPublicKey),t.userId&&o.searchParams.set("userId",t.userId);let a=performance.now(),c=a,u=!1,l=!1,p=[];try{let d=await he(o,{method:"POST",body:s,keepalive:!1,headers:{Connection:"close","Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`},signal:i});if(!d.ok){if(d.status===402){yield await d.json();return}let m=await d.text(),g=new Error(`Bad Status: ${d.status}: ${m}`);throw g.name="BadStatus",g}let h=Il(d.body);for await(let m of h)if(c=performance.now(),m.length!==0){p.push(m),p=p.slice(-10);try{let g=JSON.parse(m);u=!0,yield g}catch(g){e.Sentry?.captureException(g,{extra:{value:m}})}}}catch(d){if(d instanceof Error&&d.name==="AbortError")throw d;let h=performance.now();if(l){e.Sentry?.captureException(new Error("Error after stream ended",{cause:d}),{extra:{didStream:u,lastMessageElapsed:h-c,totalElapsed:h-a,lastEvents:p}});return}let m=d instanceof Error?d.name:"UnknownError",g=new _r(`codegen/completion endpoint: ${m}`,{cause:d});throw e.Sentry?.captureException(g,{extra:{didStream:u,lastMessageElapsed:h-c,totalElapsed:h-a,lastEvents:p}}),g}finally{l=!0}}async function wie(e,t,r,n){let i,o=JSON.stringify(r);for(let a=0;a<3;a++){try{let c=new URL(`${Fe}/codegen/feedback`);t.builderPublicKey&&c.searchParams.set("apiKey",t.builderPublicKey),t.userId&&c.searchParams.set("userId",t.userId);let u={"Content-Type":"application/json"};t.builderPrivateKey&&(u.Authorization=`Bearer ${t.builderPrivateKey}`);let l=await he(c,{method:"POST",body:o,keepalive:!0,headers:u});if(l.ok)return!0;throw new Error(`Bad Status: ${l.status}`)}catch(c){i=c}a<2&&await r0(a)}return i&&e.Sentry?.captureException(i),!1}async function z8(e,t,r,n){let i,o=JSON.stringify(r);for(let a=0;a<2;a++){try{let c=new URL(`${Fe}/codegen/sessions/set-last-completion`);t.builderPublicKey&&c.searchParams.set("apiKey",t.builderPublicKey),t.userId&&c.searchParams.set("userId",t.userId);let u={"Content-Type":"application/json"};t.builderPrivateKey&&(u.Authorization=`Bearer ${t.builderPrivateKey}`);let l=await he(c,{method:"POST",body:o,keepalive:!0,headers:u});if(l.ok)return!0;throw new Error(`Bad Status: ${l.status}`)}catch(c){i=c}a<1&&await r0(a)}return i&&e.Sentry?.captureException(i),!1}async function U0(e,t,r,n,i){try{let s=new URL(`${Fe}/codegen/sessions/${r}/turns`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),s.searchParams.set("linear",String(n)),i&&s.searchParams.set("completionIdCursor",i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`);let a=await he(s,{method:"GET",headers:o,keepalive:!0});if(!a.ok)throw new Error("Failed to get turns");return await a.json()}catch(s){return e.Sentry?.captureException(s),{turns:[],sessionId:r,initialUrl:void 0,beforeCommit:void 0,title:void 0,createdUnixTime:void 0,updatedUnixTime:void 0,allIds:[],lastCompletionId:void 0,canLoadMore:!1}}}async function Sie(e,t){let r=[];async function n(u){try{let l=e.resolve(t,u);if(await e.exists(l)){let p=await e.readFile(l);if(p){let d=OR(p,u);r.push(d)}}}catch(l){console.debug(`No ${u} found or error reading it:`,l)}}async function i(u){try{let l=e.resolve(t,u);if(await e.exists(l)){let p=await e.readFile(l);if(p){let d="hash-"+await e.hash(p);r.push({id:d,name:u,content:p,filePath:u})}}}catch(l){console.debug(`No ${u} found or error reading it:`,l)}}let s=[".cursor/rules",".builder/rules"],o=[".cursorrules",".builderrules",".windsurfrules",".github/copilot-instructions.md"],a=e.cwd(),c;do{try{for(let u of s){let l=e.resolve(a,u);if(await e.exists(l)){let p=await e.readdir(l);for(let d of p){let h=e.relative(t,e.resolve(a,`${u}/${d}`));await n(h)}}}}catch(u){console.debug(`Error reading ${a}:`,u)}for(let u of o){let l=e.relative(t,e.resolve(a,u));await i(l)}if(c=a,a=e.dirname(a),a===c)break}while(c!==t);return r}var Tie=e=>{if(!e)return{id:void 0,isInitial:!0};let t=new URL(e);return t.protocol==="cgen:"?{isInitial:!1,id:t.pathname.slice(1)}:{isInitial:!0,id:void 0}};async function j0(e,t){let r=await e.getRepoInfo(t),n={client:"@builder.io/dev-tools",clientVersion:e.version,nodeVersion:process.version,frameworks:e.getFrameworks().map(i=>i.name),systemPlatform:process.platform,systemEOL:Wm.default.EOL,systemArch:Wm.default.arch(),inGitRepo:!!r.remoteUrl};try{let i=Wm.default.userInfo();n.systemShell=i.shell??void 0}catch{}return n}function J8(){let e=!1,t=[],r,n;i();function i(){n=new Promise(c=>r=c)}async function*s(){await n;let c=t.shift();c&&(yield c),e||(yield*s())}function o(c){t.push(c),r(),i()}function a(){e=!0,r()}return[s(),o,a]}function Aie(e,t){return e.split(t).length-1}function H8(e){return e.endsWith("package.json")&&Aie(e,"/")<2||e.endsWith("Podfile")||e.endsWith("Cartfile")||e.endsWith("global.css")||e.endsWith("tailwind.config.ts")||e.endsWith("tailwind.config.js")||e.endsWith("libraries.toml")||e.endsWith("CLAUDE.md")||e.endsWith("AGENT.md")||e.endsWith("AGENTS.md")}function Pie(e){return e?[/ERROR[ ]in\b/i,/(\b|^)failed to compile\b/i,/(\b|^)Internal server error\b/i,/(\b|^)Error when evaluating SSR module virtual\b/i,/(\b|^)ReferenceError: \w* is not defined\b/i,/(\b|^)Found \d+ errors?\./i,/(\b|^)error TS\d+\b/i,/(\b|^)Module build failed\b/i,/(\b|^)Build failed\b/i,/(\b|^)\[Error:.*\]/i,/(\b|^)uncaughtException: /i].some(r=>r.test(e)):!1}async function X8(e,t){try{let r=e.resolve(e.cwd(),t);if(!await e.exists(r))throw new Error(`Workspace file not found: ${t}`);let n=await e.readFile(r);if(!n)throw new Error(`Failed to read workspace file: ${t}`);let i=JSON.parse(n);if(!i.folders||!Array.isArray(i.folders))throw new Error('Invalid workspace configuration: missing "folders" array');let s=e.dirname(r);return{workspace:i,workingDirectory:s}}catch(r){throw console.error(`Error loading workspace: ${r instanceof Error?r.message:String(r)}`),r}}function K8(e,t){return{userPrompt:e.userPrompt+`
|
|
1865
1865
|
|
|
1866
|
-
`+t.userPrompt,files:Array.from(new Set([...e.files??[],...t.files??[]])),includeBaseFiles:e.includeBaseFiles,skipSearch:t.skipSearch,attachments:t.attachments,
|
|
1866
|
+
`+t.userPrompt,files:Array.from(new Set([...e.files??[],...t.files??[]])),includeBaseFiles:e.includeBaseFiles,skipSearch:t.skipSearch,attachments:t.attachments,displayPrompt:t.displayPrompt,ephemeralUserPrompt:t.ephemeralUserPrompt,dropAbortedPrompt:t.dropAbortedPrompt,user:t.user,modelOverride:t.modelOverride,logsCheckpoint:t.logsCheckpoint}}function Fie(){let e=setInterval(()=>{},1073741824);return()=>clearInterval(e)}function _ie(e){let t=e.trim().split(/\s+/).filter(Boolean),r=Number.parseInt(t[0]??"",10),n=Number.parseInt(t[1]??"",10);return{ahead:Number.isFinite(r)?r:0,behind:Number.isFinite(n)?n:0}}function Iie(e){if(e.startsWith("ai/")){let t=e.split("/");if(t.length<3)return{sessionId:void 0,featureBranch:e};let r=t.pop();t.shift();let n=t.join("/");return{sessionId:r,featureBranch:n}}else if(e.startsWith("ai_")){let t=e.split("_");if(t.length<3)return{sessionId:void 0,featureBranch:e};let r=t.pop();t.shift();let n=t.join("_");return{sessionId:r,featureBranch:n}}return{sessionId:void 0,featureBranch:e}}var Ic=class extends Error{code;stdout;stderr;constructor(t,r,n,i,s){super(t,s),this.name="BashError",this.code=r,this.stdout=n,this.stderr=i}};var z0=q(require("readline"),1);f();async function Rc(e){let{default:t}=await import("open");await t(e)}f();var q0=require("process");async function Xm(e,t){let r=["builder.config.json","fusion.config.json"],n=e.cwd(),i=!!t.local||!t.projectId,s,o={devCommand:"",workingDirectory:n,projectId:t.projectId,branchName:t.branchName,serverUrl:"",commitMode:"commits",isLocal:i,allowedCommands:["npm *","pnpm *","yarn *","yarn","git diff *","git diff","git log *","git log","git status *","git status","git add *","git commit *","git pull *","git fetch *","git merge *","echo *","cd *","rm *","find *","ls *","cp *","mv *","curl *","npx tsc *","head *","lsof *","kill *","ps *","awk *","cat *","grep *","sed *","tail *","touch *","mkdir *","npx *","env","printenv *","sleep *","netlify *"]};if(t.configJson)try{let d=JSON.parse(t.configJson);o=Object.assign({},o,d),o.projectId&&(i=!1,o.isLocal=!1)}catch(d){e.Sentry?.captureException(d)}else{for(let d of r){let h=e.join(n,d);if(await e.exists(h)){s=h;break}}if(s)try{let d=await e.readFile(s);if(d){let h=JSON.parse(d);o=Object.assign({},o,h)}}catch(d){e.Sentry?.captureException(d)}}o.command&&(o.devCommand||(o.devCommand=o.command),delete o.command);let a=t.c||t.command,c=t.p||t.port,u=t.installCommand,l=t.serverUrl,p=t.interactive&&!t.configJson&&!t.fusionInit&&i;if(l)p=!1,o.serverUrl=l,a||(o.devCommand="");else if(a&&c){p=!1;let d="http://localhost";if(o.serverUrl)try{let h=new URL(o.serverUrl);d=`${h.protocol}//${h.hostname}`}catch{d="http://localhost"}o.serverUrl=`${d}:${c}`,o.devCommand=a}if(a&&c&&(p=!1),c&&!l&&(o.serverUrl=`http://localhost:${c}`),u&&(o.setupCommand=u),a&&(o.devCommand=a),typeof t.authenticateProxy=="boolean"&&(o.authenticateProxy=t.authenticateProxy),p){if(!o.devCommand){let d=await nt({message:"Enter the command to run for the dev server (e.g. 'npm run dev')",placeholder:"npm run dev",validate:h=>{if(h.trim()===""||h.length===0)return"Command cannot be empty"}});if(ve(d))return De("Goodbye! \u{1F44B}"),await(0,q0.exit)(1);o.devCommand=d}if(!o.serverUrl){let d=await nt({message:"Enter the port number for the dev server",placeholder:"3000",validate:h=>{let m=Number(h);if(isNaN(m)||m<0||m>65535||Math.floor(m)!==m)return"Invalid port number, must be an integer between 0 and 65535"}});if(ve(d))return De("Goodbye! \u{1F44B}"),await(0,q0.exit)(1);o.serverUrl=`http://localhost:${d}`}await e.writeFile(s??e.join(n,r[0]),JSON.stringify(kie(o,"workingDirectory","projectId","authenticateProxy"),null,2))}return o}var kie=(e,...t)=>{let r={};if(e&&typeof e=="object")for(let n in e)(!e.hasOwnProperty||e.hasOwnProperty(n))&&(t.includes(n)||(r[n]=e[n]));return r};var t3=async(e,t,r)=>{t==="indexing"?await FR(e,r):t==="generate"||t==="gen"||t==="g"?await Q8(e,r):t==="gen"?ti("code"):await Q8(e,r)},Q8=async(e,t)=>{if(console.log(""),ze((0,pe.bgCyan)((0,pe.bold)((0,pe.white)(" code ")))+" "+(0,pe.dim)(Ce)),!Mie()&&!t.prompt){await _e("tty error",{}),B.error(`This command requires a TTY-enabled terminal.
|
|
1867
1867
|
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await te(1);return}await _e("figma code started",{}),t.workspace||await Kl(e,!t.prompt);let r=await yt(e,t,{forceSpaceId:t.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),n,i;if(t.workspace){let y=await X8(e,t.workspace);n=y.workspace,i=y.workingDirectory}let s=await Xm(e,t),o=new Pi({sys:e,credentials:r,position:"cli",initialUrl:t.url,mode:t.mode??"quality-v3",mcpServers:t.mcpSupport||!1,fusionConfig:{...s,workingDirectory:i,workspace:n}}),a=t.prompt,c=(y,b)=>{(b.ctrl&&b.name==="c"||b.name==="escape")&&o.abort()},u,l=()=>{u&&p(),u=z0.default.createInterface({input:process.stdin,output:process.stdout}),process.stdin.isTTY&&process.stdin.setRawMode(!0),z0.default.emitKeypressEvents(process.stdin,u),process.stdin.on("keypress",c)},p=()=>{u&&(process.stdin.removeListener("keypress",c),process.stdin.isTTY&&process.stdin.setRawMode(!1),u.close(),u=void 0)},d,h;await o.initializeSession();let m="",g="";a&&await o.sendMessage({userPrompt:a,user:{source:"builder.io",userId:r.userId,role:"user"}}),await o.connectToEventLoop(!1,async y=>{switch(y.type){case"start":{if(m="",g=y.title,y.name==="tool"&&["view_path","Read"].includes(y.filePath))break;d&&(d.stop(),d=void 0),h&&(h[1](`
|
|
1868
1868
|
`),h[2](),h=void 0),y.name==="text"?(h=J8(),Cs.message(h[0],{symbol:(0,pe.magenta)("~")})):(d=Fn(),d.start(y.title),d.extra(Z8));break}case"delta":{m+=y.delta,y.name==="tool"||(h?h[1](y.delta):d&&d.extra(`
|
|
1869
1869
|
|
|
@@ -3897,7 +3897,7 @@ If the solution is unreasonable or infeasible, or if any of the tests are incorr
|
|
|
3897
3897
|
|
|
3898
3898
|
Do not hack around the problem, make the necessary changes to fix the problem if it's possible.
|
|
3899
3899
|
Those could be file changes, or (dev_server_control) dev-server command changes, or proxy port changes, etc. or a combination of them.
|
|
3900
|
-
`;f();var bs=q(require("fs"),1),Mn=q(require("fs/promises"),1),rr=q(require("path"),1);var yu=class{logIdCounter=0;initStatusLogs=[];sys;config;debug=!0;initState={isRunning:!1,isComplete:!1,success:!1,currentStep:"initial",error:void 0,repos:[]};constructor(t){this.sys=t.sys,this.config=t,this.debug=t.debug??!0}async checkout(t,r,n){try{await this.git(["checkout",t],n)}catch{return await this.git(["checkout","-b",t,r],n),!0}return await this.git(["reset","--hard",r],n),!1}async execAsync(t,r,n){return Js(r,{exec:t,cwd:n,debug:this.debug,sys:this.sys})}async git(t,r){return Js(t,{cwd:r,debug:this.debug,sys:this.sys})}async init(){let t=this.config;this.clearInitLogs(),this.initState.isRunning=!0,this.initState.isComplete=!1;let r=(t.fusionConfig.workspace?.folders??[]).filter(n=>n.branchName&&n.repoUrl&&n.name&&n.path&&n.repoName);this.debug&&console.log(`[DEBUG] Starting initialization with ${r.length} repositories`),this.addInitLog("log",`Starting initialization with ${r.length} repositories`,{step:"init"});try{if(!r.length){let n="At least one repository must be configured";throw new Error(n)}if(!t.sys){let n="DevToolsSys is required in config";throw this.addInitLog("error",n,{step:"validation",error:n}),new Error(n)}return await this.step1CheckDirectories(t,r),this.addInitLog("log","Directories checked",{step:"check-directories"}),await this.step2ConfigureGitRepositories(t,r),this.addInitLog("log","Git repositories configured",{step:"configure-git-repos"}),await this.step3ConfigureGitUser(t,r),this.addInitLog("log","Git user configured",{step:"configure-git-user"}),await this.step4StashChanges(t,r),this.addInitLog("log","Initialization completed successfully",{step:"stash-changes"}),await this.step5CollectRepoInfo(t,r),this.addInitLog("log","Repo info collected",{step:"collect-repo-info"}),this.debug&&console.log("[DEBUG] Initialization completed successfully"),this.addInitLog("complete","Initialization completed successfully",{step:"init-success",success:!0}),!0}catch(n){let i=n instanceof Error?n.message:String(n);this.debug&&console.error(`[DEBUG] Initialization failed with error: ${i}`);let s=this.initStatusLogs.some(o=>o.type==="error"&&o.step&&o.step!=="init-failed");return this.addInitLog("complete",`Initialization failed with error: ${i}`,{step:s?void 0:"init-failed",success:!1,error:i}),t.sys.Sentry?.captureException(n,{tags:{operation:"init",...t.sentryTags}}),!1}}addInitLog(t,r,n){let i={id:++this.logIdCounter,timestamp:new Date().toISOString(),type:t,message:r,...n};this.debug&&console.log(`[DEBUG] ${i.timestamp} ${i.type} ${i.message}`),this.initStatusLogs.push(i),this.initStatusLogs.length>1e3&&this.initStatusLogs.splice(0,this.initStatusLogs.length-1e3),n?.step&&(this.initState.currentStep=n.step),t==="complete"&&(this.initState.isComplete=!0,this.initState.isRunning=!1,this.initState.success=n?.success??!1,this.initState.error=n?.error),t==="error"&&n?.error&&(this.initState.error=n.error)}clearInitLogs(){this.initStatusLogs.length=0,this.logIdCounter=0,this.initState.isRunning=!1,this.initState.isComplete=!1,this.initState.success=!1,this.initState.currentStep="initial",this.initState.error=void 0}async hasFilesButNoGit(t){if(bs.existsSync(t))try{let n=(await Mn.readdir(t)).length>0,i=bs.existsSync(rr.join(t,".git"));return n&&!i}catch{return!1}return!1}async step1CheckDirectories(t,r){this.debug&&console.log("[DEBUG] Checking directories"),this.addInitLog("log","Checking directories",{step:"check-directories"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");if(!bs.existsSync(n)){let i=`Volume directory ${n} does not exist`;throw this.addInitLog("error",i,{step:"check-directories",error:i}),new Error(i)}this.addInitLog("log",`Volume directory exists: ${n}`,{step:"check-directories"});for(let i of r){let s=rr.join(n,i.path);if(bs.existsSync(s))this.addInitLog("log",`Directory already exists: ${s}`,{step:"check-directories"});else{this.debug&&console.log(`[DEBUG] Creating directory: ${s}`),this.addInitLog("log",`Creating directory: ${s}`,{step:"create-directories"});try{await Mn.mkdir(s,{recursive:!0})}catch(o){let a=`Failed to create directory for ${i.repoName} at ${s}: ${o}`;throw this.addInitLog("error",a,{step:"create-directories",error:a}),new Error(a,{cause:o})}}}}async step2ConfigureGitRepositories(t,r){this.addInitLog("log","Configuring git repositories",{step:"configure-git-repos"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??"."),i=rr.join(n,"/temp-cloning"),s=async()=>{bs.existsSync(i)&&(this.addInitLog("log",`Removing temp cloning directory: ${i}`,{step:"configure-git-repos"}),await Mn.rm(i,{recursive:!0,force:!0}))};await s(),this.addInitLog("log",`Creating temp cloning path: ${i}`,{step:"configure-git-repos"}),await Mn.mkdir(i,{recursive:!0});try{for(let o of r){let a=rr.join(n,o.path);if(this.addInitLog("log",`Processing repository: ${o.repoName}`,{step:"configure-git-repos"}),await this.isGitConfigured(a)){await this.cleanupLockFiles(a,o.repoName,t);try{o.enableGit?(this.addInitLog("log",`Git already configured for ${o.repoName}, validating repo`,{step:"check-existing-git"}),await this.validateGitRepo(a)):this.addInitLog("log",`Git already configured for ${o.repoName}, skipping validation because it's not main repo`,{step:"check-existing-git"})}catch(l){let p=`Failed to validate git repo for ${o.repoName}: ${l}`;throw this.addInitLog("error",p,{step:"check-existing-git",error:p}),l}this.addInitLog("log","Git repo is in good state, checking remote URL",{step:"check-existing-git"});let u=await this.getGitRemoteUrl(a);if(u){let l=this.sanitizeGitRemoteUrl(u),p=this.sanitizeGitRemoteUrl(o.repoUrl);if(l!==p){this.addInitLog("log",`Updating remote URL for ${o.repoName}`,{step:"update-remote-url"});try{await this.git(["remote","set-url","origin",o.repoUrl],a)}catch(d){let h=`Failed to update git remote URL for ${o.repoName}: ${d}`;throw this.addInitLog("error",h,{step:"update-remote-url",error:h}),new Error(h)}}}else{this.addInitLog("log",`Adding remote origin for ${o.repoName}`,{step:"check-existing-git"});try{await this.git(["remote","add","origin",o.repoUrl],a)}catch(l){let p=`Failed to add git remote origin for ${o.repoName}: ${l}`;throw this.addInitLog("error",p,{step:"check-existing-git",error:p}),new Error(p)}}}else{if(await this.hasFilesButNoGit(a)){let h="Code directory already exists but is not a git repo";throw this.addInitLog("error",h,{step:"check-existing-git",error:h}),new Error(h)}this.addInitLog("log",`Cloning repository: ${o.repoName}`,{step:"clone-repo"});let l=o.backupMetadata?await E8(t.sys,o.backupMetadata):void 0;if(l&&!l.success)throw this.addInitLog("error",`Failed to download backup for ${o.repoName}: ${l.error}`,{step:"clone-repo",error:l.error.message}),l.error;let p=rr.join(i,o.path);if(await this.cloneRepository({repo:o,repoPath:p,backupResult:l,config:t}))this.addInitLog("log",`Successfully cloned ${o.repoName}`,{step:"clone-repo"});else{let h=`Failed to clone repository ${o.repoName}`;throw this.addInitLog("error",h,{step:"clone-repo",error:h}),new Error(h)}if(l&&l.success&&l.partial)try{await this.restoreFromPartialBackup({repo:o,repoPath:p,backupResult:l})}catch(h){throw h}await Mn.rename(p,a)}}}catch(o){throw console.log(`[DEBUG] Error in step2ConfigureGitRepositories: ${o}`),this.addInitLog("error",`Failed to configure git repositories: ${o}`,{step:"configure-git-repos",error:String(o)}),o}finally{await s()}}async step3ConfigureGitUser(t,r){this.debug&&console.log("[DEBUG] Configuring git user"),this.addInitLog("log","Configuring git user",{step:"configure-git-user"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");for(let i of r){let s=rr.join(n,i.path);this.addInitLog("log",`Setting git user for ${i.repoName}`,{step:"configure-git-user"});try{await this.git(["config","user.email","builder-bot@builder.io"],s),await this.git(["config","user.name","Builder.io"],s)}catch(o){let a=`Failed to configure git user for ${i.repoName}: ${o}`;throw this.addInitLog("error",a,{step:"configure-git-user",error:a}),new Error(a)}}}async step4StashChanges(t,r){this.debug&&console.log("[DEBUG] Stashing changes"),this.addInitLog("log","Stashing changes",{step:"stash-changes"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");for(let i of r){if(!i.enableGit)continue;let s=rr.join(n,i.path);try{this.addInitLog("log",`Stashing changes for ${i.repoName}`,{step:"stash-changes"}),await this.git(["stash","--include-untracked"],s),this.addInitLog("log",`Successfully stashed changes for ${i.repoName}`,{step:"stash-changes"})}catch(o){this.debug&&console.log(`[DEBUG] Stash failed for ${i.repoName} (likely no changes)`),this.addInitLog("log",`No changes to stash for ${i.repoName}`,{step:"stash-changes"}),t.sys.Sentry?.captureException(o,{tags:{operation:"init",...t.sentryTags}})}}}async step5CollectRepoInfo(t,r){this.debug&&console.log("[DEBUG] Collecting repo info"),this.addInitLog("log","Collecting repo info",{step:"collect-repo-info"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");this.initState.repos=[];for(let i of r){let s=rr.join(n,i.path);try{let o=await this.git(["rev-parse","HEAD"],s),a=await this.git(["branch","--show-current"],s);this.initState.repos.push({repoName:i.repoName,enabledGit:!!i.enableGit,lastCommitHash:o.trim(),branch:a.trim()})}catch(o){t.sys.Sentry?.captureException(o,{tags:{operation:"init",...t.sentryTags}})}}}async isGitConfigured(t){try{return await this.git(["rev-parse","--is-inside-work-tree"],t),!0}catch{return!1}}async getGitRemoteUrl(t){try{return(await this.git(["config","--get","remote.origin.url"],t)).trim()}catch{return null}}sanitizeGitRemoteUrl(t){return t.replace(/https:\/\/[^@]+@/,"https://")}async cleanupLockFiles(t,r,n){let i=rr.join(t,".git");try{let o=(await Mn.readdir(i)).filter(c=>c.endsWith(".lock"));if(o.length===0)return;let a=[];for(let c of o){let u=rr.join(i,c);try{await Mn.unlink(u),a.push(c)}catch(l){n.sys.Sentry?.captureException(new Error(`Failed to remove ${c} for ${r}: ${l}`),{tags:{operation:"init",...n.sentryTags}})}}a.length>0&&n.sys.Sentry?.captureMessage(`Lock files found for ${r} and removed: ${a.join(", ")}`,{tags:{operation:"init",...n.sentryTags}})}catch(s){n.sys.Sentry?.captureException(new Error(`Failed to cleanup lock files for ${r}: ${s}`),{tags:{operation:"init",...n.sentryTags}})}}async validateGitRepo(t){try{await this.git(["fsck","--connectivity-only"],t)}catch(r){throw new Error("Git repo is in bad state",{cause:r})}}async restoreFromPartialBackup({repo:t,repoPath:r,backupResult:n}){try{this.addInitLog("log",`Checking for git backup for ${t.repoName}`,{step:"apply-partial-backup"});let i=async()=>{try{await this.git(["remote","remove","backup"],r)}catch(s){this.addInitLog("error",`Failed to cleanup restore: ${s}`,{step:"apply-partial-backup",error:String(s)})}};if(!n.bundlePath){try{this.addInitLog("log",`Found empty git backup, applying it to ${t.repoName}`,{step:"apply-partial-backup"}),await this.checkout(n.gitBranchName,n.lastCommitHash,r)}catch(s){throw this.addInitLog("error",`Failed to checkout backup branch: ${s}`,{step:"apply-partial-backup",error:String(s)}),s}return}try{this.addInitLog("log",`Found git backup, applying it to ${t.repoName}`,{step:"apply-partial-backup"}),await this.git(["remote","add","backup",n.bundlePath],r),await this.git(["fetch","backup"],r);let s=n.gitBranchName;await this.checkout(s,`backup/${s}`,r),this.addInitLog("log",`Successfully restored from backup to branch ${s}`,{step:"apply-partial-backup"}),await i(),this.addInitLog("log",`Cleaned up backup for ${t.repoName}`,{step:"apply-partial-backup"})}catch(s){throw await i(),this.addInitLog("error",String(s),{step:"apply-partial-backup",error:String(s)}),s}}catch(i){let s=new Error(`Failed to check git backup for ${t.repoName}. Cannot proceed without backup recovery.`,{cause:i});throw this.addInitLog("error",s.message,{step:"apply-partial-backup",error:String(i)}),s}}async cloneRepository({repo:t,repoPath:r,backupResult:n,config:i}){let s=[t.branchName??"main",null,"main","master"];if(n&&n.success&&!n.partial){if(!n.bundlePath)throw new Error("Full backups must have a bundle path");this.addInitLog("log",`Downloaded full git backup, cloning it to ${r}`,{step:"clone-repo"});try{await this.git(["clone",n.bundlePath,r]);for(let c of s)if(c)try{await this.git(["checkout",c],r)}catch{continue}await this.checkout(n.gitBranchName,n.lastCommitHash,r);let o=(await this.git(["branch","--show-current"],r)).trim(),a=(await this.git(["rev-parse","HEAD"],r)).trim();if(o!==n.gitBranchName)throw new Error(`Backup branch ${n.gitBranchName} does not match local branch ${o}`);if(a!==n.lastCommitHash)throw new Error(`Backup commit hash ${n.lastCommitHash} does not match local commit hash ${a}`);return!0}catch(o){throw this.addInitLog("error",`Failed to clone git backup for ${t.repoName}: ${o}`,{step:"clone-repo",error:String(o)}),o}}for(let o of s)try{if(bs.existsSync("/template")&&t.repoName===XD)return this.addInitLog("log",`Starting copy of template to ${r}`,{step:"clone-repo"}),this.debug&&console.log("[DEBUG] Copying from template instead of cloning"),await this.execAsync("rm",["-rf",r],"/"),await this.execAsync("cp",["-a","/template",r],"/"),this.addInitLog("log",`Copied from template for ${t.repoName}`,{step:"clone-repo"}),!0;{let a=["clone"];return o&&a.push("-b",o),a.push(t.repoUrl,r),this.debug&&console.log(`[DEBUG] Cloning with branch: ${o||"default"}`),await this.git(a),JD.includes(t.repoName)&&(await bs.rmSync(rr.join(r,".git"),{recursive:!0,force:!0}),await this.git(["init"],r),await this.git(["add","."],r),await this.git(["branch","-M","main"],r),await this.git(["commit","-m","Initial setup"],r),this.addInitLog("log",`Cleared git history for ${t.repoName}`,{step:"clone-repo"})),!0}}catch(a){this.debug&&console.log(`[DEBUG] Clone failed for branch ${o||"default"}: ${a}`),this.addInitLog("error",`Clone failed for branch ${o||"default"}: ${a}`,{step:"clone-repo",error:String(a)});continue}return!1}};f();var k7=q(require("@sentry/node"),1),N7=q(require("@amplitude/analytics-node"),1),Cg=async()=>{await Promise.allSettled([k7.flush(),N7.flush().promise]),process.exit(0)};function R7(){process.on("SIGINT",Cg),process.on("SIGTERM",Cg)}function O7(){process.removeListener("SIGINT",Cg),process.removeListener("SIGTERM",Cg)}f();var po=q(require("os"),1);function B7(e,t,r,n){let i=null,s=async()=>{try{let o=new URL(`${Fe}/projects/machine-status`);t.builderPublicKey&&o.searchParams.set("apiKey",t.builderPublicKey),t.userId&&o.searchParams.set("userId",t.userId);let a=XO(),c;a&&r.machine?c={...r.machine,environment:"remote"}:a||(c={cpus:po.cpus().length,memory:Math.round(po.totalmem()/(1024*1024*1024)),platform:po.platform(),arch:po.arch(),environment:"local"});let u={status:"ok",state:n.state,setupState:n.setupState,devState:n.devState,editorReady:n.editorReady,httpServerState:n.httpServerState,initState:n.initState,errorMessage:n.errorMessage,devToolsVersion:n.devToolsVersion,idleTime:performance.now()-n.lastRequestTime,upTime:performance.now()-n.startTime,machine:c,projectId:r.projectId},l={"Content-Type":"application/json"};t.builderPrivateKey&&(l.Authorization=`Bearer ${t.builderPrivateKey}`),await he(o,{method:"POST",body:JSON.stringify(u),headers:l,keepalive:!0})}catch(o){e.Sentry?.captureException(new Error("Failed to ping fusion status",{cause:o}))}};return{start:()=>{if(i)return;s();let o=60*1e3;i=setInterval(s,o)},stop:()=>{i&&(clearInterval(i),i=null)}}}f();var xs=require("fs"),M7=require("fs/promises");f();async function L7(e,t,r){try{let n=new URL(`${Fe}/projects/metrics`);t.builderPublicKey&&n.searchParams.set("apiKey",t.builderPublicKey),t.userId&&n.searchParams.set("userId",t.userId);let i={"Content-Type":"application/json"};t.builderPrivateKey&&(i.Authorization=`Bearer ${t.builderPrivateKey}`),await he(n,{method:"POST",body:JSON.stringify(r),headers:i,keepalive:!0})}catch(n){e.Sentry?.captureException(new Error("Failed to push metrics",{cause:n}))}}var Eg="/app-backup-test",Hw="/app/.mark",Kw={operation:"dry-run-backup-git",dryRunBackupGit:"true"},$7=async(e,t)=>{let r=await gbe(e,t);return r&&(r.success?B.success("\u2705 Dry run backup git succeeded"):(B.error(`\u274C Dry run backup git failed: ${r.error}`),e.sys.Sentry?.captureException(new Error(`Attempted dry run backup failed: ${r.error}`),{tags:Kw})),L7(e.sys,e.credentials,{counters:[{key:"projects_backup_dry_run_ended",value:1,attributes:{outcome:r.success?"success":r.error??"unknown",version:Ce}}]}),r)},gbe=async({sys:e,fusionConfig:t,credentials:r},n)=>{function i(s){let o=t.workspace?.folders.find(u=>u.backupMetadata)?.backupMetadata?.check,a=n.repos.find(u=>u.enabledGit),c=s.initState.repos.find(u=>u.enabledGit);return JSON.stringify({backupCheck:o,mainRepo:a,backupMainRepo:c},null,2)}try{let s=process.env.FLY_MACHINE_ID??"unknown";if((0,xs.existsSync)(Hw)&&(0,xs.readFileSync)(Hw,"utf8")===s)return null;if((0,xs.writeFileSync)(Hw,s),B.info("Attempting dry run backup git"),n.currentStep!=="init-success")return{success:!1,error:"main-init-failed"};(0,xs.existsSync)(Eg)&&await(0,M7.rm)(Eg,{recursive:!0,force:!0}),await(0,xs.mkdirSync)(Eg,{recursive:!0});let o=new yu({sys:e,fusionConfig:{...t,_attemptDryRunBackupGit:!1,workingDirectory:Eg},debug:!0,credentials:r,sentryTags:Kw}),a=await o.init(),c=i(o);if(!a)return console.error(`\u274C Backup failed: ${o.initState.currentStep}
|
|
3900
|
+
`;f();var bs=q(require("fs"),1),Mn=q(require("fs/promises"),1),rr=q(require("path"),1);var yu=class{logIdCounter=0;initStatusLogs=[];sys;config;debug=!0;initState={isRunning:!1,isComplete:!1,success:!1,currentStep:"initial",error:void 0,repos:[]};constructor(t){this.sys=t.sys,this.config=t,this.debug=t.debug??!0}async checkout(t,r,n){try{await this.git(["checkout",t],n)}catch{return await this.git(["checkout","-b",t,r],n),!0}return await this.git(["reset","--hard",r],n),!1}async execAsync(t,r,n){return Js(r,{exec:t,cwd:n,debug:this.debug,sys:this.sys})}async git(t,r){return Js(t,{cwd:r,debug:this.debug,sys:this.sys})}async init(){let t=this.config;this.clearInitLogs(),this.initState.isRunning=!0,this.initState.isComplete=!1;let r=(t.fusionConfig.workspace?.folders??[]).filter(n=>n.branchName&&n.repoUrl&&n.name&&n.path&&n.repoName);this.debug&&console.log(`[DEBUG] Starting initialization with ${r.length} repositories`),this.addInitLog("log",`Starting initialization with ${r.length} repositories`,{step:"init"});try{if(!r.length){let n="At least one repository must be configured";throw new Error(n)}if(!t.sys){let n="DevToolsSys is required in config";throw this.addInitLog("error",n,{step:"validation",error:n}),new Error(n)}return await this.step1CheckDirectories(t,r),this.addInitLog("log","Directories checked",{step:"check-directories"}),await this.step2ConfigureGitRepositories(t,r),this.addInitLog("log","Git repositories configured",{step:"configure-git-repos"}),await this.step3ConfigureGitUser(t,r),this.addInitLog("log","Git user configured",{step:"configure-git-user"}),await this.step4StashChanges(t,r),this.addInitLog("log","Initialization completed successfully",{step:"stash-changes"}),await this.step5CollectRepoInfo(t,r),this.addInitLog("log","Repo info collected",{step:"collect-repo-info"}),this.debug&&console.log("[DEBUG] Initialization completed successfully"),this.addInitLog("complete","Initialization completed successfully",{step:"init-success",success:!0}),!0}catch(n){let i=n instanceof Error?n.message:String(n);this.debug&&console.error(`[DEBUG] Initialization failed with error: ${i}`);let s=this.initStatusLogs.some(o=>o.type==="error"&&o.step&&o.step!=="init-failed");return this.addInitLog("complete",`Initialization failed with error: ${i}`,{step:s?void 0:"init-failed",success:!1,error:i}),t.sys.Sentry?.captureException(n,{tags:{operation:"init",...t.sentryTags}}),!1}}addInitLog(t,r,n){let i={id:++this.logIdCounter,timestamp:new Date().toISOString(),type:t,message:r,...n};this.debug&&console.log(`[DEBUG] ${i.timestamp} ${i.type} ${i.message}`),this.initStatusLogs.push(i),this.initStatusLogs.length>1e3&&this.initStatusLogs.splice(0,this.initStatusLogs.length-1e3),n?.step&&(this.initState.currentStep=n.step),t==="complete"&&(this.initState.isComplete=!0,this.initState.isRunning=!1,this.initState.success=n?.success??!1,this.initState.error=n?.error),t==="error"&&n?.error&&(this.initState.error=n.error)}clearInitLogs(){this.initStatusLogs.length=0,this.logIdCounter=0,this.initState.isRunning=!1,this.initState.isComplete=!1,this.initState.success=!1,this.initState.currentStep="initial",this.initState.error=void 0}async hasFilesButNoGit(t){if(bs.existsSync(t))try{let n=(await Mn.readdir(t)).length>0,i=bs.existsSync(rr.join(t,".git"));return n&&!i}catch{return!1}return!1}async step1CheckDirectories(t,r){this.debug&&console.log("[DEBUG] Checking directories"),this.addInitLog("log","Checking directories",{step:"check-directories"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");if(!bs.existsSync(n)){let i=`Volume directory ${n} does not exist`;throw this.addInitLog("error",i,{step:"check-directories",error:i}),new Error(i)}this.addInitLog("log",`Volume directory exists: ${n}`,{step:"check-directories"});for(let i of r){let s=rr.join(n,i.path);if(bs.existsSync(s))this.addInitLog("log",`Directory already exists: ${s}`,{step:"check-directories"});else{this.debug&&console.log(`[DEBUG] Creating directory: ${s}`),this.addInitLog("log",`Creating directory: ${s}`,{step:"create-directories"});try{await Mn.mkdir(s,{recursive:!0})}catch(o){let a=`Failed to create directory for ${i.repoName} at ${s}: ${o}`;throw this.addInitLog("error",a,{step:"create-directories",error:a}),new Error(a,{cause:o})}}}}async step2ConfigureGitRepositories(t,r){this.addInitLog("log","Configuring git repositories",{step:"configure-git-repos"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??"."),i=rr.join(n,"/temp-cloning"),s=async()=>{bs.existsSync(i)&&(this.addInitLog("log",`Removing temp cloning directory: ${i}`,{step:"configure-git-repos"}),await Mn.rm(i,{recursive:!0,force:!0}))};await s(),this.addInitLog("log",`Creating temp cloning path: ${i}`,{step:"configure-git-repos"}),await Mn.mkdir(i,{recursive:!0});try{for(let o of r){let a=rr.join(n,o.path);if(this.addInitLog("log",`Processing repository: ${o.repoName}`,{step:"configure-git-repos"}),await this.isGitConfigured(a)){await this.cleanupLockFiles(a,o.repoName,t);try{o.enableGit?(this.addInitLog("log",`Git already configured for ${o.repoName}, validating repo`,{step:"check-existing-git"}),await this.validateGitRepo(a)):this.addInitLog("log",`Git already configured for ${o.repoName}, skipping validation because it's not main repo`,{step:"check-existing-git"})}catch(l){let p=`Failed to validate git repo for ${o.repoName}: ${l}`;throw this.addInitLog("error",p,{step:"check-existing-git",error:p}),l}this.addInitLog("log","Git repo is in good state, checking remote URL",{step:"check-existing-git"});let u=await this.getGitRemoteUrl(a);if(u){let l=this.sanitizeGitRemoteUrl(u),p=this.sanitizeGitRemoteUrl(o.repoUrl);if(l!==p){this.addInitLog("log",`Updating remote URL for ${o.repoName}`,{step:"update-remote-url"});try{await this.git(["remote","set-url","origin",o.repoUrl],a)}catch(d){let h=`Failed to update git remote URL for ${o.repoName}: ${d}`;throw this.addInitLog("error",h,{step:"update-remote-url",error:h}),new Error(h)}}}else{this.addInitLog("log",`Adding remote origin for ${o.repoName}`,{step:"check-existing-git"});try{await this.git(["remote","add","origin",o.repoUrl],a)}catch(l){let p=`Failed to add git remote origin for ${o.repoName}: ${l}`;throw this.addInitLog("error",p,{step:"check-existing-git",error:p}),new Error(p)}}}else{if(await this.hasFilesButNoGit(a)){let h="Code directory already exists but is not a git repo";throw this.addInitLog("error",h,{step:"check-existing-git",error:h}),new Error(h)}this.addInitLog("log",`Cloning repository: ${o.repoName}`,{step:"clone-repo"});let l=o.backupMetadata?await E8(t.sys,o.backupMetadata):void 0;if(l&&!l.success)throw this.addInitLog("error",`Failed to download backup for ${o.repoName}: ${l.error}`,{step:"clone-repo",error:l.error.message}),l.error;let p=rr.join(i,o.path);if(await this.cloneRepository({repo:o,repoPath:p,backupResult:l,config:t}))this.addInitLog("log",`Successfully cloned ${o.repoName}`,{step:"clone-repo"});else{let h=`Failed to clone repository ${o.repoName}`;throw this.addInitLog("error",h,{step:"clone-repo",error:h}),new Error(h)}if(l&&l.success&&l.partial)try{await this.restoreFromPartialBackup({repo:o,repoPath:p,backupResult:l})}catch(h){throw h}await Mn.rename(p,a)}}}catch(o){throw console.log(`[DEBUG] Error in step2ConfigureGitRepositories: ${o}`),this.addInitLog("error",`Failed to configure git repositories: ${o}`,{step:"configure-git-repos",error:String(o)}),o}finally{await s()}}async step3ConfigureGitUser(t,r){this.debug&&console.log("[DEBUG] Configuring git user"),this.addInitLog("log","Configuring git user",{step:"configure-git-user"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");for(let i of r){let s=rr.join(n,i.path);this.addInitLog("log",`Setting git user for ${i.repoName}`,{step:"configure-git-user"});try{await this.git(["config","user.email","builder-bot@builder.io"],s),await this.git(["config","user.name","Builder.io"],s)}catch(o){let a=`Failed to configure git user for ${i.repoName}: ${o}`;throw this.addInitLog("error",a,{step:"configure-git-user",error:a}),new Error(a)}}}async step4StashChanges(t,r){this.debug&&console.log("[DEBUG] Stashing changes"),this.addInitLog("log","Stashing changes",{step:"stash-changes"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");for(let i of r){if(!i.enableGit)continue;let s=rr.join(n,i.path);try{this.addInitLog("log",`Stashing changes for ${i.repoName}`,{step:"stash-changes"}),await this.git(["stash","--include-untracked"],s),this.addInitLog("log",`Successfully stashed changes for ${i.repoName}`,{step:"stash-changes"})}catch(o){this.debug&&console.log(`[DEBUG] Stash failed for ${i.repoName} (likely no changes)`),this.addInitLog("log",`No changes to stash for ${i.repoName}`,{step:"stash-changes"}),t.sys.Sentry?.captureException(o,{tags:{operation:"init",...t.sentryTags}})}}}async step5CollectRepoInfo(t,r){this.debug&&console.log("[DEBUG] Collecting repo info"),this.addInitLog("log","Collecting repo info",{step:"collect-repo-info"});let n=rr.resolve(process.cwd(),t.fusionConfig.workingDirectory??".");this.initState.repos=[];for(let i of r){let s=rr.join(n,i.path);try{let o=await this.git(["rev-parse","HEAD"],s),a=await this.git(["branch","--show-current"],s);this.initState.repos.push({repoName:i.repoName,enabledGit:!!i.enableGit,lastCommitHash:o.trim(),branch:a.trim()})}catch(o){t.sys.Sentry?.captureException(o,{tags:{operation:"init",...t.sentryTags}})}}}async isGitConfigured(t){try{return await this.git(["rev-parse","--is-inside-work-tree"],t),!0}catch{return!1}}async getGitRemoteUrl(t){try{return(await this.git(["config","--get","remote.origin.url"],t)).trim()}catch{return null}}sanitizeGitRemoteUrl(t){return t.replace(/https:\/\/[^@]+@/,"https://")}async cleanupLockFiles(t,r,n){let i=rr.join(t,".git");try{let o=(await Mn.readdir(i)).filter(c=>c.endsWith(".lock"));if(o.length===0)return;let a=[];for(let c of o){let u=rr.join(i,c);try{await Mn.unlink(u),a.push(c)}catch(l){n.sys.Sentry?.captureException(new Error(`Failed to remove ${c} for ${r}: ${l}`),{tags:{operation:"init",...n.sentryTags}})}}a.length>0&&n.sys.Sentry?.captureMessage(`Lock files found for ${r} and removed: ${a.join(", ")}`,{tags:{operation:"init",...n.sentryTags}})}catch(s){n.sys.Sentry?.captureException(new Error(`Failed to cleanup lock files for ${r}: ${s}`),{tags:{operation:"init",...n.sentryTags}})}}async validateGitRepo(t){try{await this.git(["fsck","--connectivity-only"],t)}catch(r){throw new Error("Git repo is in bad state",{cause:r})}}async restoreFromPartialBackup({repo:t,repoPath:r,backupResult:n}){try{this.addInitLog("log",`Checking for git backup for ${t.repoName}`,{step:"apply-partial-backup"});let i=async()=>{try{await this.git(["remote","remove","backup"],r)}catch(s){this.addInitLog("error",`Failed to cleanup restore: ${s}`,{step:"apply-partial-backup",error:String(s)})}};if(!n.bundlePath){try{this.addInitLog("log",`Found empty git backup, applying it to ${t.repoName}`,{step:"apply-partial-backup"}),await this.checkout(n.gitBranchName,n.lastCommitHash,r)}catch(s){throw this.addInitLog("error",`Failed to checkout backup branch: ${s}`,{step:"apply-partial-backup",error:String(s)}),s}return}try{this.addInitLog("log",`Found git backup, applying it to ${t.repoName}`,{step:"apply-partial-backup"}),await this.git(["remote","add","backup",n.bundlePath],r),await this.git(["fetch","backup"],r);let s=n.gitBranchName;await this.checkout(s,`backup/${s}`,r),this.addInitLog("log",`Successfully restored from backup to branch ${s}`,{step:"apply-partial-backup"}),await i(),this.addInitLog("log",`Cleaned up backup for ${t.repoName}`,{step:"apply-partial-backup"})}catch(s){throw await i(),this.addInitLog("error",String(s),{step:"apply-partial-backup",error:String(s)}),s}}catch(i){let s=new Error(`Failed to check git backup for ${t.repoName}. Cannot proceed without backup recovery.`,{cause:i});throw this.addInitLog("error",s.message,{step:"apply-partial-backup",error:String(i)}),s}}async cloneRepository({repo:t,repoPath:r,backupResult:n,config:i}){let s=[t.branchName??"main",null,"main","master"];if(n&&n.success&&!n.partial){if(!n.bundlePath)throw new Error("Full backups must have a bundle path");this.addInitLog("log",`Downloaded full git backup, cloning it to ${r}`,{step:"clone-repo"});try{await this.git(["clone",n.bundlePath,r]);for(let c of s)if(c)try{await this.git(["checkout",c],r)}catch{continue}await this.checkout(n.gitBranchName,n.lastCommitHash,r);let o=(await this.git(["branch","--show-current"],r)).trim(),a=(await this.git(["rev-parse","HEAD"],r)).trim();if(o!==n.gitBranchName)throw new Error(`Backup branch ${n.gitBranchName} does not match local branch ${o}`);if(a!==n.lastCommitHash)throw new Error(`Backup commit hash ${n.lastCommitHash} does not match local commit hash ${a}`);return!0}catch(o){throw this.addInitLog("error",`Failed to clone git backup for ${t.repoName}: ${o}`,{step:"clone-repo",error:String(o)}),o}}for(let o of s)try{if(bs.existsSync("/template")&&t.repoName===XD)return this.addInitLog("log",`Starting copy of template to ${r}`,{step:"clone-repo"}),this.debug&&console.log("[DEBUG] Copying from template instead of cloning"),await this.execAsync("rm",["-rf",r],"/"),await this.execAsync("cp",["-a","/template",r],"/"),this.addInitLog("log",`Copied from template for ${t.repoName}`,{step:"clone-repo"}),!0;{let a=["clone"];return o&&a.push("-b",o),a.push(t.repoUrl,r),this.debug&&console.log(`[DEBUG] Cloning with branch: ${o||"default"}`),await this.git(a),JD.includes(t.repoName)&&(await bs.rmSync(rr.join(r,".git"),{recursive:!0,force:!0}),await this.git(["init"],r),await this.git(["add","."],r),await this.git(["branch","-M","main"],r),await this.git(["commit","-m","Initial setup"],r),this.addInitLog("log",`Cleared git history for ${t.repoName}`,{step:"clone-repo"})),!0}}catch(a){this.debug&&console.log(`[DEBUG] Clone failed for branch ${o||"default"}: ${a}`),this.addInitLog("error",`Clone failed for branch ${o||"default"}: ${a}`,{step:"clone-repo",error:String(a)});continue}return!1}};f();var k7=q(require("@sentry/node"),1),N7=q(require("@amplitude/analytics-node"),1),Cg=async()=>{await Promise.allSettled([k7.flush(),N7.flush().promise]),process.exit(0)};function R7(){process.on("SIGINT",Cg),process.on("SIGTERM",Cg)}function O7(){process.removeListener("SIGINT",Cg),process.removeListener("SIGTERM",Cg)}f();var po=q(require("os"),1);function B7(e,t,r,n){let i=null,s=async()=>{try{let o=new URL(`${Fe}/projects/machine-status`);t.builderPublicKey&&o.searchParams.set("apiKey",t.builderPublicKey),t.userId&&o.searchParams.set("userId",t.userId);let a=XO(),c;a&&r.machine?c={...r.machine,environment:"remote"}:a||(c={cpus:po.cpus().length,memory:Math.round(po.totalmem()/(1024*1024*1024)),platform:po.platform(),arch:po.arch(),environment:"local"});let u={status:"ok",state:n.state,setupState:n.setupState,devState:n.devState,editorReady:n.editorReady,httpServerState:n.httpServerState,initState:n.initState,errorMessage:n.errorMessage,devToolsVersion:n.devToolsVersion,idleTime:performance.now()-n.lastRequestTime,upTime:performance.now()-n.startTime,machine:c,projectId:r.projectId},l={"Content-Type":"application/json"};t.builderPrivateKey&&(l.Authorization=`Bearer ${t.builderPrivateKey}`),await he(o,{method:"POST",body:JSON.stringify(u),headers:l,keepalive:!0})}catch(o){e.Sentry?.captureException(new Error("Failed to ping fusion status",{cause:o}),{level:"warning"})}};return{start:()=>{if(i)return;s();let o=60*1e3;i=setInterval(s,o)},stop:()=>{i&&(clearInterval(i),i=null)}}}f();var xs=require("fs"),M7=require("fs/promises");f();async function L7(e,t,r){try{let n=new URL(`${Fe}/projects/metrics`);t.builderPublicKey&&n.searchParams.set("apiKey",t.builderPublicKey),t.userId&&n.searchParams.set("userId",t.userId);let i={"Content-Type":"application/json"};t.builderPrivateKey&&(i.Authorization=`Bearer ${t.builderPrivateKey}`),await he(n,{method:"POST",body:JSON.stringify(r),headers:i,keepalive:!0})}catch(n){e.Sentry?.captureException(new Error("Failed to push metrics",{cause:n}))}}var Eg="/app-backup-test",Hw="/app/.mark",Kw={operation:"dry-run-backup-git",dryRunBackupGit:"true"},$7=async(e,t)=>{let r=await gbe(e,t);return r&&(r.success?B.success("\u2705 Dry run backup git succeeded"):(B.error(`\u274C Dry run backup git failed: ${r.error}`),e.sys.Sentry?.captureException(new Error(`Attempted dry run backup failed: ${r.error}`),{tags:Kw})),L7(e.sys,e.credentials,{counters:[{key:"projects_backup_dry_run_ended",value:1,attributes:{outcome:r.success?"success":r.error??"unknown",version:Ce}}]}),r)},gbe=async({sys:e,fusionConfig:t,credentials:r},n)=>{function i(s){let o=t.workspace?.folders.find(u=>u.backupMetadata)?.backupMetadata?.check,a=n.repos.find(u=>u.enabledGit),c=s.initState.repos.find(u=>u.enabledGit);return JSON.stringify({backupCheck:o,mainRepo:a,backupMainRepo:c},null,2)}try{let s=process.env.FLY_MACHINE_ID??"unknown";if((0,xs.existsSync)(Hw)&&(0,xs.readFileSync)(Hw,"utf8")===s)return null;if((0,xs.writeFileSync)(Hw,s),B.info("Attempting dry run backup git"),n.currentStep!=="init-success")return{success:!1,error:"main-init-failed"};(0,xs.existsSync)(Eg)&&await(0,M7.rm)(Eg,{recursive:!0,force:!0}),await(0,xs.mkdirSync)(Eg,{recursive:!0});let o=new yu({sys:e,fusionConfig:{...t,_attemptDryRunBackupGit:!1,workingDirectory:Eg},debug:!0,credentials:r,sentryTags:Kw}),a=await o.init(),c=i(o);if(!a)return console.error(`\u274C Backup failed: ${o.initState.currentStep}
|
|
3901
3901
|
${c}`),{success:!1,error:`backup-failed:${o.initState.currentStep}`};let u=o.initState.repos.find(d=>d.enabledGit);if(!u)return console.error(`\u274C Backup repo not found
|
|
3902
3902
|
${c}`),{success:!1,error:"backup-repo-not-found"};let l=n.repos.find(d=>d.enabledGit);if(!l)return console.error(`\u274C Main repo not found
|
|
3903
3903
|
${c}`),{success:!1,error:"main-repo-not-found"};if(u.branch!==l.branch)return console.error(`\u274C Backup branch mismatch: ${u.branch} !== ${l.branch}
|
|
@@ -3910,7 +3910,7 @@ ${c}`),{success:!1,error:"backup-commit-hash-mismatch-in-metadata"}}return u.las
|
|
|
3910
3910
|
|
|
3911
3911
|
`),v.end()):v.status(500).json({error:x})}}),u.get("/get-zip",async(b,v)=>{try{let x=await(await Sg(e,t,n,a,"quality-v3",void 0,c)).archiveProject();v.setHeader("Content-Type","application/zip"),v.setHeader("Content-Disposition",`attachment; filename="${e.basename(x)}"`),v.download(x,D=>{D&&e.Sentry?.captureException(D),e.unlink(x).catch(E=>{e.Sentry?.captureException(E)})})}catch(C){e.Sentry?.captureException(C),v.status(500).json({error:"Failed to create project archive",details:C instanceof Error?C.message:String(C)})}}),u.post("/shutdown",async(b,v)=>{try{let C=await H7("api-request",!!n.autoShutdown);C?.success?v.json(C):v.status(500).json(C)}catch(C){e.Sentry?.captureException(C),v.status(500).json({success:!1,error:"Failed to shutdown",details:C instanceof Error?C.message:String(C)})}});let l=n.serverUrl?Km(n.serverUrl,e):void 0,p=a?(b,v,C)=>{let x=a.proxyMiddleware;x?x(b,v,C):v.status(500).json({error:"PROJECT NOT SET UP"})}:l;p&&i.use("/",p),i.use(Hm,td.default.json(),td.default.urlencoded({extended:!0}),u);let d=_7({noServer:!0});s.on("upgrade",function(v,C,x){let{pathname:D}=new URL(v.url??"/","wss://base.url"),S=(a?.proxyMiddleware??l)?.upgrade;if(D===Fc+"/ws"){let P=v.headers["sec-websocket-protocol"];if(!n.isLocal&&(!P||P!==t.builderPrivateKey)){e.Sentry?.captureException(new Error("Unauthorized WebSocket connection attempt"),{extra:{headerExists:!!v.headers["sec-websocket-protocol"]}}),C.write(`HTTP/1.1 401 Unauthorized\r
|
|
3912
3912
|
\r
|
|
3913
|
-
`),C.destroy();return}d.handleUpgrade(v,C,x,function(A){A.emit("connection",A,v)})}else S?S(v,C,x):C.destroy()}),Ebe({ws:d,app:i,sys:e,credentials:t,fusionConfig:n,devServer:a,sharedState:c}),c.state="ready";let h=r.app?"builder://":r.dev?"http://localhost:1234":"https://builder.io",m=new URL(`${h}/app/projects/local`);m.searchParams.set("localEditUrl",o);let g=await e.getDeviceId();if(g&&m.searchParams.set("host",g),t.builderPublicKey&&m.searchParams.set("spaceId",t.builderPublicKey),r.jsonOutput){let b={type:"server_ready",data:{proxyUrl:o,fusionEditorUrl:m.href,urlHost:h,command:n.devCommand,serverUrl:n.serverUrl,credentials:t}};console.log(JSON.stringify(b))}r.open===!1?n.isLocal&&console.log(`\u{1F517} Access Builder.io at: ${m.href}`):(B.info(`OPEN BROWSER: ${m.href}`),await Rc(m.href)),setTimeout(()=>{c.editorReady=!0},100)}catch(u){c.state="error",c.isFinalState=!0,c.errorMessage=u instanceof Error?u.message:String(u),e.Sentry?.captureException(u,{level:"fatal"})}}function Ebe({ws:e,app:t,sys:r,fusionConfig:n,credentials:i,devServer:s,sharedState:o}){e.register("initializeSession",async c=>{let u,l,p;return typeof c[0]=="object"&&c[0]?{sessionId:u,customInstructions:l,codeGenMode:p}=c[0]:typeof c[0]=="string"&&(u=c[0]),(await Sg(r,i,n,s,p??"quality-v3",u,o,l)).getSessionId()}),e.register("connectToEventLoop",async(c,u)=>{let l=await ed();if(!l)throw new Error("Server not found");let p=e.clients().get(u);if(!p)throw new Error("Client not found");let d=l.getSessionId(),h=l.connectToEventLoop(!0,m=>{m&&!m.timestamp&&(m.timestamp=Date.now()),e.notify(`${d}/event`,u,[JSON.stringify(m)])});p.on("close",h)});function a(c){e.register(c,async([u,...l])=>{n.isLocal||console.log("WS request: ",c,JSON.stringify(l));let p=await ed();if(!p)throw new Error("Server not found");try{let d=p[c];if(typeof d!="function")throw new Error(`Method ${c} not found on codeGenServer`);return d.apply(p,l)}catch(d){throw r.Sentry?.captureException(d,{tags:{functionName:c},extra:{args:l}}),d}})}a("stopEventLoop"),a("abort"),a("abortToolCall"),a("abortSetupCommand"),a("clearSession"),a("loadHistory"),a("loadMoreTurns"),a("getAllFiles"),a("sendFeedback"),a("sendMessage"),a("configureDevOrchestrator"),a("restoreFromCompletionId"),a("restoreBeforeCompletionId"),a("restoreAll"),a("restoreHEAD"),a("undoLastUserMessage"),a("pushChanges"),a("pullLatestFromRemote"),a("syncChangesFromMain"),a("hasChangesRelativeToRemote"),a("pushRepoV2"),a("readFile"),a("writeFile"),a("deleteFile"),a("fileExists"),a("manualCommit"),a("uploadBackup"),a("getDiffFromRemote"),e.register("ping",()=>(o.lastRequestTime=performance.now(),{version:Ce,supports:["customInstructions","newChat","clearSession","appCustomInstructions"]})),e.register("getBuilderRules",async()=>{let c=await ed();if(!c){let u=r.resolve(r.getAppRootDir(),".builderrules");return await r.exists(u)?await r.readFile(u):null}try{return await c.readFile(".builderrules")}catch{return null}}),e.register("setBuilderRules",async c=>{let u=await ed(),l=c[1];if(!u){let p=r.resolve(r.getAppRootDir(),".builderrules");l?await r.writeFile(p,l):await r.exists(p)&&await r.unlink(p);return}l?await u.writeFile(".builderrules",l):await u.deleteFile(".builderrules")})}async function wbe(e,t,r,n,i,s,o,a){let c=new Pi({sys:e,credentials:t,position:"fusion",sessionOrCompletionId:r.sessionId??s,mode:i,maxTokens:8e4,mcpServers:!0,fusionConfig:r,builtInCustomInstructions:[{id:"debugging-errors",name:"debugging-errors",type:"agent-mode",description:"If the user is experiencing an error, or debugging is mentioned by the user.",content:I7},...a??[]],fusionContext:{devServerOrchestrator:n,git:!!r.projectId,gitAutoInit:!0}});return r.projectId&&c.setDebug(!0),await c.initializeSession(),o.state="active-session",o.isFinalState=!0,c}function ed(){return bu||Promise.resolve(void 0)}function Sg(e,t,r,n,i,s,o,a){return bu||(bu=wbe(e,t,r,n,i,s,o,a)),bu}function Sbe(e,t,r){if(t.isLocal)return()=>{};let s=24*(60*60*1e3),o=Date.now(),a=setInterval(()=>{let c=Date.now()-o,u=Math.floor(c/s);u>1&&e.Sentry?.captureException(new Error(`Rogue devtools detected: ${u} days`),{extra:{timeSinceStart:c},contexts:{flyIo:r,fusionConfig:{...t}}})},s*2);return()=>clearInterval(a)}var H7=async(e,t=!1)=>{B.info(`\u{1F504} Attempting graceful shutdown: ${e}`);let r=()=>{t&&process.kill(process.pid,"SIGTERM")},n=await ed();if(!n)return B.info("\u{1F51A} No active session, shutting down"),r(),{success:!0,message:"No active session, shutting down",skipped:!0,reason:"no_active_session"};if(!n.isIdle())return{success:!1,message:"Not idle, skipping backup",skipped:!0,reason:"not_idle"};if(!n.fusionConfig?.autoBackupGit)return B.info("Auto backup git is disabled, skipping backup"),r(),{success:!0,message:"Auto backup git is disabled, skipping backup",skipped:!0,reason:"auto_backup_git_disabled"};if(!await n.needsBackup())return B.info("\u2705 Already backed up after last request, shutting down"),r(),{success:!0,message:"Already backed up, shutting down",skipped:!0,reason:"already_backed_up"};B.info("\u{1F4E6} Attempting to backup before shutdown...");try{let o=await n.uploadBackup();return o.success&&(B.info("\u2705 Backup successful, shutting down"),r()),o}catch(o){let a=`Backup error: ${o instanceof Error?o.message:String(o)}`;return B.error(`\u274C ${a}`),{success:!1,message:a,error:o instanceof Error?o:new Error(String(o))}}};var fo=q(vt(),1);f();var vs=q(require("@sentry/node"),1),Ui=q(vt(),1);var ej=q(require("crypto"),1);f();var K7=`You are tasked with generating comprehensive documentation for a design system based on the provided components.
|
|
3913
|
+
`),C.destroy();return}d.handleUpgrade(v,C,x,function(A){A.emit("connection",A,v)})}else S?S(v,C,x):C.destroy()}),Ebe({ws:d,app:i,sys:e,credentials:t,fusionConfig:n,devServer:a,sharedState:c}),c.state="ready";let h=r.app?"builder://":r.dev?"http://localhost:1234":"https://builder.io",m=new URL(`${h}/app/projects/local`);m.searchParams.set("localEditUrl",o);let g=await e.getDeviceId();if(g&&m.searchParams.set("host",g),t.builderPublicKey&&m.searchParams.set("spaceId",t.builderPublicKey),r.jsonOutput){let b={type:"server_ready",data:{proxyUrl:o,fusionEditorUrl:m.href,urlHost:h,command:n.devCommand,serverUrl:n.serverUrl,credentials:t}};console.log(JSON.stringify(b))}r.open===!1?n.isLocal&&console.log(`\u{1F517} Access Builder.io at: ${m.href}`):(B.info(`OPEN BROWSER: ${m.href}`),await Rc(m.href)),setTimeout(()=>{c.editorReady=!0},100)}catch(u){c.state="error",c.isFinalState=!0,c.errorMessage=u instanceof Error?u.message:String(u),e.Sentry?.captureException(u,{level:"fatal"})}}function Ebe({ws:e,app:t,sys:r,fusionConfig:n,credentials:i,devServer:s,sharedState:o}){e.register("initializeSession",async c=>{let u,l,p;return typeof c[0]=="object"&&c[0]?{sessionId:u,customInstructions:l,codeGenMode:p}=c[0]:typeof c[0]=="string"&&(u=c[0]),(await Sg(r,i,n,s,p??"quality-v3",u,o,l)).getSessionId()}),e.register("connectToEventLoop",async(c,u)=>{let l=await ed();if(!l)throw new Error("Server not found");let p=e.clients().get(u);if(!p)throw new Error("Client not found");let d=l.getSessionId(),h=l.connectToEventLoop(!0,m=>{m&&!m.timestamp&&(m.timestamp=Date.now()),e.notify(`${d}/event`,u,[JSON.stringify(m)])});p.on("close",h)});function a(c){e.register(c,async([u,...l])=>{n.isLocal||console.log("WS request: ",c,JSON.stringify(l));let p=await ed();if(!p)throw new Error("Server not found");try{let d=p[c];if(typeof d!="function")throw new Error(`Method ${c} not found on codeGenServer`);return d.apply(p,l)}catch(d){throw r.Sentry?.captureException(d,{tags:{functionName:c},extra:{args:l}}),d}})}a("stopEventLoop"),a("abort"),a("abortToolCall"),a("abortSetupCommand"),a("clearSession"),a("loadHistory"),a("loadMoreTurns"),a("getAllFiles"),a("sendFeedback"),a("sendMessage"),a("configureDevOrchestrator"),a("restoreFromCompletionId"),a("restoreBeforeCompletionId"),a("restoreAll"),a("restoreHEAD"),a("undoLastUserMessage"),a("pushChanges"),a("pullLatestFromRemote"),a("syncChangesFromMain"),a("hasChangesRelativeToRemote"),a("pushRepoV2"),a("readFile"),a("writeFile"),a("deleteFile"),a("fileExists"),a("manualCommit"),a("uploadBackup"),a("getDiffFromRemote"),a("toolFullfilment"),e.register("ping",()=>(o.lastRequestTime=performance.now(),{version:Ce,supports:["customInstructions","newChat","clearSession","appCustomInstructions"]})),e.register("getBuilderRules",async()=>{let c=await ed();if(!c){let u=r.resolve(r.getAppRootDir(),".builderrules");return await r.exists(u)?await r.readFile(u):null}try{return await c.readFile(".builderrules")}catch{return null}}),e.register("setBuilderRules",async c=>{let u=await ed(),l=c[1];if(!u){let p=r.resolve(r.getAppRootDir(),".builderrules");l?await r.writeFile(p,l):await r.exists(p)&&await r.unlink(p);return}l?await u.writeFile(".builderrules",l):await u.deleteFile(".builderrules")})}async function wbe(e,t,r,n,i,s,o,a){let c=new Pi({sys:e,credentials:t,position:"fusion",sessionOrCompletionId:r.sessionId??s,mode:i,maxTokens:8e4,mcpServers:!0,fusionConfig:r,builtInCustomInstructions:[{id:"debugging-errors",name:"debugging-errors",type:"agent-mode",description:"If the user is experiencing an error, or debugging is mentioned by the user.",content:I7},...a??[]],fusionContext:{devServerOrchestrator:n,git:!!r.projectId,gitAutoInit:!0}});return r.projectId&&c.setDebug(!0),await c.initializeSession(),o.state="active-session",o.isFinalState=!0,c}function ed(){return bu||Promise.resolve(void 0)}function Sg(e,t,r,n,i,s,o,a){return bu||(bu=wbe(e,t,r,n,i,s,o,a)),bu}function Sbe(e,t,r){if(t.isLocal)return()=>{};let s=24*(60*60*1e3),o=Date.now(),a=setInterval(()=>{let c=Date.now()-o,u=Math.floor(c/s);u>1&&e.Sentry?.captureException(new Error(`Rogue devtools detected: ${u} days`),{extra:{timeSinceStart:c},contexts:{flyIo:r,fusionConfig:{...t}}})},s*2);return()=>clearInterval(a)}var H7=async(e,t=!1)=>{B.info(`\u{1F504} Attempting graceful shutdown: ${e}`);let r=()=>{t&&process.kill(process.pid,"SIGTERM")},n=await ed();if(!n)return B.info("\u{1F51A} No active session, shutting down"),r(),{success:!0,message:"No active session, shutting down",skipped:!0,reason:"no_active_session"};if(!n.isIdle())return{success:!1,message:"Not idle, skipping backup",skipped:!0,reason:"not_idle"};if(!n.fusionConfig?.autoBackupGit)return B.info("Auto backup git is disabled, skipping backup"),r(),{success:!0,message:"Auto backup git is disabled, skipping backup",skipped:!0,reason:"auto_backup_git_disabled"};if(!await n.needsBackup())return B.info("\u2705 Already backed up after last request, shutting down"),r(),{success:!0,message:"Already backed up, shutting down",skipped:!0,reason:"already_backed_up"};B.info("\u{1F4E6} Attempting to backup before shutdown...");try{let o=await n.uploadBackup();return o.success&&(B.info("\u2705 Backup successful, shutting down"),r()),o}catch(o){let a=`Backup error: ${o instanceof Error?o.message:String(o)}`;return B.error(`\u274C ${a}`),{success:!1,message:a,error:o instanceof Error?o:new Error(String(o))}}};var fo=q(vt(),1);f();var vs=q(require("@sentry/node"),1),Ui=q(vt(),1);var ej=q(require("crypto"),1);f();var K7=`You are tasked with generating comprehensive documentation for a design system based on the provided components.
|
|
3914
3914
|
|
|
3915
3915
|
---
|
|
3916
3916
|
|